GNU bug report logs - #29080
25.3; dired-x does not update `shell-command-history'

Previous Next

Package: emacs;

Reported by: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>

Date: Tue, 31 Oct 2017 15:41:01 UTC

Severity: minor

Found in version 25.3

Done: Eli Zaretskii <eliz <at> gnu.org>

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 29080 in the body.
You can then email your comments to 29080 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#29080; Package emacs. (Tue, 31 Oct 2017 15:41:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 31 Oct 2017 15:41:01 GMT) Full text and rfc822 format available.

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

From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 25.3; dired-x does not update `shell-command-history'
Date: Tue, 31 Oct 2017 15:39:55 +0000
Hello,

After starting emacs with -Q, if I open a dired buffer, use M-! to run a shell command, then use ! to run a shell command on a dired entry, and then look at the contents of `shell-command-history’, I’ll see both commands.  But then if I (require 'dired-x), run a shell command with M-!, and then another with !, the command I ran with ! on a dired entry does not show up in `shell-command-history’.

Thanks!

Daniel

In GNU Emacs 25.3.1 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1611))
of 2017-09-13 built on JSSLA17030925
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
'configure --disable-dependency-tracking --disable-silent-rules
--enable-locallisppath=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs/25.3/share/info/emacs
--prefix=/usr/local/Cellar/emacs/25.3 --without-x --with-xml2
--without-dbus --without-gnutls --with-imagemagick --with-ns
--disable-ns-self-contained'

Configured features:
JPEG IMAGEMAGICK NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Checking 24 files in /usr/local/Cellar/emacs/25.3/share/emacs/25.3/lisp/cedet...
Checking 57 files in /usr/local/Cellar/emacs/25.3/share/emacs/25.3/lisp/calendar...
Checking 87 files in /usr/local/Cellar/emacs/25.3/share/emacs/25.3/lisp/calc...
Checking 120 files in /usr/local/Cellar/emacs/25.3/share/emacs/25.3/lisp/obsolete...
Checking for load-path shadows...done
Auto-saving...done
C-M-g is undefined
mwheel-scroll: Beginning of buffer [5 times]
Mark set
NUL characters found, which may cause problems.  Continue sending? (d, r, s, e, ?): 
Quit

Load-path shadows:
None found.

Features:
(url-util url-parse auth-source cl-seq eieio byte-opt bytecomp
byte-compile cconv eieio-core cl-macs gv url-vars pp shadow sort
mail-extr jka-compr find-func emacsbug message format-spec rfc822 mml
mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dired-x
cl-extra thingatpt help-fns help-mode easymenu misearch multi-isearch
dired-aux cl-loaddefs pcase cl-lib shell pcomplete comint ansi-color
ring dired time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 228703 15741)
(symbols 48 21855 0)
(miscs 40 4100 427)
(strings 32 21821 9613)
(string-bytes 1 636760)
(vectors 16 45989)
(vector-slots 8 1366798 120433)
(floats 8 196 137)
(intervals 56 977 125)
(buffers 976 22))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29080; Package emacs. (Tue, 31 Oct 2017 20:26:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Matz\, Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>
Cc: 29080 <at> debbugs.gnu.org
Subject: Re: bug#29080: 25.3; dired-x does not update `shell-command-history'
Date: Tue, 31 Oct 2017 22:24:56 +0200
> From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>
> Date: Tue, 31 Oct 2017 15:39:55 +0000
> 
> After starting emacs with -Q, if I open a dired buffer, use M-! to run a shell command, then use ! to run a shell command on a dired entry, and then look at the contents of `shell-command-history’, I’ll see both commands.  But then if I (require 'dired-x), run a shell command with M-!, and then another with !, the command I ran with ! on a dired entry does not show up in `shell-command-history’.

It's a feature: after loading dired-x, M-! runs a different command
(dired-smart-shell-command), which stores its history in a different
variable (dired-shell-command-history).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29080; Package emacs. (Tue, 31 Oct 2017 20:37:02 GMT) Full text and rfc822 format available.

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

From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "29080 <at> debbugs.gnu.org" <29080 <at> debbugs.gnu.org>
Subject: Re: bug#29080: 25.3; dired-x does not update `shell-command-history'
Date: Tue, 31 Oct 2017 20:36:57 +0000
> It's a feature: after loading dired-x, M-! runs a different command
> (dired-smart-shell-command), which stores its history in a different
> variable (dired-shell-command-history).

After loading dired-x, the command I run with M-! does still show up in `shell-command-history’.  But the command I run with ! (`dired-do-shell-command’) does not.  That seems to be backwards from what you are describing.

Does dired-x change `dired-do-shell-command’ in some way?

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29080; Package emacs. (Tue, 31 Oct 2017 20:48:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Matz\, Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>
Cc: 29080 <at> debbugs.gnu.org
Subject: Re: bug#29080: 25.3; dired-x does not update `shell-command-history'
Date: Tue, 31 Oct 2017 22:47:25 +0200
> From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>
> CC: "29080 <at> debbugs.gnu.org" <29080 <at> debbugs.gnu.org>
> Date: Tue, 31 Oct 2017 20:36:57 +0000
> 
> Does dired-x change `dired-do-shell-command’ in some way?

Yes, I think so.  See the comments there.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29080; Package emacs. (Tue, 31 Oct 2017 21:41:01 GMT) Full text and rfc822 format available.

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

From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "29080 <at> debbugs.gnu.org" <29080 <at> debbugs.gnu.org>
Subject: Re: bug#29080: 25.3; dired-x does not update `shell-command-history'
Date: Tue, 31 Oct 2017 21:40:36 +0000
> Yes, I think so.  See the comments there.

OK, I see.  When dired-x is loaded, `dired-read-shell-command' calls `dired-guess-shell-command' instead of calling `read-shell-command' directly.  And then`dired-guess-shell-command’ ends up calling `read-shell-command', but specifies a different history variable.  And `dired-do-shell-command' calls `dired-read-shell-command’, but `dired-smart-shell-command’ does not, but instead calls `read-shell-command' directly, using the default history variable.

I ended up just making `dired-shell-command-history' an alias for `shell-command-history’.

Thank you for the help.  We can close this issue.

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 01 Nov 2017 03:31:01 GMT) Full text and rfc822 format available.

Notification sent to "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>:
bug acknowledged by developer. (Wed, 01 Nov 2017 03:31:01 GMT) Full text and rfc822 format available.

Message #22 received at 29080-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Matz\, Daniel A. \(JSC-EG511\)" <daniel.a.matz <at> nasa.gov>
Cc: 29080-done <at> debbugs.gnu.org
Subject: Re: bug#29080: 25.3; dired-x does not update `shell-command-history'
Date: Wed, 01 Nov 2017 05:29:58 +0200
> From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz <at> nasa.gov>
> CC: "29080 <at> debbugs.gnu.org" <29080 <at> debbugs.gnu.org>
> Date: Tue, 31 Oct 2017 21:40:36 +0000
> 
> Thank you for the help.  We can close this issue.

Done.




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

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

Previous Next


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