kate: set buffer read-only

hw hw at adminart.net
Sat May 8 22:40:33 BST 2021

On 5/7/21 9:54 PM, rhkramer at gmail.com wrote:
> On Friday, May 07, 2021 03:41:03 PM J Leslie Turriff wrote:
>> 	The only thing I can find for this in Kate is Menu => Tools => Read-Only
>> Mode.  There is no command-line switch for this, nor can I find a DCOP
>> function that toggles the setting; so one would have to first open the
>> document, then use the Tools menu to disable writing, which seems quite
>> error-prone. :-(
>> 	It is, of course, possible that I've overlooked something.
> Another option, that might or might not be acceptable, would be to take away
> write permission on the underlying file -- you would still be able to edit the
> buffer, but you would not be able to save those changes.

I'm using this to protect files from being accidentially being edited 
(like when kwin yet again fails to do focus follows mouse and I can't 
figure out what happened after I started typing). Such files usually 
contain some kind of notes, like how to create a selinux module.

So I sometimes do want to edit these files to update them as I keep 
learning.  Having to change the very file permissions for this would 
work, though it would be rather awkward.

More information about the kde mailing list