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: Wed, 10 Dec 2014 04:51:01 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1418215947 12759 80.91.229.3 (10 Dec 2014 12:52:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Dec 2014 12:52:27 +0000 (UTC) To: 18960@debbugs.gnu.org, Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 10 13:52:20 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 1Xygkb-0006uU-AS for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Dec 2014 13:52:17 +0100 Original-Received: from localhost ([::1]:45379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xygka-00008o-U4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Dec 2014 07:52:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XygkR-00006K-Sz for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2014 07:52:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XygkN-0005kI-2Z for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2014 07:52:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XygkM-0005k7-VF for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2014 07:52:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XygkM-0007uH-JA for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2014 07:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Samer Masterson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Dec 2014 12:52:02 +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.141821586530322 (code B ref 18960); Wed, 10 Dec 2014 12:52:02 +0000 Original-Received: (at 18960) by debbugs.gnu.org; 10 Dec 2014 12:51:05 +0000 Original-Received: from localhost ([127.0.0.1]:60308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XygjQ-0007t0-UL for submit@debbugs.gnu.org; Wed, 10 Dec 2014 07:51:05 -0500 Original-Received: from mail-qg0-f48.google.com ([209.85.192.48]:63688) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XygjN-0007sf-Te for 18960@debbugs.gnu.org; Wed, 10 Dec 2014 07:51:02 -0500 Original-Received: by mail-qg0-f48.google.com with SMTP id f51so1966662qge.7 for <18960@debbugs.gnu.org>; Wed, 10 Dec 2014 04:51:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XXwdePEWpYUitk+s3nqwzNJY/keVgZX5RbIdzP0UAQ8=; b=kjfIwLEWUgdSMA1kV/VGqmYmO2ZFpO8FoC9naEajFX+1rePFddj8K6JRk9rkqq3RFn Ml+M1rOvueE/2CEpewH5CvZd2QwS8M0c7cg3xF+JfXpTc59JAZGf7gm8xid/8U0axybt bRuilSf9HMUXgWw+7b0QPIQ7ikhi9ps26RPCFZXbZSymde+UDJUddy9mZUa0IzILbCFm QM88CE8WOYwvQiWR4ksXlFUW+K2p1u347Jn9OmtWbxi4oEhHBPX/JcY7rgUHRsiFhdT2 P05pHAwQ5eMgHRThK3brm7WGbr8gYUFGnC6Pdm/qMeO/6eacSJxgqTqh7v7RlDI2jb6H BUqw== X-Received: by 10.140.92.215 with SMTP id b81mr7858590qge.5.1418215861175; Wed, 10 Dec 2014 04:51:01 -0800 (PST) Original-Received: by 10.140.93.84 with HTTP; Wed, 10 Dec 2014 04:51:01 -0800 (PST) In-Reply-To: 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:97127 Archived-At: eshell-parse-modifiers pulls its modifiers from eshell-modifier-alist, where are all functions that operate on lists of strings, so I updated the docstring for eshell-parse-modifiers to reflect that. I've also added my changes to the ChangeLog. Best, Samer 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 + + * 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 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))