GNU bug report logs - #4987
23.1; shell-command: optionally include working dir in prompt

Previous Next

Package: emacs;

Reported by: trentbuck <at> gmail.com

Date: Fri, 20 Nov 2009 13:05:05 UTC

Severity: wishlist

Tags: patch

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

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 4987 in the body.
You can then email your comments to 4987 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4987; Package emacs. (Fri, 20 Nov 2009 13:05:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to trentbuck <at> gmail.com:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 20 Nov 2009 13:05:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: trentbuck <at> gmail.com
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; shell-command: optionally include working dir in prompt
Date: Fri, 20 Nov 2009 04:57:07 -0800 (PST)
At http://namazu.org/~tsuchiya/elisp/shell-command.el is an emacs
library that "enables tab-completion for `shell-command'".

I noticed recently that Emacs does this internally now.  Yay!  But one
thing shell-command.el did that Emacs 23 doesn't appear to do, is to
include the working directory in the shell-command and
dired-do-shell-command prompts.  It'd be neat if Emacs did that, too.

In GNU Emacs 23.1.1 (i486-pc-linux-gnu)
 of 2009-09-14 on raven, modified by Debian
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=no' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_AU.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: rcirc

Minor modes in effect:
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  rcirc-track-minor-mode: t
  xterm-mouse-mode: t
  savehist-mode: t
  icomplete-mode: t
  partial-completion-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  use-hard-newlines: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
ESC O B ESC O B ESC O B ESC O B ESC ! C-g ESC O A ESC 
O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A 
ESC O A ESC O A ESC O A ESC O A ESC O A ESC O A ESC 
! C-g ESC ! C-g ESC ! C-g C-x ESC O C ESC O B C-x ESC 
O B Y o u ' d SPC t h i n k SPC t h e r e ' s SPC b 
e SPC a SPC w a y SPC t o SPC g o SPC b a c k SPC r 
DEL f r m SPC DEL DEL o m SPC a SPC s c r e e n l o 
g SPC t o SPC t p u t SPC c a l l s ESC b ESC b ESC 
f ( 1 ) C-e , SPC g i v e n SPC t h e SPC T E R M SPC 
t y p e RET C-x ESC O D C-x ESC O C C-x ESC O B ESC 
x r e p o r t b u g DEL DEL DEL SPC e m a c s - b u 
g C-g C-x ESC O D ESC x f i SPC l i b RET s h e l l 
- c o m m a n d RET C-x d C-g ESC < C-@ ESC O B ESC 
O B ESC O B ESC w C-x ESC O C C-x ESC O B ESC x r e 
p o r t SPC e m a c s SPC b u g RET C-g ESC x ESC O 
A RET

Recent messages:
Saving file /home/twb/Preferences/.emacs...
Wrote /home/twb/Preferences/.emacs
Quit
Mark set
Saving file /home/twb/Preferences/.emacs...
Wrote /home/twb/Preferences/.emacs
(No changes need to be saved)
Quit [6 times]
Mark set
Mark activated
Quit




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4987; Package emacs. (Fri, 20 Nov 2009 17:35:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 20 Nov 2009 17:35:05 GMT) Full text and rfc822 format available.

Message #10 received at 4987 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: trentbuck <at> gmail.com
Cc: 4987 <at> debbugs.gnu.org
Subject: Re: bug#4987: 23.1; shell-command: optionally include working dir in prompt
Date: Fri, 20 Nov 2009 19:27:21 +0200
> At http://namazu.org/~tsuchiya/elisp/shell-command.el is an emacs
> library that "enables tab-completion for `shell-command'".
>
> I noticed recently that Emacs does this internally now.  Yay!  But one
> thing shell-command.el did that Emacs 23 doesn't appear to do, is to
> include the working directory in the shell-command and
> dired-do-shell-command prompts.  It'd be neat if Emacs did that, too.

shell-command.el relies on defadvices to implement this.  I think a clean
implementation should be designed to work more like minibuf-eldef.el.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Severity set to 'wishlist' from 'normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 21 Nov 2009 00:55:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4987; Package emacs. (Sun, 22 Nov 2009 10:45:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sun, 22 Nov 2009 10:45:07 GMT) Full text and rfc822 format available.

Message #17 received at 4987 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: 4987 <at> debbugs.gnu.org
Cc: trentbuck <at> gmail.com
Subject: Re: bug#4987: 23.1; shell-command: optionally include working dir in prompt
Date: Sun, 22 Nov 2009 12:29:20 +0200
> > At http://namazu.org/~tsuchiya/elisp/shell-command.el is an emacs
> > library that "enables tab-completion for `shell-command'".
> >
> > I noticed recently that Emacs does this internally now.  Yay!  But one
> > thing shell-command.el did that Emacs 23 doesn't appear to do, is to
> > include the working directory in the shell-command and
> > dired-do-shell-command prompts.  It'd be neat if Emacs did that, too.
>
> shell-command.el relies on defadvices to implement this.  I think a clean
> implementation should be designed to work more like minibuf-eldef.el.

On second thought, there is no need to over-complicate this feature.
So we could add a new defcustom to define the prompt format and to
use it in `read-shell-command' to modify the prompt.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4987; Package emacs. (Mon, 23 Nov 2009 04:35:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 23 Nov 2009 04:35:06 GMT) Full text and rfc822 format available.

Message #22 received at 4987 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> jurta.org>
Cc: 4987 <at> debbugs.gnu.org, trentbuck <at> gmail.com
Subject: Re: bug#4987: 23.1; shell-command: optionally include working dir in prompt
Date: Sun, 22 Nov 2009 23:27:35 -0500
> On second thought, there is no need to over-complicate this feature.
> So we could add a new defcustom to define the prompt format and to
> use it in `read-shell-command' to modify the prompt.

Yes, that would be much simpler,


        Stefan



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Thu, 10 Oct 2019 23:21:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: trentbuck <at> gmail.com
Cc: 4987 <at> debbugs.gnu.org
Subject: Re: bug#4987: 23.1;
 shell-command: optionally include working dir in prompt
Date: Fri, 11 Oct 2019 01:20:15 +0200
[Message part 1 (text/plain, inline)]
trentbuck <at> gmail.com writes:

> But one thing shell-command.el did that Emacs 23 doesn't appear to do,
> is to include the working directory in the shell-command and
> dired-do-shell-command prompts.  It'd be neat if Emacs did that, too.

This is a good idea.  How about the attached patch?

I didn't bother with dired-do-shell-command since it should be obvious
what the working directory is.

Best regards,
Stefan Kangas
[0001-Support-showing-directory-in-shell-command-prompt.patch (application/octet-stream, attachment)]

Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Thu, 10 Oct 2019 23:22:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Fri, 11 Oct 2019 00:33:02 GMT) Full text and rfc822 format available.

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

