GNU bug report logs -
#1795
shell problem
Previous Next
To reply to this bug, email your comments to 1795 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1795
; Package
emacs
.
(Mon, 05 Jan 2009 23:10:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
relson <at> osage
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 05 Jan 2009 23:10:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
Within an emacs bash shell, using "!!" to re-execute a command with
"$( ... )" in it results in a space inserted between the dollar sign
and the left paren. The inserted space should _not_ be present.
###### Here's the dribble file ######
<escape>xshell<return>ls -l $( 0x2000020locate /.emc<backspace>acs | grep emacs$ 0x2000020)<return>!!<tab><return>exit<return> 0x4000020<escape><session.txt<return>
###### Here's the content of the *shell* window ######
relson <at> osage ~ $ ls -l $( locate /.emacs | grep emacs$ )
-rwxr--r-- 1 relson relson 1506 1999-05-07 07:34 /home/backuppc/maple/d-drive/Backups/viper/c/.emacs
-rwxr--r-- 1 relson relson 1506 1999-05-07 07:34 /home/backuppc/WinNT/d-drive/Backups/viper/c/.emacs
-rwxr--r-- 1 relson relson 7007 2004-04-10 08:46 /home/nic/home/relson/.emacs
-rwxr-xr-x 1 relson relson 8617 2005-06-27 11:27 /home/relson/Orion/cygwin/.emacs
-rw-r--r-- 1 relson relson 2923 2006-11-02 15:54 /home/relson/Orion/emacs.d/.emacs
-rwxr-xr-x 1 relson relson 6788 2004-12-25 18:03 /home/relson/Orion/emacs.d/emacs-20041225/.emacs
-rwxr-xr-x 1 relson relson 6788 2004-12-25 18:03 /home/relson/Orion/emacs.d/emacs-20050607/.emacs
relson <at> osage ~ $ ls -l $ ( locate /.emacs | grep emacs$ )
bash: syntax error near unexpected token `('
relson <at> osage ~ $ exit
exit
Process shell exited abnormally with code 2
###### end of *shell* window contents ######
Note: my home directory, i.e. /home/relson, does _not_ have .emacs file
############################################
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/22.3/etc/DEBUG for instructions.
In GNU Emacs 22.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.12.11)
of 2008-12-30 on osage
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure '--prefix=/usr' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--program-suffix=-emacs-22' '--infodir=/usr/share/info/emacs-22' '--without-carbon' '--with-sound' '--with-x' '--without-toolkit-scroll-bars' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-xpm' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--libdir=/usr/lib64' '--build=x86_64-pc-linux-gnu' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=athlon64 -O2 -pipe' 'LDFLAGS=-Wl,-O1''
Important settings:
value of $LC_ALL: en_US.UTF-8
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8
default-enable-multibyte-characters: t
Major mode: Text
Minor modes in effect:
encoded-kbd-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
<help-echo> <help-echo> <help-echo> C-x C-f s e s <tab>
<return> C-x C-f d r i <tab> <return> <escape> > C-x
b <return> <help-echo> <help-echo> <escape> x t r u
<tab> <return> <escape> x r e p o <tab> r <tab> <r
eturn>
Recent messages:
Loading ansi-color...done
Loading encoded-kb...done
Toggling font-lock-mode off; better pass an explicit argument.
For information about GNU Emacs and the GNU system, type <f1> C-a.
Mark set
Making completion list...
Loading help-mode...done
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1795
; Package
emacs
.
(Thu, 29 Jan 2009 15:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Relson, David" <david.relson <at> orion-sys.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 29 Jan 2009 15:50:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 1795 <at> emacsbugs.donarmstrong.com (full text, mbox):
Recalling previous commands inserts spaces in other cases besides "$(".
For example,
">|" becomes "> |"
"2>&1" becomes "2 > & 1"
Reply sent
to
Chong Yidong <cyd <at> stupidchicken.com>
:
You have taken responsibility.
(Tue, 03 Nov 2009 00:50:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
relson <at> osage
:
bug acknowledged by developer.
(Tue, 03 Nov 2009 00:50:05 GMT)
Full text and
rfc822 format available.
Message #15 received at 1795-done <at> emacsbugs.donarmstrong.com (full text, mbox):
> Within an emacs bash shell, using "!!" to re-execute a command with
> "$( ... )" in it results in a space inserted between the dollar sign
> and the left paren. The inserted space should _not_ be present.
Sorry for the delay; I've just checked a fix into CVS trunk. Thanks for
the bug report.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1795
; Package
emacs
.
(Fri, 13 Nov 2009 00:05:08 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
David Relson <relson <at> osagesoftware.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Fri, 13 Nov 2009 00:05:13 GMT)
Full text and
rfc822 format available.
Message #20 received at 1795 <at> emacsbugs.donarmstrong.com (full text, mbox):
Two problems with the fix:
1) "!1" (bang, one) -- continues to insert a space between "$" and "("
2) "!$" (bang, dollar) -- pulls in the complete previous line, not just
the line's last token.
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Sun, 22 Nov 2009 20:40:05 GMT)
Full text and
rfc822 format available.
Merged 1795 5007.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Sun, 22 Nov 2009 20:40:05 GMT)
Full text and
rfc822 format available.
Merged 1795 5007 8027.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 13 Feb 2011 01:32:01 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
.
(Thu, 17 Mar 2011 11:24:05 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 09 Sep 2011 19:13:02 GMT)
Full text and
rfc822 format available.
bug No longer marked as fixed in versions 24.1.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 09 Sep 2011 19:13:02 GMT)
Full text and
rfc822 format available.
Did not alter fixed versions and reopened.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 09 Sep 2011 19:13:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1795
; Package
emacs
.
(Sat, 09 Jan 2016 22:27:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 1795 <at> debbugs.gnu.org (full text, mbox):
David Relson <relson <at> osagesoftware.com> writes:
> Two problems with the fix:
>
> 1) "!1" (bang, one) -- continues to insert a space between "$" and "("
> 2) "!$" (bang, dollar) -- pulls in the complete previous line, not just
> the line's last token.
It looks to me like 2 is fixed in 25, however 1 is definitely still there.
--
Alan Third
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1795
; Package
emacs
.
(Tue, 26 Jan 2016 04:56:01 GMT)
Full text and
rfc822 format available.
Message #40 received at 1795 <at> debbugs.gnu.org (full text, mbox):
This bug has been re-opened due to duplicates, but I'd just like to also
point out that I just tried this Emacs 25, and can reproduce the
original problem.
help-debbugs <at> gnu.org (GNU bug Tracking System) writes:
> Your bug report
>
> #8027: 23.2; shell problem with $( and !!
>
> which was filed against the emacs package, has been closed.
>
> The explanation is attached below, along with your original report.
> If you require more details, please reply to 8027 <at> debbugs.gnu.org.
>
> --
> 8027: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8027
> GNU Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems
>
> From: Glenn Morris <rgm <at> gnu.org>
> Subject: Re: bug#8027: 23.2; shell problem with $( and !!
> To: 8027-done <at> debbugs.gnu.org, 1795 <at> debbugs.gnu.org
> Date: Thu, 17 Feb 2011 00:04:01 -0500 (4 years, 48 weeks, 6 days ago)
>
> Version: 24.1
>
> As a test, I have set shell-delimiter-argument-list to nil in the Emacs
> trunk. It fixes this issue, but may cause other issues.
>
> If it does, maybe add something like shell-delimiter-no-break-re (cf
> f90.el) that specifies a list of tokens containing delimiter characters
> that are NOT to be broken.
>
> ----------
>
> From: relson <at> osage
> Subject: 23.2; shell problem with $( and !!
> To: bug-gnu-emacs <at> gnu.org, 1795 <at> debbugs.gnu.org
> Date: Sat, 12 Feb 2011 20:32:16 -0500
> Date: Sat, 12 Feb 2011 20:32:16 -0500 (4 years, 49 weeks, 4 days ago)
>
> In a shell window using "!!<tab>" when the previous command uses "$(
> ... )" improperaly adds a space between the "$" and the "(".
>
> Starting with a directory containg a file named "test", here's how to demonstrate the problem:
>
> 1) In a shell window I can execute "find . -name test" and it'll find the 1
> file that's truly in the current directory.
>
> 2) I can then execute 'ls -l !!<tab>' and the expansion will be "ls -l
> `find . -name test`" which is correct.
>
> 3) I can also execute 'ls -l $( find . -name test)` and the test file will
> be correctly listed.
>
> 4) However, if I then type 'ls -l !!<tab>' the "$(" becomes "$ (" (with
> a space in the middle), and the command fails.
>
>
> In GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1)
> of 2011-01-31 on osage
> Windowing system distributor `The X.Org Foundation', version 11.0.10902000
> configured using `configure '--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-crt-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../lib64' '--with-gameuser=games' '--with-sound' '--with-x' '--without-gconf' '--without-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--without-xft' '--without-libotf' '--without-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--without-kerberos' '--without-kerberos5' '--with-gpm' '--with-dbus' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=athlon64 -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CPPFLAGS=''
>
> Important settings:
> value of $LC_ALL: en_US.UTF-8
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: en_US.UTF-8
> value of $XMODIFIERS: nil
> locale-coding-system: utf-8-unix
> default enable-multibyte-characters: t
>
> Major mode: Shell
>
> Minor modes in effect:
> shell-dirtrack-mode: t
> tooltip-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-encryption-mode: t
> auto-compression-mode: t
> line-number-mode: t
> transient-mark-mode: t
>
> Recent input:
> <escape> x s h e l l <return> f i n d SPC . SPC - n
> a m e SPC t e s t <return> l s SPC - l SPC ` ! ! `
> <tab> <return> l s SPC - l SPC $ ( SPC f i n d SPC
> SPC <backspace> . SPC - n a m e SPC t e s t S-SPC )
> <return> ! ! <tab> <return> <escape> x r e p o <tab>
> r <tab> <return>
>
> Recent messages:
> For information about GNU Emacs and the GNU system, type C-h C-a.
> History item: previous [2 times]
> Making completion list...
>
> Load-path shadows:
> None found.
>
> Features:
> (shadow sort mail-extr message idna sendmail regexp-opt ecomplete rfc822
> mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
> mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
> gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
> mailheader canlock sha1 hex-util hashcash mail-utils emacsbug help-mode
> easymenu view ansi-color shell comint ring tooltip ediff-hook vc-hooks
> lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
> lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
> mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
> georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
> korean japanese hebrew greek romanian slovak czech european ethiopic
> indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
> abbrev loaddefs button minibuffer faces cus-face files text-properties
> overlay md5 base64 format env code-pages mule custom widget
> hashtable-print-readable backquote make-network-process dbusbind gtk
> x-toolkit x multi-tty emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1795
; Package
emacs
.
(Sun, 08 May 2022 14:02:01 GMT)
Full text and
rfc822 format available.
Message #45 received at 1795 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
relson <at> osage writes:
> Within an emacs bash shell, using "!!" to re-execute a command with
> "$( ... )" in it results in a space inserted between the dollar sign
> and the left paren. The inserted space should _not_ be present.
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I'm unable to reproduce this in any Emacs versions I have (Emacs 25.1
and up):
[Message part 2 (image/png, inline)]
[Message part 3 (text/plain, inline)]
Are you still seeing this problem in recent Emacs versions?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1795
; Package
emacs
.
(Sat, 24 Sep 2022 11:22:02 GMT)
Full text and
rfc822 format available.
Message #48 received at 1795 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> relson <at> osage writes:
>
>> Within an emacs bash shell, using "!!" to re-execute a command with
>> "$( ... )" in it results in a space inserted between the dollar sign
>> and the left paren. The inserted space should _not_ be present.
>
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
>
> I'm unable to reproduce this in any Emacs versions I have (Emacs 25.1
> and up):
While I can't reproduce the original recipe from Bug#1795, the problem
is still there. Look at the recipes in Bug#5007 or Bug#8027, or try
this:
M-x shell
cat <(date)
!!
Type M-p
You'll see that the command has been modified and now reads:
cat < ( date )
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#1795
; Package
emacs
.
(Sat, 24 Sep 2022 11:53:02 GMT)
Full text and
rfc822 format available.
Message #51 received at 1795 <at> debbugs.gnu.org (full text, mbox):
Mauro Aranda <maurooaranda <at> gmail.com> writes:
> While I can't reproduce the original recipe from Bug#1795, the problem
> is still there. Look at the recipes in Bug#5007 or Bug#8027, or try
> this:
>
> M-x shell
> cat <(date)
> !!
> Type M-p
>
> You'll see that the command has been modified and now reads:
> cat < ( date )
Yup. How odd -- just `M-p'-ing after "cat <(date)" does the right
thing, and "!!" does the right thing, but `M-p' after "!!" mangles
spaces?
I had a brief look at the code here
(`comint-replace-by-expanded-history-before-point' etc), but I'm pretty
unfamiliar with this code, and it wasn't immediately clear where the
problem stems from.
Anybody have any ideas?
This bug report was last modified 2 years and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.