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: Tue, 24 Feb 2015 02:47:01 -0800 Message-ID: <1424774821.11596.3@mail.samertm.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-Bqojoufcr+rKyOHXlCqb" X-Trace: ger.gmane.org 1424774902 29488 80.91.229.3 (24 Feb 2015 10:48:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Feb 2015 10:48:22 +0000 (UTC) To: 18960@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 24 11:48:11 2015 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 1YQD2A-0008MK-Pl for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Feb 2015 11:48:11 +0100 Original-Received: from localhost ([::1]:48578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQD29-0006Ng-UE for geb-bug-gnu-emacs@m.gmane.org; Tue, 24 Feb 2015 05:48:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQD26-0006NY-63 for bug-gnu-emacs@gnu.org; Tue, 24 Feb 2015 05:48:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQD22-0000yt-Th for bug-gnu-emacs@gnu.org; Tue, 24 Feb 2015 05:48:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQD22-0000yp-LO for bug-gnu-emacs@gnu.org; Tue, 24 Feb 2015 05:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YQD21-00033R-Vy for bug-gnu-emacs@gnu.org; Tue, 24 Feb 2015 05:48:02 -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: Tue, 24 Feb 2015 10:48:01 +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.142477483911670 (code B ref 18960); Tue, 24 Feb 2015 10:48:01 +0000 Original-Received: (at 18960) by debbugs.gnu.org; 24 Feb 2015 10:47:19 +0000 Original-Received: from localhost ([127.0.0.1]:56283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQD1J-000329-U0 for submit@debbugs.gnu.org; Tue, 24 Feb 2015 05:47:18 -0500 Original-Received: from ec2-52-0-7-12.compute-1.amazonaws.com ([52.0.7.12]:60116 helo=samertm.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YQD1G-00031o-6l for 18960@debbugs.gnu.org; Tue, 24 Feb 2015 05:47:16 -0500 Original-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 D01E642D27 for <18960@debbugs.gnu.org>; Tue, 24 Feb 2015 10:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samertm.com; s=mail; t=1424774821; bh=d/NTS9zxBz6Ng2XJbvhIPI+nypHrXgM9RBdWVEMdQvM=; h=Date:From:Subject:To:From; b=Gwoi/jN6VKSzeJ4PykA+E9p+GNsgwGiy/STVFDRdvMVcaRqwSZQpt2+Vhulgxxtbv UFEJnqZdr67QIgL9h6mNPc3LGqIbuz5FCLpwbLA5PMTJfkPoLngxnkka44YXmzokpW VQ4iqr3gUhCvVaWKwviBdMan3APzGQtoH66d23Ig= X-Mailer: geary/0.8.3 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:99758 Archived-At: --=-Bqojoufcr+rKyOHXlCqb Content-Type: text/plain; charset=utf-8; format=flowed Hi, My copyright papers have been processed. Can we apply this to master? Best, Samer Patch below: Changes from HEAD to working tree 3 files changed, 15 insertions(+), 8 deletions(-) lisp/ChangeLog | 8 ++++++++ lisp/eshell/em-hist.el | 4 ++-- lisp/eshell/em-pred.el | 11 +++++------ Modified lisp/ChangeLog diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 45ba279..c30c43a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2014-12-10 localhost> + + * eshell/em-hist.el (eshell-hist-parse-word-designator): Return + args joined with " ". + * eshell/em-pred.el (eshell-parse-modifiers): Correct docstring. + (eshell-hist-parse-modifier): Pass mod a list instead of a string + (bug#18960). + 2014-11-28 Martin Rudalics gmx.at> Fix two issues around help-window-select. (Bug#11039) (Bug#19012) 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))))) Modified lisp/eshell/em-pred.el diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index f55d687..7d6e326 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -296,16 +296,15 @@ This function is specially for adding onto `eshell-parse-argument-hook'." (defun eshell-parse-modifiers () "Parse value modifiers and predicates at point. -If ALLOW-PREDS is non-nil, predicates will be parsed as well. Return a cons cell of the form (PRED-FUNC-LIST . MOD-FUNC-LIST) -NEW-STRING is STRING minus any modifiers. PRED-FUNC-LIST is a list of -predicate functions. MOD-FUNC-LIST is a list of result modifier -functions. PRED-FUNCS take a filename and return t if the test -succeeds; MOD-FUNCS take any string and preform a modification, -returning the resultant string." +PRED-FUNC-LIST is a list of predicate functions. MOD-FUNC-LIST +is a list of result modifier functions. PRED-FUNCS take a +filename and return t if the test succeeds; MOD-FUNCS take any +list of strings and perform a modification, returning the +resultant list of strings." (let (negate follow preds mods) (condition-case nil (while (not (eobp)) --=-Bqojoufcr+rKyOHXlCqb Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi,

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

Best,
Samer
=
Patch below:

Changes from HEAD= to working tree
3 files changed, 15 insertions(+), 8 deletions(-= )
 lisp/ChangeLog         |    = ;8 ++++++++
 lisp/eshell/em-hist.el |    4 ++--
 lisp/eshell/em-pred.el |   11 +++++------

=
Modified   lisp/ChangeLog
diff --git a/lisp/ChangeLog b/lis= p/ChangeLog
index 45ba279..c30c43a 100644
--- a/lisp/Ch= angeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2014-12-10    <samer <at> localhost>
+
+ *= eshell/em-hist.el (eshell-hist-parse-word-designator): Return
+<= span class=3D"Apple-tab-span" style=3D"white-space:pre"> args joined= with " ".
+ * eshell/em-pred.el (eshell-parse-modifiers): Correct docstring= .
+ (eshell-hist-parse-modifier): Pass mod a list instead of a string
<= div>+ (bug#= 18960).
+
 2014-11-28  Martin Rudalics  = <rudalics <at> gmx.at>

  Fix two issues arou= nd help-window-select.  (Bug#11039) (Bug#19012)
Modified   lisp/= eshell/em-hist.el
diff --git a/lisp/eshell/em-hist.el b/lisp/eshe= ll/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)
 <= span class=3D"Apple-tab-span" style=3D"white-space:pre"> (setq mth (= eshell-hist-word-reference mth)))
-      (cons (ma= pconcat 'identity (eshell-sublist textargs nth mth) "")
+   =    (cons (mapconcat 'identity (eshell-sublist textargs nth mth) "= ")
     end))))

 (defun eshel= l-hist-parse-modifier (hist reference)
@@ -737,7 +737,7 @@ matche= d."
   (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)))))

