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: Fri, 29 Jun 2012 11:45:25 +0200 Message-ID: <87obo2h2oa.fsf@gmx.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340963140 7292 80.91.229.3 (29 Jun 2012 09:45:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 29 Jun 2012 09:45:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 29 11:45:40 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 1SkXlg-0000NI-GW for ged-emacs-devel@m.gmane.org; Fri, 29 Jun 2012 11:45:36 +0200 Original-Received: from localhost ([::1]:42569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkXlg-0001ty-Gm for ged-emacs-devel@m.gmane.org; Fri, 29 Jun 2012 05:45:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkXld-0001tt-Ur for emacs-devel@gnu.org; Fri, 29 Jun 2012 05:45:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SkXlc-0002RV-5R for emacs-devel@gnu.org; Fri, 29 Jun 2012 05:45:33 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:56323) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SkXlb-0002QL-SI for emacs-devel@gnu.org; Fri, 29 Jun 2012 05:45:32 -0400 Original-Received: (qmail invoked by alias); 29 Jun 2012 09:45:28 -0000 Original-Received: from p57BB961B.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.150.27] by mail.gmx.net (mp033) with SMTP; 29 Jun 2012 11:45:28 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19He7JFd/xHv81jbCMsPSLk6HaPNgordZKfhUFNhk ZsBDtjlwabOEFk In-Reply-To: (John Wiegley's message of "Thu, 28 Jun 2012 22:32:22 -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:151284 Archived-At: "John Wiegley" writes: > Something I've noticed after moving to Emacs 24 is that using "sudo" in Eshell > has become an awful experience: > > - It's *much* slower than *sudo (by orders of magnitude) > - It doesn't show any output until the command is done > - It locks up Emacs until the command is done There is much room for improvement, no question. If I have time, I'll look on it next days. > I find this behavior distasteful, since sudo is such a common command for > users of Eshell to use. It was added in 2009 by the Tramp author: > > 2009-11-27 Michael Albinus > > * eshell/em-unix.el (eshell/su, eshell/sudo): New defuns, > providing a Tramp related implementation of "su" and "sudo". > (eshell-unix-initialize): Add "su" and "sudo". > > I appreciate what these two functions are trying to accomplish, but they > should not have been made the default. They aren't the default, if default-directory is local. And if the default directory is remote, they do exactly what is intended: run the command on that remote machine. It isn't only su or sudo, this is true for all other commands as well. > I recommend moving them out of em-unix.el and into a new module, > em-tramp.el, which is OFF by default. Users who prefer to use Tramp > for everything can turn it on, and a note to that effect should be > added to the Tramp manual. If we do this (I'm not convinced yet), it shall be called em-remote.el or so. Tramp is just an example for an implementation of process-file and start-file-process; there could be other file name handlers which will provide an own implementation. > John Best regards, Michael.