From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "John Wiegley" Newsgroups: gmane.emacs.devel Subject: Re: Recommend move eshell/su and eshell/sudo to em-tramp.el Date: Tue, 03 Jul 2012 14:47:00 -0500 Organization: New Artisans LLC Message-ID: References: <87pq8dl4dq.fsf@gmx.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1341344834 8600 80.91.229.3 (3 Jul 2012 19:47:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 Jul 2012 19:47:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 03 21:47:14 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 1Sm942-0004AV-UC for ged-emacs-devel@m.gmane.org; Tue, 03 Jul 2012 21:47:11 +0200 Original-Received: from localhost ([::1]:45052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm942-0002ni-0M for ged-emacs-devel@m.gmane.org; Tue, 03 Jul 2012 15:47:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm93z-0002nP-Nh for emacs-devel@gnu.org; Tue, 03 Jul 2012 15:47:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sm93x-0006Rx-Mj for emacs-devel@gnu.org; Tue, 03 Jul 2012 15:47:07 -0400 Original-Received: from mail-gg0-f169.google.com ([209.85.161.169]:57820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sm93x-0006QP-Fr for emacs-devel@gnu.org; Tue, 03 Jul 2012 15:47:05 -0400 Original-Received: by ggm4 with SMTP id 4so6667552ggm.0 for ; Tue, 03 Jul 2012 12:47:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:organization:references:mail-followup-to :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=kM0L2+UoVm9c7p66WBieEL78yAaJQ5rUcwBDnrRmXUI=; b=l09A2lWRQGysFzQi82bgjJEB/T1yAgv3gfN4Q8kz6fNi4KUCbzOXbvQ0hBxYXrpBMP 1wIiQHMnG9kyRfa90ZPzog/vFJSVbiweFTwFR5/ijQFSycPJRVrnVxk5v6mDLGTimPSV W3OjsxCCqarXiNrGWxSbDacVE9v/UTomiLWzb4XwdwpST0z+OXMA3LoNalgY1H0t31Al v+ImULQZhwK0WpqkxVB9FUZY2dyjaTfnszWPGDi49zMmaiJtnwlgmNakPoYO6xhS2blO ASl2MhB2vHOJQpoGo5OoFGACMj/UWzY/iZfNu/6+3TjvgD/SK2exov76/isWx0Uh0r6b nAYg== Original-Received: by 10.50.193.196 with SMTP id hq4mr9480609igc.57.1341344822705; Tue, 03 Jul 2012 12:47:02 -0700 (PDT) Original-Received: from Hermes.local (adsl-99-26-98-225.dsl.milwwi.sbcglobal.net. [99.26.98.225]) by mx.google.com with ESMTPS id pp4sm25895081igb.5.2012.07.03.12.47.01 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jul 2012 12:47:01 -0700 (PDT) Original-Received: by Hermes.local (Postfix, from userid 501) id AD441209C2B9; Tue, 3 Jul 2012 14:47:00 -0500 (CDT) Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: <87pq8dl4dq.fsf@gmx.de> (Michael Albinus's message of "Tue, 03 Jul 2012 08:56:17 +0200") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (darwin) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.161.169 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:151400 Archived-At: >>>>> Michael Albinus writes: > looks like it is the same message you have sent some days ago. Are there > changes I haven't seen? Anyway ... Ah, I never saw it come across on the emacs-devel Archives, so I believed it hadn't been sent. > In a first reaction I've said this doesn't happen if default-directory is > local. This is wrong, I did oversee that I had defined an alias as metioned > in (info "(eshell) Built-ins") > alias sudo '*sudo $*' > Would such an alias serve you better? That would serve me personally, but I don't believe it should be the default. It's not good to have a default behavior if we have to educate others on how to then disable it. It surprised me, so I'm sure it will surprise others. >> - It doesn't show any output until the command is done > I'm working on this. Hopefully, I could change the behaviour when the > command is an external command. If the command is mapped to a lisp function > (like the command "ls" to "eshell/ls"), I have no clue how to achieve > this. The latter case happens also for Lisp code not using Tramp, but there > are shorter delays. Yes, any Lisp function blocks until all output is ready, that's just a shortcoming of the way Eshell is using Emacs Lisp. > Would it be sufficient to propagate the above mentioned alias more > prominently? Or shall we make that alias the default? 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. 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? 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. Thanks, John