From unknown Sun Jun 22 07:32:13 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#22203 <22203@debbugs.gnu.org> To: bug#22203 <22203@debbugs.gnu.org> Subject: Status: 25.0.50; # is treated as a comment character in shell-command arg Reply-To: bug#22203 <22203@debbugs.gnu.org> Date: Sun, 22 Jun 2025 14:32:13 +0000 retitle 22203 25.0.50; # is treated as a comment character in shell-command= arg reassign 22203 emacs submitter 22203 Kaushal Modi severity 22203 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 11:26:03 2015 Received: (at submit) by debbugs.gnu.org; 18 Dec 2015 16:26:03 +0000 Received: from localhost ([127.0.0.1]:55858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9xr1-0006XJ-5S for submit@debbugs.gnu.org; Fri, 18 Dec 2015 11:26:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:32887) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9xqz-0006Wq-O5 for submit@debbugs.gnu.org; Fri, 18 Dec 2015 11:26:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9xqq-0007ZI-4W for submit@debbugs.gnu.org; Fri, 18 Dec 2015 11:25:56 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9xqp-0007ZD-NO for submit@debbugs.gnu.org; Fri, 18 Dec 2015 11:25:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9xqn-00017B-OI for bug-gnu-emacs@gnu.org; Fri, 18 Dec 2015 11:25:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9xql-0007Yw-LA for bug-gnu-emacs@gnu.org; Fri, 18 Dec 2015 11:25:48 -0500 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:35059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9xql-0007Yp-9h for bug-gnu-emacs@gnu.org; Fri, 18 Dec 2015 11:25:47 -0500 Received: by mail-qk0-x231.google.com with SMTP id u65so94030717qkh.2 for ; Fri, 18 Dec 2015 08:25:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=8BWhSf7LvDzLCaNVfFJyYNfTRhXa70S4Xn8yR3ZdZPg=; b=C/dd73Ks/NJYaK2Ao4bZbyPS3diSCPgiGOm93W35CTOd4HNQeih8t1JHscSWtgqq40 +uboCNu2IaLpQaGWOqh43HjgBCqPy3hiWxLTFige2Ine9SBWwBty5d1w0E6ceqY4dr5J P+OcwBqCAA6qv39H/FUdOyodCCDkWdN9u4+gbatjIqMofxR9AQ3JSZ+SlCb/KLXCNTfB zwcmh1fLhIX48Ol3o8fN2xlUwp1AVMri+HC9E8TODCHZrH68bps21G0QGhulHfpIXzk0 QZQXLIj0zKOua/QOcN41ewCGWUB6479tgi5qdHOFpqncWSO0IS0+ZwZA86guLbG9ysss pfxw== X-Received: by 10.55.74.197 with SMTP id x188mr6277981qka.104.1450455946655; Fri, 18 Dec 2015 08:25:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.143.7 with HTTP; Fri, 18 Dec 2015 08:25:07 -0800 (PST) From: Kaushal Modi Date: Fri, 18 Dec 2015 11:25:07 -0500 Message-ID: Subject: 25.0.50; # is treated as a comment character in shell-command arg To: "bug-gnu-emacs@gnu.org" Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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 Commit: Juanma Barranquero * 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 11:43:13 2015 Received: (at control) by debbugs.gnu.org; 18 Dec 2015 16:43:13 +0000 Received: from localhost ([127.0.0.1]:55884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9y7d-0007dQ-1F for submit@debbugs.gnu.org; Fri, 18 Dec 2015 11:43:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39412) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9y7b-0007dA-03 for control@debbugs.gnu.org; Fri, 18 Dec 2015 11:43:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9y7V-0004MX-1f for control@debbugs.gnu.org; Fri, 18 Dec 2015 11:43:05 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9y7U-0004MO-Vl for control@debbugs.gnu.org; Fri, 18 Dec 2015 11:43:04 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1a9y7U-0000Nb-Nd for control@debbugs.gnu.org; Fri, 18 Dec 2015 11:43:04 -0500 Subject: control message for bug 19759 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Fri, 18 Dec 2015 11:43:04 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) block 19759 by 22203 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 12:39:44 2015 Received: (at 22203) by debbugs.gnu.org; 18 Dec 2015 17:39:44 +0000 Received: from localhost ([127.0.0.1]:55934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9z0K-0003pe-MA for submit@debbugs.gnu.org; Fri, 18 Dec 2015 12:39:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60104) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9z0I-0003pP-Ql for 22203@debbugs.gnu.org; Fri, 18 Dec 2015 12:39:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9z0D-0004UO-0e for 22203@debbugs.gnu.org; Fri, 18 Dec 2015 12:39:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9z0B-0004TZ-RZ; Fri, 18 Dec 2015 12:39:35 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1a9z0A-0000qz-PU; Fri, 18 Dec 2015 12:39:34 -0500 From: Glenn Morris To: Kaushal Modi Subject: Re: bug#22203: 25.0.50; # is treated as a comment character in shell-command arg References: X-Spook: Recall military rail gun Gunfight Kosovo Ricin Power X-Ran: 6EI7!Np}+A8q'%;E>qd7Wd9Q!lD@R:*~/z3F9WwfT!9%I5ugBMEhH?H-8abw\qkZ?BK3YU X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 18 Dec 2015 12:39:34 -0500 In-Reply-To: (Kaushal Modi's message of "Fri, 18 Dec 2015 11:25:07 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22203 Cc: 22203@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Kaushal Modi wrote: > 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. I can't reproduce this. On the face of it, it seems unlikely to me that master and emacs-25 would have diverged in this area. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 13:35:42 2015 Received: (at 22203) by debbugs.gnu.org; 18 Dec 2015 18:35:42 +0000 Received: from localhost ([127.0.0.1]:55950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9zsU-00057c-Hk for submit@debbugs.gnu.org; Fri, 18 Dec 2015 13:35:42 -0500 Received: from mail-qg0-f45.google.com ([209.85.192.45]:36061) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1a9zsT-00057Q-LH for 22203@debbugs.gnu.org; Fri, 18 Dec 2015 13:35:41 -0500 Received: by mail-qg0-f45.google.com with SMTP id c96so40007423qgd.3 for <22203@debbugs.gnu.org>; Fri, 18 Dec 2015 10:35:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=qTNTdbu330sqHOFjBS0tYiSw4a9/gpj64yGg10/UoDs=; b=wyhGVsnA3GBi47SGvWk6+HmmPzJ/lS7e4+46vQGWtZuWFT2syM+ERBK3clJ58sY4Hp CBo2mXqXqQ8xXf6uGY/4FXny4Wza0qeLhjI1E6gBEbCIOwWvHC+X1q7uz86faEhNLRaO LPm3ZF6DMio+yQQfDT7LIZMb5B4HM5g9yEnX89bpo9ZpRrh/ikPj+Zni6+uq/dfEBLFg OdtqX7gzT8WVgGrVFMbI0Ykto5Q/CGMhuQECSHxLWTCg5VVLqdebzHeS9hPWSQwoneAQ JkLVjcFW5SPEHeDb/rLdieOyUKCps1UiGS4IbqmXKEJz4yqO+KXAJ1notar6bUFvMP4c bhRg== X-Received: by 10.140.101.233 with SMTP id u96mr7216595qge.70.1450463736213; Fri, 18 Dec 2015 10:35:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.143.7 with HTTP; Fri, 18 Dec 2015 10:34:56 -0800 (PST) In-Reply-To: References: From: Kaushal Modi Date: Fri, 18 Dec 2015 13:34:56 -0500 Message-ID: Subject: Re: bug#22203: 25.0.50; # is treated as a comment character in shell-command arg To: Glenn Morris Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22203 Cc: 22203@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > I can't reproduce this. That's odd. But in any case here is a gif of that in action. This is on the following build of emacs-25 branch in an emacs -Q session, Build date : 2015/12/17 18:57 Thu Savannah Git link : http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=ecce24b34ba51f10d2a729bf5496a1cbec0bf329 commit ecce24b34ba51f10d2a729bf5496a1cbec0bf329 Author: Eli Zaretskii Commit: Eli Zaretskii Fix a typo in the Emacs manual * doc/emacs/trouble.texi (Sending Patches): Fix a typo. Reported by Lele Gaifax . (Bug#22193) GIF: http://i.imgur.com/Jyskbmv.gifv From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 14:13:20 2015 Received: (at 22203) by debbugs.gnu.org; 18 Dec 2015 19:13:20 +0000 Received: from localhost ([127.0.0.1]:55974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA0Su-00060p-AO for submit@debbugs.gnu.org; Fri, 18 Dec 2015 14:13:20 -0500 Received: from b2bqsv11.mx.upcmail.net ([62.179.121.55]:45311) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA0Sr-00060X-PE for 22203@debbugs.gnu.org; Fri, 18 Dec 2015 14:13:18 -0500 Received: from edge12.upcmail.net ([192.168.13.82]) by b2bqsv11.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20151218191311.HKQN22374.b2bqsv11-int.chello.at@edge12.upcmail.net> for <22203@debbugs.gnu.org>; Fri, 18 Dec 2015 20:13:11 +0100 Received: from iznogoud.viz ([91.119.139.29]) by edge12.upcmail.net with edge id v7DA1r01o0eEoi30C7DAad; Fri, 18 Dec 2015 20:13:11 +0100 X-SourceIP: 91.119.139.29 Received: from wolfgang by iznogoud.viz with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aA0Sk-0000ZY-F0; Fri, 18 Dec 2015 20:13:10 +0100 From: Wolfgang Jenkner To: Kaushal Modi Subject: Re: bug#22203: 25.0.50; # is treated as a comment character in shell-command arg Date: Fri, 18 Dec 2015 20:11:52 +0100 References: Message-ID: <85io3va7uh.fsf@iznogoud.viz> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22203 Cc: 22203@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Fri, Dec 18 2015, Kaushal Modi wrote: > (shell-command "echo abc#def" "*abc*") > > is treated as > > (shell-command "echo abc" "*abc*") The last stop in the call chain before entering C-land is `call-process-region'. It might be interesting to see what arguments that function is passed (M-x trace-function). Wolfgang From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 14:31:00 2015 Received: (at 22203) by debbugs.gnu.org; 18 Dec 2015 19:31:00 +0000 Received: from localhost ([127.0.0.1]:55991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA0k0-000878-Fz for submit@debbugs.gnu.org; Fri, 18 Dec 2015 14:31:00 -0500 Received: from mail-qg0-f49.google.com ([209.85.192.49]:34637) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA0jz-00086g-F7 for 22203@debbugs.gnu.org; Fri, 18 Dec 2015 14:30:59 -0500 Received: by mail-qg0-f49.google.com with SMTP id p62so10873980qge.1 for <22203@debbugs.gnu.org>; Fri, 18 Dec 2015 11:30:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=j3QTTw19YYhLHi19r919x2sSujAFU8tX4sSvb7haWyo=; b=foUYotKOo9qH8vdyl81p8okKK1qBlnsDVK6EF3MRF4n4ETQR4B4QIbEwOs15WliEOI iAaMTqC0utIuCrYxq1Yu53MQ4YX6lT3qfUkc/rkZdnb0RXPtuhv8DJ0XwUbN1p/UAem8 HWg918j3j4kb9IR3tRxCvchxCyWZybCZkX6kSnBF+a4ejddR6NQbkrMQd2cL7IpYvGli dOig3Uvblv5bhD/EPRE+W/WGzarPLDwGGjZEJENLKqSaTeBI09pR7hK/lG3IT5d/dy+U mvKMhIWDQvpocX+hWuUieK6NCacjMWq/+9bwWUI5Evu3dgIOzChYbll5Y3rJdiLbp0Hv 0Lpg== X-Received: by 10.140.143.208 with SMTP id 199mr8092341qhp.84.1450467053743; Fri, 18 Dec 2015 11:30:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.143.7 with HTTP; Fri, 18 Dec 2015 11:30:14 -0800 (PST) In-Reply-To: <85io3va7uh.fsf@iznogoud.viz> References: <85io3va7uh.fsf@iznogoud.viz> From: Kaushal Modi Date: Fri, 18 Dec 2015 14:30:14 -0500 Message-ID: Subject: Re: bug#22203: 25.0.50; # is treated as a comment character in shell-command arg To: Wolfgang Jenkner Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22203 Cc: 22203@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Wolfgang, > The last stop in the call chain before entering C-land is > `call-process-region'. It might be interesting to see what arguments > that function is passed (M-x trace-function). I get this by doing trace-function on call-process-region. It looks like the arguments are passed alright .. but the result buffer *test* shows just "abc" (without quotes) as in the GIF I posted in my previous email. ====================================================================== 1 -> (call-process-region 18234 18234 "/bin/tcsh" nil # nil "-c" "echo abc#def") 1 <- call-process-region: 0 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 14:50:11 2015 Received: (at 22203-done) by debbugs.gnu.org; 18 Dec 2015 19:50:11 +0000 Received: from localhost ([127.0.0.1]:56026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA12Z-0001nx-Iy for submit@debbugs.gnu.org; Fri, 18 Dec 2015 14:50:11 -0500 Received: from mail-qk0-f181.google.com ([209.85.220.181]:34214) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA12Y-0001nl-VD for 22203-done@debbugs.gnu.org; Fri, 18 Dec 2015 14:50:11 -0500 Received: by mail-qk0-f181.google.com with SMTP id p187so115441502qkd.1 for <22203-done@debbugs.gnu.org>; Fri, 18 Dec 2015 11:50:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=9XOc5va3qnrNjOtNiSQJlFKcttLt34lU30eOv0vyJXY=; b=kAvRGb9twoBifnEM4TfM36LZBK4wpdzDhw3nsUVGyyMOMQgMnfm9jZo6UCJcoC4MwG Syd0zlzVovAEstKn9H0c/33IWhnuNX954WD2izKtpJ7BgYilBHsFib6mjpdkynWNkApY si4zz/Cc0CbvwI7B/MaOCegOSqXL7bOL7dqnzKAIxgcdp7dowuafTQvghmW8t/DqWQfk c6MgMVQtZKFcWvcbUWWbDTZugwkHI2CBhoPa/Byyfr4lBZX4wPbt+0kMqGHQxjw9ks2S gJ45YwEzMMf8enxhd/Vh44nJx8JB42aIj/HnPMqw2B3D/VDh2luOKntLJDKaNY4Z55DJ 0/eQ== X-Received: by 10.55.41.138 with SMTP id p10mr7564130qkp.18.1450468205482; Fri, 18 Dec 2015 11:50:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.143.7 with HTTP; Fri, 18 Dec 2015 11:49:26 -0800 (PST) In-Reply-To: References: <85io3va7uh.fsf@iznogoud.viz> From: Kaushal Modi Date: Fri, 18 Dec 2015 14:49:26 -0500 Message-ID: Subject: Re: bug#22203: 25.0.50; # is treated as a comment character in shell-command arg To: 22203-done@debbugs.gnu.org, Glenn Morris Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22203-done Cc: Wolfgang Jenkner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I am closing this issue. After further testing.. it turns out that this issue doesn't have to do anything with emacs. Here's what happened: I was running the separate instances of emacs (master branch version and emacs-25 branch version) from different terminals. In the terminal where I was running the master branch version (working case) I was on HOST (env var) X. In the terminal where I was running the emacs-25 branch version (non-working case) I was on the same HOST but had to ssh into the same host X as a hack to fix some group permission issues (at work). That seemed to mess up the shell-command execution. After I exit from that ssh session and restarted emacs, this issue was gone, even on emacs-25. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 14:54:46 2015 Received: (at 22203) by debbugs.gnu.org; 18 Dec 2015 19:54:46 +0000 Received: from localhost ([127.0.0.1]:56033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA170-0001ua-2T for submit@debbugs.gnu.org; Fri, 18 Dec 2015 14:54:46 -0500 Received: from b2bfep12.mx.upcmail.net ([62.179.121.57]:49118) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA16y-0001uN-Fb for 22203@debbugs.gnu.org; Fri, 18 Dec 2015 14:54:45 -0500 Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep12.mx.upcmail.net (InterMail vM.8.01.05.18 201-2260-151-151-20140610) with ESMTP id <20151218195438.URUB29633.b2bfep12-int.chello.at@edge11.upcmail.net> for <22203@debbugs.gnu.org>; Fri, 18 Dec 2015 20:54:38 +0100 Received: from iznogoud.viz ([91.119.139.29]) by edge11.upcmail.net with edge id v7te1r0080eEoi30B7te8C; Fri, 18 Dec 2015 20:53:38 +0100 X-SourceIP: 91.119.139.29 Received: from wolfgang by iznogoud.viz with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aA15t-0000bD-UW; Fri, 18 Dec 2015 20:53:37 +0100 From: Wolfgang Jenkner To: Kaushal Modi Subject: Re: bug#22203: 25.0.50; # is treated as a comment character in shell-command arg References: <85io3va7uh.fsf@iznogoud.viz> Date: Fri, 18 Dec 2015 20:53:37 +0100 In-Reply-To: (Kaushal Modi's message of "Fri, 18 Dec 2015 14:30:14 -0500") Message-ID: <85egeja5z2.fsf@iznogoud.viz> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22203 Cc: 22203@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Fri, Dec 18 2015, Kaushal Modi wrote: > It looks like the arguments are passed alright .. but the result > buffer *test* shows just "abc" (without quotes) as in the GIF I posted > in my previous email. > > ====================================================================== > 1 -> (call-process-region 18234 18234 "/bin/tcsh" nil # > nil "-c" "echo abc#def") > 1 <- call-process-region: 0 Yes, I can reproduce this with (call-process-region (point-min) (point-min) "/bin/tcsh" nil "*test*" nil "-c" "echo abc#def") However, using sh or bash instead of tcsh works (tcsh -c 'echo abc#def' works on the command line, though). So, perhaps, for some reason, emacs 25 and trunk use different shells on your system? From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 15:00:25 2015 Received: (at 22203) by debbugs.gnu.org; 18 Dec 2015 20:00:26 +0000 Received: from localhost ([127.0.0.1]:56039 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA1CT-000243-PN for submit@debbugs.gnu.org; Fri, 18 Dec 2015 15:00:25 -0500 Received: from mail-qg0-f44.google.com ([209.85.192.44]:35582) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aA1CS-00023q-9L for 22203@debbugs.gnu.org; Fri, 18 Dec 2015 15:00:24 -0500 Received: by mail-qg0-f44.google.com with SMTP id v36so41452236qgd.2 for <22203@debbugs.gnu.org>; Fri, 18 Dec 2015 12:00:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=XS8lpD0R4ZuXATvQgsW0QBCu+8D7uacEU1sh+h8wgRQ=; b=IQxKzpGKqT2bVjrz+9zZfktz/iWAaOwfV0y1c/dcqO/G6TmBmK1NBqDCf5c+16cNDY OdAWwkEUvQE3Pci3jlnX1C+5kcbQ2kTGfpzcC4YAKmpAxSAJH1Nu3qjVVkVErM6spfXp j8EZkB92xfAXS44/y5RAduGceYUPRN/X8cRrtgUDLgAVFF/AQ4NY3SbKayeITZ+3XKjc fyeXc4wxyyL9v7ASipCZwyurLfJuNDSo8CZpt2z1UEHSW6budErn9O7NST4fV7gxN35b FEr8UFSNhtvawwjWLD/Bi1rhYQYvYnFHCQ/cxnXuxRO0f8x3u5peJwnf+eOtv5YgmWO0 9ySg== X-Received: by 10.140.101.233 with SMTP id u96mr7746167qge.70.1450468818770; Fri, 18 Dec 2015 12:00:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.143.7 with HTTP; Fri, 18 Dec 2015 11:59:39 -0800 (PST) In-Reply-To: <85egeja5z2.fsf@iznogoud.viz> References: <85io3va7uh.fsf@iznogoud.viz> <85egeja5z2.fsf@iznogoud.viz> From: Kaushal Modi Date: Fri, 18 Dec 2015 14:59:39 -0500 Message-ID: Subject: Re: bug#22203: 25.0.50; # is treated as a comment character in shell-command arg To: Wolfgang Jenkner Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22203 Cc: 22203@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > So, perhaps, for some reason, emacs 25 and trunk use different shells on > your system? That was almost the case.. the shells weren't different though. The shell was the same: tcsh. (shell-command "echo abc#def" "*test*") If I run the above shell-command in an emacs started as below, everything is good; I see "abc#def" printed in the *test* buffer. HOST> emacs -Q& But if I run the SAME shell-command in an emacs started as below, I see only "abc" printed in the *test* buffer. HOST> ssh HOST HOST> emacs -Q& This is the regardless of the emacs version. I incorrectly thought earlier that it had to do with emacs-25 branch version vs the master branch version. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 19 09:09:28 2015 Received: (at 22203) by debbugs.gnu.org; 19 Dec 2015 14:09:28 +0000 Received: from localhost ([127.0.0.1]:56381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aAICO-0001XH-GY for submit@debbugs.gnu.org; Sat, 19 Dec 2015 09:09:28 -0500 Received: from b2bfep14.mx.upcmail.net ([62.179.121.59]:57095) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aAICL-0001X0-Qi for 22203@debbugs.gnu.org; Sat, 19 Dec 2015 09:09:26 -0500 Received: from edge12.upcmail.net ([192.168.13.82]) by b2bfep14.mx.upcmail.net (InterMail vM.8.01.05.18 201-2260-151-151-20140610) with ESMTP id <20151219140919.XXZK6878.b2bfep14-int.chello.at@edge12.upcmail.net> for <22203@debbugs.gnu.org>; Sat, 19 Dec 2015 15:09:19 +0100 Received: from iznogoud.viz ([91.119.211.78]) by edge12.upcmail.net with edge id vS9J1r02h1i2byK0CS9KVH; Sat, 19 Dec 2015 15:09:19 +0100 X-SourceIP: 91.119.211.78 Received: from wolfgang by iznogoud.viz with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1aAICE-0000My-GQ; Sat, 19 Dec 2015 15:09:18 +0100 From: Wolfgang Jenkner To: Kaushal Modi Subject: Re: bug#22203: 25.0.50; # is treated as a comment character in shell-command arg References: <85io3va7uh.fsf@iznogoud.viz> <85egeja5z2.fsf@iznogoud.viz> Date: Sat, 19 Dec 2015 15:09:18 +0100 In-Reply-To: (Kaushal Modi's message of "Fri, 18 Dec 2015 14:59:39 -0500") Message-ID: <85k2oa34z5.fsf@iznogoud.viz> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 22203 Cc: 22203@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) On Fri, Dec 18 2015, Kaushal Modi wrote: > HOST> emacs -Q& > > But if I run the SAME shell-command in an emacs started as below, I > see only "abc" printed in the *test* buffer. > > HOST> ssh HOST > HOST> emacs -Q& What happens if you repeat this, but, instead of `emacs -Q&', run echo $SHELL; ps -fp $$ before and after logging in via ssh? From unknown Sun Jun 22 07:32:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 17 Jan 2016 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator