From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#6226: Please add a customizable option to NOT call tramp for every sudo command Date: Wed, 26 May 2010 07:55:16 +0200 Organization: ThierryVolpiatto Message-ID: <874ohvjjgb.fsf@tux.homenetwork> References: <87zkzv3wg4.fsf@gmx.de> <878w7bfvaw.fsf@gmx.de> <8739xifsj4.fsf@gmx.de> <874ohvibs4.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1274855267 22583 80.91.229.12 (26 May 2010 06:27:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 26 May 2010 06:27:47 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 26 08:27:46 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OHA5V-0004hz-Ih for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 May 2010 08:27:45 +0200 Original-Received: from localhost ([127.0.0.1]:33808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHA5Q-0006GY-CC for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 May 2010 02:27:28 -0400 Original-Received: from [140.186.70.92] (port=55133 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHA5J-0006GR-Fs for bug-gnu-emacs@gnu.org; Wed, 26 May 2010 02:27:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHA5I-0000A4-11 for bug-gnu-emacs@gnu.org; Wed, 26 May 2010 02:27:21 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46218) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHA5H-00009w-VD for bug-gnu-emacs@gnu.org; Wed, 26 May 2010 02:27:19 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OH9dt-0003VN-Qr; Wed, 26 May 2010 01:59:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 May 2010 05:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6226 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.127485353813467 (code B ref -1); Wed, 26 May 2010 05:59:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 May 2010 05:58:58 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OH9dp-0003V9-FX for submit@debbugs.gnu.org; Wed, 26 May 2010 01:58:58 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OH9dm-0003V4-UC for submit@debbugs.gnu.org; Wed, 26 May 2010 01:58:56 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:44074) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OH9di-0006qu-MF for submit@debbugs.gnu.org; Wed, 26 May 2010 01:58:50 -0400 Original-Received: from [140.186.70.92] (port=34791 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OH9dg-0004BV-9H for bug-gnu-emacs@gnu.org; Wed, 26 May 2010 01:58:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OH9dd-00025E-VE for bug-gnu-emacs@gnu.org; Wed, 26 May 2010 01:58:47 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:43045) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OH9dd-00024Z-Pp for bug-gnu-emacs@gnu.org; Wed, 26 May 2010 01:58:45 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OH9db-0001ox-Ew for bug-gnu-emacs@gnu.org; Wed, 26 May 2010 07:58:43 +0200 Original-Received: from 197.211.85-79.rev.gaoland.net ([79.85.211.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 May 2010 07:58:43 +0200 Original-Received: from thierry.volpiatto by 197.211.85-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 26 May 2010 07:58:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 35 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 197.211.85-79.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:g2WoEFjhqczVTUQnFY4wfdL6VFc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 26 May 2010 01:59:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org 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:37282 Archived-At: Michael Albinus writes: > Stefan Monnier writes: > >>> fmakunbound does the job, yes. But i just think providing a defcustom >>> interface >> >> Agreed. > > I don't know, whether another defcustom is needed. Eshell gives you > already configuration hooks, for example: > > (add-hook 'eshell-named-command-hook > (lambda (command args) > (if (member command '("su" "sudo")) > (throw 'eshell-replace-command > (eshell-parse-command (concat "*" command) args))))) > > Alternatively, one could disable the alias commands interactively in > eshell, without further configuration: > > ~ $ fmakunbound (quote eshell/su) > ~ $ fmakunbound (quote eshell/sudo) > > I will document both approches in eshell.texi. OTOH adding an alias to su/sudo can solve problem: alias sudo *sudo -p Password: $* alias su LC_ALL=C *su -l (if you enter the alias from eshell, you have to escape $) -- Thierry Volpiatto Gpg key: http://pgp.mit.edu/