GNU bug report logs - #66518
[PATCH] Use project-name in the project-kill-buffers prompt

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Fri, 13 Oct 2023 12:38:01 UTC

Severity: normal

Tags: patch

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66518 in the body.
You can then email your comments to 66518 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#66518; Package emacs. (Fri, 13 Oct 2023 12:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Spencer Baugh <sbaugh <at> janestreet.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 13 Oct 2023 12:38:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Use project-name in the project-kill-buffers prompt
Date: Fri, 13 Oct 2023 08:36:33 -0400
[Message part 1 (text/plain, inline)]
Tags: patch


This is mildly prettier.


In GNU Emacs 29.1.50 (build 6, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2023-10-04 built on
 igm-qws-u22796a
Repository revision: 1f6accd7986dbafa8668bd16f56a22352b38a661
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.8 (Green Obsidian)

Configured using:
 'configure --config-cache --with-x-toolkit=lucid
 --with-gif=ifavailable'

[0001-Use-project-name-in-the-project-kill-buffers-prompt.patch (text/patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66518; Package emacs. (Fri, 13 Oct 2023 16:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 66518 <at> debbugs.gnu.org (full text, mbox):

From: Philip Kaludercic <philipk <at> posteo.net>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 66518 <at> debbugs.gnu.org
Subject: Re: bug#66518: [PATCH] Use project-name in the project-kill-buffers
 prompt
Date: Fri, 13 Oct 2023 16:04:08 +0000
Spencer Baugh <sbaugh <at> janestreet.com> writes:

> Tags: patch
>
>
> This is mildly prettier.

Could this cause confusion, in case two projects share the same name?

>
> In GNU Emacs 29.1.50 (build 6, x86_64-pc-linux-gnu, X toolkit, cairo
>  version 1.15.12, Xaw scroll bars) of 2023-10-04 built on
>  igm-qws-u22796a
> Repository revision: 1f6accd7986dbafa8668bd16f56a22352b38a661
> Repository branch: emacs-29
> Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
> System Description: Rocky Linux 8.8 (Green Obsidian)
>
> Configured using:
>  'configure --config-cache --with-x-toolkit=lucid
>  --with-gif=ifavailable'
>
>>From 98bffe5752a97aeaf7bb9592732e033d99e56bbe Mon Sep 17 00:00:00 2001
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Date: Fri, 13 Oct 2023 08:35:58 -0400
> Subject: [PATCH] Use project-name in the project-kill-buffers prompt
>
> This is mildly prettier.
>
> * lisp/progmodes/project.el (project-kill-buffers): Use project-name.
> ---
>  lisp/progmodes/project.el | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
> index 0612b1a2e9a..c5843d40d41 100644
> --- a/lisp/progmodes/project.el
> +++ b/lisp/progmodes/project.el
> @@ -1620,7 +1620,7 @@ project-kill-buffers
>                         (yes-or-no-p
>                          (format "Kill %d buffers in %s? "
>                                  (length bufs)
> -                                (project-root pr))))))
> +                                (project-name pr))))))
>      (cond (no-confirm
>             (mapc #'kill-buffer bufs))
>            ((null bufs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66518; Package emacs. (Fri, 13 Oct 2023 23:43:01 GMT) Full text and rfc822 format available.

Message #11 received at 66518 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Philip Kaludercic <philipk <at> posteo.net>,
 Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 66518 <at> debbugs.gnu.org
Subject: Re: bug#66518: [PATCH] Use project-name in the project-kill-buffers
 prompt
Date: Sat, 14 Oct 2023 02:41:59 +0300
On 13/10/2023 19:04, Philip Kaludercic wrote:
> Spencer Baugh<sbaugh <at> janestreet.com>  writes:
> 
>> Tags: patch
>>
>>
>> This is mildly prettier.
> Could this cause confusion, in case two projects share the same name?

I suppose this can indeed be problematic with the default backend, where 
project-name just returns the base name of the root directory (and they 
can conflict).

OTOH, we do use the project name as prefix for buffer names, for 
example. So this might be okay. Worst case, we add a user option later.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66518; Package emacs. (Mon, 16 Oct 2023 18:50:02 GMT) Full text and rfc822 format available.

Message #14 received at 66518 <at> debbugs.gnu.org (full text, mbox):

From: Spencer Baugh <sbaugh <at> janestreet.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: 66518 <at> debbugs.gnu.org, Philip Kaludercic <philipk <at> posteo.net>
Subject: Re: bug#66518: [PATCH] Use project-name in the project-kill-buffers
 prompt
Date: Mon, 16 Oct 2023 14:48:42 -0400
Dmitry Gutov <dmitry <at> gutov.dev> writes:
> On 13/10/2023 19:04, Philip Kaludercic wrote:
>> Spencer Baugh<sbaugh <at> janestreet.com>  writes:
>> 
>>> Tags: patch
>>>
>>>
>>> This is mildly prettier.
>> Could this cause confusion, in case two projects share the same name?
>
> I suppose this can indeed be problematic with the default backend,
> where project-name just returns the base name of the root directory
> (and they can conflict).
>
> OTOH, we do use the project name as prefix for buffer names, for
> example. So this might be okay. Worst case, we add a user option
> later.

My contention is that if the user is running this in the current
project, they already basically know where they are, they just need a
little reminder.  Plausibly not even that is necessary if they have
project-mode-line enabled.  And if they're running it in another
project, using project-switch-project, then they just explicitly
selected a project so we definitely don't need to tell them the full
path of the project they're running in.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#66518; Package emacs. (Mon, 16 Oct 2023 23:30:02 GMT) Full text and rfc822 format available.

Message #17 received at 66518 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 66518 <at> debbugs.gnu.org, Philip Kaludercic <philipk <at> posteo.net>
Subject: Re: bug#66518: [PATCH] Use project-name in the project-kill-buffers
 prompt
Date: Tue, 17 Oct 2023 02:29:25 +0300
Version: 30.1

On 16/10/2023 21:48, Spencer Baugh wrote:
> My contention is that if the user is running this in the current
> project, they already basically know where they are, they just need a
> little reminder.  Plausibly not even that is necessary if they have
> project-mode-line enabled.  And if they're running it in another
> project, using project-switch-project, then they just explicitly
> selected a project so we definitely don't need to tell them the full
> path of the project they're running in.

That's a fair point.

Thank you, pushed to master, and closing.




bug closed, send any further explanations to 66518 <at> debbugs.gnu.org and Spencer Baugh <sbaugh <at> janestreet.com> Request was from Dmitry Gutov <dmitry <at> gutov.dev> to control <at> debbugs.gnu.org. (Mon, 16 Oct 2023 23:32:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 14 Nov 2023 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.