From unknown Tue Jun 17 01:36:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7883: [PATCH] comint history expansion fails to process :N or $ modifier Resent-From: Roland McGrath Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jan 2011 18:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 7883@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.129563411231392 (code B ref -1); Fri, 21 Jan 2011 18:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Jan 2011 18:21:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgLcN-0008AG-T3 for submit@debbugs.gnu.org; Fri, 21 Jan 2011 13:21:52 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgLKJ-000715-JH for submit@debbugs.gnu.org; Fri, 21 Jan 2011 13:03:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgLRw-0006pp-Sf for submit@debbugs.gnu.org; Fri, 21 Jan 2011 13:11:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:51854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgLRw-0006pl-Pd for submit@debbugs.gnu.org; Fri, 21 Jan 2011 13:11:04 -0500 Received: from [140.186.70.92] (port=42544 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgLRv-0003kl-Ms for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 13:11:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgLRu-0006pM-G7 for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 13:11:03 -0500 Received: from c-24-6-0-207.hsd1.ca.comcast.net ([24.6.0.207]:54389 helo=patootie.office.frob.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgLRu-0006p0-B4 for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 13:11:02 -0500 Received: from magilla.sf.frob.com (magilla.office.frob.com [198.49.250.228]) by patootie.office.frob.com (Postfix) with ESMTP id 10F1547D3; Fri, 21 Jan 2011 10:11:00 -0800 (PST) Received: by magilla.sf.frob.com (Postfix, from userid 5281) id C342E18190D; Fri, 21 Jan 2011 10:10:59 -0800 (PST) From: Roland McGrath MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Antipastobozoticataclysm: When George Bush projectile vomits antipasto on the Japanese. Message-Id: <20110121181059.C342E18190D@magilla.sf.frob.com> Date: Fri, 21 Jan 2011 10:10:59 -0800 (PST) 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, 2) X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Fri, 21 Jan 2011 13:21:50 -0500 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.6 (------) This has been driving me nuts since I started using 23 and I only just now bothered to find and fix it. This worked correctly in 22 and was broken, apparently just by a careless change. In a comint/shell buffer, type: echo foo bar RET and then type: echo !$ TAB and you get the expansion: echo echo foo bar i.e., the whole line as if !$ had been !!. The expansion you should get is just: echo bar The following trivial patch fixes the bug, restoring the behavior of v22 with similar code to what it had originally. I tested the fix in 23.2.1, but the relevant comint.el code in the trunk has not changed since then. Thanks, Roland 2011-01-21 Roland McGrath * comint.el (comint-replace-by-expanded-history-before-point): Fix expansion of !$ and !!:N syntax to pick the indicated word. --- lisp/comint.el 2011-01-20 22:36:12 +0000 +++ lisp/comint.el 2011-01-21 18:03:09 +0000 @@ -1294,7 +1294,9 @@ than the logical beginning of line." (message "Relative reference exceeds input history size")))) ((or (looking-at "!!?:?\\([0-9^$*-]+\\)") (looking-at "!!")) ;; Just a number of args from the previous input line. - (replace-match (comint-previous-input-string 0) t t) + (replace-match (comint-args (comint-previous-input-string 0) + (match-beginning 1) (match-end 1)) + t t) (message "History item: previous")) ((looking-at "!\\??\\({\\(.+\\)}\\|\\(\\sw+\\)\\)\\(:?[0-9^$*-]+\\)?") From unknown Tue Jun 17 01:36:43 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Roland McGrath Subject: bug#7883: closed (Re: bug#7883: [PATCH] comint history expansion fails to process :N or $ modifier) Message-ID: References: <20110121181059.C342E18190D@magilla.sf.frob.com> X-Gnu-PR-Message: they-closed 7883 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 7883@debbugs.gnu.org Date: Fri, 21 Jan 2011 20:50:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1295643004-11205-1" This is a multi-part message in MIME format... ------------=_1295643004-11205-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #7883: [PATCH] comint history expansion fails to process :N or $ modifier which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 7883@debbugs.gnu.org. --=20 7883: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7883 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1295643004-11205-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 7883-done) by debbugs.gnu.org; 21 Jan 2011 20:49:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgNux-0002tf-S7 for submit@debbugs.gnu.org; Fri, 21 Jan 2011 15:49:12 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgNuw-0002t5-P2 for 7883-done@debbugs.gnu.org; Fri, 21 Jan 2011 15:49:11 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p0LKuvEr017499; Fri, 21 Jan 2011 15:56:58 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id B7ECCB411E; Fri, 21 Jan 2011 15:56:56 -0500 (EST) From: Stefan Monnier To: Roland McGrath Subject: Re: bug#7883: [PATCH] comint history expansion fails to process :N or $ modifier Message-ID: References: <20110121181059.C342E18190D@magilla.sf.frob.com> Date: Fri, 21 Jan 2011 15:56:56 -0500 In-Reply-To: <20110121181059.C342E18190D@magilla.sf.frob.com> (Roland McGrath's message of "Fri, 21 Jan 2011 10:10:59 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3735=0 X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 7883-done Cc: 7883-done@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: -2.0 (--) > The following trivial patch fixes the bug, restoring the behavior of v22 > with similar code to what it had originally. I tested the fix in 23.2.1, > but the relevant comint.el code in the trunk has not changed since then. Thanks. I installed it in the emacs-23 branch. Stefan ------------=_1295643004-11205-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Jan 2011 18:21:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgLcN-0008AG-T3 for submit@debbugs.gnu.org; Fri, 21 Jan 2011 13:21:52 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PgLKJ-000715-JH for submit@debbugs.gnu.org; Fri, 21 Jan 2011 13:03:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgLRw-0006pp-Sf for submit@debbugs.gnu.org; Fri, 21 Jan 2011 13:11:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=no version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:51854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgLRw-0006pl-Pd for submit@debbugs.gnu.org; Fri, 21 Jan 2011 13:11:04 -0500 Received: from [140.186.70.92] (port=42544 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgLRv-0003kl-Ms for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 13:11:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgLRu-0006pM-G7 for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 13:11:03 -0500 Received: from c-24-6-0-207.hsd1.ca.comcast.net ([24.6.0.207]:54389 helo=patootie.office.frob.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgLRu-0006p0-B4 for bug-gnu-emacs@gnu.org; Fri, 21 Jan 2011 13:11:02 -0500 Received: from magilla.sf.frob.com (magilla.office.frob.com [198.49.250.228]) by patootie.office.frob.com (Postfix) with ESMTP id 10F1547D3; Fri, 21 Jan 2011 10:11:00 -0800 (PST) Received: by magilla.sf.frob.com (Postfix, from userid 5281) id C342E18190D; Fri, 21 Jan 2011 10:10:59 -0800 (PST) From: Roland McGrath MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: bug-gnu-emacs@gnu.org Subject: [PATCH] comint history expansion fails to process :N or $ modifier X-Antipastobozoticataclysm: When George Bush projectile vomits antipasto on the Japanese. Message-Id: <20110121181059.C342E18190D@magilla.sf.frob.com> Date: Fri, 21 Jan 2011 10:10:59 -0800 (PST) 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, 2) X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 21 Jan 2011 13:21:50 -0500 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.6 (------) This has been driving me nuts since I started using 23 and I only just now bothered to find and fix it. This worked correctly in 22 and was broken, apparently just by a careless change. In a comint/shell buffer, type: echo foo bar RET and then type: echo !$ TAB and you get the expansion: echo echo foo bar i.e., the whole line as if !$ had been !!. The expansion you should get is just: echo bar The following trivial patch fixes the bug, restoring the behavior of v22 with similar code to what it had originally. I tested the fix in 23.2.1, but the relevant comint.el code in the trunk has not changed since then. Thanks, Roland 2011-01-21 Roland McGrath * comint.el (comint-replace-by-expanded-history-before-point): Fix expansion of !$ and !!:N syntax to pick the indicated word. --- lisp/comint.el 2011-01-20 22:36:12 +0000 +++ lisp/comint.el 2011-01-21 18:03:09 +0000 @@ -1294,7 +1294,9 @@ than the logical beginning of line." (message "Relative reference exceeds input history size")))) ((or (looking-at "!!?:?\\([0-9^$*-]+\\)") (looking-at "!!")) ;; Just a number of args from the previous input line. - (replace-match (comint-previous-input-string 0) t t) + (replace-match (comint-args (comint-previous-input-string 0) + (match-beginning 1) (match-end 1)) + t t) (message "History item: previous")) ((looking-at "!\\??\\({\\(.+\\)}\\|\\(\\sw+\\)\\)\\(:?[0-9^$*-]+\\)?") ------------=_1295643004-11205-1-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 08 00:05:46 2011 Received: (at control) by debbugs.gnu.org; 8 Feb 2011 05:05:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pmflp-0002Tn-Ou for submit@debbugs.gnu.org; Tue, 08 Feb 2011 00:05:45 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pmflo-0002TZ-5e; Tue, 08 Feb 2011 00:05:44 -0500 Received: from localhost ([127.0.0.1]:36666) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmfuB-0000fI-Oz; Tue, 08 Feb 2011 00:14:23 -0500 From: Glenn Morris To: 8000@debbugs.gnu.org Subject: Re: bug#8000: 23.2; strange behavior of !$ in shell window References: <87aai7fg61.fsf@osage.osagesoftware.com> <19792.50969.454603.954501@fencepost.gnu.org> X-Spook: BRLO Ft. Bragg cypherpunk Blowpipe spy hackers Pine Gap X-Ran: 48Q,m_Tk_|OEBomE6~edOIsBxxx):V+*X)4s2fSYHtq\v5/CH(9?9Q/8^x-\h'1`u5bZZg X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 08 Feb 2011 00:14:23 -0500 In-Reply-To: (Glenn Morris's message of "Mon, 07 Feb 2011 23:57:42 -0500") 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: 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 (------) forcemerge 7883 8000 stop And in 23.3 it will work again because this is a duplicate of http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7883, sigh. From unknown Tue Jun 17 01:36:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7883: [PATCH] comint history expansion fails to process :N or $ modifier Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Feb 2011 01:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 7883@debbugs.gnu.org, Roland McGrath Received: via spool by 7883-submit@debbugs.gnu.org id=B7883.12977332484457 (code B ref 7883); Tue, 15 Feb 2011 01:28:02 +0000 Received: (at 7883) by debbugs.gnu.org; 15 Feb 2011 01:27:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pp9hQ-00019p-Ep for submit@debbugs.gnu.org; Mon, 14 Feb 2011 20:27:28 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pp9hO-00019W-VC for 7883@debbugs.gnu.org; Mon, 14 Feb 2011 20:27:27 -0500 Received: from localhost ([127.0.0.1]:46525) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pp9q4-0007PE-VY; Mon, 14 Feb 2011 20:36:25 -0500 From: Glenn Morris References: <20110121181059.C342E18190D@magilla.sf.frob.com> X-Spook: Semtex wire transfer Afghanistan basement Indigo IMF X-Ran: -~ONq|N-.9V9>C5pChmf7|Y]J|B}-H5b+KcXu_a73-J6Lvw9&zud+=awgK0g?=::;*j}3a X-Hue: blue X-Attribution: GM Date: Mon, 14 Feb 2011 20:36:24 -0500 In-Reply-To: (Stefan Monnier's message of "Fri, 21 Jan 2011 15:56:56 -0500") 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-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 (------) Stefan Monnier wrote: >> The following trivial patch fixes the bug, restoring the behavior of v22 >> with similar code to what it had originally. I tested the fix in 23.2.1, >> but the relevant comint.el code in the trunk has not changed since then. > > Thanks. I installed it in the emacs-23 branch. This just undoes the fix installed for http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1795 (Although it wasn't really fixed anyway.) From unknown Tue Jun 17 01:36:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7883: [PATCH] comint history expansion fails to process :N or $ modifier Resent-From: Roland McGrath Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Feb 2011 01:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Glenn Morris Cc: 7883@debbugs.gnu.org, Stefan Monnier Received: via spool by 7883-submit@debbugs.gnu.org id=B7883.12977344437221 (code B ref 7883); Tue, 15 Feb 2011 01:48:02 +0000 Received: (at 7883) by debbugs.gnu.org; 15 Feb 2011 01:47:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PpA0h-0001sP-0g for submit@debbugs.gnu.org; Mon, 14 Feb 2011 20:47:23 -0500 Received: from toast.topped-with-meat.com ([168.75.111.31] helo=topped-with-meat.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PpA0e-0001s5-Ik for 7883@debbugs.gnu.org; Mon, 14 Feb 2011 20:47:21 -0500 Received: by topped-with-meat.com (Postfix, from userid 5281) id 1B2242C3F6; Mon, 14 Feb 2011 17:56:19 -0800 (PST) From: Roland McGrath MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit In-Reply-To: Glenn Morris's message of Monday, 14 February 2011 20:36:24 -0500 References: <20110121181059.C342E18190D@magilla.sf.frob.com> X-Shopping-List: (1) Sullen bums (2) Ardent abstinent sand reservations (3) Magisterial beatific suction convulsions Message-Id: <20110215015619.1B2242C3F6@topped-with-meat.com> Date: Mon, 14 Feb 2011 17:56:19 -0800 (PST) X-CMAE-Score: 0 X-CMAE-Analysis: v=1.1 cv=8K6wSE2RzR1kS5OE/lTcb4ipl6maKCuSpzsqcIXyXfY= c=1 sm=1 a=R6mwsaruDd4A:10 a=kj9zAlcOel0A:10 a=mDV3o1hIAAAA:8 a=Uj0l02vvdgURlYFXp9gA:9 a=zM6o20UGMysLugbh5NsA:7 a=hSC3L9ZOuerWrNk3OcUdd6fyIL0A:4 a=CjuIK1q_8ugA:10 a=WkljmVdYkabdwxfqvArNOQ==:117 X-Spam-Score: -2.6 (--) 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: -2.6 (--) > This just undoes the fix installed for > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1795 > > (Although it wasn't really fixed anyway.) The change was not a fix for that problem at all, as you say. That problem continues to exist in various forms (that also exist in v22) and is a bug in entirely different parts of the code. I noticed the gratuitous insertion of spaces long ago, but it didn't really irk me quite enough to look into it. I see no reason whatsoever why expansion should be looking for metacharacters and fiddling things around like that at all. I always assumed it was a dismally misguided attempt at pretty-printing, which, even it weren't completely broken (as it is), is not a proper thing to be doing implicitly during history expansion at all. This misfeature appears to be fixed by: (setq comint-delimiter-argument-list nil) ;buffer-local The buffer-local setting comes from the global value of shell-delimiter-argument-list, which I've just set to nil in my init files. I really can't tell what the thinking behind the default setting of that was, since it's not commented particularly well. It seems just entirely wrong-headed to me. As far as I can tell, the only uses of the things it affects (comint-delimiter-argument-list, comint-arguments, comint-args) are in this history expansion stuff, where it is just thoroughly wrong if you either want to have history expansion work anything like it does in the shell (which is largely immune to any details of shell syntax, though bash's is not so immune to quoting as is csh's, which is the original and One True definition of ! history's meaning), or you know much of anything about shell syntax. Thanks, Roland From unknown Tue Jun 17 01:36:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7883: [PATCH] comint history expansion fails to process :N or $ modifier Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Feb 2011 01:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Roland McGrath Cc: 7883@debbugs.gnu.org, Stefan Monnier Received: via spool by 7883-submit@debbugs.gnu.org id=B7883.12977346877786 (code B ref 7883); Tue, 15 Feb 2011 01:52:02 +0000 Received: (at 7883) by debbugs.gnu.org; 15 Feb 2011 01:51:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PpA4d-00021W-CZ for submit@debbugs.gnu.org; Mon, 14 Feb 2011 20:51:27 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PpA4b-00021E-EE for 7883@debbugs.gnu.org; Mon, 14 Feb 2011 20:51:26 -0500 Received: from localhost ([127.0.0.1]:56173) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpADH-0000YT-QU; Mon, 14 Feb 2011 21:00:24 -0500 From: Glenn Morris References: <20110121181059.C342E18190D@magilla.sf.frob.com> <20110215015619.1B2242C3F6@topped-with-meat.com> X-Spook: Armani Clinton Guantanamo bluebird New World Order X-Ran: 61P=mQfuW]Wb+K>1bK6=5-\C#)n?9=z_&d;BMPPt8t{NQ!{ X-Hue: magenta X-Attribution: GM Date: Mon, 14 Feb 2011 21:00:23 -0500 In-Reply-To: <20110215015619.1B2242C3F6@topped-with-meat.com> (Roland McGrath's message of "Mon, 14 Feb 2011 17:56:19 -0800 (PST)") 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-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 (------) Roland McGrath wrote: > The buffer-local setting comes from the global value of > shell-delimiter-argument-list, which I've just set to nil in my init files. :) http://debbugs.gnu.org/cgi-bin/bugreport.cgi?bug=8027#22