unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* insertion in read-only buffer
@ 2016-09-27  8:54 Joost Kremers
  0 siblings, 0 replies; only message in thread
From: Joost Kremers @ 2016-09-27  8:54 UTC (permalink / raw)
  To: help-gnu-emacs

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
entered.

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                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-27  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-27  8:54 insertion in read-only buffer Joost Kremers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).