GNU bug report logs - #74709
[PATCH] Avoid empty unique qualifier in buffer name

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Fri, 6 Dec 2024 12:18:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

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 74709 in the body.
You can then email your comments to 74709 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#74709; Package emacs. (Fri, 06 Dec 2024 12:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Manuel Giraud <manuel <at> ledu-giraud.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 06 Dec 2024 12:18:02 GMT) Full text and rfc822 format available.

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Avoid empty unique qualifier in buffer name
Date: Fri, 06 Dec 2024 13:17:31 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

Hi,

This patch prevents from having an empty unique qualifier in the buffer
name.  Maybe this could happen with others file buffer as well but, most
of the time, you could witness it with Dired buffer in homedir.  Here is
a recipe:

  - emacs -Q
  - C-x d /ssh:somewhere: ;; This buffer is named "~</ssh:somewhere:>"
  - C-x d /~/             ;; This buffer is named "~<>"

With this patch, the last buffer will simply be named "~" instead.

In GNU Emacs 31.0.50 (build 26, x86_64-unknown-openbsd7.6, X toolkit) of
 2024-12-06 built on computer
Repository revision: 2c1dfba7feb67c39299da0579a2be7ff14e13ccb
Repository branch: mgi/unique
Windowing system distributor 'The X.Org Foundation', version 11.0.12101014
System Description: OpenBSD computer 7.6 GENERIC.MP#458 amd64

Configured using:
 'configure CC=egcc CPPFLAGS=-I/usr/local/include
 LDFLAGS=-L/usr/local/lib MAKEINFO=gmakeinfo --prefix=/home/manuel/emacs
 --bindir=/home/manuel/bin --with-x-toolkit=lucid
 --with-toolkit-scroll-bars=no --without-cairo
 --without-compress-install'

