unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jay Kamat <jaygkamat@gmail.com>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 28568@debbugs.gnu.org
Subject: bug#28568: 26.0.60; [eshell] Incompatible change in alias argument handling
Date: Wed, 27 Sep 2017 00:28:24 -0400	[thread overview]
Message-ID: <87efqswys7.fsf@gmail.com> (raw)
In-Reply-To: <871smxo45g.fsf_-_@users.sourceforge.net> (Noam Postavsky's message of "Sat, 23 Sep 2017 10:55:55 -0400")

[-- Attachment #1: Type: text/plain, Size: 848 bytes --]

Hi!

I was getting quite annoyed with this bug (since it breaks all my eshell
aliases), and I would really hate to see this bug in the emacs 26
release, so I wanted to push it along. I've attached a patch that simply
reverts the fix to #27954 (commit e66e81679c), which seems to solve the
problem.

From bug #27954, the issue was:

> 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.

which can be fixed by changing the alias to:

alias ll 'ls -l $*'

which works fine for me in both cases ('ll' and 'll test.txt').

All this patch is doing is reverting commit e66e81679c and updating the
alias documentation, so feel free to remake and commit this yourself if
you wish (or if I'm doing it wrong).

Thanks,
-Jay


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Revert-change-to-eshell-alias-argument-parsing-Bug-2.patch --]
[-- Type: text/x-diff, Size: 2017 bytes --]

From fd4a8b3b2b42dbf1520a6cd8cc3b265f55ea6ca6 Mon Sep 17 00:00:00 2001
From: Jay Kamat <jaygkamat@gmail.com>
Date: Wed, 27 Sep 2017 00:01:23 -0400
Subject: [PATCH] Revert change to eshell alias argument parsing (Bug#28568)

Update documentation of 'll' example alias to minimize confusion

This reverts commit e66e81679c3c91d6bf8f62c7abcd968430b4d1fe.
---
 doc/misc/eshell.texi    | 6 +++---
 lisp/eshell/em-alias.el | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index 8963826c4c..be8e659544 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -431,9 +431,9 @@ Aliases
 
 Aliases are commands that expand to a longer input line.  For example,
 @command{ll} is a common alias for @code{ls -l}, and would be defined
-with the command invocation @samp{alias ll ls -l}; with this defined,
-running @samp{ll foo} in Eshell will actually run @samp{ls -l foo}.
-Aliases defined (or deleted) by the @command{alias} command are
+with the command invocation @samp{alias ll 'ls -l $*'}; with this
+defined, running @samp{ll foo} in Eshell will actually run @samp{ls -l
+foo}.  Aliases defined (or deleted) by the @command{alias} command are
 automatically written to the file named by @code{eshell-aliases-file},
 which you can also edit directly (although you will have to manually
 reload it).
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el
index f951efa65d..80b14a9b93 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) args)))))))
+                    ,(eshell-parse-command (nth 1 alias))))))))
 
 (defun eshell-alias-completions (name)
   "Find all possible completions for NAME.
-- 
2.11.0


  reply	other threads:[~2017-09-27  4:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87fubfjk10.fsf@gmail.com>
     [not found] ` <87a81mjxmz.fsf@gmail.com>
2017-09-23  8:23   ` bug#28320: Possible Eshell/Tramp Bug in Emacs 26 Michael Albinus
2017-09-23 13:21     ` bug#28568: 26.0.60; [eshell] Incompatible change in alias argument handling Noam Postavsky
2017-09-23 14:55     ` bug#28568: 26.0.60; [eshell] Incompatible change in alias argument handling (Was: Possible Eshell/Tramp Bug in Emacs 26) Noam Postavsky
2017-09-27  4:28       ` Jay Kamat [this message]
2017-09-27 12:55         ` bug#28568: 26.0.60; [eshell] Incompatible change in alias argument handling Noam Postavsky
2017-09-30  1:45           ` Noam Postavsky
2017-09-30  8:06             ` Eli Zaretskii
2017-10-01  0:12               ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efqswys7.fsf@gmail.com \
    --to=jaygkamat@gmail.com \
    --cc=28568@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).