enchive icon indicating copy to clipboard operation
enchive copied to clipboard

Why is inserted Emacs' buffer read-only, and should it be?

Open ilohmar opened this issue 4 years ago • 4 comments

I just tested this with emacs -q: Loading and enabling enchive-mode, then opening an ".enchive" file, the created buffer is read-only.

I am unsure as to whether it should be, but my main issue is: how come? I read quite some docs, did my googling, experimented with enchive-mode-hook and modifying the handler code directly, and I can't seem to figure out when/why the buffer gets buffer-read-only t. Also, I seem to recall that the behavior changed at some point, but unfortunately, I have no idea at what point (new Emacs build, new enchive-mode, or something else).

Any insights appreciated!

ilohmar avatar Jun 20 '20 20:06 ilohmar

I'm unable to reproduce this. Is the .enchive file itself read-only, or not writable by you? It's normal for Emacs to open read-only files in read-only-mode. What version of Emacs are you using, and on what platform?

skeeto avatar Jun 20 '20 22:06 skeeto

GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2020-04-14

The file is 600 (as most of my files). I just repeated the test after a chmod 644, same result.

So sth is weird about my setup.. I will try a fresh emacs build tomorrow!

ilohmar avatar Jun 20 '20 22:06 ilohmar

No change.. open a 644 .enchive file, now from emacs -q of today's master (see below), w/ latest enchive-mode master, no configuration: the buffer is read-only.

This is puzzling, and I have no vaguely related other observations. If you have any more ideas to try, I am all ears.

GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2020-06-21

ilohmar avatar Jun 21 '20 09:06 ilohmar

Edit: I meant (and tested) 666, of course.

ilohmar avatar Jun 21 '20 11:06 ilohmar

I have noticed that the above problem has disappeared at some point during the last 6 months. I would love to explain why, but I have absolutely no clue. So, sorry, but I am just closing this..

ilohmar avatar Jan 24 '23 18:01 ilohmar