From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "MT" Newsgroups: gmane.emacs.bugs Subject: bug#6922: 23.1; Setting read-only property in an overlay has no effect Date: Thu, 26 Aug 2010 16:46:56 +0200 Message-ID: <1282834016.22363.1391876553@webmail.messagingengine.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1282842180 32733 80.91.229.12 (26 Aug 2010 17:03:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 26 Aug 2010 17:03:00 +0000 (UTC) To: 6922@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 26 19:02:56 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oofqp-0003fV-CV for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Aug 2010 19:02:56 +0200 Original-Received: from localhost ([127.0.0.1]:38270 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oofqo-00064l-In for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Aug 2010 13:02:54 -0400 Original-Received: from [140.186.70.92] (port=55865 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ooe4z-0004sy-Ho for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 11:09:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ooe4y-0005GB-9f for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 11:09:25 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46347) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ooe4y-0005G3-8I for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 11:09:24 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OodnC-0002Zu-6h; Thu, 26 Aug 2010 10:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "MT" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Aug 2010 14:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6922 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.12828342499902 (code B ref -1); Thu, 26 Aug 2010 14:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Aug 2010 14:50:49 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oodmy-0002Zf-RI for submit@debbugs.gnu.org; Thu, 26 Aug 2010 10:50:49 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oodhw-0002XV-1d for submit@debbugs.gnu.org; Thu, 26 Aug 2010 10:45:37 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:34030) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OodjJ-0003Bc-Cv for submit@debbugs.gnu.org; Thu, 26 Aug 2010 10:47:01 -0400 Original-Received: from [140.186.70.92] (port=59394 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OodjH-0000f9-W5 for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 10:47:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OodjG-00010v-K3 for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 10:46:59 -0400 Original-Received: from out1.smtp.messagingengine.com ([66.111.4.25]:49281) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OodjG-00010J-Gl for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 10:46:58 -0400 Original-Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 601CA4CD for ; Thu, 26 Aug 2010 10:46:56 -0400 (EDT) Original-Received: from web3.messagingengine.com ([10.202.2.213]) by compute1.internal (MEProxy); Thu, 26 Aug 2010 10:46:56 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:from:to:mime-version:content-transfer-encoding:content-type:subject:date; s=smtpout; bh=Ne5C6Cu+wNbJunmYNJ1zkw0nZZU=; b=ZzJdQjDV/LluPB0yjtRBjQS3l2aJFw+NALCnZ3j6H6/YOgaKBdgFaMsq2OHm+00YAQQM8Ay32YzvYFapWas6lhR3tNboZcC0prrk0cp+4TmSy4kmiV8tTXCCO79kpJaEcY5VD3regtRW0b3zW406ibqyG/8p2qTKtUVBeoVHZ24= Original-Received: by web3.messagingengine.com (Postfix, from userid 99) id 3E555AA09D8; Thu, 26 Aug 2010 10:46:56 -0400 (EDT) X-Sasl-Enc: HsOzXMTnL2rNAf9Rhs5nbKjGYKJIu13a5AvlVtHs1J4J 1282834016 X-Mailer: MessagingEngine.com Webmail Interface X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Thu, 26 Aug 2010 10:50:48 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 26 Aug 2010 10:51:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Thu, 26 Aug 2010 13:02:45 -0400 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:39770 Archived-At: 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. -- http://www.fastmail.fm - Or how I learned to stop worrying and love email again