all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Schmidt <christopher@ch.ristopher.com>
To: 13045@debbugs.gnu.org
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)	[thread overview]
Message-ID: <87r4n3mgsb@ch.ristopher.com> (raw)
In-Reply-To: <87lidhrf03@ch.ristopher.com> (Christopher Schmidt's message of "Sat, 1 Dec 2012 15:03:40 +0000 (GMT)")

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

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: dired-guess-shell-command.diff --]
[-- Type: text/x-diff, Size: 893 bytes --]

=== 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


[-- Attachment #3: Type: text/plain, Size: 65 bytes --]


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

        Christopher

  parent reply	other threads:[~2012-12-06 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-01 15:03 bug#13045: 24.2.90; dired-guess-shell-command: default in prompt after colon Christopher Schmidt
2012-12-02  0:50 ` Juri Linkov
2012-12-06 13:49 ` Christopher Schmidt [this message]
2012-12-15 12:05   ` Juri Linkov

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=87r4n3mgsb@ch.ristopher.com \
    --to=christopher@ch.ristopher.com \
    --cc=13045@debbugs.gnu.org \
    /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.