* Re: saveplace prevent me from quitting if ~/.emacs-places is write-protected [not found] <plfznobujip.fsf@st.com> @ 2003-03-05 20:47 ` Richard Stallman 2003-03-06 2:48 ` Karl Fogel 0 siblings, 1 reply; 5+ messages in thread From: Richard Stallman @ 2003-03-05 20:47 UTC (permalink / raw) Cc: emacs-devel [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 458 bytes --] I have saveplace enabled, and I launched Emacs from another account than mine, so, no permission on ~/.emacs-place. C-x C-c to quit, it asks me if I want to save ~/.emacs-place anyway, because it's write protected. I say no, and get this error message « basic-save-buffer-2: Attempt to save to a file which you aren't allowed to write » Please use M-x toggle-debug-on-error so you can get a backtrace and send it to us. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: saveplace prevent me from quitting if ~/.emacs-places is write-protected 2003-03-05 20:47 ` saveplace prevent me from quitting if ~/.emacs-places is write-protected Richard Stallman @ 2003-03-06 2:48 ` Karl Fogel 2003-03-06 7:14 ` Matthieu Moy 2003-03-07 19:40 ` Richard Stallman 0 siblings, 2 replies; 5+ messages in thread From: Karl Fogel @ 2003-03-06 2:48 UTC (permalink / raw) Cc: emacs-devel Richard Stallman <rms@gnu.org> quotes someone else saying: > I have saveplace enabled, and I launched Emacs from another account > than mine, so, no permission on ~/.emacs-place. Can you say exactly what you did, starting from login? If you are logged in as user foo, then ~/.emacs-place should expand to that file in foo's home directory, and you should have permissions on ~foo/.emacs-place (assuming the file was created in some reasonable manner). Whether the foo account is "your" account or someone else's shouldn't make a difference to the permission system... There may be some crucial bit of your recipe I'm misunderstanding. (Of course, we could just reproduce this by setting .emacs-place unwriteable manually, but it sounds like that's not what you did.) > C-x C-c to quit, it asks me if I want to save ~/.emacs-place anyway, > because it's write protected. I say no, and get this error message > > « basic-save-buffer-2: Attempt to save to a file which you aren't > allowed to write » Richard, et al, Assuming we can reproduce this, what is the right solution? Is there already a policy for how Emacs should behave when there's an error saving a file at exit time, and that file is managed by Emacs (i.e., is not just a regular file visited for editing by the user)? Thanks, -Karl ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: saveplace prevent me from quitting if ~/.emacs-places is write-protected 2003-03-06 2:48 ` Karl Fogel @ 2003-03-06 7:14 ` Matthieu Moy 2003-03-07 19:40 ` Richard Stallman 1 sibling, 0 replies; 5+ messages in thread From: Matthieu Moy @ 2003-03-06 7:14 UTC (permalink / raw) Cc: emacs-devel Karl Fogel <kfogel@floss.red-bean.com> writes: > Richard Stallman <rms@gnu.org> quotes someone else saying: >> I have saveplace enabled, and I launched Emacs from another account >> than mine, so, no permission on ~/.emacs-place. > > Can you say exactly what you did, starting from login? > > If you are logged in as user foo, then ~/.emacs-place should expand to > that file in foo's home directory, and you should have permissions on > ~foo/.emacs-place Oh, sorry for the missunderstanding : I logged in with my own user. Then I did a "su foo" and "set user=foo" (This is on a solaris box, so, by default, "su" keeps most of the configuration of the original user) So, I have the priviledges of the user foo, with the configuration of my own user. You can easyly reproduce it by launching emacs /tmp/foo & [ Modify and save foo ] [ Modify foo again ] su chown root /tmp/foo [ exit Emacs ] > Assuming we can reproduce this, what is the right solution? Is there > already a policy for how Emacs should behave when there's an error > saving a file at exit time, and that file is managed by Emacs (i.e., > is not just a regular file visited for editing by the user)? I think there should be : My configuration was a very particular one, but it's very frustrating to have a running Emacs, and have to use "kill" to exit just because of a problem with this file, and it shouldn't be hard to fix. I didn't look at the source, but this shouldn't be much more than one error catching in the right place. Thanks, -- Matthieu ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: saveplace prevent me from quitting if ~/.emacs-places is write-protected 2003-03-06 2:48 ` Karl Fogel 2003-03-06 7:14 ` Matthieu Moy @ 2003-03-07 19:40 ` Richard Stallman 2003-03-08 12:19 ` Matthieu Moy 1 sibling, 1 reply; 5+ messages in thread From: Richard Stallman @ 2003-03-07 19:40 UTC (permalink / raw) Cc: emacs-devel Richard Stallman <rms@gnu.org> quotes someone else saying: > I have saveplace enabled, and I launched Emacs from another account > than mine, so, no permission on ~/.emacs-place. Can you say exactly what you did, starting from login? I didn't do this myself. I don't know any more. Assuming we can reproduce this, what is the right solution? Is there already a policy for how Emacs should behave when there's an error saving a file at exit time, and that file is managed by Emacs (i.e., is not just a regular file visited for editing by the user)? It may as well ignore the error. I don't see a better alternative. The user wants to exit and should not be impeded. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: saveplace prevent me from quitting if ~/.emacs-places is write-protected 2003-03-07 19:40 ` Richard Stallman @ 2003-03-08 12:19 ` Matthieu Moy 0 siblings, 0 replies; 5+ messages in thread From: Matthieu Moy @ 2003-03-08 12:19 UTC (permalink / raw) Cc: emacs-devel Richard Stallman <rms@gnu.org> writes: > Assuming we can reproduce this, what is the right solution? Is there > already a policy for how Emacs should behave when there's an error > saving a file at exit time, and that file is managed by Emacs (i.e., > is not just a regular file visited for editing by the user)? > > It may as well ignore the error. I don't see a better alternative. > The user wants to exit and should not be impeded. I don't remember if it is possible to catch an (error "...") with something like (condition-case ...), but if it is, then, the best solution would be to catch it, and then ask the user : "Some errors occured during saving. Quit anyway ? (y/n)" A bit like what happens when you refuse to save a buffer. ("Modified buffers exist, exit anyway ?") Note that this would cover any kind of errors during saving. Or we can consider that my configuration is an exotic one and say that the bug is not serious enough ... -- Matthieu ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-03-08 12:19 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <plfznobujip.fsf@st.com> 2003-03-05 20:47 ` saveplace prevent me from quitting if ~/.emacs-places is write-protected Richard Stallman 2003-03-06 2:48 ` Karl Fogel 2003-03-06 7:14 ` Matthieu Moy 2003-03-07 19:40 ` Richard Stallman 2003-03-08 12:19 ` Matthieu Moy
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).