From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.bugs Subject: bug#6922: 23.1; Setting read-only property in an overlay has no effect Date: Mon, 18 Jan 2016 22:29:53 +0100 Message-ID: <87wpr67ezy.fsf@mbork.pl> References: <1282834016.22363.1391876553@webmail.messagingengine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453152682 9134 80.91.229.3 (18 Jan 2016 21:31:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jan 2016 21:31:22 +0000 (UTC) Cc: MT To: 6922@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 18 22:31:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aLHOI-0007Cc-Oz for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jan 2016 22:31:11 +0100 Original-Received: from localhost ([::1]:33756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLHOH-0004t3-VR for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jan 2016 16:31:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLHOE-0004su-1u for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2016 16:31:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLHOA-0001PE-06 for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2016 16:31:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLHO9-0001P2-T3 for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2016 16:31:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aLHO9-0001cf-MB for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2016 16:31:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Marcin Borkowski Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jan 2016 21:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6922 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6922-submit@debbugs.gnu.org id=B6922.14531526106153 (code B ref 6922); Mon, 18 Jan 2016 21:31:01 +0000 Original-Received: (at 6922) by debbugs.gnu.org; 18 Jan 2016 21:30:10 +0000 Original-Received: from localhost ([127.0.0.1]:53228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLHNJ-0001b9-Q2 for submit@debbugs.gnu.org; Mon, 18 Jan 2016 16:30:10 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:44131) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLHNH-0001az-Q1 for 6922@debbugs.gnu.org; Mon, 18 Jan 2016 16:30:08 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id CA5718F2023; Mon, 18 Jan 2016 22:30:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 55DAmu-o9Dsu; Mon, 18 Jan 2016 22:29:57 +0100 (CET) Original-Received: from localhost (unknown [109.232.24.28]) by mail.mojserwer.eu (Postfix) with ESMTPSA id E14578F2020; Mon, 18 Jan 2016 22:29:56 +0100 (CET) In-Reply-To: <1282834016.22363.1391876553@webmail.messagingengine.com> (MT's message of "Thu, 26 Aug 2010 16:46:56 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111722 Archived-At: For the record, the problem persists in GNU Emacs 25.1.50.1. Neither seems there to be any change in the manual (as RMS suggested in the discussion at http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01598.html). Regards, Marcin Borkowski On 2010-08-26, at 17:46, "MT" wrote: > If I create an overlay in a buffer and set the 'read-only' property to > t, it seems to make no difference, and I can still make changes to the > text in the region where the overlay is active. Setting other overlay > properties does have an effect. Setting the read-only property as a text > property however works as expected. > > To demonstrate: > 1. Type some text in an empty buffer. > 2. (setq overlay (make-overlay 1 10)) ; Creates an overlay in this > buffer between positions 1-10 named 'overlay' > 3. (overlay-put overlay 'read-only t) ; Applies the read-only property > to this overlay. > 4. Type some characters at the beginning of the buffer. Emacs doesn't > complain that the text is read-only, and text is edited as normal. > > I do this instead: > (put-text-property 1 10 'read-only t) ; Apply the read-only property > as a text property rather than an overlay > Now if I try typing text in the same region as before, Emacs prevents me > from doing so and says 'Text is read-only'. > > > > In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) > of 2010-03-29 on rothera, modified by Debian > Windowing system distributor `The X.Org Foundation', version > 11.0.10706000 > configured using `configure '--build=i486-linux-gnu' > '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' > '--libexecdir=/usr/lib' '--localstatedir=/var/lib' > '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' > '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' > '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' > 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' > 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' > > Important settings: > value of $LC_ALL: nil > value of $LC_COLLATE: nil > value of $LC_CTYPE: nil > value of $LC_MESSAGES: nil > value of $LC_MONETARY: nil > value of $LC_NUMERIC: C > value of $LC_TIME: en_DK.UTF-8 > value of $LANG: en_IN.UTF-8 > value of $XMODIFIERS: nil > locale-coding-system: utf-8-unix > default-enable-multibyte-characters: t > > Major mode: Fundamental > > Minor modes in effect: > tooltip-mode: t > tool-bar-mode: t > mouse-wheel-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > blink-cursor-mode: t > global-auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t > > Recent input: > M-x r e p o r t - e m a c s - b u g > > Recent messages: > Setting up ede... > Loading `eieio': old-style backquotes detected! > Setting up ede...done > Setting up eieio...done > Setting up semantic...done > Setting up speedbar...done > Setting up cedet-contrib...done > Loading /etc/emacs/site-start.d/55ecb.el (source)...done > For information about GNU Emacs and the GNU system, type C-h C-a. > /usr/bin/mail is not an executable. Setting mail-interactive to t.