From: Leo Liu <sdl.web@gmail.com>
To: 31794@debbugs.gnu.org
Cc: Mark Oteiza <mvoteiza@udel.edu>
Subject: bug#31794: 26.1; dired-do-shell-command broken
Date: Tue, 12 Jun 2018 12:24:09 +0800 [thread overview]
Message-ID: <m11sdcmy3a.fsf@gmail.com> (raw)
1. emacs -q
2. in dired mode press !
3. C-h v
Step 3 should give you no completion. Another issue is when
icomplete-mode is on one constantly gets "No matches" for every input.
This is due to the following change.
commit c2a8cffe8044cc38c4cf1b5c3d1c9571ddeec623
Date: Sun Aug 6 10:15:17 2017 -0400
; Fix previous commit
The mailcap minibuffer completion used dynamic binding. Locally set
a dynamic variable.
* lisp/dired-aux.el: Store list of files in
`minibuffer-completion-table'.
I intend to fix the issue on emacs-26 with the following patch. Comments?
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index c336103f..516cd2c5 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -614,14 +614,16 @@ with a prefix argument."
(declare-function mailcap-file-default-commands "mailcap" (files))
+(defvar dired-aux-files)
+
(defun minibuffer-default-add-dired-shell-commands ()
"Return a list of all commands associated with current dired files.
This function is used to add all related commands retrieved by `mailcap'
to the end of the list of defaults just after the default value."
(interactive)
- (let* ((files minibuffer-completion-table)
- (commands (and (require 'mailcap nil t)
- (mailcap-file-default-commands files))))
+ (let ((commands (and (boundp 'dired-aux-files)
+ (require 'mailcap nil t)
+ (mailcap-file-default-commands dired-aux-files))))
(if (listp minibuffer-default)
(append minibuffer-default commands)
(cons minibuffer-default commands))))
@@ -639,9 +641,9 @@ This normally reads using `read-shell-command', but if the
offer a smarter default choice of shell command."
(minibuffer-with-setup-hook
(lambda ()
- (set (make-local-variable 'minibuffer-completion-table) files)
- (set (make-local-variable 'minibuffer-default-add-function)
- 'minibuffer-default-add-dired-shell-commands))
+ (setq-local dired-aux-files files)
+ (setq-local minibuffer-default-add-function
+ #'minibuffer-default-add-dired-shell-commands))
(setq prompt (format prompt (dired-mark-prompt arg files)))
(if (functionp 'dired-guess-shell-command)
(dired-mark-pop-up nil 'shell files
next reply other threads:[~2018-06-12 4:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 4:24 Leo Liu [this message]
2018-06-19 11:40 ` bug#31794: 26.1; dired-do-shell-command broken Mark Oteiza
2018-06-23 13:18 ` Eli Zaretskii
2018-06-23 13:32 ` Leo Liu
2018-06-23 13:49 ` Eli Zaretskii
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=m11sdcmy3a.fsf@gmail.com \
--to=sdl.web@gmail.com \
--cc=31794@debbugs.gnu.org \
--cc=mvoteiza@udel.edu \
/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.