GNU bug report logs - #75530
[PATCH 0/3] Consistently remap read-only-mode for special edit modes

Previous Next

Package: emacs;

Reported by: Liam Hupfer <liam <at> hpfr.net>

Date: Mon, 13 Jan 2025 00:58:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Liam Hupfer <liam <at> hpfr.net>
Cc: 75530 <at> debbugs.gnu.org, Howard Melman <hmelman <at> gmail.com>
Subject: bug#75530: [PATCH v2 2/3] Remap read-only-mode for Occur modes (bug#75530)
Date: Tue, 04 Feb 2025 09:44:42 +0200
>> The difference is because it’s more useful to type `C-x C-q’ to change
>> read-onlyness of an occur buffer and edit it textually than to do the
>> same in a dired buffer where random edits (other than renaming file
>> names) make less sense.
>
> This is a little confusing to me. ‘read-only-mode’ on its own will make
> the buffer editable, but won’t it leave Occur or Grep’s special bindings
> in place? So you can’t even insert text! Seems to me that
> ‘fundamental-mode’ followed by ‘read-only-mode’ (which would then be
> available on ‘C-x C-q’) would be needed? Or ‘switch-to-buffer’ plus
> ‘insert-buffer’?

One particular use case where it's useful to disable the read-only
status with 'C-x C-q' is to use e.g. 'M-x flush-lines' to further
narrow down the results displayed in the Occur buffer.

> Not to mention Occur uses text properties to make the
> line numbers read-only even when the buffer is writable. Maybe that
> wasn’t the case in 2013.

Indeed, unfortunately this use case was precluded after the change
that added the read-only property on line numbers was made recently
on 2022-01-23 in the commit 1bcbca3750d9e8c47bee7ac893b885ade584d783.
Maybe we need to revert this change and find another solution.




This bug report was last modified 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.