From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#5072: 23.1.50; Eshell fail with sudo command Date: Mon, 30 Nov 2009 06:28:53 +0100 Message-ID: <873a3wvawa.fsf@gmx.de> References: <87ljhpcjgv.fsf@tux.homenetwork> <87fx7xqcj1.fsf@gmx.de> Reply-To: Michael Albinus , 5072@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259560070 9075 80.91.229.12 (30 Nov 2009 05:47:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 05:47:50 +0000 (UTC) Cc: 5072@emacsbugs.donarmstrong.com, Thierry Volpiatto To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 30 06:47:42 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NEz6r-0001EA-3E for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 06:47:41 +0100 Original-Received: from localhost ([127.0.0.1]:32996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEz6q-0004jk-Dg for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 00:47:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NEz6i-0004jW-0p for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 00:47:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NEz6d-0004iv-2W for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 00:47:31 -0500 Original-Received: from [199.232.76.173] (port=38818 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEz6c-0004is-TO for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 00:47:26 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:42969) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NEz6c-0002kL-7X for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2009 00:47:26 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAU5lNHa031532; Sun, 29 Nov 2009 21:47:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAU5Z53l030388; Sun, 29 Nov 2009 21:35:05 -0800 Resent-Date: Sun, 29 Nov 2009 21:35:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Michael Albinus Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 30 Nov 2009 05:35:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 5072 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5072-submit@emacsbugs.donarmstrong.com id=B5072.125955894329838 (code B ref 5072); Mon, 30 Nov 2009 05:35:05 +0000 Original-Received: (at 5072) by emacsbugs.donarmstrong.com; 30 Nov 2009 05:29:03 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with SMTP id nAU5T1eg029835 for <5072@emacsbugs.donarmstrong.com>; Sun, 29 Nov 2009 21:29:03 -0800 Original-Received: (qmail invoked by alias); 30 Nov 2009 05:28:55 -0000 Original-Received: from p57A2208E.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.32.142] by mail.gmx.net (mp061) with SMTP; 30 Nov 2009 06:28:55 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+dX9lNIlSdc/Ei6Id8q5Q65s/xZh0S/9tCjeaFGr 6P2IZVIKZ9vmmT In-Reply-To: (Stefan Monnier's message of "Sun, 29 Nov 2009 20:25:01 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.63 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 30 Nov 2009 00:47:31 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33053 Archived-At: Stefan Monnier 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@remotehost:/etc /ssh:user@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.