GNU bug report logs - #27954
25.2; eshell alias: arguments get lost

Previous Next

Package: emacs;

Reported by: Tobias Zawada <i_inbox <at> tn-home.de>

Date: Fri, 4 Aug 2017 15:28:02 UTC

Severity: normal

Tags: fixed, notabug, patch

Merged with 31765

Found in versions 25.2, 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27954 in the body.
You can then email your comments to 27954 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#27954; Package emacs. (Fri, 04 Aug 2017 15:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Zawada <i_inbox <at> tn-home.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 04 Aug 2017 15:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Zawada <i_inbox <at> tn-home.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.2; eshell alias: arguments get lost
Date: Fri, 4 Aug 2017 09:52:21 +0200 (CEST)
[Message part 1 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27954; Package emacs. (Fri, 11 Aug 2017 02:21:01 GMT) Full text and rfc822 format available.

Message #8 received at 27954 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Tobias Zawada <i_inbox <at> tn-home.de>
Cc: 27954 <at> debbugs.gnu.org
Subject: Re: bug#27954: 25.2; eshell alias: arguments get lost
Date: Thu, 10 Aug 2017 22:22:03 -0400
[Message part 1 (text/plain, inline)]
tags 27954 + patch
quit

Tobias Zawada <i_inbox <at> tn-home.de> writes:

> In eshell:
>
> alias ll ls -l
>
> gives a full listing of all files as result of the following eshell-command:
>
> ll test.txt
>
> But, I expect only the listing for the file test.txt.
>
> At that link location there is also the following fast hack as workaround:
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; beginning of hack
>
> (defun eshell-maybe-replace-by-alias-bugfix-25.2.1 (command args)
> "If COMMAND has an alias definition, call that instead using ARGS."
> (unless (and eshell-prevent-alias-expansion
> (member command eshell-prevent-alias-expansion))
> (let ((alias (eshell-lookup-alias command)))
> (if alias
> (throw 'eshell-replace-command
> `(let ((eshell-command-name ',eshell-last-command-name)
> (eshell-command-arguments ',eshell-last-arguments)
> (eshell-prevent-alias-expansion
> ',(cons command eshell-prevent-alias-expansion)))
> ,(eshell-parse-command (nth 1 alias) args)))))))
>
> (advice-add #'eshell-maybe-replace-by-alias :override #'eshell-maybe-replace-by-alias-bugfix-25.2.1)

So this really just a case not ignoring ARGS, right?

[v1-0001-Don-t-lose-arguments-to-eshell-aliases-Bug-27954.patch (text/x-diff, inline)]
From fe2f8c4ce36a0775faedb1d7d4e9cbffec96f4cb Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Mon, 7 Aug 2017 08:56:42 -0400
Subject: [PATCH v1] Don't lose arguments to eshell aliases (Bug#27954)

* lisp/eshell/em-alias.el (eshell-maybe-replace-by-alias): Use ARGS.
---
 lisp/eshell/em-alias.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el
index 5bf80b2310..990eb02024 100644
--- a/lisp/eshell/em-alias.el
+++ b/lisp/eshell/em-alias.el
@@ -225,7 +225,7 @@ eshell-maybe-replace-by-alias
                         (eshell-command-arguments ',eshell-last-arguments)
                         (eshell-prevent-alias-expansion
                          ',(cons command eshell-prevent-alias-expansion)))
-                    ,(eshell-parse-command (nth 1 alias))))))))
+                    ,(eshell-parse-command (nth 1 alias) args)))))))
 
 (defun eshell-alias-completions (name)
   "Find all possible completions for NAME.
-- 
2.11.1


Added tag(s) patch. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 11 Aug 2017 02:21:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27954; Package emacs. (Sat, 19 Aug 2017 02:30:02 GMT) Full text and rfc822 format available.

Message #13 received at 27954 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Tobias Zawada <i_inbox <at> tn-home.de>
Cc: 27954 <at> debbugs.gnu.org
Subject: Re: bug#27954: 25.2; eshell alias: arguments get lost
Date: Fri, 18 Aug 2017 22:30:45 -0400
tags 27954 fixed
close 27954 26.1
quit

npostavs <at> users.sourceforge.net writes:

> So this really just a case not ignoring ARGS, right?

Pushed to master.

[1: e66e81679c]: 2017-08-18 22:29:36 -0400
  Don't lose arguments to eshell aliases (Bug#27954)
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=e66e81679c3c91d6bf8f62c7abcd968430b4d1fe




Added tag(s) fixed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 19 Aug 2017 02:30:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.1, send any further explanations to 27954 <at> debbugs.gnu.org and Tobias Zawada <i_inbox <at> tn-home.de> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Sat, 19 Aug 2017 02:30:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Sep 2017 11:24:05 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 09 Jun 2018 19:31:02 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 26.1. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 09 Jun 2018 19:32:02 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 09 Jun 2018 19:32:02 GMT) Full text and rfc822 format available.

Message #26 received at 27954-quiet <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: 27954-quiet <at> debbugs.gnu.org
Subject: Re: bug#27954: 25.2; eshell alias: arguments get lost
Date: Sat, 09 Jun 2018 15:31:51 -0400
notfixed 27954 26.1
tags 27954 + notabug
quit

For the record, this was reverted before 26.1 was released, see
Bug#28568.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 08 Jul 2018 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 11 Jul 2018 13:12:02 GMT) Full text and rfc822 format available.

Forcibly Merged 27954 31765. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 11 Jul 2018 13:12:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 09 Aug 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.