GNU bug report logs -
#13045
24.2.90; dired-guess-shell-command: default in prompt after colon
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13045 in the body.
You can then email your comments to 13045 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13045
; Package
emacs
.
(Sat, 01 Dec 2012 15:07:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christopher Schmidt <christopher <at> ch.ristopher.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 01 Dec 2012 15:07:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
emacs -q
C-x C-f /tmp RET
M-x load-library RET dired-x RET
M-! touch rms.tar RET
g
# Move point to rms.tar
!
The prompt says
! on rms.tar: {3 guesses} [tar xvf]
I think it should say
! on rms.tar {3 guesses} [tar xvf]:
This is consistent with most other commands that insert the default in
the prompt.
The code that generates the prompt is in dired-guess-shell-command.
I think it is a good idea to add a new magic options to Emacs which
will, if customised, unconditionally add the default value, if there is
one, to the minibuffer prompt. WDYT?
Christopher
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13045
; Package
emacs
.
(Sun, 02 Dec 2012 00:56:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 13045 <at> debbugs.gnu.org (full text, mbox):
> I think it is a good idea to add a new magic options to Emacs which
> will, if customised, unconditionally add the default value, if there is
> one, to the minibuffer prompt. WDYT?
Indeed a new magic option would be good like proposed in
http://debbugs.gnu.org/12443
This could also display the number of available default values
and the first default, e.g. a customized option:
(defcustom minibuffer-default-prompt-format " (%i defaults, %s)"
"Default format."
:type 'string)
Then for your example `dired-guess-shell-command' could display:
! on rms.tar (3 defaults, tar xvf):
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13045
; Package
emacs
.
(Thu, 06 Dec 2012 13:51:01 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Christopher Schmidt <christopher <at> ch.ristopher.com> writes:
> emacs -q
> C-x C-f /tmp RET
> M-x load-library RET dired-x RET
> M-! touch rms.tar RET
> g
> # Move point to rms.tar
> !
>
> The prompt says
>
> ! on rms.tar: {3 guesses} [tar xvf]
>
> I think it should say
>
> ! on rms.tar {3 guesses} [tar xvf]:
>
> This is consistent with most other commands that insert the default in
> the prompt.
>
> The code that generates the prompt is in dired-guess-shell-command.
[dired-guess-shell-command.diff (text/x-diff, inline)]
=== modified file 'lisp/dired-x.el'
--- lisp/dired-x.el 2012-09-25 04:13:02 +0000
+++ lisp/dired-x.el 2012-12-06 13:47:11 +0000
@@ -1114,6 +1114,7 @@
(if (null default)
;; Nothing to guess
(read-shell-command prompt nil 'dired-shell-command-history)
+ (setq prompt (replace-regexp-in-string ": $" " " prompt))
(if (listp default)
;; More than one guess
(setq default-list default
@@ -1124,7 +1125,7 @@
;; Just one guess
(setq default-list (list default)))
;; Put the first guess in the prompt but not in the initial value.
- (setq prompt (concat prompt (format "[%s] " default)))
+ (setq prompt (concat prompt (format "[%s]: " default)))
;; All guesses can be retrieved with M-n
(setq val (read-shell-command prompt nil
'dired-shell-command-history
[Message part 3 (text/plain, inline)]
Patch for emacs-24 as of right now. WDYT?
Christopher
Reply sent
to
Juri Linkov <juri <at> jurta.org>
:
You have taken responsibility.
(Sat, 15 Dec 2012 12:08:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Christopher Schmidt <christopher <at> ch.ristopher.com>
:
bug acknowledged by developer.
(Sat, 15 Dec 2012 12:08:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 13045-done <at> debbugs.gnu.org (full text, mbox):
> === modified file 'lisp/dired-x.el'
> --- lisp/dired-x.el 2012-09-25 04:13:02 +0000
> +++ lisp/dired-x.el 2012-12-06 13:47:11 +0000
> @@ -1114,6 +1114,7 @@
> (if (null default)
> ;; Nothing to guess
> (read-shell-command prompt nil 'dired-shell-command-history)
> + (setq prompt (replace-regexp-in-string ": $" " " prompt))
> (if (listp default)
> ;; More than one guess
> (setq default-list default
> @@ -1124,7 +1125,7 @@
> ;; Just one guess
> (setq default-list (list default)))
> ;; Put the first guess in the prompt but not in the initial value.
> - (setq prompt (concat prompt (format "[%s] " default)))
> + (setq prompt (concat prompt (format "[%s]: " default)))
Thanks, this is a satisfactory short-term solution. Installed to the trunk.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 12 Jan 2013 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 117 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.