emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/embark 5ea4c18468 1/2: Prevent dired from reusing embar


From: ELPA Syncer
Subject: [elpa] externals/embark 5ea4c18468 1/2: Prevent dired from reusing embark-export-dired buffer
Date: Fri, 27 Jan 2023 15:57:45 -0500 (EST)

branch: externals/embark
commit 5ea4c18468c14059215a94df63d9918c8d62fe3c
Author: ookami <mail@ookami.one>
Commit: ookami <mail@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)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]