all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* saveplace prevent me from quitting if ~/.emacs-places is write-protected
@ 2003-03-04 17:30 matthieu.moy
  2003-03-05 20:47 ` Richard Stallman
  0 siblings, 1 reply; 7+ messages in thread
From: matthieu.moy @ 2003-03-04 17:30 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.2 (sparc-sun-solaris2.5.1, X toolkit)
 of 2002-08-05 on crx968
configured using `configure  --prefix=/var/tmp/bgm'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

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 »

Which  I understand,  but  the problem  is  that it  prevents me  from
quitting !!


Recent input:
y e s <return> C-x C-c y e s <return> n o <return> 
C-x C-f ~ / . e m <tab> . e <tab> <return> C-s . e 
m a c s - p l C-s C-s C-s C-s <up> C-s e m a c s - 
p l C-s C-s C-s <prior> C-x C-f e m <tab> - c u <tab> 
<return> C-s p l a C-s C-s C-s C-s C-s <up> C-s C-s 
<prior> C-x k <return> C-s p l a c s <down> <C-tab> 
<C-tab> <C-tab> <C-tab> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> 
<help-menu> <report-emacs-bug>

Recent messages:
Loading emacsbug...done
byte-code: Quit
(No files need saving)
Saving places to /users/mm43/.emacs-places...
basic-save-buffer-2: Attempt to save to a file which you aren't allowed to write
Note: file is write protected [2 times]
Followed link to /users/mm43/etc/emacs.el
Mark saved where search started [2 times]
Note: file is write protected
Mark saved where search started [2 times]

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

* Re: saveplace prevent me from quitting if ~/.emacs-places is write-protected
       [not found] <mailman.2738.1046800682.21513.bug-gnu-emacs@gnu.org>
@ 2003-03-05 19:04 ` Kevin Rodgers
  0 siblings, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2003-03-05 19:04 UTC (permalink / raw)


matthieu.moy@imag.fr wrote:

> I have  saveplace enabled, and  I launched Emacs from  another account
> than mine, so, no permission on ~/.emacs-place. 


How do you have saveplace enabled?  If it were enabled in your ~/.emacs but not
in the other account's ~/.emacs, then you wouldn't have this problem.


-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

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

* Re: saveplace prevent me from quitting if ~/.emacs-places is write-protected
  2003-03-04 17:30 saveplace prevent me from quitting if ~/.emacs-places is write-protected matthieu.moy
@ 2003-03-05 20:47 ` Richard Stallman
  2003-03-06  2:48   ` Karl Fogel
  0 siblings, 1 reply; 7+ 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] 7+ messages in thread

* Re: saveplace prevent me from quitting if ~/.emacs-places is write-protected
  2003-03-05 20:47 ` 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread

end of thread, other threads:[~2003-03-08 12:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-04 17:30 saveplace prevent me from quitting if ~/.emacs-places is write-protected matthieu.moy
2003-03-05 20:47 ` 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
     [not found] <mailman.2738.1046800682.21513.bug-gnu-emacs@gnu.org>
2003-03-05 19:04 ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.