[0001-Avoid-empty-unique-qualifier-in-buffer-name.patch (text/patch, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Manuel Giraud

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74709; Package emacs. (Fri, 06 Dec 2024 16:17:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 74709 <at> debbugs.gnu.org
Subject: Re: bug#74709: [PATCH] Avoid empty unique qualifier in buffer name
Date: Fri, 06 Dec 2024 18:16:22 +0200
> Date: Fri, 06 Dec 2024 13:17:31 +0100
> From:  Manuel Giraud via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> This patch prevents from having an empty unique qualifier in the buffer
> name.  Maybe this could happen with others file buffer as well but, most
> of the time, you could witness it with Dired buffer in homedir.  Here is
> a recipe:
> 
>   - emacs -Q
>   - C-x d /ssh:somewhere: ;; This buffer is named "~</ssh:somewhere:>"
>   - C-x d /~/             ;; This buffer is named "~<>"
> 
> With this patch, the last buffer will simply be named "~" instead.

FWIW, I actually like the feature whereby once we need the <SOMETHING>
suffix, all the buffers that share the same base name acquire the
brackets.  Why is it a problem that there's nothing inside?  It is not
a bug.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74709; Package emacs. (Fri, 06 Dec 2024 16:36:01 GMT) Full text and rfc822 format available.

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 74709 <at> debbugs.gnu.org
Subject: Re: bug#74709: [PATCH] Avoid empty unique qualifier in buffer name
Date: Fri, 06 Dec 2024 17:34:55 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Date: Fri, 06 Dec 2024 13:17:31 +0100
>> From:  Manuel Giraud via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> This patch prevents from having an empty unique qualifier in the buffer
>> name.  Maybe this could happen with others file buffer as well but, most
>> of the time, you could witness it with Dired buffer in homedir.  Here is
>> a recipe:
>> 
>>   - emacs -Q
>>   - C-x d /ssh:somewhere: ;; This buffer is named "~</ssh:somewhere:>"
>>   - C-x d /~/             ;; This buffer is named "~<>"
>> 
>> With this patch, the last buffer will simply be named "~" instead.
>
> FWIW, I actually like the feature whereby once we need the <SOMETHING>
> suffix, all the buffers that share the same base name acquire the
> brackets.  Why is it a problem that there's nothing inside?  It is not
> a bug.

No it is not a bug.  It is just a matter of aesthetic.  But you're right
that it could also serve as visual help.  I think this PR could be
ignored then.  Thanks.
-- 
Manuel Giraud




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74709; Package emacs. (Fri, 06 Dec 2024 16:52:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 74709 <at> debbugs.gnu.org
Subject: Re: bug#74709: [PATCH] Avoid empty unique qualifier in buffer name
Date: Fri, 06 Dec 2024 18:51:36 +0200
> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
> Cc: 74709 <at> debbugs.gnu.org
> Date: Fri, 06 Dec 2024 17:34:55 +0100
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >> Date: Fri, 06 Dec 2024 13:17:31 +0100
> >> From:  Manuel Giraud via "Bug reports for GNU Emacs,
> >>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >> 
> >> This patch prevents from having an empty unique qualifier in the buffer
> >> name.  Maybe this could happen with others file buffer as well but, most
> >> of the time, you could witness it with Dired buffer in homedir.  Here is
> >> a recipe:
> >> 
> >>   - emacs -Q
> >>   - C-x d /ssh:somewhere: ;; This buffer is named "~</ssh:somewhere:>"
> >>   - C-x d /~/             ;; This buffer is named "~<>"
> >> 
> >> With this patch, the last buffer will simply be named "~" instead.
> >
> > FWIW, I actually like the feature whereby once we need the <SOMETHING>
> > suffix, all the buffers that share the same base name acquire the
> > brackets.  Why is it a problem that there's nothing inside?  It is not
> > a bug.
> 
> No it is not a bug.  It is just a matter of aesthetic.  But you're right
> that it could also serve as visual help.  I think this PR could be
> ignored then.  Thanks.

Let's wait a bit for others to chime in, before we decide to close,
okay?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74709; Package emacs. (Fri, 06 Dec 2024 17:18:02 GMT) Full text and rfc822 format available.

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 74709 <at> debbugs.gnu.org
Subject: Re: bug#74709: [PATCH] Avoid empty unique qualifier in buffer name
Date: Fri, 06 Dec 2024 18:17:44 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

[...]

> Let's wait a bit for others to chime in, before we decide to close,
> okay?

👍
-- 
Manuel Giraud




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74709; Package emacs. (Fri, 06 Dec 2024 17:46:01 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 74709 <at> debbugs.gnu.org
Subject: Re: bug#74709: [PATCH] Avoid empty unique qualifier in buffer name
Date: Fri, 06 Dec 2024 23:14:38 +0530
[வெள்ளி டிசம்பர் 06, 2024] Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> Tags: patch
>
> Hi,
>
> This patch prevents from having an empty unique qualifier in the buffer
> name.  Maybe this could happen with others file buffer as well but, most
> of the time, you could witness it with Dired buffer in homedir.  Here is
> a recipe:
>
>   - emacs -Q
>   - C-x d /ssh:somewhere: ;; This buffer is named "~</ssh:somewhere:>"
>   - C-x d /~/             ;; This buffer is named "~<>"
>
> With this patch, the last buffer will simply be named "~" instead.

I usually have ~/tmp visited in a Dired buffer.  Sometimes I also visit
/tmp which gets named as "tmp<>".  With this patch, /tmp's buffer is
named "tmp" instead.  This confuses me as I am used to seeing "tmp" for
~/tmp's Dired buffer more often than not.  Can we gate this new
behaviour behind a user option please?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74709; Package emacs. (Fri, 06 Dec 2024 19:31:01 GMT) Full text and rfc822 format available.

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: 74709 <at> debbugs.gnu.org
Subject: Re: bug#74709: [PATCH] Avoid empty unique qualifier in buffer name
Date: Fri, 06 Dec 2024 20:30:16 +0100
Visuwesh <visuweshm <at> gmail.com> writes:

> [வெள்ளி டிசம்பர் 06, 2024] Manuel Giraud via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" wrote:
>
>> Tags: patch
>>
>> Hi,
>>
>> This patch prevents from having an empty unique qualifier in the buffer
>> name.  Maybe this could happen with others file buffer as well but, most
>> of the time, you could witness it with Dired buffer in homedir.  Here is
>> a recipe:
>>
>>   - emacs -Q
>>   - C-x d /ssh:somewhere: ;; This buffer is named "~</ssh:somewhere:>"
>>   - C-x d /~/             ;; This buffer is named "~<>"
>>
>> With this patch, the last buffer will simply be named "~" instead.
>
> I usually have ~/tmp visited in a Dired buffer.  Sometimes I also visit
> /tmp which gets named as "tmp<>".  With this patch, /tmp's buffer is
> named "tmp" instead.  This confuses me as I am used to seeing "tmp" for
> ~/tmp's Dired buffer more often than not.  Can we gate this new
> behaviour behind a user option please?

I don't think that there is more confusion then if you only have /tmp
opened which will have its buffer named "tmp", no?
-- 
Manuel Giraud




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74709; Package emacs. (Sat, 07 Dec 2024 03:48:02 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 74709 <at> debbugs.gnu.org
Subject: Re: bug#74709: [PATCH] Avoid empty unique qualifier in buffer name
Date: Sat, 07 Dec 2024 09:16:08 +0530
[வெள்ளி டிசம்பர் 06, 2024] Manuel Giraud wrote:

> Visuwesh <visuweshm <at> gmail.com> writes:
>
>> [வெள்ளி டிசம்பர் 06, 2024] Manuel Giraud via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" wrote:
>>
>>> Tags: patch
>>>
>>> Hi,
>>>
>>> This patch prevents from having an empty unique qualifier in the buffer
>>> name.  Maybe this could happen with others file buffer as well but, most
>>> of the time, you could witness it with Dired buffer in homedir.  Here is
>>> a recipe:
>>>
>>>   - emacs -Q
>>>   - C-x d /ssh:somewhere: ;; This buffer is named "~</ssh:somewhere:>"
>>>   - C-x d /~/             ;; This buffer is named "~<>"
>>>
>>> With this patch, the last buffer will simply be named "~" instead.
>>
>> I usually have ~/tmp visited in a Dired buffer.  Sometimes I also visit
>> /tmp which gets named as "tmp<>".  With this patch, /tmp's buffer is
>> named "tmp" instead.  This confuses me as I am used to seeing "tmp" for
>> ~/tmp's Dired buffer more often than not.  Can we gate this new
>> behaviour behind a user option please?
>
> I don't think that there is more confusion then if you only have /tmp
> opened which will have its buffer named "tmp", no?

Sorry, I meant having /tmp being "tmp" when both ~/tmp and /tmp are open
is confusing for the aforementioned reason.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#74709; Package emacs. (Sat, 07 Dec 2024 10:05:02 GMT) Full text and rfc822 format available.

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Visuwesh <visuweshm <at> gmail.com>
Cc: 74709 <at> debbugs.gnu.org
Subject: Re: bug#74709: [PATCH] Avoid empty unique qualifier in buffer name
Date: Sat, 07 Dec 2024 11:04:14 +0100
Visuwesh <visuweshm <at> gmail.com> writes:

> [வெள்ளி டிசம்பர் 06, 2024] Manuel Giraud wrote:
>
>> Visuwesh <visuweshm <at> gmail.com> writes:
>>
>>> [வெள்ளி டிசம்பர் 06, 2024] Manuel Giraud via "Bug reports for GNU Emacs,
>>> the Swiss army knife of text editors" wrote:
>>>
>>>> Tags: patch
>>>>
>>>> Hi,
>>>>
>>>> This patch prevents from having an empty unique qualifier in the buffer
>>>> name.  Maybe this could happen with others file buffer as well but, most
>>>> of the time, you could witness it with Dired buffer in homedir.  Here is
>>>> a recipe:
>>>>
>>>>   - emacs -Q
>>>>   - C-x d /ssh:somewhere: ;; This buffer is named "~</ssh:somewhere:>"
>>>>   - C-x d /~/             ;; This buffer is named "~<>"
>>>>
>>>> With this patch, the last buffer will simply be named "~" instead.
>>>
>>> I usually have ~/tmp visited in a Dired buffer.  Sometimes I also visit
>>> /tmp which gets named as "tmp<>".  With this patch, /tmp's buffer is
>>> named "tmp" instead.  This confuses me as I am used to seeing "tmp" for
>>> ~/tmp's Dired buffer more often than not.  Can we gate this new
>>> behaviour behind a user option please?
>>
>> I don't think that there is more confusion then if you only have /tmp
>> opened which will have its buffer named "tmp", no?
>
> Sorry, I meant having /tmp being "tmp" when both ~/tmp and /tmp are open
> is confusing for the aforementioned reason.

Yes, you're right.  Thinking a bit more about it, I don't think this
patch was a good idea anymore.  When a buffer is named "tmp<>" it
conveys the information that there is another buffer with the same base
name.  If it is just named "tmp", we have lost this bit of information.
-- 
Manuel Giraud




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 21 Dec 2024 09:12:01 GMT) Full text and rfc822 format available.

Notification sent to Manuel Giraud <manuel <at> ledu-giraud.fr>:
bug acknowledged by developer. (Sat, 21 Dec 2024 09:12:01 GMT) Full text and rfc822 format available.

Message #34 received at 74709-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 74709-done <at> debbugs.gnu.org, visuweshm <at> gmail.com
Subject: Re: bug#74709: [PATCH] Avoid empty unique qualifier in buffer name
Date: Sat, 21 Dec 2024 11:11:36 +0200
> Cc: 74709 <at> debbugs.gnu.org
> Date: Sat, 07 Dec 2024 11:04:14 +0100
> From:  Manuel Giraud via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Visuwesh <visuweshm <at> gmail.com> writes:
> 
> > [வெள்ளி டிசம்பர் 06, 2024] Manuel Giraud wrote:
> >
> >> Visuwesh <visuweshm <at> gmail.com> writes:
> >>
> >>> [வெள்ளி டிசம்பர் 06, 2024] Manuel Giraud via "Bug reports for GNU Emacs,
> >>> the Swiss army knife of text editors" wrote:
> >>>
> >>>> Tags: patch
> >>>>
> >>>> Hi,
> >>>>
> >>>> This patch prevents from having an empty unique qualifier in the buffer
> >>>> name.  Maybe this could happen with others file buffer as well but, most
> >>>> of the time, you could witness it with Dired buffer in homedir.  Here is
> >>>> a recipe:
> >>>>
> >>>>   - emacs -Q
> >>>>   - C-x d /ssh:somewhere: ;; This buffer is named "~</ssh:somewhere:>"
> >>>>   - C-x d /~/             ;; This buffer is named "~<>"
> >>>>
> >>>> With this patch, the last buffer will simply be named "~" instead.
> >>>
> >>> I usually have ~/tmp visited in a Dired buffer.  Sometimes I also visit
> >>> /tmp which gets named as "tmp<>".  With this patch, /tmp's buffer is
> >>> named "tmp" instead.  This confuses me as I am used to seeing "tmp" for
> >>> ~/tmp's Dired buffer more often than not.  Can we gate this new
> >>> behaviour behind a user option please?
> >>
> >> I don't think that there is more confusion then if you only have /tmp
> >> opened which will have its buffer named "tmp", no?
> >
> > Sorry, I meant having /tmp being "tmp" when both ~/tmp and /tmp are open
> > is confusing for the aforementioned reason.
> 
> Yes, you're right.  Thinking a bit more about it, I don't think this
> patch was a good idea anymore.  When a buffer is named "tmp<>" it
> conveys the information that there is another buffer with the same base
> name.  If it is just named "tmp", we have lost this bit of information.

Thanks.  Since there were no further comments withing 2 weeks, I'm now
closing this bug.




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

This bug report was last modified 210 days ago.

Previous Next


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