all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: trentbuck@gmail.com, 4987@debbugs.gnu.org
Subject: bug#4987: 23.1; shell-command: optionally include working dir in prompt
Date: Fri, 11 Oct 2019 15:30:11 +0200	[thread overview]
Message-ID: <CADwFkmnicMKjvnM_Ev05TSbwj8cRAb1nM85dU7PFD2yWSjx-Eg@mail.gmail.com> (raw)
In-Reply-To: <87a7a7a3pm.fsf@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

Michael Albinus <michael.albinus@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

[-- Attachment #2: 0001-Improve-documentation-of-shell-command-prompt-show-c.patch --]
[-- Type: application/octet-stream, Size: 1550 bytes --]

From b5a8590ed56d19b38846ab88ed0b58e89808ea8f Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Fri, 11 Oct 2019 15:23:56 +0200
Subject: [PATCH] Improve documentation of shell-command-prompt-show-cwd

* doc/emacs/misc.texi (Single Shell):
* lisp/simple.el (shell-command): Document
'shell-command-prompt-show-cwd'.  (Bug#4987)
---
 doc/emacs/misc.texi | 5 +++++
 lisp/simple.el      | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 3bfb729dc7..d260dff8de 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -787,6 +787,11 @@ Single Shell
 command output.  The default value is @code{nil} that means to use
 the same number of columns as provided by the shell.
 
+@vindex shell-command-promt-show-cwd
+  To make the above commands show the current directory in their
+prompts, set the variable @code{shell-command-prompt-show-cmd} to a
+non-nil value.
+
 @kindex M-|
 @findex shell-command-on-region
   @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!}, but
diff --git a/lisp/simple.el b/lisp/simple.el
index 44ab8e125d..6f57bf15a2 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3505,6 +3505,8 @@ shell-command
 With prefix argument, insert the COMMAND's output at point.
 
 Interactively, prompt for COMMAND in the minibuffer.
+If `shell-command-prompt-show-cwd' is non-nil, show the current
+directory in the prompt.
 
 If COMMAND ends in `&', execute it asynchronously.
 The output appears in the buffer `*Async Shell Command*'.
-- 
2.23.0


  reply	other threads:[~2019-10-11 13:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 12:57 bug#4987: 23.1; shell-command: optionally include working dir in prompt trentbuck
2009-11-20 17:27 ` Juri Linkov
2009-11-22 10:29   ` Juri Linkov
2009-11-23  4:27     ` Stefan Monnier
2019-10-10 23:20 ` Stefan Kangas
2019-10-11  0:31   ` Trent W. Buck
2019-10-11  8:14   ` Eli Zaretskii
2019-10-11 11:03     ` Stefan Kangas
2019-10-11 12:04       ` Michael Albinus
2019-10-11 13:30         ` Stefan Kangas [this message]
2019-10-11 14:26           ` Michael Albinus
2019-10-11 14:35           ` Robert Pluim
2019-10-12  8:12             ` Stefan Kangas
2019-10-14  9:32               ` Robert Pluim
2019-10-17 10:57                 ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmnicMKjvnM_Ev05TSbwj8cRAb1nM85dU7PFD2yWSjx-Eg@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=4987@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=trentbuck@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.