bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22203: 25.0.50; # is treated as a comment character in shell-command


From: Kaushal Modi
Subject: bug#22203: 25.0.50; # is treated as a comment character in shell-command arg
Date: Fri, 18 Dec 2015 11:25:07 -0500

Hi,

I need to run shell-command that has a hash character (#) in it.

Here's is a trivialized example of what I need to do

(shell-command "echo abc#def" "*abc*")

The above works in a terminal and also in the below build from master branch:

Build date        : 2015/11/12 12:45 Thu
Savannah Git link :
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9dd7da9945c16aa343080a535ed74eeecf769fd1

commit 9dd7da9945c16aa343080a535ed74eeecf769fd1
Author: Juanma Barranquero <lekktu@gmail.com>
Commit: Juanma Barranquero <lekktu@gmail.com>

    * test/automated/keymap-tests.el: New test file

I get the output "abc#def" in both the cases.

But when I do the same in an emacs -Q session on the latest emacs
build on emacs-25 branch, the # is treated as a "comment char" and
everything after the # is not passed to the shell.

So

(shell-command "echo abc#def" "*abc*")

is treated as

(shell-command "echo abc" "*abc*")

I searched the log messages for "shell-command" here:
http://git.savannah.gnu.org/cgit/emacs.git/log/?h=emacs-25 but I did
not find a commit that could have caused this change.

Is this change intentional? If so, how do I pass "#" to the shell
using shell-command?

Thanks!


In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.23)
 of 2015-12-17
Repository revision: ecce24b34ba51f10d2a729bf5496a1cbec0bf329
Windowing system distributor 'The X.Org Foundation', version 11.0.60900000
System Description: Red Hat Enterprise Linux Workstation release 6.6 (Santiago)

Configured using:
 'configure --prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-25
 'CPPFLAGS=-fgnu89-inline -I/home/kmodi/usr_local/6/include
 -I/usr/include/freetype2 -I/usr/include' 'CFLAGS=-ggdb3 -O0'
 'CXXFLAGS=-ggdb3 -O0' 'LDFLAGS=-L/home/kmodi/usr_local/6/lib
 -L/home/kmodi/usr_local/6/lib64 -ggdb3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

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

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

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message dired format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr
mail-utils time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd
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 dbusbind inotify
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 82254 6037)
 (symbols 48 19481 0)
 (miscs 40 48 136)
 (strings 32 12980 4411)
 (string-bytes 1 391078)
 (vectors 16 11502)
 (vector-slots 8 429541 5229)
 (floats 8 143 131)
 (intervals 56 232 16)
 (buffers 976 13)
 (heap 1024 30926 755))


--
Kaushal Modi





reply via email to

[Prev in Thread] Current Thread [Next in Thread]