<= /span>Modified   lisp/eshell/em-pred.el
diff --git a/lisp/es= hell/em-pred.el b/lisp/eshell/em-pred.el
index f55d687..7d6e326 1= 00644
--- a/lisp/eshell/em-pred.el
+++ b/lisp/eshell/em= -pred.el
@@ -296,16 +296,15 @@ This function is specially for add= ing onto
`eshell-parse-argument-hook'."

=  (defun eshell-parse-modifiers ()
   "Parse value = modifiers and predicates at point.
-If ALLOW-PREDS is non-nil, pr= edicates will be parsed as well.
 Return a cons cell of the = form

   (PRED-FUNC-LIST . MOD-FUNC-LIST)=

-NEW-STRING is STRING minus any modifiers.  = PRED-FUNC-LIST is a list of
-predicate functions.  MOD-FUNC-= LIST is a list of result modifier
-functions.  PRED-FUNCS ta= ke a filename and return t if the test
-succeeds; MOD-FUNCS take = any string and preform a modification,
-returning the resultant s= tring."
+PRED-FUNC-LIST is a list of predicate functions.  M= OD-FUNC-LIST
+is a list of result modifier functions.  PRED-= FUNCS take a
+filename and return t if the test succeeds; MOD-FUN= CS take any
+list of strings and perform a modification, returnin= g the
+resultant list of strings."
   (let (n= egate follow preds mods)
     (condition-case nil<= /div>
  <= /span>(while (not (eobp))
= --=-Bqojoufcr+rKyOHXlCqb--