From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.devel Subject: read-only overlays (was: 23.0.50; delete-seletion-mode and read-only text) Date: Tue, 22 Jan 2008 14:20:35 +0100 Message-ID: References: <4795169E.5060704@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1201008102 16227 80.91.229.12 (22 Jan 2008 13:21:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jan 2008 13:21:42 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 22 14:22:01 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JHJ4e-000159-NG for ged-emacs-devel@m.gmane.org; Tue, 22 Jan 2008 14:21:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JHJ4E-0001BX-PM for ged-emacs-devel@m.gmane.org; Tue, 22 Jan 2008 08:21:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JHJ4A-00019N-NY for emacs-devel@gnu.org; Tue, 22 Jan 2008 08:21:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JHJ49-00015W-0l for emacs-devel@gnu.org; Tue, 22 Jan 2008 08:21:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JHJ48-00015A-Sf for emacs-devel@gnu.org; Tue, 22 Jan 2008 08:21:24 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JHJ48-0005ig-HY for emacs-devel@gnu.org; Tue, 22 Jan 2008 08:21:24 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JHJ3S-0006fy-2h for emacs-devel@gnu.org; Tue, 22 Jan 2008 13:20:42 +0000 Original-Received: from remote1.student.chalmers.se ([129.16.29.79]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jan 2008 13:20:42 +0000 Original-Received: from bojohan+news by remote1.student.chalmers.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jan 2008 13:20:42 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 30 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: remote1.student.chalmers.se Mail-Copies-To: never User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:Mq4aUGMOteFc2ZYLOB6jEd8U/hw= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:87296 Archived-At: martin rudalics writes: > (not (or (get-text-property from 'read-only) > (< (next-single-property-change from 'read-only nil to) to))))) At first I was going to suggest that this should use get-char-property and next-single-char-property-change, to include read-only overlays. But on closer look, it seems that those beasts don't exist. The manual's description of `inhibit-read-only'[1] does say that "Read-only characters in a buffer are those that have non-`nil' `read-only' properties (either text properties or overlay properties)." But (overlay-put o 'read-only t) has no effect. (`read-only' is indeed not listed in "Overlay Properties"[2]. OTOH, of the properties in "Special Properties"[3] that are not listed in "Overlay Properties", `pointer', `field', `line-spacing' and `line-height' all have effect as property of an overlay, but maybe that is just luck. (`syntax-table' and `read-only' don't.)) [1] (info "(elisp) Read Only Buffers") [2] (info "(elisp) Overlay Properties") [3] (info "(elisp) Special Properties") -- Johan Bockgård