From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Samer Masterson Newsgroups: gmane.emacs.bugs Subject: bug#18960: 24.4; Eshell history substitution causes error Date: Mon, 8 Dec 2014 03:54:46 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c1fca2024d0f0509b31956 X-Trace: ger.gmane.org 1418057133 31193 80.91.229.3 (8 Dec 2014 16:45:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Dec 2014 16:45:33 +0000 (UTC) Cc: 18960@debbugs.gnu.org To: Emanuel Evans Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 08 17:45:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xy1R3-0005GP-ML for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Dec 2014 17:45:21 +0100 Original-Received: from localhost ([::1]:34901 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy1R3-0008AT-Ab for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Dec 2014 11:45:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy1Qt-000893-AQ for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 11:45:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xy1Qm-0007Tm-D2 for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 11:45:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60635) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy1Ql-0007Ow-St for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 11:45:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xy1Ql-000210-Ll for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 11:45:03 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Samer Masterson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Dec 2014 16:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18960 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18960-submit@debbugs.gnu.org id=B18960.14180570797669 (code B ref 18960); Mon, 08 Dec 2014 16:45:03 +0000 Original-Received: (at 18960) by debbugs.gnu.org; 8 Dec 2014 16:44:39 +0000 Original-Received: from localhost ([127.0.0.1]:57844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy1QN-0001zY-Eb for submit@debbugs.gnu.org; Mon, 08 Dec 2014 11:44:39 -0500 Original-Received: from mail-qa0-f52.google.com ([209.85.216.52]:46639) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XxwuB-0001m1-Jw for 18960@debbugs.gnu.org; Mon, 08 Dec 2014 06:55:08 -0500 Original-Received: by mail-qa0-f52.google.com with SMTP id dc16so3271529qab.11 for <18960@debbugs.gnu.org>; Mon, 08 Dec 2014 03:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=qJeJDOIxTKUvOorPeL51BmlSRbYRtMpbmNYsdzKz2TY=; b=GpvtgpQT5aQi+Swi9quOZ3iaH4PZnVAMMNvOSry+GepbH8pEz+JGr3iJrmwwRgVgXP 7ClF/5T4foiwtpV4Dm1HeNJzSyEHofd9nCUNgL61OgJuUBMuyzMOu90BUFEuAwIeICGY CO52fZ5nNfGfmtoNTQA5jmK6zetDVj4TA3WlVzfJUWIInsZAp8bnWtNCJav5DBzzQ/cl xH/AdzApsBfOMyO5RaLa4biVtEuIZ+7Hbs/7NM9fUMlylTpcWfxXaWdFlmRG431F7G87 rgTmYGJadsW07plcD2ozkjHc5+UttSizndP3cPnKcsQPcS75XR1HgtcKvLnYawzublbq n5Gg== X-Received: by 10.224.28.135 with SMTP id m7mr50912194qac.7.1418039706928; Mon, 08 Dec 2014 03:55:06 -0800 (PST) Original-Received: by 10.140.93.84 with HTTP; Mon, 8 Dec 2014 03:54:46 -0800 (PST) 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97001 Archived-At: --001a11c1fca2024d0f0509b31956 Content-Type: text/plain; charset=UTF-8 The attached patch fixes this issue. This is my second emacs patch, so let me know if I'm doing anything wrong or nonstandard. Best, Samer Patch: 1 file changed, 2 insertions(+), 2 deletions(-) lisp/eshell/em-hist.el | 4 ++-- Modified lisp/eshell/em-hist.el diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index b721b5d..e7e9a1e 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -724,7 +724,7 @@ matched." (setq nth (eshell-hist-word-reference nth))) (unless (numberp mth) (setq mth (eshell-hist-word-reference mth))) - (cons (mapconcat 'identity (eshell-sublist textargs nth mth) "") + (cons (mapconcat 'identity (eshell-sublist textargs nth mth) " ") end)))) (defun eshell-hist-parse-modifier (hist reference) @@ -737,7 +737,7 @@ matched." (goto-char (point-min)) (let ((modifiers (cdr (eshell-parse-modifiers)))) (dolist (mod modifiers) - (setq hist (funcall mod hist))) + (setq hist (car (funcall mod (list hist))))) hist)) (delete-region here (point))))) --001a11c1fca2024d0f0509b31956 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The attached patch fixes this issue. This is my second ema= cs patch, so let me know if I'm doing anything wrong or nonstandard.
Best,
Samer

Patch:
1 file changed, 2 insertions(+), 2 deletions(-)
=C2=A0= lisp/eshell/em-hist.el | 4 ++--

Modified =C2=A0 lisp/eshell/em-hist.el
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index b721b5d..e7e9a1e 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -724,7 +724,7 @@ matched.&= quot;
=C2=A0 (s= etq nth (eshell-hist-word-reference nth)))
=C2=A0 =C2=A0 =C2=A0 = =C2=A0(unless (numberp mth)
=C2=A0 (setq mth (eshell-hist-word-reference mth)))
= - =C2=A0 =C2=A0 =C2=A0(cons (mapconcat 'identity (eshell-sublist textar= gs nth mth) "")
+ =C2=A0 =C2=A0 =C2=A0(cons (mapconcat = 'identity (eshell-sublist textargs nth mth) " ")
= =C2=A0 =C2=A0 =C2=A0end)= )))
=C2=A0
=C2=A0(defun eshell-hist-parse-modifier (his= t reference)
@@ -737,7 +737,7 @@ matched."
=C2=A0<= span class=3D"" style=3D"white-space:pre"> =C2=A0(goto-char (point-= min))
=C2=A0 = =C2=A0(let ((modifiers (cdr (eshell-parse-modifiers))))
=C2=A0 =C2=A0 =C2=A0(dolist (mod = modifiers)
- = =C2=A0 =C2=A0 =C2=A0(setq hist (funcall mod hist)))
+ =C2=A0 =C2=A0 =C2=A0(setq hist (ca= r (funcall mod (list hist)))))
=C2=A0 =C2=A0 =C2=A0hist))
=C2=A0 =C2=A0 =C2=A0 = =C2=A0(delete-region here (point)))))

--001a11c1fca2024d0f0509b31956--