From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: sudo command with minibuffer password prompt
Date: Thu, 17 Dec 2009 11:44:14 +0100 [thread overview]
Message-ID: <87pr6dvq0x.fsf@lola.goethe.zz> (raw)
In-Reply-To: c56323c2-7de2-4f62-bd0a-f7dca20f41e7@r1g2000vbp.googlegroups.com
Nordlöw <per.nordlow@gmail.com> writes:
> Is it possible to call
> sudo CMD
> from within Emacs and get the password prompt in the minibuffer like
> TRAMP does when we open a file with super user privs?
Something like
(with-temp-buffer
(cd "/sudo::/")
(shell-command "cat /etc/shadow"))
should work.
--
David Kastrup
next prev parent reply other threads:[~2009-12-17 10:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 11:48 sudo command with minibuffer password prompt Nordlöw
2009-12-16 13:04 ` Pascal J. Bourguignon
2009-12-16 13:56 ` Nordlöw
2009-12-16 13:59 ` Nordlöw
2009-12-17 2:39 ` Steve Revilak
2009-12-17 6:22 ` Thierry Volpiatto
2009-12-16 20:37 ` Michael Albinus
2009-12-17 10:44 ` David Kastrup [this message]
[not found] <20091216170829.14846AF606@mxperim7.sea5.speakeasy.net>
[not found] ` <mailman.13084.1261017601.2239.help-gnu-emacs@gnu.org>
2009-12-17 10:03 ` Nordlöw
2009-12-17 21:15 ` Pascal J. Bourguignon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pr6dvq0x.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).