From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#68074: eshell sudo/doas does not work for aliases Date: Sat, 27 Jan 2024 12:24:46 -0800 Message-ID: References: <31356544.8861481.1703711546895.ref@mail.yahoo.com> <31356544.8861481.1703711546895@mail.yahoo.com> <713218597.2366797.1706313180478@mail.yahoo.com> <68241238-add1-af83-9b7c-904732e7bca6@gmail.com> <2135837382.2409214.1706345170815@mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12361"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68074-done@debbugs.gnu.org To: Alfonso Sanchez-Beato , Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 27 21:26:25 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rTpFx-00034h-8j for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Jan 2024 21:26:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTpFX-00066s-6i; Sat, 27 Jan 2024 15:25:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTpFU-00064t-OF for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 15:25:56 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTpFT-0000mV-EZ for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 15:25:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTpFa-0004Bi-HB for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 15:26:02 -0500 Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jan 2024 20:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 68074 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 68074@debbugs.gnu.org, jporterbugs@gmail.com, alfonsosanchezbeato@yahoo.es Original-Received: via spool by 68074-done@debbugs.gnu.org id=D68074.170638710516024 (code D ref 68074); Sat, 27 Jan 2024 20:26:02 +0000 Original-Received: (at 68074-done) by debbugs.gnu.org; 27 Jan 2024 20:25:05 +0000 Original-Received: from localhost ([127.0.0.1]:55992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTpEf-0004AO-2F for submit@debbugs.gnu.org; Sat, 27 Jan 2024 15:25:05 -0500 Original-Received: from mail-yb1-xb2c.google.com ([2607:f8b0:4864:20::b2c]:50540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTpEa-00049m-S7 for 68074-done@debbugs.gnu.org; Sat, 27 Jan 2024 15:25:03 -0500 Original-Received: by mail-yb1-xb2c.google.com with SMTP id 3f1490d57ef6-dbed0710c74so1605218276.1 for <68074-done@debbugs.gnu.org>; Sat, 27 Jan 2024 12:24:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706387088; x=1706991888; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=cxJDw24KVpesODcrmfPW/ao5fy8bBRunKedyckNjP8Y=; b=Ptsscf2XvQHk/U90CbvwJ2PCmEZFwexBmkRKv3SWJv5jEXtxI+2DSufKMHvSThT1i8 vCQ23yUPgzQMtx6xj4Jbnc6AurZ/XqdJbgppfBAdz3iKz0V12vAgwFifdtKkR4eR3MxA joxMG6JSYwEPXAIQ8q1R623imPxcZearu6VqICb3u957C7N2tyJKBLGdzko42k9szcYx eJNNtY9jIahlGV5olCae6Ezq6Fkfe11y6D9ijhpOMrxZ9ertsoM6m5EmgLo7CSP9slIH oUmp+tILGjV7v8nFaTfs6j9QYDAVy5xkck3oSMfZGLNo+65JP7sgrLje29kLCLT+WxaM pIxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706387088; x=1706991888; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=cxJDw24KVpesODcrmfPW/ao5fy8bBRunKedyckNjP8Y=; b=uo4eP5c4DExls/NlW0jPsZTagUovscnzyKxz0S5bI2yNqfwZAJJENXC++DVMYKwxYR 9jS7fWpsxHz27tTNF+DlUctnxOLSlHIslLHNoSI80ittm/kpbuEZNm2GoGKvKWvuJc5S xZR9C82HZ2nsCnwqmrUTqBE3dcTle9eIE1YrVg8MqFij7/Iw/BG3uO/hOyX2oJM3KcTg NdkU0MHwJkySHrZ6JwTTqgofnLVAGDhvEk0Rn0TZ4RKo9Hifz2WEm4jRJGEbW3jj/KcJ isPuaL12vZ9ZJHMkjFV5E9SAjTdZHiTIXWB0rrG6/b4yFq3e+4kOe8R/5T1rntOXL3ta JmBQ== X-Gm-Message-State: AOJu0YxFaNShEovfOuXc9BI4ixnO45BfigjeS0UkkfFKhkFMYHo8sAwG XBRX1b2eKKCuqqtX1v2t7Pzbr++uyZFydbaqKgSK7sY3GQ8mbSA3 X-Google-Smtp-Source: AGHT+IE7Zn4NgVVKGjrt+82M5avq8YZKSVQD6h7IMHpFuebsRcB9zpMK9vPIja4yiZAtKHwVhI1A1g== X-Received: by 2002:a05:690c:830:b0:5ff:d0ef:2d1c with SMTP id by16-20020a05690c083000b005ffd0ef2d1cmr2149927ywb.67.1706387087918; Sat, 27 Jan 2024 12:24:47 -0800 (PST) Original-Received: from [192.168.1.2] (076-168-148-233.res.spectrum.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id n3-20020a170902e54300b001d4816958c2sm2809611plf.166.2024.01.27.12.24.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 27 Jan 2024 12:24:47 -0800 (PST) Content-Language: en-US In-Reply-To: <2135837382.2409214.1706345170815@mail.yahoo.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279033 Archived-At: On 1/27/2024 12:46 AM, Alfonso Sanchez-Beato via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > > En sábado, 27 de enero de 2024, 01:19:32 GMT, Jim Porter escribió: >> ... actually, this is a more-complete patch. I'm not 100% sure about >> this part though: >> >>   ',(car args) >> >> That (usually) creates something like (quote "command"), but it's safer I thought about this some more and the extraneous quoting is fine in my opinion. Eshell already does that quite a bit in 'eshell-do-eval', so what's one more case? > This last patch works nicely, thanks a lot! It works also in cases where my patch was not, like: > > $ eshell/sudo VAR=val ... Wait, that works?! (After trying it out locally, so it does!) Looking at the code, I see why now: 'eshell-named-command' calls 'eshell-prepare-command-hook', and that hook is where we handle local variables. However, I truly didn't expect that; I thought the local variable handling occurred in an earlier phase. The more you know... Anyway, since this works even better than I'd expected, I've now merged my patch to the master branch as 3c680968e49. Closing this bug now.