From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 03:23:35 2011 Received: (at submit) by debbugs.gnu.org; 21 Apr 2011 07:23:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCoEg-0000zG-6w for submit@debbugs.gnu.org; Thu, 21 Apr 2011 03:23:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCoEd-0000z5-2s for submit@debbugs.gnu.org; Thu, 21 Apr 2011 03:23:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCoEW-0002W3-5L for submit@debbugs.gnu.org; Thu, 21 Apr 2011 03:23:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RFC_ABUSE_POST, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:48986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCoEW-0002Vy-3p for submit@debbugs.gnu.org; Thu, 21 Apr 2011 03:23:24 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCoEU-0006XN-97 for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 03:23:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCoES-0002Vj-F2 for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 03:23:22 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:36789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCoES-0002Vf-4z for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 03:23:20 -0400 Received: by wwb39 with SMTP id 39so1461154wwb.30 for ; Thu, 21 Apr 2011 00:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=I73FnMWi6P/Pkq/8dBrGPRZvMev1NhzDxVYRUp1jZGg=; b=WpS5PgEZTEmFZigUks7wemlEEyk+bVX5tKxNdVWROwzTAPkMLP5nL+FkEia+g+D6MN FC1aFK9B58QplcN+Kb++V/A4XAnzzk72Cladv3rTifkRxd+Y/fSCj7XQfr7z7JrS6V62 HWXlAb+DPtckXGHo1pEb0Ut2zAfD64o11LSi8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; b=a0ZBz50hI9Ghy8RKxqZA2E71xSawt4Svilb5rp2/UWKUm49KEciwp2c/t/XJa34CTi uRw1q0DlGfSdxpqs80Ettf93j8rQ55Uuf6dqPDPRKaVVMiXEc3NGDRwY56sB8cGkFC0X 9ulwMMMTFcTAJB9d2ercwgJr/y/0G2pCZQghU= Received: by 10.216.241.197 with SMTP id g47mr1626912wer.24.1303370598982; Thu, 21 Apr 2011 00:23:18 -0700 (PDT) Received: from thierry-MM061 (82.77.197-77.rev.gaoland.net [77.197.77.82]) by mx.google.com with ESMTPS id p5sm1004498wbg.11.2011.04.21.00.23.16 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2011 00:23:17 -0700 (PDT) From: Thierry Volpiatto To: bug-gnu-emacs@gnu.org Subject: 24.0.50; shell-quote-argument shouldn't escape special characters Date: Thu, 21 Apr 2011 09:23:13 +0200 Message-ID: <8762q8xe3i.fsf@gmail.com> User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) Hi all, (shell-quote-argument "Vid=C3=A9os") =3D=3D> "Vid\\=C3=A9os" eshell: ls (shell-quote-argument "Vid=C3=A9os") Vid\=C3=A9os: No such file or directory In GNU Emacs 24.0.50.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0) of 2011-04-19 on thierry-MM061 Windowing system distributor `The X.Org Foundation', version 11.0.10900000 Important settings: value of $LC_ALL: nil 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: fr_FR.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: TeX-PDF-mode: t eldoc-mode: t minibuffer-depth-indicate-mode: t auto-image-file-mode: t show-paren-mode: t display-time-mode: t diff-auto-refine-mode: t recentf-mode: t savehist-mode: t shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 Q y C-z=20 c C-c a a C-x C-=C2=B2 C-x C-b l i s p =20 m q =20 q q y m q y M-x r e p o r t Recent messages: nnml: Reading incoming mail (no new mail)...done Reading active file via nnml...done Reading active file from archive via nnfolder...done Reading active file via nndraft...done Checking new news...done No Gnus is good news No more unread newsgroups Are you sure you want to quit reading news? (y or n) y (No changes need to be saved) Load-path shadows: ~/elisp/ngnus/lisp/.dir-locals hides ~/elisp/org-active/.dir-locals ~/elisp/ngnus/lisp/lpath hides ~/elisp/emacs-wget/lpath ~/elisp/ngnus/lisp/password-cache hides /usr/local/share/emacs/24.0.50/lisp= /password-cache ~/elisp/ngnus/lisp/format-spec hides /usr/local/share/emacs/24.0.50/lisp/fo= rmat-spec ~/elisp/ngnus/lisp/color hides /usr/local/share/emacs/24.0.50/lisp/color ~/elisp/ngnus/lisp/md4 hides /usr/local/share/emacs/24.0.50/lisp/md4 ~/elisp/ngnus/lisp/hex-util hides /usr/local/share/emacs/24.0.50/lisp/hex-u= til ~/elisp/ngnus/lisp/sha1 hides /usr/local/share/emacs/24.0.50/lisp/sha1 ~/elisp/ngnus/lisp/dns-mode hides /usr/local/share/emacs/24.0.50/lisp/textm= odes/dns-mode ~/elisp/ngnus/lisp/imap hides /usr/local/share/emacs/24.0.50/lisp/net/imap ~/elisp/ngnus/lisp/hmac-md5 hides /usr/local/share/emacs/24.0.50/lisp/net/h= mac-md5 ~/elisp/ngnus/lisp/dig hides /usr/local/share/emacs/24.0.50/lisp/net/dig ~/elisp/ngnus/lisp/sasl hides /usr/local/share/emacs/24.0.50/lisp/net/sasl ~/elisp/ngnus/lisp/sasl-cram hides /usr/local/share/emacs/24.0.50/lisp/net/= sasl-cram ~/elisp/ngnus/lisp/sasl-digest hides /usr/local/share/emacs/24.0.50/lisp/ne= t/sasl-digest ~/elisp/ngnus/lisp/tls hides /usr/local/share/emacs/24.0.50/lisp/net/tls ~/elisp/ngnus/lisp/dns hides /usr/local/share/emacs/24.0.50/lisp/net/dns ~/elisp/ngnus/lisp/hmac-def hides /usr/local/share/emacs/24.0.50/lisp/net/h= mac-def ~/elisp/ngnus/lisp/netrc hides /usr/local/share/emacs/24.0.50/lisp/net/netrc ~/elisp/ngnus/lisp/ntlm hides /usr/local/share/emacs/24.0.50/lisp/net/ntlm ~/elisp/ngnus/lisp/sasl-ntlm hides /usr/local/share/emacs/24.0.50/lisp/net/= sasl-ntlm ~/elisp/ngnus/lisp/binhex hides /usr/local/share/emacs/24.0.50/lisp/mail/bi= nhex ~/elisp/ngnus/lisp/hashcash hides /usr/local/share/emacs/24.0.50/lisp/mail/= hashcash ~/elisp/ngnus/lisp/uudecode hides /usr/local/share/emacs/24.0.50/lisp/mail/= uudecode ~/elisp/ngnus/lisp/parse-time hides /usr/local/share/emacs/24.0.50/lisp/cal= endar/parse-time ~/elisp/ngnus/lisp/time-date hides /usr/local/share/emacs/24.0.50/lisp/cale= ndar/time-date ~/elisp/ngnus/lisp/pgg-parse hides /usr/local/share/emacs/24.0.50/lisp/obso= lete/pgg-parse ~/elisp/ngnus/lisp/pgg hides /usr/local/share/emacs/24.0.50/lisp/obsolete/p= gg ~/elisp/ngnus/lisp/pgg-pgp5 hides /usr/local/share/emacs/24.0.50/lisp/obsol= ete/pgg-pgp5 ~/elisp/ngnus/lisp/pgg-pgp hides /usr/local/share/emacs/24.0.50/lisp/obsole= te/pgg-pgp ~/elisp/ngnus/lisp/pgg-def hides /usr/local/share/emacs/24.0.50/lisp/obsole= te/pgg-def ~/elisp/ngnus/lisp/pgg-gpg hides /usr/local/share/emacs/24.0.50/lisp/obsole= te/pgg-gpg Features: (shadow epa-mail emacsbug qp smiley gnus-cite mail-extr gnus-async gnus-bcklg gnus-ml nndraft nnmh utf-7 nnml nnimap utf7 nnfolder rot13 netrc network-stream starttls tls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache gnus-dired view cal-iso w3m-form w3m-cookie w3m-bookmark w3m-tabmenu w3m-session vc-git xgit-dvc xgit xgit-annotate xgit-log cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs conf-mode sh-script preview prv-emacs tex-buf reftex-vcr reftex-dcr reftex-auc reftex imenu reftex-vars font-latex latex tex-style tex latexenc vc-rcs vc-bzr bzr-dvc bzr dvc-annotate xhg-dvc xhg xhg-annotate xhg-mq xhg-log bzr-core xdarcs-core xgit-core xhg-core xmtn-minimal tla smerge-mode newcomment dvc-state dvc-config dvc-diff dvc-fileinfo diff dvc-cmenu dvc-about dvc-version dvc-revlist uniquify align-let server popup googlecl google-maps google-maps-static google-maps-geocode google-maps-base json simple-call-tree el-expectations el-mock csv2org iedit eieio-base zop-to-char mule-util elscreen smallurl mm-url xml-weather rectangle-utils tv-utils eldoc pcvs pcvs-parse pcvs-info pcvs-defs auto-document autodoc mb-depth ioccur moz cl-info slime-xref-browser slime-banner slime-tramp slime-asdf slime-fancy slime-fontifying-fu slime-package-fu slime-references slime-scratch slime-presentations slime-fuzzy slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc slime-parse slime-repl slime apropos hideshow hyperspec slime-autoloads boxquote rect image-file newsticker newst-treeview newst-plainview newst-reader newst-ticker newst-backend ledger-config ledger esh-arg esh-util lpr woman man two-column em-term term ehelp electric esh-toggle em-xtra flymake pdbtrack no-word regex-tool whitespace htmlfontify paren time dired-tar dired-extension image-dired yaoddmuse skeleton sgml-mode emms-mplayer-config emms-playlist-limit emms-volume emms-volume-amixer emms-i18n emms-history emms-score emms-stream-info emms-metaplaylist-mode emms-bookmarks emms-lastfm-client parse-time emms-cue emms-mode-line-icon emms-browser sort emms-playlist-sort emms-last-played emms-player-xine emms-player-mpd tq emms-playing-time emms-lyrics emms-url hl-line emms-tag-editor emms-mark emms-mode-line emms-cache emms-info-ogginfo emms-info-mp3info emms-playlist-mode emms-player-vlc emms-player-mplayer emms-info emms-streams later-do emms-source-playlist emms-source-file emms-player-simple emms-setup emms emms-compat winner dvc-init bzr-gnus tla-gnus xgit-gnus xhg-gnus gnus-art mm-uu mml2015 mm-view mml-smime smime dig nnir gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader dvc-gnus tla-core tla-autoconf tla-defs dvc-log vc vc-dispatcher dvc-unified dvc-tips dired-x ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff dvc-autoloads dvc-core dvc-lisp dvc-buffers dvc-ui dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site psvn log-edit pcvs-util add-log diff-mode htmlize-hack htmlize muse-colors muse-docbook muse-texinfo texnfo-upd texinfo muse-latex muse-html muse-xml-common muse-wiki cus-edit cus-start cus-load muse-publish muse-project muse-protocols muse-regexps muse muse-nested-tags muse-mode muse-autoloads org-config-thierry org-crypt cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs vc-hg org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp org-exp-blocks org-info org-gnus org-docview org-bibtex org-bbdb org-agenda appt diary-lib diary-loaddefs org-annotation-helper org-capture org-mks remember org-remember org-datetree config-w3m mime-w3m w3m doc-view jka-compr image-mode timezone w3m-hist w3m-fb w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util mime eword-decode mel path-util mime-parse std11 luna mime-def alist mcharset mcs-20 mcs-e20 pces pces-e20 pces-20 broken pcustom poe pym static apel-ver product w3m-load addressbook-bookmark message sendmail rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader firefox-protocol bookmark-firefox-handler url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse url-vars mailcap bookmark-extensions org ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys ob ob-eval org-pcomplete pcomplete org-list org-faces org-compat org-entities org-macs noutline outline cal-menu calendar cal-loaddefs bookmark pp recentf tree-widget wid-edit savehist init-anything-thierry descbinds-anything anything-ipython ipython python-mode info-look ansi-color executable shell shell-history anything-complete anything-show-completion anything-obsolete anything-match-plugin anything-delicious xml anything-mercurial anything-config browse-url rx grep compile comint ring tramp tramp-compat format-spec tramp-loaddefs dired-aux ffap thingatpt anything warnings epa-file epa derived epg epg-config auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util time-date mm-util mail-prsvr password-cache dired regexp-opt gnus-load usage-memo punycode idna naquadah-theme sha1 hex-util eev-thierry edmacro kmacro iterator eev-all eev-mini-steps eev-browse-url eev-langs eev-compose eev-glyphs disp-table eev-insert eev-steps eev-bounded eev easy-mmode advice help-fns advice-preload w3m-wget preview-latex tex-site auto-loads info easymenu cl 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 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 loaddefs button faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) --=20 A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 06:33:35 2011 Received: (at 8531) by debbugs.gnu.org; 21 Apr 2011 10:33:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCrCY-0005Du-TY for submit@debbugs.gnu.org; Thu, 21 Apr 2011 06:33:35 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCrCX-0005Di-7E for 8531@debbugs.gnu.org; Thu, 21 Apr 2011 06:33:34 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LJZ00J00ZV2JY00@a-mtaout22.012.net.il> for 8531@debbugs.gnu.org; Thu, 21 Apr 2011 13:32:28 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.124.129.240]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LJZ00JBMZY3J310@a-mtaout22.012.net.il>; Thu, 21 Apr 2011 13:32:28 +0300 (IDT) Date: Thu, 21 Apr 2011 13:33:09 +0300 From: Eli Zaretskii Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters In-reply-to: <8762q8xe3i.fsf@gmail.com> To: Thierry Volpiatto Message-id: <83ei4v3ndm.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <8762q8xe3i.fsf@gmail.com> X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > From: Thierry Volpiatto > Date: Thu, 21 Apr 2011 09:23:13 +0200 >=20 > (shell-quote-argument "Vid=C3=A9os") > =3D=3D> "Vid\\=C3=A9os" >=20 > eshell: > ls (shell-quote-argument "Vid=C3=A9os") > Vid\=C3=A9os: No such file or directory Looks like a problem in Eshell: I have no problem with using the result of shell-quote-argument in "M-!". From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 08:11:15 2011 Received: (at submit) by debbugs.gnu.org; 21 Apr 2011 12:11:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCsj5-00089b-3N for submit@debbugs.gnu.org; Thu, 21 Apr 2011 08:11:15 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCsj2-00089P-EO for submit@debbugs.gnu.org; Thu, 21 Apr 2011 08:11:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCsiw-0007Up-HX for submit@debbugs.gnu.org; Thu, 21 Apr 2011 08:11:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:34617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCsiw-0007Ul-GG for submit@debbugs.gnu.org; Thu, 21 Apr 2011 08:11:06 -0400 Received: from eggs.gnu.org ([140.186.70.92]:50400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCsiv-0001K5-KK for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 08:11:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCsiu-0007Ua-Fw for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 08:11:05 -0400 Received: from lo.gmane.org ([80.91.229.12]:42167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCsiu-0007UW-7Z for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 08:11:04 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QCsis-0005k2-Kn for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 14:11:02 +0200 Received: from 82.77.197-77.rev.gaoland.net ([77.197.77.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Apr 2011 14:11:02 +0200 Received: from thierry.volpiatto by 82.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Apr 2011 14:11:02 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters Date: Thu, 21 Apr 2011 14:10:49 +0200 Lines: 26 Message-ID: <87ipu7oldi.fsf@gmail.com> References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 82.77.197-77.rev.gaoland.net User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:V5IgOL6zMuP6UA4p1l6rJefFZLI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) Eli Zaretskii writes: >> From: Thierry Volpiatto >> Date: Thu, 21 Apr 2011 09:23:13 +0200 >> >> (shell-quote-argument "Vidéos") >> ==> "Vid\\éos" >> >> eshell: >> ls (shell-quote-argument "Vidéos") >> Vid\éos: No such file or directory > > Looks like a problem in Eshell: No it is the same in M-x shell > I have no problem with using the > result of shell-quote-argument in "M-!". Which result? Which command? I am speaking of escaping accentued characters "é, à etc..." Why `shell-quote-argument' escape such characters? -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 09:03:50 2011 Received: (at submit) by debbugs.gnu.org; 21 Apr 2011 13:03:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCtXx-0000q9-Rp for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:03:50 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCtXv-0000px-Pj for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:03:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCtXp-0007Oh-OO for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:03:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:44158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtXp-0007Od-Mz for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:03:41 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtXl-0006vJ-4P for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:03:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCtXj-0007Mp-Uv for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:03:37 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:65505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtXj-0007MI-Oa for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:03:35 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LK0003006SHSB00@a-mtaout20.012.net.il> for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 16:03:33 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.124.129.240]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LK00026B6XWK3C0@a-mtaout20.012.net.il>; Thu, 21 Apr 2011 16:03:33 +0300 (IDT) Date: Thu, 21 Apr 2011 16:04:37 +0300 From: Eli Zaretskii Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters In-reply-to: <87ipu7oldi.fsf@gmail.com> To: Thierry Volpiatto Message-id: <83aafj3gd6.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) > From: Thierry Volpiatto > Date: Thu, 21 Apr 2011 14:10:49 +0200 >=20 > > I have no problem with using the > > result of shell-quote-argument in "M-!". > Which result? > Which command? The command was "ls Vid\=C3=A9os". It displayed the files in that directory. > I am speaking of escaping accentued characters "=C3=A9, =C3=A0 etc.= .." Yes, so am I. > Why `shell-quote-argument' escape such characters? Because it wants to play safe. In a Posix shell, any non-special character preceded with a backslash stands for itself, I'm sure you know that. Backslash-escaping anything that is not in the Posix character set avoids too much knowledge about the underlying shell's special characters, and should be harmless if the escaped characters are not special. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 09:32:10 2011 Received: (at submit) by debbugs.gnu.org; 21 Apr 2011 13:32:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCtzN-0001RF-IW for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:32:10 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCtzJ-0001Ql-7q for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:32:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCtzD-00040e-F1 for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:32:00 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:52461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtzD-00040a-DO for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:31:59 -0400 Received: from eggs.gnu.org ([140.186.70.92]:34790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtzC-0003ZK-Hz for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:31:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCtz9-0003zz-Tr for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:31:58 -0400 Received: from lo.gmane.org ([80.91.229.12]:38585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCtz9-0003zp-NV for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:31:55 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QCtz8-0003oD-Hm for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 15:31:54 +0200 Received: from 82.77.197-77.rev.gaoland.net ([77.197.77.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Apr 2011 15:31:54 +0200 Received: from thierry.volpiatto by 82.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Apr 2011 15:31:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters Date: Thu, 21 Apr 2011 15:31:41 +0200 Lines: 40 Message-ID: <87hb9rzq6a.fsf@gmail.com> References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 82.77.197-77.rev.gaoland.net User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:KpuRwIQ23LAPV1I2Wtkrfk7q4TA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.3 (-----) Eli Zaretskii writes: >> From: Thierry Volpiatto >> Date: Thu, 21 Apr 2011 14:10:49 +0200 >> >> > I have no problem with using the >> > result of shell-quote-argument in "M-!". >> Which result? >> Which command? > > The command was "ls Vid\éos". It displayed the files in that > directory. Yes, but ls "Vid\éos" fail. The point is being able to do something like this: (shell-command (format "ls %s" (shell-quote-argument (read-string "Fname: ")))) instead of e.g (shell-command (format "ls '%s'" (read-string "Fname: "))) >> I am speaking of escaping accentued characters "é, à etc..." > > Yes, so am I. Ok. >> Why `shell-quote-argument' escape such characters? > > Because it wants to play safe. In a Posix shell, any non-special > character preceded with a backslash stands for itself, I'm sure you > know that. Backslash-escaping anything that is not in the Posix > character set avoids too much knowledge about the underlying shell's > special characters, and should be harmless if the escaped characters > are not special. Oh yes, i remember now that "é etc.." are not in posix character set, thanks. -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 09:57:04 2011 Received: (at submit) by debbugs.gnu.org; 21 Apr 2011 13:57:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCuNU-00021F-Ft for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:57:04 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCuNS-00020n-9m for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:57:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCuNM-0007rr-7u for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:56:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:49145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCuNM-0007rk-4E for submit@debbugs.gnu.org; Thu, 21 Apr 2011 09:56:56 -0400 Received: from eggs.gnu.org ([140.186.70.92]:32974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCuNL-00085E-5k for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:56:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCuNH-0007ps-2I for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:56:55 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:45860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCuNG-0007pF-MW for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 09:56:50 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LK00040093OEP00@a-mtaout20.012.net.il> for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 16:56:48 +0300 (IDT) Received: from HOME-C4E4A596F7 ([77.124.129.240]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LK0003AU9EN33C0@a-mtaout20.012.net.il>; Thu, 21 Apr 2011 16:56:48 +0300 (IDT) Date: Thu, 21 Apr 2011 16:58:00 +0300 From: Eli Zaretskii Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters In-reply-to: <87hb9rzq6a.fsf@gmail.com> To: Thierry Volpiatto Message-id: <837han3dw7.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: QUOTED-PRINTABLE X-012-Sender: halo1@inter.net.il References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> <87hb9rzq6a.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) > From: Thierry Volpiatto > Date: Thu, 21 Apr 2011 15:31:41 +0200 >=20 > > The command was "ls Vid\=C3=A9os". It displayed the files in tha= t > > directory. > Yes, but ls "Vid\=C3=A9os" fail. Where did the quotes come from? shell-quote-argument doesn't add extra quotes. > The point is being able to do something like this: > (shell-command (format "ls %s" (shell-quote-argument (read-string "= Fname: ")))) >=20 > instead of e.g > (shell-command (format "ls '%s'" (read-string "Fname: "))) The former works for me without any changes. Are you sure you use th= e default version of shell-quote-argument? From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 12:35:01 2011 Received: (at submit) by debbugs.gnu.org; 21 Apr 2011 16:35:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCwqL-0005WZ-Az for submit@debbugs.gnu.org; Thu, 21 Apr 2011 12:35:01 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCwqJ-0005WN-Cw for submit@debbugs.gnu.org; Thu, 21 Apr 2011 12:35:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCwqD-0002Zt-Ds for submit@debbugs.gnu.org; Thu, 21 Apr 2011 12:34:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:51935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCwqD-0002Zp-CU for submit@debbugs.gnu.org; Thu, 21 Apr 2011 12:34:53 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCwqC-0008TY-KU for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 12:34:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCwqB-0002Ze-9J for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 12:34:52 -0400 Received: from lo.gmane.org ([80.91.229.12]:44491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCwqB-0002Za-1L for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 12:34:51 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QCwqA-0006QR-2q for bug-gnu-emacs@gnu.org; Thu, 21 Apr 2011 18:34:50 +0200 Received: from 82.77.197-77.rev.gaoland.net ([77.197.77.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Apr 2011 18:34:50 +0200 Received: from thierry.volpiatto by 82.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Apr 2011 18:34:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Thierry Volpiatto Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters Date: Thu, 21 Apr 2011 18:34:37 +0200 Lines: 27 Message-ID: <87aafjzhpe.fsf@gmail.com> References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> <87hb9rzq6a.fsf@gmail.com> <837han3dw7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 82.77.197-77.rev.gaoland.net User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:RqPjiAGlulZlILYHM63j2tjTw8I= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) Eli Zaretskii writes: >> From: Thierry Volpiatto >> Date: Thu, 21 Apr 2011 15:31:41 +0200 >> >> > The command was "ls Vid\éos". It displayed the files in that >> > directory. >> Yes, but ls "Vid\éos" fail. > > Where did the quotes come from? shell-quote-argument doesn't add > extra quotes. > >> The point is being able to do something like this: >> (shell-command (format "ls %s" (shell-quote-argument (read-string "Fname: ")))) >> >> instead of e.g >> (shell-command (format "ls '%s'" (read-string "Fname: "))) > > The former works for me without any changes. Are you sure you use the > default version of shell-quote-argument? Yes you're right, sorry, i was inserting ~/Vidéos. So yes the problem is related only to eshell. -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 21 19:15:05 2011 Received: (at 8531) by debbugs.gnu.org; 21 Apr 2011 23:15:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QD35V-0005wD-OT for submit@debbugs.gnu.org; Thu, 21 Apr 2011 19:15:05 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QD35U-0005vW-0n for 8531@debbugs.gnu.org; Thu, 21 Apr 2011 19:15:04 -0400 Received: from localhost ([127.0.0.1]:45336) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QD35O-0006wU-Nf; Thu, 21 Apr 2011 19:14:58 -0400 From: Glenn Morris To: Thierry Volpiatto Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> <87hb9rzq6a.fsf@gmail.com> <837han3dw7.fsf@gnu.org> <87aafjzhpe.fsf@gmail.com> X-Spook: import codes Leitrim domestic disruption 2600 Magazine X-Ran: 8Z+t\\ZULU\Vv]bi:S*O/Mvb`dwP.i,kwjghG_:bZ8cCwb`JmZPLZ7NoB\pv-l*FMNEv't X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 21 Apr 2011 19:14:58 -0400 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) Thierry Volpiatto wrote: > So yes the problem is related only to eshell. Why do you want/need to call shell-quote-argument inside eshell? From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 01:53:42 2011 Received: (at 8531) by debbugs.gnu.org; 22 Apr 2011 05:53:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QD9JG-00065a-JB for submit@debbugs.gnu.org; Fri, 22 Apr 2011 01:53:42 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QD9JF-00065N-0g for 8531@debbugs.gnu.org; Fri, 22 Apr 2011 01:53:41 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QD9J9-0006bb-IM; Fri, 22 Apr 2011 01:53:35 -0400 Date: Fri, 22 Apr 2011 01:53:35 -0400 Message-Id: From: Eli Zaretskii To: Glenn Morris In-reply-to: (message from Glenn Morris on Thu, 21 Apr 2011 19:14:58 -0400) Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> <87hb9rzq6a.fsf@gmail.com> <837han3dw7.fsf@gnu.org> <87aafjzhpe.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org, thierry.volpiatto@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) > From: Glenn Morris > Date: Thu, 21 Apr 2011 19:14:58 -0400 > Cc: 8531@debbugs.gnu.org > > Thierry Volpiatto wrote: > > > So yes the problem is related only to eshell. > > Why do you want/need to call shell-quote-argument inside eshell? He doesn't. But a literal Vid\éos (with the backslash typed by hand) doesn't work with Eshell, either. Doesn't Eshell support the standard shell feature whereby a non-special character escaped by a backslash stands for itself? From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 02:03:44 2011 Received: (at 8531) by debbugs.gnu.org; 22 Apr 2011 06:03:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QD9Sx-0006Ip-Js for submit@debbugs.gnu.org; Fri, 22 Apr 2011 02:03:43 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QD9Sv-0006Ie-8T for 8531@debbugs.gnu.org; Fri, 22 Apr 2011 02:03:41 -0400 Received: by wwb28 with SMTP id 28so403013wwb.15 for <8531@debbugs.gnu.org>; Thu, 21 Apr 2011 23:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=4++/YQ8zg29Gkdt4tjnTTvCZhFVN351NgQJuBGnDZQ8=; b=nAPid98wbg+ROiprmgFeW9e7bXfwuNYJbFGM4pXMofK+lSltxK+FzcfLD/6pd4EFkY Z/ffNKMmL8DqKrY1tk9Zv5HM1J9tS0jGV0AubkzRcXfmGVS/uBKe4LaJY1F+vXNnqzZU 4DY9/8e72Q5Ew8d3GhjJQTZWlr88oB9F8FqTk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=twe7pfcdXgyMNxllPbfmJWYby1UiTyeXlZucGiZaYBT+goWg7H739gRP5JH0BuXIkr zdn7XrRy0cytde7K5dZBbwVtkYMqnT6Ft9TfxKtI6uwnCl8Q4DvGvQuRtrnki46+2GJM 4CZdBzrv8hTQOLO7MbSaTboFit43vIM52e0Rk= Received: by 10.227.23.202 with SMTP id s10mr730713wbb.171.1303452215237; Thu, 21 Apr 2011 23:03:35 -0700 (PDT) Received: from thierry-MM061 (82.77.197-77.rev.gaoland.net [77.197.77.82]) by mx.google.com with ESMTPS id w12sm1562574wby.41.2011.04.21.23.03.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2011 23:03:33 -0700 (PDT) From: Thierry Volpiatto To: Glenn Morris Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> <87hb9rzq6a.fsf@gmail.com> <837han3dw7.fsf@gnu.org> <87aafjzhpe.fsf@gmail.com> Date: Fri, 22 Apr 2011 08:03:30 +0200 In-Reply-To: (Glenn Morris's message of "Thu, 21 Apr 2011 19:14:58 -0400") Message-ID: <8762q6zutp.fsf@gmail.com> User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Glenn Morris writes: > Thierry Volpiatto wrote: > >> So yes the problem is related only to eshell. > > Why do you want/need to call shell-quote-argument inside eshell? For compatibility with Windows filenames: --8<---------------cut here---------------start------------->8--- (goto-char (point-max)) (insert (format "cd '%s'" anything-ff-default-directory)) (eshell-send-input))) --8<---------------cut here---------------end--------------->8--- As there is no evaluation inside the quotes, this actually works fine, but before that, i wrote it with shell-quote-argument, which was working fine excepted with accentued char. -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 02:15:45 2011 Received: (at 8531) by debbugs.gnu.org; 22 Apr 2011 06:15:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QD9eb-0006ZS-AY for submit@debbugs.gnu.org; Fri, 22 Apr 2011 02:15:45 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QD9eY-0006ZC-Is for 8531@debbugs.gnu.org; Fri, 22 Apr 2011 02:15:43 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QD9eS-0007n8-EJ; Fri, 22 Apr 2011 02:15:36 -0400 Date: Fri, 22 Apr 2011 02:15:36 -0400 Message-Id: From: Eli Zaretskii To: Thierry Volpiatto In-reply-to: <8762q6zutp.fsf@gmail.com> (message from Thierry Volpiatto on Fri, 22 Apr 2011 08:03:30 +0200) Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> <87hb9rzq6a.fsf@gmail.com> <837han3dw7.fsf@gnu.org> <87aafjzhpe.fsf@gmail.com> <8762q6zutp.fsf@gmail.com> X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 8531 Cc: rgm@gnu.org, 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) > From: Thierry Volpiatto > Date: Fri, 22 Apr 2011 08:03:30 +0200 > Cc: 8531@debbugs.gnu.org > > Glenn Morris writes: > > > Thierry Volpiatto wrote: > > > >> So yes the problem is related only to eshell. > > > > Why do you want/need to call shell-quote-argument inside eshell? > For compatibility with Windows filenames: You mean, file names with embedded white space? If not, what other compatibility issues are there? From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 03:10:48 2011 Received: (at 8531) by debbugs.gnu.org; 22 Apr 2011 07:10:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QDAVr-0007mj-KQ for submit@debbugs.gnu.org; Fri, 22 Apr 2011 03:10:47 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QDAVp-0007mS-Kx for 8531@debbugs.gnu.org; Fri, 22 Apr 2011 03:10:46 -0400 Received: from localhost ([127.0.0.1]:47825) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QDAVj-000234-Tg; Fri, 22 Apr 2011 03:10:40 -0400 From: Glenn Morris To: Eli Zaretskii Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> <87hb9rzq6a.fsf@gmail.com> <837han3dw7.fsf@gnu.org> <87aafjzhpe.fsf@gmail.com> X-Spook: Abbas propaganda IDEA mania Fedayeen TWA unclassified X-Ran: _5.|}B'rawx7SzI4VYN{!pdk<#ONj;;>wVNsoVJz({8Zs8E!Nc*L>OENJ%seTvT7P!STNX X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 22 Apr 2011 03:10:39 -0400 In-Reply-To: (Eli Zaretskii's message of "Fri, 22 Apr 2011 01:53:35 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org, thierry.volpiatto@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) Eli Zaretskii wrote: > He doesn't. But a literal Vid\=C3=A9os (with the backslash typed by hand) > doesn't work with Eshell, either. Doesn't Eshell support the standard > shell feature whereby a non-special character escaped by a backslash > stands for itself? >From reading the comments in eshell-parse-backslash, no. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 04:03:36 2011 Received: (at 8531) by debbugs.gnu.org; 22 Apr 2011 08:03:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QDBKy-0000Uz-4L for submit@debbugs.gnu.org; Fri, 22 Apr 2011 04:03:36 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QDBKw-0000Un-6y for 8531@debbugs.gnu.org; Fri, 22 Apr 2011 04:03:34 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QDBKq-0004j6-Hk; Fri, 22 Apr 2011 04:03:28 -0400 Date: Fri, 22 Apr 2011 04:03:28 -0400 Message-Id: From: Eli Zaretskii To: Glenn Morris In-reply-to: (message from Glenn Morris on Fri, 22 Apr 2011 03:10:39 -0400) Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> <87hb9rzq6a.fsf@gmail.com> <837han3dw7.fsf@gnu.org> <87aafjzhpe.fsf@gmail.com> X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org, thierry.volpiatto@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) > From: Glenn Morris > Cc: thierry.volpiatto@gmail.com, 8531@debbugs.gnu.org > Date: Fri, 22 Apr 2011 03:10:39 -0400 > > Eli Zaretskii wrote: > > > Doesn't Eshell support the standard shell feature whereby a > > non-special character escaped by a backslash stands for itself? > > From reading the comments in eshell-parse-backslash, no. IMO, the reasons stated in those comments for not supporting escaped non-special characters are bad a design decision. Eshell should only do that on Windows, and even then there should be a user option for such behavior, the default being that the directory separator is a forward slash. IOW, Eshell should behave like a Posix shell, even on Windows. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 05:21:50 2011 Received: (at 8531) by debbugs.gnu.org; 22 Apr 2011 09:21:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QDCYg-0002F0-0x for submit@debbugs.gnu.org; Fri, 22 Apr 2011 05:21:50 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QDCYe-0002En-08 for 8531@debbugs.gnu.org; Fri, 22 Apr 2011 05:21:48 -0400 Received: by wwb28 with SMTP id 28so494259wwb.15 for <8531@debbugs.gnu.org>; Fri, 22 Apr 2011 02:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=SXnVXoRQznf7vbh7aqPzzYRzoev+bWHU3qWna2yAQkA=; b=sbtANoq6vsbb90o6YMypLMbXStBwx39u/LQWaHHHT/SmjK8OTPAZmFWGTLZEIvVUmX t/MSgIsGiij91InGQpz9bSSbH3U5bsV8TuN7iWnEi1F8P1yciPQ3LxP6E+YCnzv1xxRu EZOZdNkZ7HCvQQIC6ytAiHba6R3X0/rwIa8aU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=eqrIQxwB53DK3EkIP1U6drT/gik6V+zX3wRO/mYdtj24XtcSB1NGGMIJjOaeNxs99l lBoJRZrcl54vOscZQWky6vsVc7hSWLIuWHljLR0JLo3GUhi7F6of6l+UKVGPECCxLkJK 8nUkkUo9BLxLZqXY5Bsw+OBFggMoMikrRPqWo= Received: by 10.216.15.133 with SMTP id f5mr507261wef.71.1303464101880; Fri, 22 Apr 2011 02:21:41 -0700 (PDT) Received: from thierry-MM061 (82.77.197-77.rev.gaoland.net [77.197.77.82]) by mx.google.com with ESMTPS id y29sm1638990wbd.55.2011.04.22.02.21.39 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Apr 2011 02:21:40 -0700 (PDT) From: Thierry Volpiatto To: Eli Zaretskii Subject: Re: bug#8531: 24.0.50; shell-quote-argument shouldn't escape special characters References: <8762q8xe3i.fsf@gmail.com> <83ei4v3ndm.fsf@gnu.org> <87ipu7oldi.fsf@gmail.com> <83aafj3gd6.fsf@gnu.org> <87hb9rzq6a.fsf@gmail.com> <837han3dw7.fsf@gnu.org> <87aafjzhpe.fsf@gmail.com> <8762q6zutp.fsf@gmail.com> Date: Fri, 22 Apr 2011 11:21:37 +0200 In-Reply-To: (Eli Zaretskii's message of "Fri, 22 Apr 2011 02:15:36 -0400") Message-ID: <87y632vdy6.fsf@gmail.com> User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 8531 Cc: rgm@gnu.org, 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Eli Zaretskii writes: >> From: Thierry Volpiatto >> Date: Fri, 22 Apr 2011 08:03:30 +0200 >> Cc: 8531@debbugs.gnu.org >> >> Glenn Morris writes: >> >> > Thierry Volpiatto wrote: >> > >> >> So yes the problem is related only to eshell. >> > >> > Why do you want/need to call shell-quote-argument inside eshell? >> For compatibility with Windows filenames: > > You mean, file names with embedded white space? Yes. > If not, what other compatibility issues are there? Nothing else for the moment. -- A+ Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 22 17:53:05 2011 Received: (at control) by debbugs.gnu.org; 22 Apr 2011 21:53:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QDOHh-0003pV-8z for submit@debbugs.gnu.org; Fri, 22 Apr 2011 17:53:05 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QDOHf-0003p4-8y for control@debbugs.gnu.org; Fri, 22 Apr 2011 17:53:03 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QDOHZ-0002Yt-NI for control@debbugs.gnu.org; Fri, 22 Apr 2011 17:52:57 -0400 Date: Fri, 22 Apr 2011 17:52:57 -0400 Message-Id: Subject: control message for bug 8531 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) retitle 8531 eshell backslash handling severity 8531 wishlist From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 11:44:39 2014 Received: (at 8531) by debbugs.gnu.org; 8 Dec 2014 16:44:39 +0000 Received: from localhost ([127.0.0.1]:57842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy1QH-0001zG-C4 for submit@debbugs.gnu.org; Mon, 08 Dec 2014 11:44:39 -0500 Received: from samertm.com ([162.243.37.26]:60530 helo=mail.samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xxui9-0006dA-HR for 8531@debbugs.gnu.org; Mon, 08 Dec 2014 04:34:34 -0500 Received: from samertm.com (localhost [127.0.0.1]) by mail.samertm.com (Postfix) with ESMTP id 71B258076F for <8531@debbugs.gnu.org>; Mon, 8 Dec 2014 09:34:12 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 08 Dec 2014 01:34:12 -0800 From: samer To: 8531@debbugs.gnu.org Subject: Re: bug#8531: 24.0.50; Message-ID: <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> X-Sender: samer@samertm.com User-Agent: Roundcube Webmail/0.9.5 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 8531 X-Mailman-Approved-At: Mon, 08 Dec 2014 11:44:30 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) Hi, I found this bug on debbugs thanks to Lars' getting started guide. This change simplifies the code by making the behavior that used occur for newlines following a backslash, returning the character literal after the backslash, the behavior that occurs for _all_ non-special characters. This is my first contribution to emacs, so don't hesitate to correct anything nonstandard in the patch I've included. I'm interested in doing more work on eshell, too. What eshell bugs would benefit from a fresh pair of eyes? Best, Samer Patch for esh-arg.el: *** /home/samer/build/emacs120714/share/emacs/25.0.50/lisp/eshell/esh-arg.el.gz.old --- /home/samer/build/emacs120714/share/emacs/25.0.50/lisp/eshell/esh-arg.el.gz *************** *** 89,95 **** (goto-char (match-end 0)) (eshell-finish-arg))))) ! ;; backslash before a special character means escape it 'eshell-parse-backslash ;; text beginning with ' is a literally quoted --- 89,96 ---- (goto-char (match-end 0)) (eshell-finish-arg))))) ! ;; backslash before a character escapes it if the character is ! ;; special, and returns the character literal if it is non-special 'eshell-parse-backslash ;; text beginning with ' is a literally quoted *************** *** 282,294 **** "A stub function that generates an error if a floating operator is found." (error "Unhandled operator in input text")) - (defsubst eshell-looking-at-backslash-return (pos) - "Test whether a backslash-return sequence occurs at POS." - (and (eq (char-after pos) ?\\) - (or (= (1+ pos) (point-max)) - (and (eq (char-after (1+ pos)) ?\n) - (= (+ pos 2) (point-max)))))) - (defun eshell-quote-backslash (string &optional index) "Intelligently backslash the character occurring in STRING at INDEX. If the character is itself a backslash, it needs no escaping." --- 283,288 ---- *************** *** 305,313 **** (string ?\\ char))))) (defun eshell-parse-backslash () ! "Parse a single backslash (\) character, which might mean escape. ! It only means escape if the character immediately following is a ! special character that is not itself a backslash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) --- 299,309 ---- (string ?\\ char))))) (defun eshell-parse-backslash () ! "Parse a single backslash (\) character to escape the character after. ! If the character immediately following the backslash is a special ! character, it returns the escaped version of that character. ! Else, the character has no meaning and is returned as the literal ! character. This conforms with the behavior of bash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) *************** *** 321,338 **** (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) - ;; allow \\ to mean a literal "\" character followed by a - ;; normal return, rather than a backslash followed by a line - ;; continuation (i.e., "\\ + \n" rather than "\ + \\n"). This - ;; is necessary because backslashes in Eshell are not special - ;; unless they either precede something special, or precede a - ;; backslash that precedes something special. (Mainly this is - ;; done to make using backslash on Windows systems more - ;; natural-feeling). - (if (eshell-looking-at-backslash-return (1+ (point))) - (forward-char)) (forward-char) ! "\\")))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" --- 317,325 ---- (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) (forward-char) ! (forward-char) ! (char-before))))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" Diff finished. Mon Dec 8 01:23:11 2014 *** /home/samer/build/emacs120714/share/emacs/25.0.50/lisp/eshell/esh-arg.el.gz.old --- /home/samer/build/emacs120714/share/emacs/25.0.50/lisp/eshell/esh-arg.el.gz *************** *** 89,95 **** (goto-char (match-end 0)) (eshell-finish-arg))))) ! ;; backslash before a special character means escape it 'eshell-parse-backslash ;; text beginning with ' is a literally quoted --- 89,96 ---- (goto-char (match-end 0)) (eshell-finish-arg))))) ! ;; backslash before a character escapes it if the character is ! ;; special, and returns the character literal if it is non-special 'eshell-parse-backslash ;; text beginning with ' is a literally quoted *************** *** 282,294 **** "A stub function that generates an error if a floating operator is found." (error "Unhandled operator in input text")) - (defsubst eshell-looking-at-backslash-return (pos) - "Test whether a backslash-return sequence occurs at POS." - (and (eq (char-after pos) ?\\) - (or (= (1+ pos) (point-max)) - (and (eq (char-after (1+ pos)) ?\n) - (= (+ pos 2) (point-max)))))) - (defun eshell-quote-backslash (string &optional index) "Intelligently backslash the character occurring in STRING at INDEX. If the character is itself a backslash, it needs no escaping." --- 283,288 ---- *************** *** 305,313 **** (string ?\\ char))))) (defun eshell-parse-backslash () ! "Parse a single backslash (\) character, which might mean escape. ! It only means escape if the character immediately following is a ! special character that is not itself a backslash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) --- 299,309 ---- (string ?\\ char))))) (defun eshell-parse-backslash () ! "Parse a single backslash (\) character to escape the character after. ! If the character immediately following the backslash is a special ! character, it returns the escaped version of that character. ! Else, the character has no meaning and is returned as the literal ! character. This conforms with the behavior of bash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) *************** *** 321,338 **** (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) - ;; allow \\ to mean a literal "\" character followed by a - ;; normal return, rather than a backslash followed by a line - ;; continuation (i.e., "\\ + \n" rather than "\ + \\n"). This - ;; is necessary because backslashes in Eshell are not special - ;; unless they either precede something special, or precede a - ;; backslash that precedes something special. (Mainly this is - ;; done to make using backslash on Windows systems more - ;; natural-feeling). - (if (eshell-looking-at-backslash-return (1+ (point))) - (forward-char)) (forward-char) ! "\\")))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" --- 317,325 ---- (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) (forward-char) ! (forward-char) ! (char-before))))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 11:49:12 2014 Received: (at submit) by debbugs.gnu.org; 8 Dec 2014 16:49:12 +0000 Received: from localhost ([127.0.0.1]:57855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy1Ul-00029K-8n for submit@debbugs.gnu.org; Mon, 08 Dec 2014 11:49:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49943) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy1Ui-00029B-9S for submit@debbugs.gnu.org; Mon, 08 Dec 2014 11:49:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xy1Uc-0000SL-FS for submit@debbugs.gnu.org; Mon, 08 Dec 2014 11:49:08 -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 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy1Uc-0000SH-CZ for submit@debbugs.gnu.org; Mon, 08 Dec 2014 11:49:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy1UX-0000b2-G1 for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 11:49:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xy1US-0000RZ-L2 for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 11:48:57 -0500 Received: from samertm.com ([162.243.37.26]:51935 helo=mail.samertm.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy1US-0000Kw-Gg for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 11:48:52 -0500 Received: from samertm.com (localhost [127.0.0.1]) by mail.samertm.com (Postfix) with ESMTP id E1F488076F for ; Mon, 8 Dec 2014 16:48:15 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 08 Dec 2014 08:48:15 -0800 From: samer To: bug-gnu-emacs@gnu.org Subject: bug#8531: =?UTF-8?Q?=32=34=2E=30=2E=35=30=3B=09shell-quote-argume?= =?UTF-8?Q?nt=20shouldn=27t=20escape=20special=20characters?= Message-ID: X-Sender: samer@samertm.com User-Agent: Roundcube Webmail/0.9.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (-----) Hi, I found this bug on debbugs thanks to Lars' getting started guide. This change simplifies the code by making the behavior that used occur for newlines following a backslash, returning the character literal after the backslash, the behavior that occurs for _all_ non-special characters. This is my first contribution to emacs, so don't hesitate to correct anything nonstandard in the patch I've included. I'm interested in doing more work on eshell, too. What eshell bugs would benefit from a fresh pair of eyes? Also, I sent this email to 8531@debbugs.gnu.org five hours and I didn't see my email on debbugs. Apologies for the duplication if that email actually went through. Best, Samer Patch for esh-arg.el: *** /home/samer/build/emacs120714/share/emacs/25.0.50/lisp/eshell/esh-arg.el.gz.old --- /home/samer/build/emacs120714/share/emacs/25.0.50/lisp/eshell/esh-arg.el.gz *************** *** 89,95 **** (goto-char (match-end 0)) (eshell-finish-arg))))) ! ;; backslash before a special character means escape it 'eshell-parse-backslash ;; text beginning with ' is a literally quoted --- 89,96 ---- (goto-char (match-end 0)) (eshell-finish-arg))))) ! ;; backslash before a character escapes it if the character is ! ;; special, and returns the character literal if it is non-special 'eshell-parse-backslash ;; text beginning with ' is a literally quoted *************** *** 282,294 **** "A stub function that generates an error if a floating operator is found." (error "Unhandled operator in input text")) - (defsubst eshell-looking-at-backslash-return (pos) - "Test whether a backslash-return sequence occurs at POS." - (and (eq (char-after pos) ?\\) - (or (= (1+ pos) (point-max)) - (and (eq (char-after (1+ pos)) ?\n) - (= (+ pos 2) (point-max)))))) - (defun eshell-quote-backslash (string &optional index) "Intelligently backslash the character occurring in STRING at INDEX. If the character is itself a backslash, it needs no escaping." --- 283,288 ---- *************** *** 305,313 **** (string ?\\ char))))) (defun eshell-parse-backslash () ! "Parse a single backslash (\) character, which might mean escape. ! It only means escape if the character immediately following is a ! special character that is not itself a backslash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) --- 299,309 ---- (string ?\\ char))))) (defun eshell-parse-backslash () ! "Parse a single backslash (\) character to escape the character after. ! If the character immediately following the backslash is a special ! character, it returns the escaped version of that character. ! Else, the character has no meaning and is returned as the literal ! character. This conforms with the behavior of bash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) *************** *** 321,338 **** (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) - ;; allow \\ to mean a literal "\" character followed by a - ;; normal return, rather than a backslash followed by a line - ;; continuation (i.e., "\\ + \n" rather than "\ + \\n"). This - ;; is necessary because backslashes in Eshell are not special - ;; unless they either precede something special, or precede a - ;; backslash that precedes something special. (Mainly this is - ;; done to make using backslash on Windows systems more - ;; natural-feeling). - (if (eshell-looking-at-backslash-return (1+ (point))) - (forward-char)) (forward-char) ! "\\")))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" --- 317,325 ---- (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) (forward-char) ! (forward-char) ! (char-before))))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" Diff finished. Mon Dec 8 01:23:11 2014 *** /home/samer/build/emacs120714/share/emacs/25.0.50/lisp/eshell/esh-arg.el.gz.old --- /home/samer/build/emacs120714/share/emacs/25.0.50/lisp/eshell/esh-arg.el.gz *************** *** 89,95 **** (goto-char (match-end 0)) (eshell-finish-arg))))) ! ;; backslash before a special character means escape it 'eshell-parse-backslash ;; text beginning with ' is a literally quoted --- 89,96 ---- (goto-char (match-end 0)) (eshell-finish-arg))))) ! ;; backslash before a character escapes it if the character is ! ;; special, and returns the character literal if it is non-special 'eshell-parse-backslash ;; text beginning with ' is a literally quoted *************** *** 282,294 **** "A stub function that generates an error if a floating operator is found." (error "Unhandled operator in input text")) - (defsubst eshell-looking-at-backslash-return (pos) - "Test whether a backslash-return sequence occurs at POS." - (and (eq (char-after pos) ?\\) - (or (= (1+ pos) (point-max)) - (and (eq (char-after (1+ pos)) ?\n) - (= (+ pos 2) (point-max)))))) - (defun eshell-quote-backslash (string &optional index) "Intelligently backslash the character occurring in STRING at INDEX. If the character is itself a backslash, it needs no escaping." --- 283,288 ---- *************** *** 305,313 **** (string ?\\ char))))) (defun eshell-parse-backslash () ! "Parse a single backslash (\) character, which might mean escape. ! It only means escape if the character immediately following is a ! special character that is not itself a backslash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) --- 299,309 ---- (string ?\\ char))))) (defun eshell-parse-backslash () ! "Parse a single backslash (\) character to escape the character after. ! If the character immediately following the backslash is a special ! character, it returns the escaped version of that character. ! Else, the character has no meaning and is returned as the literal ! character. This conforms with the behavior of bash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) *************** *** 321,338 **** (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) - ;; allow \\ to mean a literal "\" character followed by a - ;; normal return, rather than a backslash followed by a line - ;; continuation (i.e., "\\ + \n" rather than "\ + \\n"). This - ;; is necessary because backslashes in Eshell are not special - ;; unless they either precede something special, or precede a - ;; backslash that precedes something special. (Mainly this is - ;; done to make using backslash on Windows systems more - ;; natural-feeling). - (if (eshell-looking-at-backslash-return (1+ (point))) - (forward-char)) (forward-char) ! "\\")))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" --- 317,325 ---- (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) (forward-char) ! (forward-char) ! (char-before))))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 13:46:32 2014 Received: (at 8531) by debbugs.gnu.org; 8 Dec 2014 18:46:32 +0000 Received: from localhost ([127.0.0.1]:57986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy3KJ-00029d-Ql for submit@debbugs.gnu.org; Mon, 08 Dec 2014 13:46:32 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:43186) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy3KI-00029V-10 for 8531@debbugs.gnu.org; Mon, 08 Dec 2014 13:46:30 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjwPAOwQflRFxLi7/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSQtiB0J1lkBAQEBBgEBAQEekG8HhEgFiwGSMYM4jkWBeIQZIYJ3AQEB X-IPAS-Result: AjwPAOwQflRFxLi7/2dsb2JhbABbgweDYIVaxR0EAgKBJBcBAQEBAQF8hAMBAQMBViMFCws0EhQYDSQtiB0J1lkBAQEBBgEBAQEekG8HhEgFiwGSMYM4jkWBeIQZIYJ3AQEB X-IronPort-AV: E=Sophos;i="5.07,502,1413259200"; d="scan'208";a="99886871" Received: from 69-196-184-187.dsl.teksavvy.com (HELO ceviche.home) ([69.196.184.187]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Dec 2014 13:46:28 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 3A814660F3; Mon, 8 Dec 2014 13:46:28 -0500 (EST) From: Stefan Monnier To: samer Subject: Re: bug#8531: 24.0.50; Message-ID: References: <8762q8xe3i.fsf@gmail.com> <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> Date: Mon, 08 Dec 2014 13:46:28 -0500 In-Reply-To: <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> (samer@samertm.com's message of "Mon, 08 Dec 2014 01:34:12 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) > I found this bug on debbugs thanks to Lars' getting started guide. This > change simplifies the code by making the behavior that used occur for > newlines following a backslash, returning the character literal after the > backslash, the behavior that occurs for _all_ non-special characters. This looks OK, thanks. Please include an entry for etc/NEWS mentioning the change in behavior and a description for the ChangeLog file. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 19:15:53 2014 Received: (at 8531) by debbugs.gnu.org; 9 Dec 2014 00:15:53 +0000 Received: from localhost ([127.0.0.1]:58291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy8Sz-0007XC-Sh for submit@debbugs.gnu.org; Mon, 08 Dec 2014 19:15:53 -0500 Received: from samertm.com ([162.243.37.26]:32880 helo=mail.samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy8St-0007X0-Vc for 8531@debbugs.gnu.org; Mon, 08 Dec 2014 19:15:48 -0500 Received: from samertm.com (localhost [127.0.0.1]) by mail.samertm.com (Postfix) with ESMTP id C95CF81E4D; Tue, 9 Dec 2014 00:15:17 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 08 Dec 2014 16:15:17 -0800 From: samer To: Stefan Monnier Subject: Re: bug#8531: 24.0.50; In-Reply-To: References: <8762q8xe3i.fsf@gmail.com> <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> Message-ID: <92a38c617b988742e23fc909e497975a@samertm.com> X-Sender: samer@samertm.com User-Agent: Roundcube Webmail/0.9.5 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 8531 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) Forgot to CC debbugs in my previous email: This is the full patch, generated with magit because I couldn't commit this to a private branch (I get "Empty change log entry" even though I've changed both ChangeLog files. I don't know awk, do you have any idea why I would get that error?) Best, Samer Changes from master to working tree 4 files changed, 26 insertions(+), 22 deletions(-) etc/ChangeLog | 4 ++++ etc/NEWS | 6 ++++++ lisp/ChangeLog | 7 +++++++ lisp/eshell/esh-arg.el | 31 +++++++++---------------------- Modified etc/ChangeLog diff --git a/etc/ChangeLog b/etc/ChangeLog index 309c01f..3e76256 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2014-12-08 Samer Masterson + + * NEWS: Mention change in backslash expand behavior for eshell. + 2014-12-08 Lars Magne Ingebrigtsen * NEWS: Mention the new eww `S' command. Modified etc/NEWS diff --git a/etc/NEWS b/etc/NEWS index 56036f8..e6d9aab 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -192,6 +192,12 @@ result of the calculation into the current buffer. *** New minor mode global-eldoc-mode *** eldoc-documentation-function now defaults to nil +** eshell + +*** Backslash (\) expands to the character literal after it if that +character is non-special (e.g. 'b\in' expands to 'bin', because 'i' is +not a special character). This behavior conforms with bash. + ** eww +++ Modified lisp/ChangeLog diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2669e07..0ec9b35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-12-08 Samer Masterson + + * eshell/esh-arg.el (eshell-parse-backslash): Return the literal + character after the backslash if the character is non-special + (bug#8531). + (eshell-looking-at-backslash-return): Unused, remove. + 2014-12-08 Lars Magne Ingebrigtsen * net/nsm.el (nsm-check-protocol): Test for RC4 on `high'. Modified lisp/eshell/esh-arg.el diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 704de57..33ff384 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -89,7 +89,8 @@ yield the values intended." (goto-char (match-end 0)) (eshell-finish-arg))))) - ;; backslash before a special character means escape it + ;; backslash before a character escapes it if the character is + ;; special, and returns the character literal if it is non-special 'eshell-parse-backslash ;; text beginning with ' is a literally quoted @@ -282,13 +283,6 @@ Point is left at the end of the arguments." "A stub function that generates an error if a floating operator is found." (error "Unhandled operator in input text")) -(defsubst eshell-looking-at-backslash-return (pos) - "Test whether a backslash-return sequence occurs at POS." - (and (eq (char-after pos) ?\\) - (or (= (1+ pos) (point-max)) - (and (eq (char-after (1+ pos)) ?\n) - (= (+ pos 2) (point-max)))))) - (defun eshell-quote-backslash (string &optional index) "Intelligently backslash the character occurring in STRING at INDEX. If the character is itself a backslash, it needs no escaping." @@ -305,9 +299,11 @@ If the character is itself a backslash, it needs no escaping." (string ?\\ char))))) (defun eshell-parse-backslash () - "Parse a single backslash (\) character, which might mean escape. -It only means escape if the character immediately following is a -special character that is not itself a backslash." + "Parse a single backslash (\) character to escape the character after. +If the character immediately following the backslash is a special +character, it returns the escaped version of that character. +Else, the character has no meaning and is returned as the literal +character. This conforms with the behavior of bash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) @@ -321,18 +317,9 @@ special character that is not itself a backslash." (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) - ;; allow \\ to mean a literal "\" character followed by a - ;; normal return, rather than a backslash followed by a line - ;; continuation (i.e., "\\ + \n" rather than "\ + \\n"). This - ;; is necessary because backslashes in Eshell are not special - ;; unless they either precede something special, or precede a - ;; backslash that precedes something special. (Mainly this is - ;; done to make using backslash on Windows systems more - ;; natural-feeling). - (if (eshell-looking-at-backslash-return (1+ (point))) - (forward-char)) (forward-char) - "\\")))) + (forward-char) + (char-before))))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 19:41:54 2014 Received: (at 8531) by debbugs.gnu.org; 9 Dec 2014 00:41:54 +0000 Received: from localhost ([127.0.0.1]:58309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy8sE-00017w-2b for submit@debbugs.gnu.org; Mon, 08 Dec 2014 19:41:54 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:48074) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy8sC-00017o-3i for 8531@debbugs.gnu.org; Mon, 08 Dec 2014 19:41:53 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xy8rp-0000wE-WF; Tue, 09 Dec 2014 01:41:30 +0100 From: Lars Magne Ingebrigtsen To: samer Subject: Re: bug#8531: 24.0.50; References: <8762q8xe3i.fsf@gmail.com> <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> <92a38c617b988742e23fc909e497975a@samertm.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEVyc3JsbWxqa2pvcXBv cG9tbm3A0tVRUVCupv4FAAACSklEQVQ4jWWUva7bMAyF1crJfCVUeyU0uKsAyp0diOpcJeJ+hyKv kNfvYezrpKiBIDC/kIe/Mff1SSlFzmZ/vho1pSi8m4hFUnpfwUmY8d6kwqlI30FgcT1E6Y3Z1Hr2 KW2gR++AAEolPssOXBJxQUKrpV3x8RtQBhdx3IRrphVE54JPMEt3ci0zULs8PBwQMpbQg1BBdkM2 4Jz30UUYuBLqGFuoID6qXc2VCr5bWEF0Ps6DFyr4/QhS5OQ1FMrxbwdBDWSJqLbR3UOjIyOrARhm soZK7wpCk5DbNVtEssbYnC2fLwCjye+JKL803ZZu7j8qN4MQeP/YyTSb+4lpOQhlc7zdbhuyTdSj TmMu2dz02cAM8I0N+lrz8QHgkhG4qcZyCEMk3zZgdYgNWUUj2sBfK0AsyjQLwFvXNn57Ai1IUOCX jra26/EJyFZBr7bMX4C1JajGYwj086lBNAdklTBTae1T47vFTOa1u1iS1pZXD2k6jxDUp672PwBz xeA1lLtgocZxc9BZTUPbfhLxaP2ydQTpoo7LtnABpYB81NWD2ioeffAjDH4jTTxn4oe4xgqQxyXw Yh8nUmX1cAgkcmUsg1GCNfWrBnYz9IHjKLmg789tv0BcI7GKo7vsPsUFC8uVLS+IhfXZ78Nht8JA sDxlU6eyXxSENauyXfS8ecTUeddAtlP79EApA6tb7Tq0ct4BrgrLruVZMzV3eYJ00kteypKZcQQv IPkOCcrTxD39C8aizZqw4sYc3p8ghsUY5kl6v+z/Jf8/97+QHuOQrtpQggAAAABJRU5ErkJggg== X-Now-Playing: Herbert's _You Saw It All_: "Back to the Start (Mr. Oizo 'Non' Mix)" X-Hashcash: 1:23:141209:samer@samertm.com::Oe6qiQ3WZeA+RKYL:00000000000000000000000000000000000000000000HIdh X-Hashcash: 1:23:141209:monnier@iro.umontreal.ca::VRlrxUdQCBn6x7OK:0000000000000000000000000000000000001Jpf3 Date: Tue, 09 Dec 2014 01:41:29 +0100 In-Reply-To: <92a38c617b988742e23fc909e497975a@samertm.com> (samer@samertm.com's message of "Mon, 08 Dec 2014 16:15:17 -0800") Message-ID: User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1Xy8rp-0000wE-WF X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1418690490.05945@RnK8h6SjfCD5nmhHtqlXuA X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) samer writes: > Forgot to CC debbugs in my previous email: Looks good, I think. Do you have FSF copyright assignment papers on file? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 19:42:49 2014 Received: (at control) by debbugs.gnu.org; 9 Dec 2014 00:42:49 +0000 Received: from localhost ([127.0.0.1]:58313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy8t6-00019Y-Im for submit@debbugs.gnu.org; Mon, 08 Dec 2014 19:42:48 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:59350) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy8t4-00019Q-R5 for control@debbugs.gnu.org; Mon, 08 Dec 2014 19:42:47 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Xy8sn-0000xE-P7 for control@debbugs.gnu.org; Tue, 09 Dec 2014 01:42:29 +0100 Date: Tue, 09 Dec 2014 01:42:29 +0100 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #8531 X-MailScanner-ID: 1Xy8sn-0000xE-P7 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1418690549.9389@JwIycMF5yCZwJkgsUVf1PA X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) tags 8531 patch From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 21:12:25 2014 Received: (at 8531) by debbugs.gnu.org; 9 Dec 2014 02:12:25 +0000 Received: from localhost ([127.0.0.1]:58380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyAHo-00066s-WA for submit@debbugs.gnu.org; Mon, 08 Dec 2014 21:12:25 -0500 Received: from samertm.com ([162.243.37.26]:32908 helo=mail.samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyAHm-00066h-NF for 8531@debbugs.gnu.org; Mon, 08 Dec 2014 21:12:23 -0500 Received: from samertm.com (localhost [127.0.0.1]) by mail.samertm.com (Postfix) with ESMTP id 5B21B80367; Tue, 9 Dec 2014 02:11:51 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 08 Dec 2014 18:11:51 -0800 From: samer To: Lars Magne Ingebrigtsen Subject: Re: bug#8531: 24.0.50; In-Reply-To: References: <8762q8xe3i.fsf@gmail.com> <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> <92a38c617b988742e23fc909e497975a@samertm.com> Message-ID: <5640c52e1c5e106032bc99c3e2407a8b@samertm.com> X-Sender: samer@samertm.com User-Agent: Roundcube Webmail/0.9.5 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 2014-12-08 16:41, Lars Magne Ingebrigtsen wrote: > samer writes: > >> Forgot to CC debbugs in my previous email: > > Looks good, I think. Do you have FSF copyright assignment papers on > file? I don't, but I would be willing to assign my copyright to the FSF. How can we start that process? Best, Samer From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 08 21:15:05 2014 Received: (at 8531) by debbugs.gnu.org; 9 Dec 2014 02:15:05 +0000 Received: from localhost ([127.0.0.1]:58389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyAKP-0006Dc-0u for submit@debbugs.gnu.org; Mon, 08 Dec 2014 21:15:05 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:48539) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyAKM-0006BQ-R1 for 8531@debbugs.gnu.org; Mon, 08 Dec 2014 21:15:03 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XyAK4-0001wD-Jb for 8531@debbugs.gnu.org; Tue, 09 Dec 2014 03:14:44 +0100 From: Lars Magne Ingebrigtsen To: 8531@debbugs.gnu.org Subject: Re: bug#8531: 24.0.50; References: <8762q8xe3i.fsf@gmail.com> <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> <92a38c617b988742e23fc909e497975a@samertm.com> <5640c52e1c5e106032bc99c3e2407a8b@samertm.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEX8+OqMfYnl1MjWwbj+ //j+//v////9/PP+/vr06tzq3PFuAAACZUlEQVQ4jV3SP3PTMBQAcFFo1IwhX6BIA6cx0tQtdxhc tg6xSLcc1K/OJloTX7ZcLm0yuvYdoG/L07OV0mpwfPrl/ZPMACB5eDOKSwjGWFI5wwAKgB9x/70Q CeNfzWSMYDEoghbqc1o+4RsCPMNYCvWQuskR7kdjg2tihDg/VPfhLwQFvhFohAoDJqMLgm+yAyMR +BrDR5LgYdfBWAjxp2ox7YRqFFn2gQAzidMpxfYAP7tUQqjTT/QyCZAFGHfgf7XhV4bJ8wzgaXxC oPzePAMGzculEVjD11sKNIZZmnD3pTDaaOV5Sz0Y001+c2mh7YACmgi7RwtbbS58fUettRHm1sJ1 zIStSYIb6guupDmvedea6SPy0MGsMXW9poD2CFlm57sTXbO70HII6GGWzGfJV+1Za3Afe9J98Sw5 7JIrBBlAHiMQkuRyESGM2N0H5Ah22UOrhZER0sQCAsfiPhyIFv1Xkg4AlsJXl9J8xKPFniOcIai6 evyODdEx9rBnBKVdyJdwi8e/9Ky0uTCvYIXA8fRV8wKADWARIPdcmv+Kw/ovLFiZ2Vs/2FKy/mph UcOGlxY2fnAtX8G+Smzh/GBNn1iEol7tkoNNnRrcvQCsPstszhFO8I6bZ3BneF975tSq0V55cYQp x3wV4/UUvx7l/RGuWBiTDb1XDV67j3PQ7NOw7xmCQpgfwoIbnH3Kq6HiLmRCoBs2v3P2rnCM8apy voN1jc96BY7PEJDWPbyVgopseEL71bARoSvYNr6vntK+86KDuAqWOtznrNGaujouhxGcu6HUVKOM E8KmQmCs1aFd8Q9XwVK1CU5PvQAAAABJRU5ErkJggg== X-Now-Playing: Wishmountain's _Tesco_: "Coke" X-Hashcash: 1:23:141209:samer@samertm.com::6s6S6xZ2+nTpmZ+u:000000000000000000000000000000000000000000007RPy X-Hashcash: 1:23:141209:8531@debbugs.gnu.org::gYkVeKJtbkbGaOhI:00000000000000000000000000000000000000000NStT Date: Tue, 09 Dec 2014 03:14:44 +0100 In-Reply-To: <5640c52e1c5e106032bc99c3e2407a8b@samertm.com> (samer@samertm.com's message of "Mon, 08 Dec 2014 18:11:51 -0800") Message-ID: User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1XyAK4-0001wD-Jb X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1418696085.42673@KKqmWps3FF9ZfovtcCjIug X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 8531 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) samer writes: > I don't, but I would be willing to assign my copyright to the FSF. How > can we start that process? I've sent the assignment form off-list. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 09 17:11:49 2014 Received: (at 8531) by debbugs.gnu.org; 9 Dec 2014 22:11:49 +0000 Received: from localhost ([127.0.0.1]:60002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyT0X-0008Lg-0y for submit@debbugs.gnu.org; Tue, 09 Dec 2014 17:11:49 -0500 Received: from samertm.com ([162.243.37.26]:34161 helo=mail.samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyT0U-0008LW-Pi for 8531@debbugs.gnu.org; Tue, 09 Dec 2014 17:11:47 -0500 Received: from samertm.com (localhost [127.0.0.1]) by mail.samertm.com (Postfix) with ESMTP id 7A05A80367; Tue, 9 Dec 2014 22:11:15 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 09 Dec 2014 14:11:15 -0800 From: samer To: Lars Magne Ingebrigtsen Subject: Re: bug#8531: 24.0.50; In-Reply-To: <5640c52e1c5e106032bc99c3e2407a8b@samertm.com> References: <8762q8xe3i.fsf@gmail.com> <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> <92a38c617b988742e23fc909e497975a@samertm.com> <5640c52e1c5e106032bc99c3e2407a8b@samertm.com> Message-ID: <285c2dea5aa9a0e4c5d154c7a462196d@samertm.com> X-Sender: samer@samertm.com User-Agent: Roundcube Webmail/0.9.5 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) I've sent an email to assign@gnu.org. What is the next step for getting this patch merged into Emacs? Best, Samer From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 09 17:22:06 2014 Received: (at 8531) by debbugs.gnu.org; 9 Dec 2014 22:22:06 +0000 Received: from localhost ([127.0.0.1]:60010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyTAT-0000A8-Os for submit@debbugs.gnu.org; Tue, 09 Dec 2014 17:22:05 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:59263) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyTAQ-00009y-NT for 8531@debbugs.gnu.org; Tue, 09 Dec 2014 17:22:03 -0500 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XyTA8-000051-DM; Tue, 09 Dec 2014 23:21:44 +0100 From: Lars Magne Ingebrigtsen To: samer Subject: Re: bug#8531: 24.0.50; References: <8762q8xe3i.fsf@gmail.com> <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> <92a38c617b988742e23fc909e497975a@samertm.com> <5640c52e1c5e106032bc99c3e2407a8b@samertm.com> <285c2dea5aa9a0e4c5d154c7a462196d@samertm.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVsBRvwZ3WNByOqETWt DC5VBBUYAQctAw7TIErFCS/aSNhxAAACc0lEQVQ4jXXTQWvbMBQHcJHVdXr0YZBjppm2vnZfIKRi iW8mRPF262XSNYRa79oYl8o3z8Rgfdu+JztdtzIFgtHP7/+eUMJiccHn04rNP53E1NLKL5iLJyxN mwVfI4jTye9XQQNSnJhzjs9vSy5eUjsjeNo/Q34oCdp4XU5uSxFFBM+HRQEHX5H0dTlZV/0I2yCA rYeTbXn8uz5GPqqM81yuLYGzS+6OCNaJHkVCZj1YV/LE9pGt5/ne3dYBFNMOobe1FUnd2+OsDlXx sy5DSEIEzO3bpOyP2LxT6odbhsUSBrB1WlqEWWXUVXPIMsEYJvnV4bQ41k5tbh6gSJo3WGEBnmOl dH6AgwvPUPMBGqWZVHs+Z24oqKaRj6qNlqBjvmRjUusBHy61Ntt4yUdwiy9+f2YvlVIxge9RZXSK aIan9yBiziw16bL10UedQdwxn9TIqa84zuy1Vr8Ege/R5I8j1N+1evDgx23MxkMUvRilHlJxP0IH jyN8xhYY9e1umKqDrR0BK/QAfiq4wtvAT/SkCO4RUoKmSPGb7nY1AmeCsrq9PyAeZOV73HMClG7y N9wRpATJCNU1wVcPWGI7lniYtYp6cI73EVNJVxz8uPXuD3As6du8oN+CvdlSlKJ9gtS1oU5w3sVm MVYQxNQlUMWFc41R74BTl9aoYpL+AxgmBHbVm9NuBNwn4GIZB6B1tsw9qDeg8TIZbOYwlEzY28rY JGMsGCo0bkgGclj70IA0Z5CSKQAJ+OfKDahxaRYQ7GRRAMCQAlSjMSBnCrcR8C18D+SeGQJA0MZg ASaek/ARF1Mflh4AzP/gg8AA+bvwscLbKxq4ltvD/ivnAAAAAElFTkSuQmCC X-Now-Playing: Matmos's _The Marriage of True Minds_: "Mental Radio" X-Hashcash: 1:23:141209:samer@samertm.com::zotpUKvqEXPMh5pA:000000000000000000000000000000000000000000001dr3 X-Hashcash: 1:23:141209:8531@debbugs.gnu.org::HFF3auYJb/LXZmG9:000000000000000000000000000000000000000002Rig Date: Tue, 09 Dec 2014 23:21:44 +0100 In-Reply-To: <285c2dea5aa9a0e4c5d154c7a462196d@samertm.com> (samer@samertm.com's message of "Tue, 09 Dec 2014 14:11:15 -0800") Message-ID: User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1XyTA8-000051-DM X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1418768504.85296@Yh57CuItUCU1kXiLmJ83tQ X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) samer writes: > I've sent an email to assign@gnu.org. What is the next step for > getting this patch merged into Emacs? The copyright clerk will get in touch with you. Once the paperwork is finalised, follow up to this bug report, and we can get your patches installed. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 09 17:31:06 2014 Received: (at 8531) by debbugs.gnu.org; 9 Dec 2014 22:31:06 +0000 Received: from localhost ([127.0.0.1]:60026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyTJC-0000RB-Gz for submit@debbugs.gnu.org; Tue, 09 Dec 2014 17:31:06 -0500 Received: from samertm.com ([162.243.37.26]:34190 helo=mail.samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyTJA-0000R4-Nl for 8531@debbugs.gnu.org; Tue, 09 Dec 2014 17:31:05 -0500 Received: from samertm.com (localhost [127.0.0.1]) by mail.samertm.com (Postfix) with ESMTP id 094F180367; Tue, 9 Dec 2014 22:30:38 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 09 Dec 2014 14:30:38 -0800 From: samer To: Lars Magne Ingebrigtsen Subject: Re: bug#8531: 24.0.50; In-Reply-To: References: <8762q8xe3i.fsf@gmail.com> <803b223f5dd871db67cab3b46e8b6d3a@samertm.com> <92a38c617b988742e23fc909e497975a@samertm.com> <5640c52e1c5e106032bc99c3e2407a8b@samertm.com> <285c2dea5aa9a0e4c5d154c7a462196d@samertm.com> Message-ID: X-Sender: samer@samertm.com User-Agent: Roundcube Webmail/0.9.5 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) Alright, thanks! Best, Samer On 2014-12-09 14:21, Lars Magne Ingebrigtsen wrote: > samer writes: > >> I've sent an email to assign@gnu.org. What is the next step for >> getting this patch merged into Emacs? > > The copyright clerk will get in touch with you. Once the paperwork is > finalised, follow up to this bug report, and we can get your patches > installed. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 24 05:51:51 2015 Received: (at 8531) by debbugs.gnu.org; 24 Feb 2015 10:51:51 +0000 Received: from localhost ([127.0.0.1]:56305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQD5f-00039k-8I for submit@debbugs.gnu.org; Tue, 24 Feb 2015 05:51:50 -0500 Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:60123 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQD5Z-00039F-HX for 8531@debbugs.gnu.org; Tue, 24 Feb 2015 05:51:45 -0500 Received: from [10.1.10.35] (c-98-210-154-226.hsd1.ca.comcast.net [98.210.154.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by samertm.com (Postfix) with ESMTPSA id 85B1042D27 for <8531@debbugs.gnu.org>; Tue, 24 Feb 2015 10:51:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail; t=1424775088; bh=WFYF11G4K+bU/SVPu+c2Vj5Tfa4ZhmddRP8/4NHFnm4=; h=Date:From:Subject:To:From; b=qJhUH+jiLINNu7rBwpbrisoqrsV8QJIFNim4r4wrLv2pGglKM8E9W/9Z9WvTu+EEB LWZmmINpzPRiq6ko9gvan+tN8i0ZIdF6E7QLJcgC6p0h15PfmIViQ5ThFoaO2/I+ZP DOhAe0qrqxbAlp2XtApFec2b/l1si7s6AY1hqcEw= Date: Tue, 24 Feb 2015 02:51:29 -0800 From: Samer Masterson Subject: Re: bug#8531: 24.0.50; To: 8531@debbugs.gnu.org Message-Id: <1424775089.11596.4@mail.samertm.com> X-Mailer: geary/0.8.3 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-gEzGzcyui/y9YOYZoGrz" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 8531 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.4 (/) --=-gEzGzcyui/y9YOYZoGrz Content-Type: text/plain; charset=utf-8; format=flowed Hi, My copyright papers have been processed. Can we apply this to master? Best, Samer Changes from master to working tree 4 files changed, 26 insertions(+), 22 deletions(-) etc/ChangeLog | 4 ++++ etc/NEWS | 6 ++++++ lisp/ChangeLog | 7 +++++++ lisp/eshell/esh-arg.el | 31 +++++++++---------------------- Modified etc/ChangeLog diff --git a/etc/ChangeLog b/etc/ChangeLog index 309c01f..3e76256 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2014-12-08 Samer Masterson dark-horse> + + * NEWS: Mention change in backslash expand behavior for eshell. + 2014-12-08 Lars Magne Ingebrigtsen gnus.org> * NEWS: Mention the new eww `S' command. Modified etc/NEWS diff --git a/etc/NEWS b/etc/NEWS index 56036f8..e6d9aab 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -192,6 +192,12 @@ result of the calculation into the current buffer. *** New minor mode global-eldoc-mode *** eldoc-documentation-function now defaults to nil +** eshell + +*** Backslash (\) expands to the character literal after it if that +character is non-special (e.g. 'b\in' expands to 'bin', because 'i' is +not a special character). This behavior conforms with bash. + ** eww +++ Modified lisp/ChangeLog diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2669e07..0ec9b35 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-12-08 Samer Masterson samertm.com> + + * eshell/esh-arg.el (eshell-parse-backslash): Return the literal + character after the backslash if the character is non-special + (bug#8531). + (eshell-looking-at-backslash-return): Unused, remove. + 2014-12-08 Lars Magne Ingebrigtsen gnus.org> * net/nsm.el (nsm-check-protocol): Test for RC4 on `high'. Modified lisp/eshell/esh-arg.el diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 704de57..33ff384 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -89,7 +89,8 @@ yield the values intended." (goto-char (match-end 0)) (eshell-finish-arg))))) - ;; backslash before a special character means escape it + ;; backslash before a character escapes it if the character is + ;; special, and returns the character literal if it is non-special 'eshell-parse-backslash ;; text beginning with ' is a literally quoted @@ -282,13 +283,6 @@ Point is left at the end of the arguments." "A stub function that generates an error if a floating operator is found." (error "Unhandled operator in input text")) -(defsubst eshell-looking-at-backslash-return (pos) - "Test whether a backslash-return sequence occurs at POS." - (and (eq (char-after pos) ?\\) - (or (= (1+ pos) (point-max)) - (and (eq (char-after (1+ pos)) ?\n) - (= (+ pos 2) (point-max)))))) - (defun eshell-quote-backslash (string &optional index) "Intelligently backslash the character occurring in STRING at INDEX. If the character is itself a backslash, it needs no escaping." @@ -305,9 +299,11 @@ If the character is itself a backslash, it needs no escaping." (string ?\\ char))))) (defun eshell-parse-backslash () - "Parse a single backslash (\) character, which might mean escape. -It only means escape if the character immediately following is a -special character that is not itself a backslash." + "Parse a single backslash (\) character to escape the character after. +If the character immediately following the backslash is a special +character, it returns the escaped version of that character. +Else, the character has no meaning and is returned as the literal +character. This conforms with the behavior of bash." (when (eq (char-after) ?\\) (if (eshell-looking-at-backslash-return (point)) (throw 'eshell-incomplete ?\\) @@ -321,18 +317,9 @@ special character that is not itself a backslash." (forward-char 2) (list 'eshell-escape-arg (char-to-string (char-before)))) - ;; allow \\ to mean a literal "\" character followed by a - ;; normal return, rather than a backslash followed by a line - ;; continuation (i.e., "\\ + \n" rather than "\ + \\n"). This - ;; is necessary because backslashes in Eshell are not special - ;; unless they either precede something special, or precede a - ;; backslash that precedes something special. (Mainly this is - ;; done to make using backslash on Windows systems more - ;; natural-feeling). - (if (eshell-looking-at-backslash-return (1+ (point))) - (forward-char)) (forward-char) - "\\")))) + (forward-char) + (char-before))))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" --=-gEzGzcyui/y9YOYZoGrz Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi,

My copyright papers have been processed. = Can we apply this to master?

Best,
Samer=

Changes from master to working tree
4 f= iles changed, 26 insertions(+), 22 deletions(-)
 etc/ChangeL= og          |  4 ++++
 etc/NEW= S               |  6 ++++++
 lisp/ChangeLog         |  7 +++++++=
 lisp/eshell/esh-arg.el | 31 +++++++++----------------------

Modified   etc/ChangeLog
diff --git a/etc/ChangeL= og b/etc/ChangeLog
index 309c01f..3e76256 100644
--- a/= etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
=
+2014-12-08  Samer Masterson  <samer <at> dark-hors= e>
+
+ * NEWS: Mention change in backslash expand behavior for = eshell.
+
 2014-12-08  Lars Magne Ingebrigtse= n  <larsi <at> gnus.org>

  * NEWS: Ment= ion the new eww `S' command.
Modified   etc/NEWS
diff --git = a/etc/NEWS b/etc/NEWS
index 56036f8..e6d9aab 100644
---= a/etc/NEWS
+++ b/etc/NEWS
@@ -192,6 +192,12 @@ result = of the calculation into the current buffer.
 *** New minor m= ode global-eldoc-mode
 *** eldoc-documentation-function now = defaults to nil

+** eshell
+
+= *** Backslash (\) expands to the character literal after it if that
+character is non-special (e.g. 'b\in' expands to 'bin', because 'i' is<= /div>
+not a special character). This behavior conforms with bash.
+
 ** eww

 +++
Modified =   lisp/ChangeLog
diff --git a/lisp/ChangeLog b/lisp/ChangeLo= g
index 2669e07..0ec9b35 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2014-12-= 08  Samer Masterson  <samer <at> samertm.com>
+
+ <= /span>* eshell/esh-arg.el (eshell-parse-backslash): Return the literal
+ cha= racter after the backslash if the character is non-special
+ (bug#8531).
+ (e= shell-looking-at-backslash-return): Unused, remove.
+
&= nbsp;2014-12-08  Lars Magne Ingebrigtsen  <larsi <at> gn= us.org>

  * net/nsm.el (nsm-check-protocol): Test for= RC4 on `high'.
Modified   lisp/eshell/esh-arg.el
diff --git= a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el
index 704de57.= .33ff384 100644
--- a/lisp/eshell/esh-arg.el
+++ b/lisp= /eshell/esh-arg.el
@@ -89,7 +89,8 @@ yield the values intended."<= /div>
  <= /span>  (goto-char (match-end 0))
   (eshell-finish-arg)))))=

