kate: set buffer read-only

hw hw at adminart.net
Sat May 8 23:10:38 BST 2021

On 5/8/21 11:38 AM, René J.V. Bertin wrote:
> On Friday May 07 2021 14:41:03 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.
> Yeah, you didn't go into Tools/Configure Shortcuts, and you'll find you can add it to the main toolbar of the "KatePartView" via Tools/Configure Toolbars.
> I have another protection against accidental changes: deactivate auto-saving. Any Kate-based editor will show you if your document has been modified, and even without auto-saving there's still some sort of backup that will allow you to restore unsaved changes in case of a crash.
> R

Can that be deactivated per buffer?  Not that I would want to do that; 
autosaving is a good feature, and I don't see how turning it off could 
be useful for protecting buffer contents from being accidentially altered:

How do you suggest that I remember which buffers I want to save and 
which ones not?  I'm setting buffers to read-only so that I do /not/ 
need to remember that.  (The duration of emacs sessions is usually the 
same as the uptime of the machine, and that can be more than a year.)

More information about the kde mailing list