emacs-devel
[Top][All Lists]
Advanced

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

Re: Name of buffers created by project-shell


From: Dmitry Gutov
Subject: Re: Name of buffers created by project-shell
Date: Mon, 10 May 2021 03:08:48 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Hi Matthias,

On 08.05.2021 20:09, Matthias Meulien wrote:

When shell minor mode dirtrack-mode is enabled (the default), the value
of list-buffers-directory is updated when cd, pushd, popd, etc. are
issued; It will thus interfere if uniquify has to rerationalize the
buffer name...

I saw in commit 1c3a86e7fc2 that project-prefixed-buffer-name has been
introduced which I understand as "forgot of uniquify since it doesn't
handle buffer not visiting files properly".

Not really. Also see my comment here: https://debbugs.gnu.org/47975#8

I have some time to work on
improving the uniquify situation but can you confirm there's still
interest for this?

Yes, of course. Even if we in the end decide that uniquify is not suitable for project.el's needs, some cleanup and better handling of edge cases would still be welcome.

But your plan below sounds reasonable, even if I don't have the time ATM to re-familiarize myself with the implementation details.

My rough plan is to change uniquify-list-buffers-directory-modes to be a
mapping from major modes to functions that, given a buffer, returns the
buffer proposed name and a directory. This would remove the use of
list-buffers-directory in uniquify and gives the opportunity for each
major mode to provide its convenience function based on
current-directory or project-root.

The default won't be to add shell-mode and eshell-mode to this new
uniquify-list-buffers-directory-modes mapping (to avoid breaking current
behavior) but do it locally when shell or eshell are called from
project.el. Is this dependency acceptable?

:thumbsup:



reply via email to

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