--- Begin Message ---
Subject: |
24.2.90; dired-guess-shell-command: default in prompt after colon |
Date: |
Sat, 1 Dec 2012 15:03:40 +0000 (GMT) |
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
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#13045: 24.2.90; dired-guess-shell-command: default in prompt after colon |
Date: |
Sat, 15 Dec 2012 14:05:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) |
> === 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.
--- End Message ---