From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Recommend move eshell/su and eshell/sudo to em-tramp.el Date: Wed, 04 Jul 2012 16:53:17 +0200 Message-ID: <8762a3r31e.fsf@gmx.de> References: <87pq8dl4dq.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1341413619 12709 80.91.229.3 (4 Jul 2012 14:53:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 4 Jul 2012 14:53:39 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 04 16:53:39 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SmQxV-0005LF-Ct for ged-emacs-devel@m.gmane.org; Wed, 04 Jul 2012 16:53:37 +0200 Original-Received: from localhost ([::1]:43032 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmQxU-0000Ck-Ci for ged-emacs-devel@m.gmane.org; Wed, 04 Jul 2012 10:53:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmQxK-0000CX-1U for emacs-devel@gnu.org; Wed, 04 Jul 2012 10:53:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmQxI-0007Kx-9d for emacs-devel@gnu.org; Wed, 04 Jul 2012 10:53:25 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:56439) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SmQxI-0007KX-0Z for emacs-devel@gnu.org; Wed, 04 Jul 2012 10:53:24 -0400 Original-Received: (qmail invoked by alias); 04 Jul 2012 14:53:21 -0000 Original-Received: from p57BB95E4.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.149.228] by mail.gmx.net (mp037) with SMTP; 04 Jul 2012 16:53:21 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/ptUNS9DrphXYFFyhuuyduH/jMaPee0b0HN12qvF Ho+U9tYLJ0pnH7 In-Reply-To: (John Wiegley's message of "Tue, 03 Jul 2012 14:47:00 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.23 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151416 Archived-At: "John Wiegley" writes: > This type of behavior, being that it is special, really deserves to be in its > own "opt-in" module. It's better to educate people how to turn on behavior > that may have surprising consequences, rather than to make it the default and > then educate them how to disable it. Understood. Maybe we should change it such a way, that plain sudo is called when your default directory is local. This is what people expect. > Also, eshell/sudo does not fit with the philosophy of the other > functions in em-unix.el. Every other function in that file provides a > *pure Lisp* implementation of an equivalent Unix command. As far as I > can see, both *sudo and eshell/sudo end up calling /usr/bin/sudo. > sehell/sudo is not pure Lisp (i.e., it involves an external command). > So I'm not sure what benefit eshell/sudo gains, since ultimately it > does the same thing, only slower and with blocking I/O? The idea behind eshell/sudo (and eshell/su) is - Allow su(do) to run lisp commands. "sudo ls" would call the Lisp implementation of ls, not the UNIX ls . - Allow su(do) on remote hosts. On the fly, tramp-default-proxies-alist is expanded, in order to apply sudo on that remote host, and not on the local host. Two new features, which weren't in eshell before (IIRC). > Other than that, you know I'm a huge Tramp fan, and I use Tramp+eshell quite > often. I'm very interested in seeing this work progress, albeit in its own > module. I agree with you that we shall not surprise people, especially when calling sudo for local machine purposes. OTOH, I'd love to have a kind of automagic to let it work on remote machines. Opt-in modules need time and courage to discover. > Thanks, > John Best regards, Michael.