From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jay Kamat Newsgroups: gmane.emacs.bugs Subject: bug#28568: 26.0.60; [eshell] Incompatible change in alias argument handling Date: Wed, 27 Sep 2017 00:28:24 -0400 Message-ID: <87efqswys7.fsf@gmail.com> References: <87fubfjk10.fsf@gmail.com> <87a81mjxmz.fsf@gmail.com> <87r2uxlt6o.fsf@gmx.de> <871smxo45g.fsf_-_@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1506493940 26452 195.159.176.226 (27 Sep 2017 06:32:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Sep 2017 06:32:20 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: 28568@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 27 08:32:15 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dx5tB-0006Dp-Ek for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Sep 2017 08:32:09 +0200 Original-Received: from localhost ([::1]:52386 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dx5tI-0000LO-Rd for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Sep 2017 02:32:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dx5t8-0000JT-BZ for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 02:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dx5t4-00067c-Ro for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 02:32:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53636) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dx5t4-000672-MD for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 02:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dx5t4-0001Lf-Fh for bug-gnu-emacs@gnu.org; Wed, 27 Sep 2017 02:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jay Kamat Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Sep 2017 06:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28568-submit@debbugs.gnu.org id=B28568.15064939115151 (code B ref 28568); Wed, 27 Sep 2017 06:32:02 +0000 Original-Received: (at 28568) by debbugs.gnu.org; 27 Sep 2017 06:31:51 +0000 Original-Received: from localhost ([127.0.0.1]:34082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dx5st-0001L1-Ir for submit@debbugs.gnu.org; Wed, 27 Sep 2017 02:31:51 -0400 Original-Received: from mail-yw0-f194.google.com ([209.85.161.194]:34720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dx3xZ-0006i9-GD for 28568@debbugs.gnu.org; Wed, 27 Sep 2017 00:28:33 -0400 Original-Received: by mail-yw0-f194.google.com with SMTP id v72so6135343ywa.1 for <28568@debbugs.gnu.org>; Tue, 26 Sep 2017 21:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4afuJWwplYdsDPwGpbLGoSVMiWOYt1fdjpjFv3XY7xE=; b=crFJaIfJ0g2uMt/8kBOt6fmoS+dIdiOfE25V9Y+w9lijrHA44udNFathJLkglz6JCw ++Y/+fNv6bHhnFHb5kn/hops4LJHinUNrFDJjLW6kuazeOGHj7YMGVWcxebYy/ZXWyrk 2Mvmy5mSrKsUUBWkZ5Oe41WK6TNjAwFYOtbRvggVksBTYXLPG75ZFYS7MGqeV/M8nmXp hdPh6BIHpFHRfoNhRDoHu0O+swCgmSg9ZRcH5WBWW9TXnQvVAcV5uk/1K+9CpPo59MCf h6kXU2zI2dRuG8GpQ3vpzR1TBpbypSww72A73BDHDsUPJQFeiFcBJdLXf7Cww8A4Pm0M vhcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4afuJWwplYdsDPwGpbLGoSVMiWOYt1fdjpjFv3XY7xE=; b=EmMBRdW4AkOwkZeuPxDmB2PGmhj4bGiMt+i0a8WAimLCarWoU3KhzX11pbELmYg94d ArEfEBTNv7MsbQphHPo+j/0yxgwLKE1BG4E7qppGqTUCSbRJEUpeATQhTEkTpxVrcg6y yPnckvSuSVy8JuPJ2GSpqXKLhjSu9kchOfF6+VwsY9x0nA5aRdOMikr5C7Mq8Yf/6OFi Q7wuYmTq6EUdKSz0DgLek5c3fbklg5FMUCrUK3iyciQzFaefIUG66jbz0Q/PTecShfkP j0vj7GtAZ1b8DKhgJLnK4ry8FMUejfhdbpIBK7U3CfeSkWfLzG1ue7EeX+lxJAnGZKVg T3RQ== X-Gm-Message-State: AHPjjUh657XwLWfDxuwDqgtYxZcoBS8raJhMVtZERqUSwg8Bpsck/jUM pL3FzikR9ts/5OzXl4sy9gjPJz7A X-Google-Smtp-Source: AOwi7QAoBTeaEJozJmt+Ba2teWsMegJD/thG4T+kvcQVxS6sNyO+EX+DKqMB66WyeVIDA6peBQo+ag== X-Received: by 10.37.31.193 with SMTP id f184mr72751ybf.2.1506486507645; Tue, 26 Sep 2017 21:28:27 -0700 (PDT) Original-Received: from laythe (res380d-128-61-81-32.res.gatech.edu. [128.61.81.32]) by smtp.gmail.com with ESMTPSA id o190sm4416950ywo.50.2017.09.26.21.28.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Sep 2017 21:28:25 -0700 (PDT) In-Reply-To: <871smxo45g.fsf_-_@users.sourceforge.net> (Noam Postavsky's message of "Sat, 23 Sep 2017 10:55:55 -0400") X-Mailman-Approved-At: Wed, 27 Sep 2017 02:31:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:137482 Archived-At: --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Revert-change-to-eshell-alias-argument-parsing-Bug-2.patch >From fd4a8b3b2b42dbf1520a6cd8cc3b265f55ea6ca6 Mon Sep 17 00:00:00 2001 From: Jay Kamat 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 --=-=-=--