From: "Trent W. Buck" <trentbuck <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 4987 <at> debbugs.gnu.org
Subject: Re: bug#4987: 23.1; shell-command: optionally include working dir in
 prompt
Date: Fri, 11 Oct 2019 11:31:49 +1100
Stefan Kangas wrote:
> trentbuck <at> gmail.com writes:
>> One thing shell-command.el did, that Emacs 23 doesn't, is include
>> the working directory in the prompts.
>
> This is a good idea.  How about the attached patch?

Looks good to me :-)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Fri, 11 Oct 2019 08:15:04 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: trentbuck <at> gmail.com, 4987 <at> debbugs.gnu.org
Subject: Re: bug#4987: 23.1;
 shell-command: optionally include working dir in prompt
Date: Fri, 11 Oct 2019 11:14:10 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Fri, 11 Oct 2019 01:20:15 +0200
> Cc: 4987 <at> debbugs.gnu.org
> 
> > But one thing shell-command.el did that Emacs 23 doesn't appear to do,
> > is to include the working directory in the shell-command and
> > dired-do-shell-command prompts.  It'd be neat if Emacs did that, too.
> 
> This is a good idea.  How about the attached patch?

Thanks, LGTM.

I would suggest to name the defcustom to shell-command-prompt-show-cwd
instead, it sounds more accurate to me.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Fri, 11 Oct 2019 11:04:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: trentbuck <at> gmail.com, 4987 <at> debbugs.gnu.org
Subject: Re: bug#4987: 23.1;
 shell-command: optionally include working dir in prompt
Date: Fri, 11 Oct 2019 13:03:05 +0200
close 4987 27.1
quit

Eli Zaretskii <eliz <at> gnu.org> writes:
> Thanks, LGTM.
>
> I would suggest to name the defcustom to shell-command-prompt-show-cwd
> instead, it sounds more accurate to me.

Thanks, I made that change and pushed this as commit 552c20ce39.  Closing.

Best regards,
Stefan Kangas




