* bug#8027: 23.2; shell problem with $( and !!
@ 2011-02-13 1:32 ` Unknown
2011-02-13 2:22 ` Glenn Morris
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Unknown @ 2011-02-13 1:32 UTC (permalink / raw)
To: 8027
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)
--
David Relson Osage Software Systems, Inc.
relson@osagesoftware.com Ann Arbor, MI 48103
www.osagesoftware.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: 23.2; shell problem with $( and !!
2011-02-13 1:32 ` Unknown
@ 2011-02-13 2:22 ` Glenn Morris
2011-02-13 2:24 ` Glenn Morris
2011-06-13 1:34 ` bug#8027: Default value for shell-delimiter-argument-list Jose E. Marchesi
[not found] ` <handler.8027.D8027.129791850130793.notifdone@debbugs.gnu.org>
2 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2011-02-13 2:22 UTC (permalink / raw)
To: relson; +Cc: 8027
Dupe of 1795 and 5007.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: 23.2; shell problem with $( and !!
2011-02-13 2:22 ` Glenn Morris
@ 2011-02-13 2:24 ` Glenn Morris
2011-02-13 4:21 ` David Relson
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2011-02-13 2:24 UTC (permalink / raw)
To: relson; +Cc: 8027
Please use a valid email address when reporting bugs.
Glenn Morris wrote (on Sat, 12 Feb 2011 at 21:22 -0500):
> Dupe of 1795 and 5007.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: 23.2; shell problem with $( and !!
2011-02-13 2:24 ` Glenn Morris
@ 2011-02-13 4:21 ` David Relson
2011-02-13 19:58 ` Glenn Morris
0 siblings, 1 reply; 12+ messages in thread
From: David Relson @ 2011-02-13 4:21 UTC (permalink / raw)
To: Glenn Morris; +Cc: 8027
On Sat, 12 Feb 2011 21:24:20 -0500
Glenn Morris wrote:
>
> Please use a valid email address when reporting bugs.
>
> Glenn Morris wrote (on Sat, 12 Feb 2011 at 21:22 -0500):
>
> > Dupe of 1795 and 5007.
Hi Glen,
Sorry about that, and I thank you for writing. I had wondered why
there wasn't an autoresponse to the bug report.
Evidently emacs' bug reporting system picked up my machine name
from /etc/hosts, which I didn't realize, rather than my email address.
How do I tell emacs my email address so that bug reports will be
correct (without needing manual fixing)?
FWIW, the fix for 1795 is defective. It fixes the changing of "$(" to
"$ (" when "!!<tab>" is used. However, when "!$<tab>" is used to get
the last argument, the 1795 fix duplicates the whole previous line.
It's my belief that "!$<tab>" and "!$<enter>" should behave the same,
but they don't and it's frustrating.
David
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: 23.2; shell problem with $( and !!
2011-02-13 4:21 ` David Relson
@ 2011-02-13 19:58 ` Glenn Morris
2011-02-15 1:42 ` Glenn Morris
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2011-02-13 19:58 UTC (permalink / raw)
To: David Relson; +Cc: 8027
David Relson wrote:
> Evidently emacs' bug reporting system picked up my machine name
> from /etc/hosts, which I didn't realize, rather than my email address.
> How do I tell emacs my email address so that bug reports will be
> correct (without needing manual fixing)?
I think you can set user-mail-address.
Perhaps report-emacs-bug should be improved in this regard.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: 23.2; shell problem with $( and !!
2011-02-13 19:58 ` Glenn Morris
@ 2011-02-15 1:42 ` Glenn Morris
0 siblings, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2011-02-15 1:42 UTC (permalink / raw)
To: David Relson; +Cc: 8027
Try setting shell-delimiter-argument-list to nil.
(Though I don't know if this will have any other adverse affects.)
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: 23.2; shell problem with $( and !!
[not found] ` <20110215073140.2b4f075c@osage.osagesoftware.com>
@ 2011-02-15 18:46 ` Glenn Morris
2011-02-17 5:04 ` Glenn Morris
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2011-02-15 18:46 UTC (permalink / raw)
To: David Relson; +Cc: 8027
Please keep the debbugs.gnu.org address cc'd on replies.
David Relson wrote (on Tue, 15 Feb 2011 at 07:31 -0500):
> Adding the following lines to .emacs is working well (with no adverse
> effects noticed yet)
>
> (defvar shell-delimiter-argument-list)
> (setq shell-delimiter-argument-list nil)
>
> I'll propagate the addition to my various platforms (gentoo, centos,
> ubuntu, solaris, and cygwin) and see what happens :->
>
> Thanks!
>
> David
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: 23.2; shell problem with $( and !!
2011-02-15 18:46 ` bug#8027: 23.2; shell problem with $( and !! Glenn Morris
@ 2011-02-17 5:04 ` Glenn Morris
2011-02-13 1:32 ` Unknown
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2011-02-17 5:04 UTC (permalink / raw)
To: 8027-done
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: Default value for shell-delimiter-argument-list
2011-02-13 1:32 ` Unknown
2011-02-13 2:22 ` Glenn Morris
@ 2011-06-13 1:34 ` Jose E. Marchesi
2011-09-09 19:13 ` Glenn Morris
[not found] ` <handler.8027.D8027.129791850130793.notifdone@debbugs.gnu.org>
2 siblings, 1 reply; 12+ messages in thread
From: Jose E. Marchesi @ 2011-06-13 1:34 UTC (permalink / raw)
To: 8027
[ resent from
http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg00392.html ]
Hi.
Today I tried to cd into a directory named "Introduction & motivation/"
while in shell-mode, by typing I and then TAB. To my surprise the
resulting expanded and quoted name was "Introduction\\ &\\ motivation"
instead of "Inroduction\\ \\&\\ motivation".
Unfortunately I only realized what was going on after hitting RET and
having bash trying to execute the command "motivation".
Seems that the default value of shell-delimiter-argument-list was
changed to nil as a way to fix bug #8027 [1]. As a consequence the
expanded filenames in shell-mode are not safe to be included in a
command line.
Is that a definitive fix or just a workaround until a better solution is
found for the problem with the !! completion?
[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8027
--
Jose E. Marchesi jemarch@gnu.org
GNU Project http://www.gnu.org
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: Default value for shell-delimiter-argument-list
2011-06-13 1:34 ` bug#8027: Default value for shell-delimiter-argument-list Jose E. Marchesi
@ 2011-09-09 19:13 ` Glenn Morris
2012-02-15 8:01 ` Glenn Morris
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2011-09-09 19:13 UTC (permalink / raw)
To: 8027
I have reopened this in light of the message I forwarded from
emacs-devel. Probably this change should be reverted and re-done another
way.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#8027: Default value for shell-delimiter-argument-list
2011-09-09 19:13 ` Glenn Morris
@ 2012-02-15 8:01 ` Glenn Morris
0 siblings, 0 replies; 12+ messages in thread
From: Glenn Morris @ 2012-02-15 8:01 UTC (permalink / raw)
To: 8027
Glenn Morris wrote:
> I have reopened this in light of the message I forwarded from
> emacs-devel. Probably this change should be reverted and re-done another
> way.
I reverted it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#1795: bug#8027: closed (Re: bug#8027: 23.2; shell problem with $( and !!)
[not found] ` <handler.8027.D8027.129791850130793.notifdone@debbugs.gnu.org>
@ 2016-01-26 4:54 ` Andrew Hyatt
0 siblings, 0 replies; 12+ messages in thread
From: Andrew Hyatt @ 2016-01-26 4:54 UTC (permalink / raw)
To: 1795; +Cc: 8027
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@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@debbugs.gnu.org.
>
> --
> 8027: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8027
> GNU Bug Tracking System
> Contact help-debbugs@gnu.org with problems
>
> From: Glenn Morris <rgm@gnu.org>
> Subject: Re: bug#8027: 23.2; shell problem with $( and !!
> To: 8027-done@debbugs.gnu.org, 1795@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@osage
> Subject: 23.2; shell problem with $( and !!
> To: bug-gnu-emacs@gnu.org, 1795@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-lin
ux-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)
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-01-26 4:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20110214231338.7a1a771c@osage.osagesoftware.com>
[not found] ` <20110215073140.2b4f075c@osage.osagesoftware.com>
2011-02-15 18:46 ` bug#8027: 23.2; shell problem with $( and !! Glenn Morris
2011-02-17 5:04 ` Glenn Morris
2011-02-13 1:32 ` Unknown
2011-02-13 2:22 ` Glenn Morris
2011-02-13 2:24 ` Glenn Morris
2011-02-13 4:21 ` David Relson
2011-02-13 19:58 ` Glenn Morris
2011-02-15 1:42 ` Glenn Morris
2011-06-13 1:34 ` bug#8027: Default value for shell-delimiter-argument-list Jose E. Marchesi
2011-09-09 19:13 ` Glenn Morris
2012-02-15 8:01 ` Glenn Morris
[not found] ` <handler.8027.D8027.129791850130793.notifdone@debbugs.gnu.org>
2016-01-26 4:54 ` bug#1795: bug#8027: closed (Re: bug#8027: 23.2; shell problem with $( and !!) Andrew Hyatt
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.