unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Matthias Meulien <orontee@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Name of buffers created by project-shell
Date: Mon, 10 May 2021 03:08:48 +0300	[thread overview]
Message-ID: <bed16ef3-1e14-9ff7-9cef-390992633352@yandex.ru> (raw)
In-Reply-To: <87sg2xrw3y.fsf@gmail.com>

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	other threads:[~2021-05-10  0:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 21:18 Name of buffers created by project-shell Matthias Meulien
2021-03-04  3:21 ` Dmitry Gutov
2021-03-04  4:03   ` Stefan Monnier
2021-03-04 17:50   ` Juri Linkov
2021-03-05 14:22     ` Dmitry Gutov
2021-03-14 13:46   ` Matthias Meulien
2021-03-15  0:41     ` Dmitry Gutov
2021-03-15 13:05       ` Matthias Meulien
2021-03-21 19:44       ` Dmitry Gutov
2021-03-23 20:08         ` Matthias Meulien
2021-03-24 20:12           ` Juri Linkov
2021-03-24 20:47             ` Dmitry Gutov
2021-05-08 17:09         ` Matthias Meulien
2021-05-10  0:08           ` Dmitry Gutov [this message]
2021-03-14 13:56   ` Matthias Meulien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bed16ef3-1e14-9ff7-9cef-390992633352@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=orontee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).