unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Enric Rodríguez Carbonell" <erodri@cs.upc.edu>
To: 36103@debbugs.gnu.org
Subject: bug#36103: 24.5; Blank spaces around parentheses in history expansion in shell mode
Date: Wed, 5 Jun 2019 13:03:49 +0200	[thread overview]
Message-ID: <5fb3dec3-3c48-9a49-cc50-8f68981978af@cs.upc.edu> (raw)

Hi,

I would like to report what I think is a bug in the history expansion in 
shell mode.

This is the sequence of steps:

$ emacs -Q

Once in emacs:

M-x shell

Then I type in the command line of the shell window:

$ for file in $(ls); do echo $file; done

Then I type at the prompt:

$ !for

and then run command:

M-x comint-replace-by-expanded-history

which replaces the

$ !for

by

$ for file in $ ( ls ) ; do echo $file ; done

The blank spaces around the parentheses should not be there.
Because of these blank spaces, this command cannot be executed,
as "$ (" should be "$(".

Best regards,

Enric

****************************************************************

In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
  of 2017-09-20 on lcy01-07, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11804000
System Description:    Ubuntu 16.04.6 LTS

Configured using:
  `configure --build x86_64-linux-gnu --prefix=/usr
  --sharedstatedir=/var/lib --libexecdir=/usr/lib
  --localstatedir=/var/lib --infodir=/usr/share/info
  --mandir=/usr/share/man --with-pop=yes
  --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
  --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
  --libexecdir=/usr/lib --localstatedir=/var/lib
  --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
  --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
  --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
  'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
  -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
  -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Important settings:
   value of $LC_MONETARY: es_ES.UTF-8
   value of $LC_NUMERIC: es_ES.UTF-8
   value of $LC_TIME: es_ES.UTF-8
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: @im=ibus
   locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
   shell-dirtrack-mode: t
   tooltip-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
   line-number-mode: t
   transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
History item: 1

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils shell pcomplete comint ansi-color
ring time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar 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 minibuffer 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 make-network-process dbusbind
gfilenotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 75917 7030)
  (symbols 48 18019 0)
  (miscs 40 45 149)
  (strings 32 11232 4144)
  (string-bytes 1 311767)
  (vectors 16 9670)
  (vector-slots 8 389946 11489)
  (floats 8 63 219)
  (intervals 56 308 19)
  (buffers 960 12)
  (heap 1024 16912 853))
-- 
_______________________________________
Enric Rodriguez Carbonell
Technical University of Catalonia (UPC)
www.cs.upc.edu/~erodri
+34-93-4137815

Office 113 - Omega Building
Department of Computer Science (CS)
Jordi Girona 1, 08034 Barcelona, Spain
_______________________________________






             reply	other threads:[~2019-06-05 11:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 11:03 Enric Rodríguez Carbonell [this message]
2019-06-06  1:02 ` bug#36103: 24.5; Blank spaces around parentheses in history expansion in shell mode Noam Postavsky
2023-10-03 10:54 ` Mauro Aranda
2023-10-07 13:39   ` Mauro Aranda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5fb3dec3-3c48-9a49-cc50-8f68981978af@cs.upc.edu \
    --to=erodri@cs.upc.edu \
    --cc=36103@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).