unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29080: 25.3; dired-x does not update `shell-command-history'
@ 2017-10-31 15:39 Matz, Daniel A. (JSC-EG511)
  2017-10-31 20:24 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Matz, Daniel A. (JSC-EG511) @ 2017-10-31 15:39 UTC (permalink / raw)
  To: 29080

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#29080: 25.3; dired-x does not update `shell-command-history'
  2017-10-31 15:39 bug#29080: 25.3; dired-x does not update `shell-command-history' Matz, Daniel A. (JSC-EG511)
@ 2017-10-31 20:24 ` Eli Zaretskii
  2017-10-31 20:36   ` Matz, Daniel A. (JSC-EG511)
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-10-31 20:24 UTC (permalink / raw)
  To: Matz, Daniel A. (JSC-EG511); +Cc: 29080

> From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz@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).





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#29080: 25.3; dired-x does not update `shell-command-history'
  2017-10-31 20:24 ` Eli Zaretskii
@ 2017-10-31 20:36   ` Matz, Daniel A. (JSC-EG511)
  2017-10-31 20:47     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Matz, Daniel A. (JSC-EG511) @ 2017-10-31 20:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 29080@debbugs.gnu.org

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#29080: 25.3; dired-x does not update `shell-command-history'
  2017-10-31 20:36   ` Matz, Daniel A. (JSC-EG511)
@ 2017-10-31 20:47     ` Eli Zaretskii
  2017-10-31 21:40       ` Matz, Daniel A. (JSC-EG511)
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2017-10-31 20:47 UTC (permalink / raw)
  To: Matz, Daniel A. (JSC-EG511); +Cc: 29080

> From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz@nasa.gov>
> CC: "29080@debbugs.gnu.org" <29080@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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#29080: 25.3; dired-x does not update `shell-command-history'
  2017-10-31 20:47     ` Eli Zaretskii
@ 2017-10-31 21:40       ` Matz, Daniel A. (JSC-EG511)
  2017-11-01  3:29         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Matz, Daniel A. (JSC-EG511) @ 2017-10-31 21:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 29080@debbugs.gnu.org

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#29080: 25.3; dired-x does not update `shell-command-history'
  2017-10-31 21:40       ` Matz, Daniel A. (JSC-EG511)
@ 2017-11-01  3:29         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2017-11-01  3:29 UTC (permalink / raw)
  To: Matz, Daniel A. (JSC-EG511); +Cc: 29080-done

> From: "Matz, Daniel A. (JSC-EG511)" <daniel.a.matz@nasa.gov>
> CC: "29080@debbugs.gnu.org" <29080@debbugs.gnu.org>
> Date: Tue, 31 Oct 2017 21:40:36 +0000
> 
> Thank you for the help.  We can close this issue.

Done.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-01  3:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-31 15:39 bug#29080: 25.3; dired-x does not update `shell-command-history' Matz, Daniel A. (JSC-EG511)
2017-10-31 20:24 ` Eli Zaretskii
2017-10-31 20:36   ` Matz, Daniel A. (JSC-EG511)
2017-10-31 20:47     ` Eli Zaretskii
2017-10-31 21:40       ` Matz, Daniel A. (JSC-EG511)
2017-11-01  3:29         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).