-   ;; backslash before a special character = means escape it
+   ;; backslash before a character escapes = it if the character is
+   ;; special, and returns the chara= cter literal if it is non-special
    'eshell-parse-bac= kslash

    ;; text beginning with ' is a= literally quoted
@@ -282,13 +283,6 @@ Point is left at the end o= f the arguments."
   "A stub function that generates an= error if a floating operator is 
found."
  &= nbsp;(error "Unhandled operator in input text"))

-= (defsubst eshell-looking-at-backslash-return (pos)
-  "Test = whether a backslash-return sequence occurs at POS."
-  (and = (eq (char-after pos) ?\\)
-       (or (=3D (1+ pos= ) (point-max))
-   (and (eq (char-after (1+ pos)) ?\n)
- (=3D (+ pos 2= ) (point-max))))))
-
 (defun eshell-quote-backslas= h (string &optional index)
   "Intelligently backsl= ash the character occurring in STRING at INDEX.
 If the char= acter is itself a backslash, it needs no escaping."
@@ -305,9 +29= 9,11 @@ If the character is itself a backslash, it needs no 
escaping."
   (string ?\\ char)))))

&nb= sp;(defun eshell-parse-backslash ()
-  "Parse a single backs= lash (\) character, which might mean escape.
-It only means escap= e if the character immediately following is a
-special character = that is not itself a backslash."
+  "Parse a single backslas= h (\) character to escape the character 
after.
+I= f the character immediately following the backslash is a special
= +character, it returns the escaped version of that character.
+El= se, the character has no meaning and is returned as the literal
+= character. This conforms with the behavior of bash."
   = ;(when (eq (char-after) ?\\)
     (if (eshell-look= ing-at-backslash-return (point))
  (throw 'eshell-incomplete ?\\)
=
@@ -321,18 +317,9 @@ special character that is not itself a backslash.= "
 =    (forward-char 2)
     (list 'eshell-es= cape-arg
   (char-to-string (char-before))))
- ;; allow \\<RET= > to mean a literal "\" character followed by a
- ;; normal return, rat= her than a backslash followed by a line
- ;; continuation (i.e., "\\ + \n" r= ather than "\ + \\n").  This
- ;; is necessary because backslashes in E= shell are not special
- ;; unless they either precede something special, or = precede a
- ;; backslash that precedes something special.  (Mainly this= is
- ;; done to make using backslash on Windows systems more
- ;; natural-fe= eling).
- (if (eshell-looking-at-backslash-return (1+ (point)))
-<= span class=3D"Apple-tab-span" style=3D"white-space:pre">   &nb= sp;(forward-char))
  (forward-char)
- "\\"))))
+ (forward-char)
+ (char-be= fore)))))

 (defun eshell-parse-literal-quote = ()
   "Parse a literally quoted string.  Nothing h= as special meaning!"
= --=-gEzGzcyui/y9YOYZoGrz-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 03 10:52:28 2015 Received: (at 8531) by debbugs.gnu.org; 3 Mar 2015 15:52:28 +0000 Received: from localhost ([127.0.0.1]:34070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YSp7Q-0002iE-DY for submit@debbugs.gnu.org; Tue, 03 Mar 2015 10:52:28 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:49872) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YSp7K-0002hv-Dr for 8531@debbugs.gnu.org; Tue, 03 Mar 2015 10:52:22 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NKN001007VV1300@a-mtaout20.012.net.il> for 8531@debbugs.gnu.org; Tue, 03 Mar 2015 17:52:12 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NKN000D882ZTC70@a-mtaout20.012.net.il>; Tue, 03 Mar 2015 17:52:12 +0200 (IST) Date: Tue, 03 Mar 2015 17:52:05 +0200 From: Eli Zaretskii Subject: Re: bug#8531: 24.0.50; In-reply-to: <1424775089.11596.4@mail.samertm.com> X-012-Sender: halo1@inter.net.il To: Samer Masterson Message-id: <83d24qqdsq.fsf@gnu.org> References: <1424775089.11596.4@mail.samertm.com> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii 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: 1.0 (+) > Date: Tue, 24 Feb 2015 02:51:29 -0800 > From: Samer Masterson > > Changes from master to working tree > 4 files changed, 26 insertions(+), 22 deletions(-) > etc/ChangeLog | 4 ++++ > etc/NEWS | 6 ++++++ > lisp/ChangeLog | 7 +++++++ > lisp/eshell/esh-arg.el | 31 +++++++++---------------------- > > Modified etc/ChangeLog > diff --git a/etc/ChangeLog b/etc/ChangeLog > index 309c01f..3e76256 100644 > --- a/etc/ChangeLog > +++ b/etc/ChangeLog > @@ -1,3 +1,7 @@ > +2014-12-08 Samer Masterson dark-horse> > + > + * NEWS: Mention change in backslash expand behavior for eshell. > + > 2014-12-08 Lars Magne Ingebrigtsen gnus.org> > > * NEWS: Mention the new eww `S' command. > Modified etc/NEWS > diff --git a/etc/NEWS b/etc/NEWS > index 56036f8..e6d9aab 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -192,6 +192,12 @@ result of the calculation into the current buffer. > *** New minor mode global-eldoc-mode > *** eldoc-documentation-function now defaults to nil > > +** eshell > + > +*** Backslash (\) expands to the character literal after it if that > +character is non-special (e.g. 'b\in' expands to 'bin', because 'i' is > +not a special character). This behavior conforms with bash. Thanks. First, please leave 2 blanks between sentences (we use the US English conventions for that). More importantly, this patch doesn't really fix the original bug, does it? Apologies if I missed something. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 15 08:01:46 2015 Received: (at 8531) by debbugs.gnu.org; 15 Mar 2015 12:01:46 +0000 Received: from localhost ([127.0.0.1]:47002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YX7En-0005Lc-GR for submit@debbugs.gnu.org; Sun, 15 Mar 2015 08:01:46 -0400 Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:39513 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YX7Ek-0005LR-PM for 8531@debbugs.gnu.org; Sun, 15 Mar 2015 08:01:43 -0400 Received: from localhost (c-98-210-154-226.hsd1.ca.comcast.net [98.210.154.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by samertm.com (Postfix) with ESMTPSA id 3E879424AA; Sun, 15 Mar 2015 12:01:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail; t=1426420877; bh=VLVNww6GuDXfvqQb+oBa0fE5d7M2yOwrHBi0umLCtqo=; h=From:Date:Subject:To:Cc:From; b=lJ6RArkr5ApKxWYlBjD6hsn2/YW4BIgMyVz9278WTCZImLryPcnxOxl/AVwCGDsfa fiNX0qmvwocw8YeFqxXlQYDnM1AtsupuJn0RcCVMT3FvTnfZj0EGbbJVLOHIDY3S85 g1rpNfoXY/vUyUEVTjJQYEmYoDLel8D8ojm52gBU= From: Samer Masterson Date: Sun, 15 Mar 2015 04:58:58 -0700 Subject: Re: bug#8531: 24.0.50; To: Eli Zaretskii X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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" Message-Id: X-Spam-Score: 0.4 (/) Hi, This is the updated patch. Thanks in advance for the review. Just to clarify, the bug is that $ ls Vid\éos doesn't do the right thing in eshell (it preserves the backslash if the character after it is non-special). This diverges from POSIX and Bash. New behavior: Outside of a double quoted string, the backslash escapes the following charater if that character is special. Otherwise it simply returns the character afterwards (the backslash is ignored). I expanded `eshell-parse-backslash's behavior to match Bash for quoted strings as well. Inside a double quoted string, the backslash escapes the following character if that character is special, otherwise the backslash is preserved. Best, Samer Patch below: [PATCH] Fix bug#8531 * eshell/esh-arg.el (eshell-parse-argument-hook): Update comment. (eshell-parse-backslash): Return escaped character after backslash if it is special. Otherwise, if the backslash is not in a quoted string, ignore the backslash and return the character after; if the backslash is in a quoted string, return the backslash and the character after. (bug#8531) * automated/eshell.el (eshell-test/escape-nonspecial) (eshell-test/escape-nonspecial-unicode) (eshell-test/escape-nonspecial-quoted) (eshell-test/escape-special-quoted): Add tests for new `eshell-parse-backslash' behavior. (bug#8531) --- lisp/ChangeLog | 9 +++++++++ lisp/eshell/esh-arg.el | 49 +++++++++++++++++++++--------------------------- test/ChangeLog | 8 ++++++++ test/automated/eshell.el | 31 ++++++++++++++++++++++++++++++ 4 files changed, 69 insertions(+), 28 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a9cf1b0..209382d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2015-03-15 Samer Masterson + + * eshell/esh-arg.el (eshell-parse-argument-hook): Update comment. + (eshell-parse-backslash): Return escaped character after backslash + if it is special. Otherwise, if the backslash is not in a quoted + string, ignore the backslash and return the character after; if + the backslash is in a quoted string, return the backslash and the + character after. (bug#8531) + 2015-03-14 Michael R. Mauger * progmodes/sql.el: Version 3.5 diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 5c7d7ca..a5f697f 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -89,7 +89,7 @@ yield the values intended." (goto-char (match-end 0)) (eshell-finish-arg))))) - ;; backslash before a special character means escape it + ;; parse backslash and the character after 'eshell-parse-backslash ;; text beginning with ' is a literally quoted @@ -305,34 +305,27 @@ If the character is itself a backslash, it needs no escaping." (string ?\\ char))))) (defun eshell-parse-backslash () - "Parse a single backslash (\) character, which might mean escape. -It only means escape if the character immediately following is a -special character that is not itself a backslash." + "Parse a single backslash (\\) character and the character after. +If the character after the backslash is special, always ignore +the backslash and return the escaped character. + +Otherwise, if the backslash is not in quoted string, the +backslash is ignored and the character after is returned. If the +backslash is in a quoted string, the backslash and the character +after are both returned." (when (eq (char-after) ?\\) - (if (eshell-looking-at-backslash-return (point)) - (throw 'eshell-incomplete ?\\) - (if (and (not (eq (char-after (1+ (point))) ?\\)) - (if eshell-current-quoted - (memq (char-after (1+ (point))) - eshell-special-chars-inside-quoting) - (memq (char-after (1+ (point))) - eshell-special-chars-outside-quoting))) - (progn - (forward-char 2) - (list 'eshell-escape-arg - (char-to-string (char-before)))) - ;; allow \\ to mean a literal "\" character followed by a - ;; normal return, rather than a backslash followed by a line - ;; continuation (i.e., "\\ + \n" rather than "\ + \\n"). This - ;; is necessary because backslashes in Eshell are not special - ;; unless they either precede something special, or precede a - ;; backslash that precedes something special. (Mainly this is - ;; done to make using backslash on Windows systems more - ;; natural-feeling). - (if (eshell-looking-at-backslash-return (1+ (point))) - (forward-char)) - (forward-char) - "\\")))) + (when (eshell-looking-at-backslash-return (point)) + (throw 'eshell-incomplete ?\\)) + (forward-char 2) ; Move one char past the backslash. + ;; If the char is in a quote, backslash only has special meaning + ;; if it is escaping a special char. + (if eshell-current-quoted + (if (memq (char-before) eshell-special-chars-inside-quoting) + (list 'eshell-escape-arg (char-to-string (char-before))) + (concat "\\" (char-to-string (char-before)))) + (if (memq (char-before) eshell-special-chars-outside-quoting) + (list 'eshell-escape-arg (char-to-string (char-before))) + (char-to-string (char-before)))))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" diff --git a/test/ChangeLog b/test/ChangeLog index 6a474e1..ff2cd60 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,11 @@ +2015-03-15 Samer Masterson + + * automated/eshell.el (eshell-test/escape-nonspecial) + (eshell-test/escape-nonspecial-unicode) + (eshell-test/escape-nonspecial-quoted) + (eshell-test/escape-special-quoted): Add tests for new + `eshell-parse-backslash' behavior. (bug#8531) + 2015-03-10 Jackson Ray Hamilton * indent/js-indent-init-dynamic.js: Fix spelling error. diff --git a/test/automated/eshell.el b/test/automated/eshell.el index d51355f..81898db 100644 --- a/test/automated/eshell.el +++ b/test/automated/eshell.el @@ -166,6 +166,37 @@ e.g. \"{(+ 1 2)} 3\" => 3" (eshell-command-result-p "+ 1 2; + $_ 4" "3\n6\n"))) +(ert-deftest eshell-test/escape-nonspecial () + "Test that \"\\c\" and \"c\" are equivalent when \"c\" is not a +special character." + (with-temp-eshell + (eshell-command-result-p "echo he\\llo" + "hello\n"))) + +(ert-deftest eshell-test/escape-nonspecial-unicode () + "Test that \"\\c\" and \"c\" are equivalent when \"c\" is a +unicode character (unicode characters are nonspecial by +definition)." + (with-temp-eshell + (eshell-command-result-p "echo Vid\\éos" + "Vidéos\n"))) + +(ert-deftest eshell-test/escape-nonspecial-quoted () + "Test that the backslash is preserved for escaped nonspecial +chars" + (with-temp-eshell + (eshell-command-result-p "echo \"h\\i\"" + ;; Backslashes are doubled for regexp. + "h\\\\i\n"))) + +(ert-deftest eshell-test/escape-special-quoted () + "Test that the backslash is not preserved for escaped special +chars" + (with-temp-eshell + (eshell-command-result-p "echo \"h\\\\i\"" + ;; Backslashes are doubled for regexp. + "h\\\\i\n"))) + (ert-deftest eshell-test/command-running-p () "Modeline should show no command running" (with-temp-eshell From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 05 23:51:13 2015 Received: (at 8531) by debbugs.gnu.org; 6 Apr 2015 03:51:13 +0000 Received: from localhost ([127.0.0.1]:45744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yey48-0004yf-9P for submit@debbugs.gnu.org; Sun, 05 Apr 2015 23:51:12 -0400 Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:55346 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yey46-0004yS-4o for 8531@debbugs.gnu.org; Sun, 05 Apr 2015 23:51:10 -0400 Received: from [10.20.0.210] (75-101-62-71.dsl.static.fusionbroadband.com [75.101.62.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by samertm.com (Postfix) with ESMTPSA id E078541B6B; Mon, 6 Apr 2015 03:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail; t=1428292219; bh=sUcccSoC9cFUnI/GlbDxPcsUwCq9GZAQV0MLpMC8SEI=; h=Date:From:Subject:To:Cc:In-Reply-To:References:From; b=X4nvTS96L6eMhoPUriHxMTqOVBSwsYB8htPhrJuj6iRdAW6QIn4bh5aVlAqsA/O7p ItKYCKJ+G8MsvocH6yr4atJenuxFG2MO1VIVahrnhKhL7wXBOhh5bBwAzJBzMcwnuY BDwnzkRkndQMdPTKcwd8jZGWKtM4Nc45ivPfa38E= Date: Sun, 05 Apr 2015 20:50:50 -0700 From: Samer Masterson Subject: Re: bug#8531: 24.0.50; To: Eli Zaretskii Message-Id: <1428292250.15170.0@mail.samertm.com> In-Reply-To: <83h9u0psn8.fsf@gnu.org> References: <1424775089.11596.4@mail.samertm.com> <83d24qqdsq.fsf@gnu.org> <1425472710.1450.3@mail.samertm.com> <83h9u0psn8.fsf@gnu.org> X-Mailer: geary/0.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 8531 Cc: 8531@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.4 (/) Hi, This is the updated patch. Thanks in advance for the review. Just to clarify, the bug is that $ ls Vid\=C3=A9os doesn't do the right thing in eshell (it preserves the backslash if the character after it is non-special). This diverges from POSIX and Bash. New behavior: Outside of a double quoted string, the backslash escapes the following charater if that character is special. Otherwise it simply returns the character afterwards (the backslash is ignored). I expanded `eshell-parse-backslash's behavior to match Bash for quoted strings as well. Inside a double quoted string, the backslash escapes the following character if that character is special, otherwise the backslash is preserved. Best, Samer (The date on the commit below is correct, I just forgot to send it to the list). patch below: 900b7a998e210ec260b136ea093c3eba3ce63f34 HEAD bug-8531 Author: Samer Masterson Date: Sun Mar 15 04:01:58 2015 -0700 Fix bug#8531 =20 * eshell/esh-arg.el (eshell-parse-argument-hook): Update comment. (eshell-parse-backslash): Return escaped character after backslash if it is special. Otherwise, if the backslash is not in a quoted string, ignore the backslash and return the character after; if the backslash is in a quoted string, return the backslash and the character after. (bug#8531) * automated/eshell.el (eshell-test/escape-nonspecial) (eshell-test/escape-nonspecial-unicode) (eshell-test/escape-nonspecial-quoted) (eshell-test/escape-special-quoted): Add tests for new `eshell-parse-backslash' behavior. (bug#8531) 4 files changed, 69 insertions(+), 28 deletions(-) lisp/ChangeLog | 9 +++++++++ lisp/eshell/esh-arg.el | 49 +++++++++++++++++++++-----------------------= ---- test/ChangeLog | 8 ++++++++ test/automated/eshell.el | 31 ++++++++++++++++++++++++++++++ Modified lisp/ChangeLog diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a9cf1b0..209382d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2015-03-15 Samer Masterson + + * eshell/esh-arg.el (eshell-parse-argument-hook): Update comment. + (eshell-parse-backslash): Return escaped character after backslash + if it is special. Otherwise, if the backslash is not in a quoted + string, ignore the backslash and return the character after; if + the backslash is in a quoted string, return the backslash and the + character after. (bug#8531) + 2015-03-14 Michael R. Mauger =20 * progmodes/sql.el: Version 3.5 Modified lisp/eshell/esh-arg.el diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 5c7d7ca..a5f697f 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -89,7 +89,7 @@ yield the values intended." (goto-char (match-end 0)) (eshell-finish-arg))))) =20 - ;; backslash before a special character means escape it + ;; parse backslash and the character after 'eshell-parse-backslash =20 ;; text beginning with ' is a literally quoted @@ -305,34 +305,27 @@ If the character is itself a backslash, it needs no e= scaping." (string ?\\ char))))) =20 (defun eshell-parse-backslash () - "Parse a single backslash (\) character, which might mean escape. -It only means escape if the character immediately following is a -special character that is not itself a backslash." + "Parse a single backslash (\\) character and the character after. +If the character after the backslash is special, always ignore +the backslash and return the escaped character. + +Otherwise, if the backslash is not in quoted string, the +backslash is ignored and the character after is returned. If the +backslash is in a quoted string, the backslash and the character +after are both returned." (when (eq (char-after) ?\\) - (if (eshell-looking-at-backslash-return (point)) - (throw 'eshell-incomplete ?\\) - (if (and (not (eq (char-after (1+ (point))) ?\\)) - (if eshell-current-quoted - (memq (char-after (1+ (point))) - eshell-special-chars-inside-quoting) - (memq (char-after (1+ (point))) - eshell-special-chars-outside-quoting))) - (progn - (forward-char 2) - (list 'eshell-escape-arg - (char-to-string (char-before)))) - ;; allow \\ to mean a literal "\" character followed by a - ;; normal return, rather than a backslash followed by a line - ;; continuation (i.e., "\\ + \n" rather than "\ + \\n"). This - ;; is necessary because backslashes in Eshell are not special - ;; unless they either precede something special, or precede a - ;; backslash that precedes something special. (Mainly this is - ;; done to make using backslash on Windows systems more - ;; natural-feeling). - (if (eshell-looking-at-backslash-return (1+ (point))) - (forward-char)) - (forward-char) - "\\")))) + (when (eshell-looking-at-backslash-return (point)) + (throw 'eshell-incomplete ?\\)) + (forward-char 2) ; Move one char past the backslash. + ;; If the char is in a quote, backslash only has special meaning + ;; if it is escaping a special char. + (if eshell-current-quoted + (if (memq (char-before) eshell-special-chars-inside-quoting) + (list 'eshell-escape-arg (char-to-string (char-before))) + (concat "\\" (char-to-string (char-before)))) + (if (memq (char-before) eshell-special-chars-outside-quoting) + (list 'eshell-escape-arg (char-to-string (char-before))) + (char-to-string (char-before)))))) =20 (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" Modified test/ChangeLog diff --git a/test/ChangeLog b/test/ChangeLog index 6a474e1..ff2cd60 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,11 @@ +2015-03-15 Samer Masterson + + * automated/eshell.el (eshell-test/escape-nonspecial) + (eshell-test/escape-nonspecial-unicode) + (eshell-test/escape-nonspecial-quoted) + (eshell-test/escape-special-quoted): Add tests for new + `eshell-parse-backslash' behavior. (bug#8531) + 2015-03-10 Jackson Ray Hamilton =20 * indent/js-indent-init-dynamic.js: Fix spelling error. Modified test/automated/eshell.el diff --git a/test/automated/eshell.el b/test/automated/eshell.el index d51355f..81898db 100644 --- a/test/automated/eshell.el +++ b/test/automated/eshell.el @@ -166,6 +166,37 @@ e.g. \"{(+ 1 2)} 3\" =3D> 3" (eshell-command-result-p "+ 1 2; + $_ 4" "3\n6\n"))) =20 +(ert-deftest eshell-test/escape-nonspecial () + "Test that \"\\c\" and \"c\" are equivalent when \"c\" is not a +special character." + (with-temp-eshell + (eshell-command-result-p "echo he\\llo" + "hello\n"))) + +(ert-deftest eshell-test/escape-nonspecial-unicode () + "Test that \"\\c\" and \"c\" are equivalent when \"c\" is a +unicode character (unicode characters are nonspecial by +definition)." + (with-temp-eshell + (eshell-command-result-p "echo Vid\\=C3=A9os" + "Vid=C3=A9os\n"))) + +(ert-deftest eshell-test/escape-nonspecial-quoted () + "Test that the backslash is preserved for escaped nonspecial +chars" + (with-temp-eshell + (eshell-command-result-p "echo \"h\\i\"" + ;; Backslashes are doubled for regexp. + "h\\\\i\n"))) + +(ert-deftest eshell-test/escape-special-quoted () + "Test that the backslash is not preserved for escaped special +chars" + (with-temp-eshell + (eshell-command-result-p "echo \"h\\\\i\"" + ;; Backslashes are doubled for regexp. + "h\\\\i\n"))) + (ert-deftest eshell-test/command-running-p () "Modeline should show no command running" (with-temp-eshell = From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 22:32:23 2015 Received: (at 8531-done) by debbugs.gnu.org; 9 Apr 2015 02:32:23 +0000 Received: from localhost ([127.0.0.1]:49819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yg2GV-0005Pb-2O for submit@debbugs.gnu.org; Wed, 08 Apr 2015 22:32:23 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:31531) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yg2GT-0005PO-E4 for 8531-done@debbugs.gnu.org; Wed, 08 Apr 2015 22:32:21 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgUFAGvvdVRBbthL/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMFCws0EhQYDSSIE6IRjGQHAQEBAgECgz4Dg3AEqDs X-IPAS-Result: AgUFAGvvdVRBbthL/2dsb2JhbAA3gVOhb4EIgXUBAQQBViMFCws0EhQYDSSIE6IRjGQHAQEBAgECgz4Dg3AEqDs X-IronPort-AV: E=Sophos;i="5.01,1,1400040000"; d="scan'208";a="115767869" Received: from 65-110-216-75.cpe.pppoe.ca (HELO pastel.home) ([65.110.216.75]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Apr 2015 22:32:16 -0400 Received: by pastel.home (Postfix, from userid 20848) id C918D20AC; Wed, 8 Apr 2015 22:32:15 -0400 (EDT) From: Stefan Monnier To: Samer Masterson Subject: Re: bug#8531: 24.0.50; Message-ID: References: <8762q8xe3i.fsf@gmail.com> Date: Wed, 08 Apr 2015 22:32:15 -0400 In-Reply-To: (Samer Masterson's message of "Sun, 15 Mar 2015 04:58:58 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 8531-done Cc: 8531-done@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.3 (/) > This is the updated patch. Thanks in advance for the review. Thanks, installed, Stefan From unknown Tue Aug 19 21:02:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 May 2015 11:24:05 +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