GNU bug report logs - #24723
26.0.50; minibuffer-default-add-shell-commands wrong behavior

Previous Next

Package: emacs;

Reported by: Mark Oteiza <mvoteiza <at> udel.edu>

Date: Tue, 18 Oct 2016 05:30:02 UTC

Severity: normal

Found in version 26.0.50

Fixed in version 26.1

Done: Mark Oteiza <mvoteiza <at> udel.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mark Oteiza <mvoteiza <at> udel.edu>
To: 24723 <at> debbugs.gnu.org
Subject: bug#24723: 26.0.50; minibuffer-default-add-shell-commands wrong behavior
Date: Tue, 18 Oct 2016 20:29:37 -0400
I'm inclined to push the following:

diff --git a/lisp/simple.el b/lisp/simple.el
index 70bd759..67ab8ca 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3169,7 +3169,9 @@ minibuffer-default-add-shell-commands
   (let* ((filename (if (listp minibuffer-default)
                       (car minibuffer-default)
                     minibuffer-default))
-        (commands (and filename (require 'mailcap nil t)
+         ;; The default minibuffer value is not always a filename (Bug#24723)
+        (commands (and filename (file-readable-p filename)
+                        (require 'mailcap nil t)
                        (mailcap-file-default-commands (list filename)))))
     (setq commands (mapcar (lambda (command)
                             (concat command " " filename))




This bug report was last modified 7 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.