GNU bug report logs - #79949
[PATCH] User option to show command of shell buffers

Previous Next

Package: emacs;

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

Date: Fri, 5 Dec 2025 10:58:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 79949 AT debbugs.gnu.org.

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

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


Report forwarded to michael.albinus <at> gmx.de, bug-gnu-emacs <at> gnu.org:
bug#79949; Package emacs. (Fri, 05 Dec 2025 10:58:01 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 michael.albinus <at> gmx.de, bug-gnu-emacs <at> gnu.org. (Fri, 05 Dec 2025 10:58: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] User option to show command of shell buffers
Date: Fri, 05 Dec 2025 11:57:01 +0100
[Message part 1 (text/plain, inline)]
Tags: patch

Hi,

This patch introduces a user option to show the command and current
directory in shell-command buffer's header line.



In GNU Emacs 31.0.50 (build 26, x86_64-unknown-openbsd7.8) of 2025-12-04
 built on computer
Repository revision: 21f9295aa9a54c58665280ff36d544acb56bd346
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101020
System Description: OpenBSD computer 7.8 GENERIC.MP#127 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=no
 --with-toolkit-scroll-bars=no --without-cairo --without-dbus
 --without-gconf --without-gsettings --without-compress-install'

[0001-User-option-to-show-command-of-shell-buffers.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Manuel Giraud

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79949; Package emacs. (Fri, 05 Dec 2025 16:45:01 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 79949 <at> debbugs.gnu.org
Subject: Re: bug#79949: [PATCH] User option to show command of shell buffers
Date: Fri, 05 Dec 2025 17:44:20 +0100
Manuel Giraud <manuel <at> ledu-giraud.fr> writes:

> Hi,

Hi Manuel,

> This patch introduces a user option to show the command and current
> directory in shell-command buffer's header line.

Nice idea. The code looks good to me (but I haven't tested).

I don't know whether we need the default directory in the header line,
because it is already in the mode line. At least in the remote case. But
I have no strong opinion about.

Nit-picking:

> +*** New user option 'shell-command-show-header'.
> +When this option is set to a non-nil value, the command and the current
> +directory is displayed into the output buffer's header line.

"... are displayed ..."

Best regards, Michael.




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

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 79949 <at> debbugs.gnu.org
Subject: Re: bug#79949: [PATCH] User option to show command of shell buffers
Date: Fri, 05 Dec 2025 18:04:12 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Manuel Giraud <manuel <at> ledu-giraud.fr> writes:
>
>> Hi,
>
> Hi Manuel,
>
>> This patch introduces a user option to show the command and current
>> directory in shell-command buffer's header line.
>
> Nice idea. The code looks good to me (but I haven't tested).
>
> I don't know whether we need the default directory in the header line,
> because it is already in the mode line. At least in the remote case. But
> I have no strong opinion about.

I don't have the default directory showed in the mode line (even for the
remote case).

> Nit-picking:
>
>> +*** New user option 'shell-command-show-header'.
>> +When this option is set to a non-nil value, the command and the current
>> +directory is displayed into the output buffer's header line.
>
> "... are displayed ..."

Thanks.  I'll fix this one.
-- 
Manuel Giraud




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

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: 79949 <at> debbugs.gnu.org
Subject: Re: bug#79949: [PATCH] User option to show command of shell buffers
Date: Fri, 05 Dec 2025 18:14:51 +0100
Manuel Giraud <manuel <at> ledu-giraud.fr> writes:

Hi Manuel,

>> I don't know whether we need the default directory in the header line,
>> because it is already in the mode line. At least in the remote case. But
>> I have no strong opinion about.
>
> I don't have the default directory showed in the mode line (even for the
> remote case).

In the remote case, there is a "@" in the outer left of the mode
line. Move your mouse over this.

Yes, it is a hidden gem.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79949; Package emacs. (Fri, 05 Dec 2025 18:35:01 GMT) Full text and rfc822 format available.

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 79949 <at> debbugs.gnu.org
Subject: Re: bug#79949: [PATCH] User option to show command of shell buffers
Date: Fri, 05 Dec 2025 19:34:19 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Manuel Giraud <manuel <at> ledu-giraud.fr> writes:
>
> Hi Manuel,
>
>>> I don't know whether we need the default directory in the header line,
>>> because it is already in the mode line. At least in the remote case. But
>>> I have no strong opinion about.
>>
>> I don't have the default directory showed in the mode line (even for the
>> remote case).
>
> In the remote case, there is a "@" in the outer left of the mode
> line. Move your mouse over this.
>
> Yes, it is a hidden gem.

Ooh thanks that's a good one :)

Still, I think I can leave the default directory in the header line for
remote case for the sake of similarity.  Let's wait to see what others
say.
-- 
Manuel Giraud




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79949; Package emacs. (Fri, 05 Dec 2025 19:20:01 GMT) Full text and rfc822 format available.

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

From: Manuel Giraud <manuel <at> ledu-giraud.fr>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 79949 <at> debbugs.gnu.org
Subject: Re: bug#79949: [PATCH] User option to show command of shell buffers
Date: Fri, 05 Dec 2025 20:18:55 +0100
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Manuel Giraud <manuel <at> ledu-giraud.fr> writes:
>
> Hi Manuel,
>
>>> I don't know whether we need the default directory in the header line,
>>> because it is already in the mode line. At least in the remote case. But
>>> I have no strong opinion about.
>>
>> I don't have the default directory showed in the mode line (even for the
>> remote case).
>
> In the remote case, there is a "@" in the outer left of the mode
> line. Move your mouse over this.

Hi again Michael,

FWIW I've just discovered that this is also true for local buffers with
the last "-" after buffer modification state.
-- 
Manuel Giraud




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79949; Package emacs. (Sat, 06 Dec 2025 07:59:03 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Manuel Giraud <manuel <at> ledu-giraud.fr>
Cc: michael.albinus <at> gmx.de, 79949 <at> debbugs.gnu.org
Subject: Re: bug#79949: [PATCH] User option to show command of shell buffers
Date: Sat, 06 Dec 2025 09:57:50 +0200
> Cc: 79949 <at> debbugs.gnu.org
> From: Manuel Giraud <manuel <at> ledu-giraud.fr>
> Date: Fri, 05 Dec 2025 19:34:19 +0100
> 
> Michael Albinus <michael.albinus <at> gmx.de> writes:
> 
> > Manuel Giraud <manuel <at> ledu-giraud.fr> writes:
> >
> > Hi Manuel,
> >
> >>> I don't know whether we need the default directory in the header line,
> >>> because it is already in the mode line. At least in the remote case. But
> >>> I have no strong opinion about.
> >>
> >> I don't have the default directory showed in the mode line (even for the
> >> remote case).
> >
> > In the remote case, there is a "@" in the outer left of the mode
> > line. Move your mouse over this.
> >
> > Yes, it is a hidden gem.
> 
> Ooh thanks that's a good one :)

Note that the default directory is shown in a tooltip for the local
case as well, if you move the mouse pointer over the "-" that comes
after the read-only and modified indicators.

So it isn't like remote buffers have this information while local
ones don't.




This bug report was last modified 4 days ago.

Previous Next


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