* rmail buffer switches in R/O mode everytime: how to debug ?
@ 2025-02-02 22:40 Xavier Maillard
2025-02-03 12:09 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Xavier Maillard @ 2025-02-02 22:40 UTC (permalink / raw)
To: help-gnu-emacs
Hello,
when I try to quit/save rmail buffers, it keeps telling me that buffer
is read-only.
Thus I have to C-x C-q to switch to R/W.
What could cause this ?
- xavier.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rmail buffer switches in R/O mode everytime: how to debug ?
2025-02-02 22:40 rmail buffer switches in R/O mode everytime: how to debug ? Xavier Maillard
@ 2025-02-03 12:09 ` Eli Zaretskii
2025-02-03 19:50 ` Xavier Maillard
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2025-02-03 12:09 UTC (permalink / raw)
To: help-gnu-emacs
> From: Xavier Maillard <x@maillard.im>
> Date: Sun, 02 Feb 2025 23:40:30 +0100
>
> Hello,
>
> when I try to quit/save rmail buffers, it keeps telling me that buffer
> is read-only.
> Thus I have to C-x C-q to switch to R/W.
Doesn't happen to me.
You don't need to make the buffer writable to be able to save it.
> What could cause this ?
Some customization of yours? Try in "emacs -Q".
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rmail buffer switches in R/O mode everytime: how to debug ?
2025-02-03 12:09 ` Eli Zaretskii
@ 2025-02-03 19:50 ` Xavier Maillard
2025-02-03 20:15 ` Eli Zaretskii
2025-02-04 8:49 ` Alfred M. Szmidt
0 siblings, 2 replies; 9+ messages in thread
From: Xavier Maillard @ 2025-02-03 19:50 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Xavier Maillard <x@maillard.im>
>> Date: Sun, 02 Feb 2025 23:40:30 +0100
>>
>> Hello,
>>
>> when I try to quit/save rmail buffers, it keeps telling me that buffer
>> is read-only.
>> Thus I have to C-x C-q to switch to R/W.
>
> Doesn't happen to me.
Here is the message I get (from *Messages* buffer):
Saving file /Users/x/.local/share/mail/in/inbox.rmail...
run-hook-with-args-until-success: Buffer is read-only: #<buffer inbox.rmail>
> Some customization of yours? Try in "emacs -Q".
I will try.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rmail buffer switches in R/O mode everytime: how to debug ?
2025-02-03 19:50 ` Xavier Maillard
@ 2025-02-03 20:15 ` Eli Zaretskii
2025-02-03 20:24 ` Xavier Maillard
2025-02-04 8:49 ` Alfred M. Szmidt
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2025-02-03 20:15 UTC (permalink / raw)
To: help-gnu-emacs
> From: Xavier Maillard <x@maillard.im>
> Cc: help-gnu-emacs@gnu.org
> Date: Mon, 03 Feb 2025 20:50:19 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Xavier Maillard <x@maillard.im>
> >> Date: Sun, 02 Feb 2025 23:40:30 +0100
> >>
> >> Hello,
> >>
> >> when I try to quit/save rmail buffers, it keeps telling me that buffer
> >> is read-only.
> >> Thus I have to C-x C-q to switch to R/W.
> >
> > Doesn't happen to me.
>
> Here is the message I get (from *Messages* buffer):
>
> Saving file /Users/x/.local/share/mail/in/inbox.rmail...
> run-hook-with-args-until-success: Buffer is read-only: #<buffer inbox.rmail>
So you have some hook that is run as side effect of saving, and that
hook causes the error. Thus, the next question is: what is that hook
and what does it do?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rmail buffer switches in R/O mode everytime: how to debug ?
2025-02-03 20:15 ` Eli Zaretskii
@ 2025-02-03 20:24 ` Xavier Maillard
2025-02-03 20:32 ` Xavier Maillard
0 siblings, 1 reply; 9+ messages in thread
From: Xavier Maillard @ 2025-02-03 20:24 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
This is exactly what I am trying to figure out. My .emacs is quite basic
and there is nothing rmail related doing weird things.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rmail buffer switches in R/O mode everytime: how to debug ?
2025-02-03 20:24 ` Xavier Maillard
@ 2025-02-03 20:32 ` Xavier Maillard
2025-02-04 12:14 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Xavier Maillard @ 2025-02-03 20:32 UTC (permalink / raw)
To: eliz; +Cc: help-gnu-emacs
Fount it !
Culprit seems to be this:
; Clean trailing whitespace before saving:
(add-to-list 'write-file-functions 'delete-trailing-whitespace)
Is this a bug ? (GNU Emacs 31)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rmail buffer switches in R/O mode everytime: how to debug ?
2025-02-03 19:50 ` Xavier Maillard
2025-02-03 20:15 ` Eli Zaretskii
@ 2025-02-04 8:49 ` Alfred M. Szmidt
1 sibling, 0 replies; 9+ messages in thread
From: Alfred M. Szmidt @ 2025-02-04 8:49 UTC (permalink / raw)
To: Xavier Maillard; +Cc: eliz, help-gnu-emacs
>> when I try to quit/save rmail buffers, it keeps telling me that buffer
>> is read-only.
>> Thus I have to C-x C-q to switch to R/W.
>
> Doesn't happen to me.
Here is the message I get (from *Messages* buffer):
Saving file /Users/x/.local/share/mail/in/inbox.rmail...
run-hook-with-args-until-success: Buffer is read-only: #<buffer inbox.rmail>
Double check the permissions on the file, and the directory it is in.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rmail buffer switches in R/O mode everytime: how to debug ?
2025-02-03 20:32 ` Xavier Maillard
@ 2025-02-04 12:14 ` Eli Zaretskii
2025-02-04 18:59 ` Xavier Maillard
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2025-02-04 12:14 UTC (permalink / raw)
To: help-gnu-emacs
> From: Xavier Maillard <x@maillard.im>
> Cc: help-gnu-emacs@gnu.org
> Date: Mon, 03 Feb 2025 21:32:35 +0100
>
>
> Fount it !
>
> Culprit seems to be this:
>
> ; Clean trailing whitespace before saving:
> (add-to-list 'write-file-functions 'delete-trailing-whitespace)
>
> Is this a bug ? (GNU Emacs 31)
I don't think this is a bug: why would you want to delete trailing
space from the inbox file? Its format must be preserved, even if
there are excess spaces there.
So I would be more selective in your hook: invoke
delete-trailing-whitespace only in some buffers, not in Rmail buffer.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: rmail buffer switches in R/O mode everytime: how to debug ?
2025-02-04 12:14 ` Eli Zaretskii
@ 2025-02-04 18:59 ` Xavier Maillard
0 siblings, 0 replies; 9+ messages in thread
From: Xavier Maillard @ 2025-02-04 18:59 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
> So I would be more selective in your hook: invoke
> delete-trailing-whitespace only in some buffers, not in Rmail buffer.
Makes sense. Thank you.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-02-04 18:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-02 22:40 rmail buffer switches in R/O mode everytime: how to debug ? Xavier Maillard
2025-02-03 12:09 ` Eli Zaretskii
2025-02-03 19:50 ` Xavier Maillard
2025-02-03 20:15 ` Eli Zaretskii
2025-02-03 20:24 ` Xavier Maillard
2025-02-03 20:32 ` Xavier Maillard
2025-02-04 12:14 ` Eli Zaretskii
2025-02-04 18:59 ` Xavier Maillard
2025-02-04 8:49 ` Alfred M. Szmidt
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.