branch: externals/embark commit 5ea4c18468c14059215a94df63d9918c8d62fe3c Author: ookami <m...@ookami.one> Commit: ookami <m...@ookami.one>
Prevent dired from reusing embark-export-dired buffer Assume you narrow files inside directory ~/.emacs.d, and export the completion candidates to embark, embark will create a dired buffer(using dired-noselect) to display them. The problem is, dired will reuse buffer whenever possible. If you go to ~/.emacs.d again later, the narrowed buffer will show up, instead of the full content under ~/.emacs.d... A quick work around is to unset dired-directory, then dired-find-buffer-nocreate won't reuse this buffer. --- embark.el | 1 + 1 file changed, 1 insertion(+) diff --git a/embark.el b/embark.el index 715dbf0183..560bae6a1e 100644 --- a/embark.el +++ b/embark.el @@ -3223,6 +3223,7 @@ PRED is a predicate function used to filter the items." (mapcar (lambda (file) (string-remove-prefix dir file)) files))))) (with-current-buffer buf + (setq-local dired-directory nil) (rename-buffer (format "*Embark Export Dired %s*" default-directory))) (pop-to-buffer buf)))