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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24723 in the body.
You can then email your comments to 24723 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24723; Package emacs. (Tue, 18 Oct 2016 05:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mark Oteiza <mvoteiza <at> udel.edu>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 18 Oct 2016 05:30:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mark Oteiza <mvoteiza <at> udel.edu>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; minibuffer-default-add-shell-commands wrong behavior
Date: Tue, 18 Oct 2016 01:29:13 -0400
From -Q, with a ~/.mailcap containing the line

text/plain: cat %s;

1. (read-shell-command "? " nil nil "dog")
2. M-n, minibuffer should now contain "dog", as expected
3. M-n once more, minibuffer now contains "cat dog"

minibuffer-default-add-shell-commands is treating a command as a
filename; it should not be concatenating commands together.


In GNU Emacs 26.0.50.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars)
 of 2016-10-17 built on logos
Repository revision: e697ccab77b1668a0781397b55b676fc4e9bc1b6




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24723; Package emacs. (Wed, 19 Oct 2016 00:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 24723 <at> debbugs.gnu.org (full text, mbox):

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




bug marked as fixed in version 26.1, send any further explanations to 24723 <at> debbugs.gnu.org and Mark Oteiza <mvoteiza <at> udel.edu> Request was from Mark Oteiza <mvoteiza <at> udel.edu> to control <at> debbugs.gnu.org. (Tue, 26 Sep 2017 13:11:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 25 Oct 2017 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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