GNU bug report logs - #5072
23.1.50; Eshell fail with sudo command

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Sun, 29 Nov 2009 18:00:06 UTC

Severity: normal

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 5072 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 5072 <at> debbugs.gnu.org,
        Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Subject: Re: bug#5072: 23.1.50; Eshell fail with sudo command
Date: Mon, 30 Nov 2009 06:28:53 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> I've added recently an eshell implementation for su and sudo, using
>> Tramp. This requires to run bash, indeed.
>
> What is the advantage?

Imagine, you are on a remote machine, and you want to call a Lisp
function, accessing a file with root permissions. In eshell, you do:

     ~ $ cd /ssh:user <at> remotehost:/etc
     /ssh:user <at> remotehost:/etc $ sudo find-file shadow

>> In order to keep your original behaviour, you shall call
>> ,----
>> | *sudo emerge -av somepackage
>> `----
>
> Couldn't your code fail more gracefully and transparently fallback on
> running the bare `sudo'?

That is the eshell built-in approach to suppress command emulation. You
can also apply it to "ls" or "du" or whatever command available in
eshell implementation(1). I wouldn't change it; eshell users know this
approach, likely (2).

Maybe more useful would be to improve Tramp, calling a command via
start-file-process directly (without opening a shell first). This is
already on my todo list, but it isn't simple; it needs basic changes.

At least I will move the eshell related information in etc/NEWS to the
"user visible changes" section.

(1): Check for "eshell/*" Lisp functions.

(2): eshell documentation is very poor. Even this is not documented; I
will improve it next days.

>         Stefan

Best regards, Michael.



This bug report was last modified 15 years and 223 days ago.

Previous Next


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