[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

insertion in read-only buffer

From: Joost Kremers
Subject: insertion in read-only buffer
Date: 27 Sep 2016 08:54:12 GMT
User-agent: slrn/1.0.1 (Linux)

Hi all,

I'm wondering if there's a way to specify a position in a read-only
buffer where text can be entered, regardless of the buffer's read-only
status. I know about the variable `inhibit-read-only' and the
`inhibit-read-only' text property, but IIUC these won't allow me to do
what I want, which is to allow the user to freely move around in a
read-only buffer and have particular positions in the buffer (indicated
by specific markup tags, which are part of the file) where text can be

So suppose my buffer contains the following text, with | indicating point:

| Lorem ipsum dolor sit amet, consectetur {++|++} adipiscing elit, sed do
| eiusmod tempor incididunt ut labore et dolore magna aliqua.

then at *this* particular cursor position, I want to be able to enter
text. If I move the cursor anywhere else, the text should be read-only.

The problem with using text properties (or fields, which I also looked
at) is that before text is actually inserted, there is no character to
put a text property on.

I'd be grateful for any suggestions.

Joost Kremers                         
Selbst in die Unterwelt dringt durch Spalten Licht

reply via email to

[Prev in Thread] Current Thread [Next in Thread]