bug marked as fixed in version 27.1, send any further explanations to 4987 <at> debbugs.gnu.org and trentbuck <at> gmail.com Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Fri, 11 Oct 2019 11:04:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Fri, 11 Oct 2019 12:05:04 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: trentbuck <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>, 4987 <at> debbugs.gnu.org
Subject: Re: bug#4987: 23.1; shell-command: optionally include working dir
 in prompt
Date: Fri, 11 Oct 2019 14:04:05 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

>> I would suggest to name the defcustom to shell-command-prompt-show-cwd
>> instead, it sounds more accurate to me.
>
> Thanks, I made that change and pushed this as commit 552c20ce39.  Closing.

Shouldn't the user option be mentioned in the docstring and the Emacs
manual? etc/NEWS is rarely used on a daily basis.

> Best regards,
> Stefan Kangas

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Fri, 11 Oct 2019 13:31:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: trentbuck <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>, 4987 <at> debbugs.gnu.org
Subject: Re: bug#4987: 23.1;
 shell-command: optionally include working dir in prompt
Date: Fri, 11 Oct 2019 15:30:11 +0200
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

> Shouldn't the user option be mentioned in the docstring and the Emacs
> manual? etc/NEWS is rarely used on a daily basis.

Sure.  How about the attached patch?

Best regards,
Stefan Kangas
[0001-Improve-documentation-of-shell-command-prompt-show-c.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Fri, 11 Oct 2019 14:28:02 GMT) Full text and rfc822 format available.

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

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: trentbuck <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>, 4987 <at> debbugs.gnu.org
Subject: Re: bug#4987: 23.1; shell-command: optionally include working dir
 in prompt
Date: Fri, 11 Oct 2019 16:26:51 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

>> Shouldn't the user option be mentioned in the docstring and the Emacs
>> manual? etc/NEWS is rarely used on a daily basis.
>
> Sure.  How about the attached patch?

LGTM, thanks.

> Best regards,
> Stefan Kangas

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Fri, 11 Oct 2019 14:36:03 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: trentbuck <at> gmail.com, 4987 <at> debbugs.gnu.org,
 Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#4987: 23.1; shell-command: optionally include working dir
 in prompt
Date: Fri, 11 Oct 2019 16:35:46 +0200
>>>>> On Fri, 11 Oct 2019 15:30:11 +0200, Stefan Kangas <stefan <at> marxist.se> said:

    Stefan> +@vindex shell-command-promt-show-cwd
    Stefan> +  To make the above commands show the current directory in their
    Stefan> +prompts, set the variable @code{shell-command-prompt-show-cmd} to a
                                                                       ^^^
'cwd', no?
(and it itʼs customizable, I prefer saying 'customize' rather than 'set')

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Sat, 12 Oct 2019 08:13:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: trentbuck <at> gmail.com, 4987 <at> debbugs.gnu.org,
 Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#4987: 23.1;
 shell-command: optionally include working dir in prompt
Date: Sat, 12 Oct 2019 10:12:36 +0200
[Message part 1 (text/plain, inline)]
Robert Pluim <rpluim <at> gmail.com> writes:

>     Stefan> +prompts, set the variable @code{shell-command-prompt-show-cmd} to a
>                                                                        ^^^
> 'cwd', no?
> (and it itʼs customizable, I prefer saying 'customize' rather than 'set')

Thanks, fixed in attached.

Best regards,
Stefan Kangas
[0001-Improve-documentation-of-shell-command-prompt-show-c.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Mon, 14 Oct 2019 09:33:01 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: trentbuck <at> gmail.com, 4987 <at> debbugs.gnu.org,
 Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#4987: 23.1; shell-command: optionally include working dir
 in prompt
Date: Mon, 14 Oct 2019 11:32:47 +0200
>>>>> On Sat, 12 Oct 2019 10:12:36 +0200, Stefan Kangas <stefan <at> marxist.se> said:
 
    Stefan> +@vindex shell-command-promt-show-cwd

Thereʼs a 'p' missing in 'prompt'.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4987; Package emacs. (Thu, 17 Oct 2019 10:58:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: trentbuck <at> gmail.com, 4987 <at> debbugs.gnu.org,
 Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#4987: 23.1;
 shell-command: optionally include working dir in prompt
Date: Thu, 17 Oct 2019 12:57:30 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

> Thereʼs a 'p' missing in 'prompt'.

Fixed and pushed to master as commit 3cf92da6fa.

Best regards,
Stefan Kangas




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

This bug report was last modified 4 years and 157 days ago.

Previous Next


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