bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#44023: dired-allow-duplicate-buffers


From: Boruch Baum
Subject: bug#44023: dired-allow-duplicate-buffers
Date: Fri, 6 Nov 2020 05:01:19 -0500
User-agent: NeoMutt/20180716

On 2020-11-05 10:38, Stefan Monnier wrote:
> > 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).

The case you mention sounds like the converse: multiple directories in a
single buffer, versus what I'm addressing which is multiple buffers for
a single directory.

> > +(defcustom dired-allow-duplicate-buffers t
> 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?

I prefer the defcustom route because I like giving a user choices (it's
also more emacs-y). Less subjectively, adding an argument creates a mess
because the modified function is a generic internal function so the
argument would either need to be added to all its potential parents, or
diredc would need to advice or replace those parents (which just
replaces a single messy advice with several messy advices).

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0





reply via email to

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