bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13045: 24.2.90; dired-guess-shell-command: default in prompt after c


From: Christopher Schmidt
Subject: bug#13045: 24.2.90; dired-guess-shell-command: default in prompt after colon
Date: Thu, 6 Dec 2012 13:49:57 +0000 (GMT)

Christopher Schmidt <christopher@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.
=== 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

Patch for emacs-24 as of right now.  WDYT?

        Christopher

reply via email to

[Prev in Thread] Current Thread [Next in Thread]