From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: insertion in read-only buffer Date: 27 Sep 2016 08:54:12 GMT Message-ID: NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1474966577 21711 195.159.176.226 (27 Sep 2016 08:56:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 27 Sep 2016 08:56:17 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 27 10:56:13 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1booB5-0002uY-L5 for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Sep 2016 10:55:51 +0200 Original-Received: from localhost ([::1]:48867 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1booB4-0001Sr-2j for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Sep 2016 04:55:50 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 32 Original-X-Trace: individual.net IxmFm4BiGkvSk2ffWfxatgvivaUw4AaDKnZoiwPC8NcE/jTf4K Cancel-Lock: sha1:tgBwLlSi7VC74bdagCMHxlnGeRI= Original-Xref: usenet.stanford.edu gnu.emacs.help:218976 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111401 Archived-At: 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)