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

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

[debbugs-tracker] bug#31794: closed (26.1; dired-do-shell-command broken


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#31794: closed (26.1; dired-do-shell-command broken)
Date: Sat, 23 Jun 2018 13:50:02 +0000

Your message dated Sat, 23 Jun 2018 16:49:03 +0300
with message-id <address@hidden>
and subject line Re: bug#31794: 26.1; dired-do-shell-command broken
has caused the debbugs.gnu.org bug report #31794,
regarding 26.1; dired-do-shell-command broken
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
31794: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=31794
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 26.1; dired-do-shell-command broken Date: Tue, 12 Jun 2018 12:24:09 +0800
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#31794: 26.1; dired-do-shell-command broken Date: Sat, 23 Jun 2018 16:49:03 +0300
> From:  Leo Liu <address@hidden>
> Cc: Mark Oteiza <address@hidden>,  address@hidden
> Date: Sat, 23 Jun 2018 21:32:09 +0800
> 
> Sorry for the lack of activity. I was moving last week and things are
> bit messy at the moment. The worst is no good internet connection. So
> yes I'd appreciate it if someone can help me install the fix. Otherwise
> I'll get to it ASAP (might be one or two weeks).

Thanks, I pushed it to the emacs-26 branch, and I'm marking this bug
done.


--- End Message ---

reply via email to

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