Skip to content

[fix] don't replace dired with eaf-file-manager by default #1175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions eaf.el
Original file line number Diff line number Diff line change
Expand Up @@ -539,12 +539,18 @@ Turning on this option can quickly rebuild the buffer very conveniently, avoidin
Only turn off this option when you want investigate the cause of the crash."
:type 'boolean)

(defcustom eaf-dired-advisor-enable t
(defcustom eaf-dired-advisor-enable nil
"Toggle to enable/disable the EAF advisor in dired.

When enabled, EAF will use eaf-file-manager to open file from dired."
:type 'boolean)

(defcustom eaf-find-file-advisor-enable nil
"Toggle to enable/disable the EAF advisor for find-file.

When enabled, EAF will use eaf-file-manager to open files."
:type 'boolean)

(defvar eaf--monitor-configuration-p t
"When this variable is non-nil, `eaf-monitor-configuration-change' executes.
This variable is used to open buffer in backend and avoid graphics blink.
Expand Down Expand Up @@ -1979,8 +1985,9 @@ You can configure a blacklist using `eaf-find-file-ext-blacklist'"

It currently identifies PDF, videos, images, and mindmap file extensions."
(eaf--find-file orig-fn file nil args))
(advice-add #'find-file :around #'eaf--find-file-advisor)
(advice-add #'org-open-file :around #'eaf--find-file-advisor)
(when eaf-find-file-advisor-enable
(advice-add #'find-file :around #'eaf--find-file-advisor)
(advice-add #'org-open-file :around #'eaf--find-file-advisor))

;; Use `eaf-open' in `dired-find-file' and `dired-find-alternate-file'
(defun eaf--dired-find-file-advisor (orig-fn)
Expand Down