GNU bug report logs -
#59502
29.0.50; [PATCH] Dedicated buffers per project
Previous Next
Full log
Message #26 received at 59502 <at> debbugs.gnu.org (full text, mbox):
Hi again!
On 23/11/2022 07:11, Gabriel wrote:
> 3) Create a single defcustom to compute the name of project-related
> buffers. This is similar to how `project-compile' behaves today, but
> would be a more general-purpose customization option. This is currently
> my preferred solution (see the attached patch). I tried to make it
> simple, consistent and without introducing behavior changes related to
> how project-related buffers are currently named, but I am not really
> happy with the implementation. An example of how users could customize
> this option is presented below:
>
> (setopt project-buffer-name-function
> (lambda (name)
> (format "*%s-%s*"
> (project-name (project-current))
> name)))
A couple more thoughts: the buffer name function will generally be used
before the buffer is created. The value of default-directory might even
be wrong.
But even if it's not, some project backends might choose to enable or
disable themselves based on the value of the major mode, which at the
time that the function is called, might not be set yet.
Which is to say, it might be handy to have the project instance passed
to this function as an argument, rather than have it looked up again.
Does it look feasible to you in most cases? If yes, we could rethink the
story with project-compilation-buffer-name-function. Perhaps make it a
function which returns a function.
This bug report was last modified 2 years and 190 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.