unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Auto-Prompt for Password and Raise Privilegies when needed
@ 2010-05-03 16:50 Nordlöw
  2010-05-03 21:10 ` Andreas Politz
  0 siblings, 1 reply; 8+ messages in thread
From: Nordlöw @ 2010-05-03 16:50 UTC (permalink / raw)
  To: help-gnu-emacs

The Finder in Mac OS X is very much ahead of everything else when it
comes to cleverness in auto-raising the user when needed to reach or
execute resources that require other privilegies than the current.

I tried to teach new Emacs user to remember the tramp-prefix /sudo::
or /su:: but unfortunately many users (ever engineers) are to lazy to
remember these things and in stressed situations they tend to revert
to really cumbersome and error-prone alternatives using copy, edit
elsewhere and copy-back which unfortunately may change permissions and
modes on the file.

Instead I really believe Emacs should use the Mac OS x way of thinking
when opening and modifying files (using find-file and alikes) that are
owned by other users.

When we try to edit a file that is owned by another user but writable
by the current user Emacs (through TRAMP) should ask for the password
of the user owning the file and then reopen the file by adding TRAMP-
sudo/su-prefix to the url.

I strongly believe this should be default behavior in Emacs.

The implement this we need a hook that is called every time the user
tries to change the content of the file. How do define that function?
I grepped for the string

Buffer is read-only

in the emacs cvs sources. This is printed each time we try to modify a
buffer that is read-only. This is an internal string. Do we have to
modify the builtins in this case? Or is there another way of solving
this problem?

Thanks in advance for any comments,
Per Nordlöw


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-05-05 20:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03 16:50 Auto-Prompt for Password and Raise Privilegies when needed Nordlöw
2010-05-03 21:10 ` Andreas Politz
2010-05-04 14:00   ` quodlibetor
2010-05-04 14:17     ` Andreas Politz
2010-05-04 20:11       ` Andreas Politz
2010-05-04 14:56     ` Nordlöw
2010-05-05  4:14     ` Stefan Monnier
2010-05-05 20:25       ` Nordlöw

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).