From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#28568: 26.0.60; [eshell] Incompatible change in alias argument handling Date: Sat, 23 Sep 2017 09:21:47 -0400 Message-ID: <87a81lo8ic.fsf_-_@users.sourceforge.net> References: <87fubfjk10.fsf@gmail.com> <87a81mjxmz.fsf@gmail.com> <87r2uxlt6o.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1506172996 31873 195.159.176.226 (23 Sep 2017 13:23:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 23 Sep 2017 13:23:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) Cc: Tobias Zawada , Jay Kamat , Michael Albinus To: 28568@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 23 15:23:10 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 1dvkOk-0007rD-57 for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Sep 2017 15:23:10 +0200 Original-Received: from localhost ([::1]:34993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvkOr-0001r5-AQ for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Sep 2017 09:23:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvkOi-0001qN-LU for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 09:23:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvkOe-0007Aa-Mj for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 09:23:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44957) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvkOe-0007AS-J4 for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 09:23:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dvkOb-000079-Mc; Sat, 23 Sep 2017 09:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: jaygkamat@gmail.com, i_inbox@tn-home.de, michael.albinus@gmx.de, bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Sep 2017 13:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28568 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Jay Kamat , Tobias Zawada , Michael Albinus Original-Received: via spool by submit@debbugs.gnu.org id=B.1506172925337 (code B ref -1); Sat, 23 Sep 2017 13:23:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Sep 2017 13:22:05 +0000 Original-Received: from localhost ([127.0.0.1]:53632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvkNh-00005M-I4 for submit@debbugs.gnu.org; Sat, 23 Sep 2017 09:22:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvkNg-0008WN-2S for submit@debbugs.gnu.org; Sat, 23 Sep 2017 09:22:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvkNZ-0006Bk-Oe for submit@debbugs.gnu.org; Sat, 23 Sep 2017 09:21:58 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52294) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dvkNZ-0006Ba-L8 for submit@debbugs.gnu.org; Sat, 23 Sep 2017 09:21:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvkNX-0001gu-3F for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 09:21:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvkNT-00063b-1m for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 09:21:55 -0400 Original-Received: from mail-it0-x234.google.com ([2607:f8b0:4001:c0b::234]:48833) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvkNS-00061r-SY for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 09:21:50 -0400 Original-Received: by mail-it0-x234.google.com with SMTP id m123so3599428ita.3 for ; Sat, 23 Sep 2017 06:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=2gzKy2q4ZKrsdCZCih8Y1kZL1GmqFkgSXZWuI/ZeDPY=; b=ocK35m1HN6/yPMU0T1zkcVOYn/l8+rE/eC0cy6pyq/UzJLOG37b4po3DgFY/H734Al mOyqVbkej4Q08f1VmeDNdKAjEibPBTDop4+DQ+YNZA/1Dc+DrLDwH3DdGKO8NdmKPXBr VxsuicJ/Qa7GCeooBJ3D2W4+0OU3jX/71O/PptlSYflQH5CXkxoWgT78KbMYQYDsbkME IdZijtlFru7MQuMZqQHIOnzcgpblqfboETXzcGxoSu0FPg2dHSgFEBS/cxSqKYNBggYk XUfppGFUss5nfI8+cqc/b2Kqiyp5Pgev2lEpletvix3yKwXxb+7leulQJ/sUKMUOj47H D8Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=2gzKy2q4ZKrsdCZCih8Y1kZL1GmqFkgSXZWuI/ZeDPY=; b=Olpcg4/N6v0bW25rKQnyTnoTD37aGJbcOeUy7/fD0+m5okZ8u7cNByRyzfb6QjtLm5 xIAKJtAGPGTxa4S2HLiE3DhfDLDuRA1faaUVAHUUbx62728Li1GAruJ0Fm12oQQ66HlR j+gOun3uKWwIlJagmAZ8Mtz8hkY1P68KvGC6hjgUt2sH4ZXnza+Fv/ChPaidDkNsbSuI pXscsYn5+TMuQehxUVRtenDXqN5Hyd8b8EaRYO7EtMSd/AaSazUU6ewg7nM1KZ8laoar iXPIUGdz+KMBsIYstXxnlfAHWGEs00bIcEguW2Fg0Z4vLlN1MAmQjXv+jDx691G+dpAW YMrw== X-Gm-Message-State: AHPjjUhdqHyaXFf8c3oD1UwXFkamK+Vcy68MEO6o/UyC3pbt1/Pqn80I Ji6kEu9UX/DC5UaEomNWSJ44fA== X-Google-Smtp-Source: AOwi7QCJZ/iffDW2zCt5BC+bixWK9GuvQ8+GnTx4c7c/MLe561FvxE6FNJF9iACeuCwB6hGwNDKg2w== X-Received: by 10.36.120.142 with SMTP id p136mr10565989itc.55.1506172908848; Sat, 23 Sep 2017 06:21:48 -0700 (PDT) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id k133sm1574073itd.0.2017.09.23.06.21.48 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Sep 2017 06:21:48 -0700 (PDT) In-Reply-To: <87r2uxlt6o.fsf@gmx.de> (Michael Albinus's message of "Sat, 23 Sep 2017 10:23:27 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:137285 Archived-At: > Jay Kamat writes: > >> It seems that the fix to >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27954 (commit >> e66e81679c3c91d6bf8f62c7abcd968430b4d1fe) caused this issue. I had an >> eshell alias defined as >> >> alias sudo eshell/sudo $* >> >> Which seems to no longer work (with the error described). Right. The problem is that the arguments are now getting submitted twice. sudo ls -> {{eshell/sudo $*}} ls -> eshell/sudo ls ls I'm thinking we should probably revert the fix for Bug#27954; the comments at the top of em-alias.el explicitly say using '$*' (and '$1', '$2') in the alias definition is the supported way to handle arguments. ;;;_* Creating aliases ;; ;; The user interface is simple: type 'alias' followed by the command ;; name followed by the definition. Argument references are made ;; using '$1', '$2', etc., or '$*'. For example: ;; ;; alias ll 'ls -l $*' ;; ;; This will cause the command 'll NEWS' to be replaced by 'ls -l ;; NEWS'. This is then passed back to the command parser for ;; reparsing.{Only the command text specified in the alias definition ;; will be reparsed. Argument references (such as '$*') are handled ;; using variable values, which means that the expansion will not be ;; reparsed, but used directly.} The manual is a bit inconsistent about it, with `(eshell) Built-ins' suggesting alias sudo '*sudo $*' and `(eshell) Aliases' suggesting alias ll ls -l I think this just means we should correct the `(eshell) Aliases' page. Michael Albinus writes: > There's also bug#28320, which seems to report the same problem. No, that is a different problem, I've opened a new bug for this one.