GNU bug report logs -
#44023
dired-allow-duplicate-buffers
Previous Next
Full log
View this message in rfc822 format
> In going through the existing dired code, it seems that some functions
> presume that multiple buffers can be visiting the same directory. See:
Because of the functionality of Dired (which allows visiting several
directories (and subdirectories)) in a single buffer, the code basically
"has to" handle that case, indeed (tho I'd be surprised if there aren't
improvements to be made in that regard).
> +(defcustom dired-allow-duplicate-buffers t
[...]
> - ;; Look for an existing buffer.
> - (buffer (dired-find-buffer-nocreate dirname mode))
> - ;; Note that buffer already is in dired-mode, if found.
> + (buffer (when (not (bound-and-true-p dired-allow-duplicate-buffers))
> + ;; Look for an existing buffer.
> + (dired-find-buffer-nocreate dirname mode)
> + ;; Note that buffer already is in dired-mode, if found.
> + ))
[ The ";; Note ..." comment seems to be misplaced. ]
I wonder if it's better to add a user-config variable or a new argument
to `dired-internal-noselect`?
E.g. I suspect that diredc wants/needs this feature, but it's not
diredc's job to set user options, so for diredc it would probably make
more sense to pass that as an argument.
WDYT?
Stefan
This bug report was last modified 4 years and 220 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.