* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
@ 2010-05-20 4:42 Ken Hori
2010-05-20 6:43 ` Michael Albinus
0 siblings, 1 reply; 13+ messages in thread
From: Ken Hori @ 2010-05-20 4:42 UTC (permalink / raw)
To: 6226
I've recently noticed Eshell is now calling tramp for every sudo
command. Tramp is very slow, and I believe for most cases tramp
intermediation is unnecessary.
Could we please add a customizable switch to enable/disable
eshell/sudo? Disabling eshell/sudo by default would be even better.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-20 4:42 bug#6226: Please add a customizable option to NOT call tramp for every sudo command Ken Hori
@ 2010-05-20 6:43 ` Michael Albinus
2010-05-22 3:50 ` Ken Hori
0 siblings, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2010-05-20 6:43 UTC (permalink / raw)
To: Ken Hori; +Cc: 6226
Ken Hori <fplemma@gmail.com> writes:
> I've recently noticed Eshell is now calling tramp for every sudo
> command. Tramp is very slow, and I believe for most cases tramp
> intermediation is unnecessary.
>
> Could we please add a customizable switch to enable/disable
> eshell/sudo? Disabling eshell/sudo by default would be even better.
All built-in commands of eshell can be disabled by prepending "*". See
(info "(eshell)Built-ins")
That means, you shall call
~ $ *sudo command
Best regards, Michael.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-20 6:43 ` Michael Albinus
@ 2010-05-22 3:50 ` Ken Hori
2010-05-22 22:03 ` Michael Albinus
0 siblings, 1 reply; 13+ messages in thread
From: Ken Hori @ 2010-05-22 3:50 UTC (permalink / raw)
To: Michael Albinus; +Cc: 6226
Yes, I am aware of that. Thank you. And I'm also aware
I can just remove eshell-unix from eshell-modules-list.
Inside em-unix.el are
eshell/agrep
eshell/cat
eshell/cp
eshell/diff
eshell/du
eshell/egrep
eshell/fgrep
eshell/glimpse
eshell/grep
eshell/info
eshell/ln
eshell/locate
eshell/make
eshell/man
eshell/mkdir
eshell/mv
eshell/occur
eshell/rm
eshell/rmdir
eshell/su
eshell/sudo
eshell/time
eshell/whoami
Some are beneficial, but many command wrappers are not -- at
least to me.
I think it's a good idea to give the users freedom
of choosing which eshell commands to opt-in or out.
On Wed, May 19, 2010 at 11:43 PM, Michael Albinus
<michael.albinus@gmx.de> wrote:
> Ken Hori <fplemma@gmail.com> writes:
>
>> I've recently noticed Eshell is now calling tramp for every sudo
>> command. Tramp is very slow, and I believe for most cases tramp
>> intermediation is unnecessary.
>>
>> Could we please add a customizable switch to enable/disable
>> eshell/sudo? Disabling eshell/sudo by default would be even better.
>
> All built-in commands of eshell can be disabled by prepending "*". See
>
> (info "(eshell)Built-ins")
>
> That means, you shall call
>
> ~ $ *sudo command
>
> Best regards, Michael.
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-22 3:50 ` Ken Hori
@ 2010-05-22 22:03 ` Michael Albinus
2010-05-23 13:22 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2010-05-22 22:03 UTC (permalink / raw)
To: Ken Hori; +Cc: 6226
Ken Hori <fplemma@gmail.com> writes:
> Yes, I am aware of that. Thank you. And I'm also aware
> I can just remove eshell-unix from eshell-modules-list.
>
> Inside em-unix.el are
>
> eshell/agrep
> eshell/cat
> eshell/cp
> eshell/diff
> eshell/du
> eshell/egrep
> eshell/fgrep
> eshell/glimpse
> eshell/grep
> eshell/info
> eshell/ln
> eshell/locate
> eshell/make
> eshell/man
> eshell/mkdir
> eshell/mv
> eshell/occur
> eshell/rm
> eshell/rmdir
> eshell/su
> eshell/sudo
> eshell/time
> eshell/whoami
>
> Some are beneficial, but many command wrappers are not -- at
> least to me.
>
> I think it's a good idea to give the users freedom
> of choosing which eshell commands to opt-in or out.
(eval-after-load "em-unix"
(progn
(unintern "eshell/su")
(unintern "eshell/sudo")))
Best regards, Michael.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-22 22:03 ` Michael Albinus
@ 2010-05-23 13:22 ` Stefan Monnier
2010-05-23 17:15 ` Michael Albinus
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2010-05-23 13:22 UTC (permalink / raw)
To: Michael Albinus; +Cc: 6226
> (eval-after-load "em-unix"
> (progn
> (unintern "eshell/su")
> (unintern "eshell/sudo")))
FWIW, I think `unintern' is a bit drastic. `makfunbound' would be my
preferred choice.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-23 13:22 ` Stefan Monnier
@ 2010-05-23 17:15 ` Michael Albinus
2010-05-23 18:54 ` Juanma Barranquero
0 siblings, 1 reply; 13+ messages in thread
From: Michael Albinus @ 2010-05-23 17:15 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 6226
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> (eval-after-load "em-unix"
>> (progn
>> (unintern "eshell/su")
>> (unintern "eshell/sudo")))
>
> FWIW, I think `unintern' is a bit drastic. `makfunbound' would be my
> preferred choice.
Thanks. Just another function I didn't know.
> Stefan
Best regards, Michael.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-23 17:15 ` Michael Albinus
@ 2010-05-23 18:54 ` Juanma Barranquero
2010-05-24 8:16 ` Ken Hori
0 siblings, 1 reply; 13+ messages in thread
From: Juanma Barranquero @ 2010-05-23 18:54 UTC (permalink / raw)
To: Michael Albinus; +Cc: 6226
On Sun, May 23, 2010 at 19:15, Michael Albinus <michael.albinus@gmx.de> wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> FWIW, I think `unintern' is a bit drastic. `makfunbound' would be my
>> preferred choice.
>
> Thanks. Just another function I didn't know.
`fmakunbound', I hope :-)
Juanma
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-23 18:54 ` Juanma Barranquero
@ 2010-05-24 8:16 ` Ken Hori
2010-05-24 14:05 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: Ken Hori @ 2010-05-24 8:16 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Michael Albinus, 6226
fmakunbound does the job, yes. But i just think providing a defcustom interface
> to give the users freedom
> of choosing which eshell commands to opt-in or out.
is better rather than manual enable/disable through a raw function call.
I'm speaking from user's perspective, not elisp programmer's. It's
just me though.
On Sun, May 23, 2010 at 11:54 AM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Sun, May 23, 2010 at 19:15, Michael Albinus <michael.albinus@gmx.de> wrote:
>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> FWIW, I think `unintern' is a bit drastic. `makfunbound' would be my
>>> preferred choice.
>>
>> Thanks. Just another function I didn't know.
>
> `fmakunbound', I hope :-)
>
> Juanma
>
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-24 8:16 ` Ken Hori
@ 2010-05-24 14:05 ` Stefan Monnier
2010-05-26 3:26 ` Michael Albinus
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2010-05-24 14:05 UTC (permalink / raw)
To: Ken Hori; +Cc: Juanma Barranquero, Michael Albinus, 6226
>> `fmakunbound', I hope :-)
Yes, thanks.
> fmakunbound does the job, yes. But i just think providing a defcustom
> interface
Agreed.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-24 14:05 ` Stefan Monnier
@ 2010-05-26 3:26 ` Michael Albinus
2010-05-26 5:55 ` Thierry Volpiatto
2010-05-26 13:30 ` Stefan Monnier
0 siblings, 2 replies; 13+ messages in thread
From: Michael Albinus @ 2010-05-26 3:26 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Juanma Barranquero, 6226
Stefan Monnier <monnier@iro.umontreal.ca> 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.
> Stefan
Best regards, Michael.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-26 3:26 ` Michael Albinus
@ 2010-05-26 5:55 ` Thierry Volpiatto
2010-05-26 10:16 ` Michael Albinus
2010-05-26 13:30 ` Stefan Monnier
1 sibling, 1 reply; 13+ messages in thread
From: Thierry Volpiatto @ 2010-05-26 5:55 UTC (permalink / raw)
To: bug-gnu-emacs
Michael Albinus <michael.albinus@gmx.de> writes:
> Stefan Monnier <monnier@iro.umontreal.ca> 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/
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-26 5:55 ` Thierry Volpiatto
@ 2010-05-26 10:16 ` Michael Albinus
0 siblings, 0 replies; 13+ messages in thread
From: Michael Albinus @ 2010-05-26 10:16 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: 6226-done
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> OTOH adding an alias to su/sudo can solve problem:
>
> alias sudo *sudo -p Password: $*
> alias su LC_ALL=C *su -l
Excellent. Aliases stay persistent, so it is the complete solution. I've
added this to eshell.texi.
Best regards, Michael.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#6226: Please add a customizable option to NOT call tramp for every sudo command
2010-05-26 3:26 ` Michael Albinus
2010-05-26 5:55 ` Thierry Volpiatto
@ 2010-05-26 13:30 ` Stefan Monnier
1 sibling, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2010-05-26 13:30 UTC (permalink / raw)
To: Michael Albinus; +Cc: Juanma Barranquero, 6226
>>> fmakunbound does the job, yes. But i just think providing a defcustom
>>> interface
>> Agreed.
> I don't know, whether another defcustom is needed.
I'm not sure either. But fmakunbound is clearly not good enough since
it can't easily be undone.
> alias sudo *sudo -p Password: $*
> alias su LC_ALL=C *su -l
That's a better solution, yes.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-05-26 13:30 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-20 4:42 bug#6226: Please add a customizable option to NOT call tramp for every sudo command Ken Hori
2010-05-20 6:43 ` Michael Albinus
2010-05-22 3:50 ` Ken Hori
2010-05-22 22:03 ` Michael Albinus
2010-05-23 13:22 ` Stefan Monnier
2010-05-23 17:15 ` Michael Albinus
2010-05-23 18:54 ` Juanma Barranquero
2010-05-24 8:16 ` Ken Hori
2010-05-24 14:05 ` Stefan Monnier
2010-05-26 3:26 ` Michael Albinus
2010-05-26 5:55 ` Thierry Volpiatto
2010-05-26 10:16 ` Michael Albinus
2010-05-26 13:30 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).