From: Marcin Borkowski <mbork@mbork.pl>
To: 6922@debbugs.gnu.org
Cc: MT <mt_void@warpmail.net>
Subject: bug#6922: 23.1; Setting read-only property in an overlay has no effect
Date: Mon, 18 Jan 2016 22:29:53 +0100 [thread overview]
Message-ID: <87wpr67ezy.fsf@mbork.pl> (raw)
In-Reply-To: <1282834016.22363.1391876553@webmail.messagingengine.com> (MT's message of "Thu, 26 Aug 2010 16:46:56 +0200")
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" <mt_void@warpmail.net> 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 <return>
>
> 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.
next prev parent reply other threads:[~2016-01-18 21:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-26 14:46 bug#6922: 23.1; Setting read-only property in an overlay has no effect MT
2011-12-10 12:09 ` Johan Bockgård
2016-01-18 21:29 ` Marcin Borkowski [this message]
2016-01-20 18:00 ` Eli Zaretskii
2016-01-21 3:02 ` Richard Stallman
2016-01-21 17:33 ` Eli Zaretskii
2016-01-22 3:24 ` Richard Stallman
2016-01-22 7:37 ` Eli Zaretskii
2016-01-22 10:59 ` Lars Magne Ingebrigtsen
2016-01-22 12:58 ` Marcin Borkowski
2016-02-07 22:24 ` John Wiegley
2016-02-07 22:30 ` Marcin Borkowski
2016-02-18 5:12 ` Marcin Borkowski
2016-02-18 16:52 ` Eli Zaretskii
2016-02-18 18:53 ` John Wiegley
2016-02-08 16:04 ` John Wiegley
2016-02-08 17:55 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wpr67ezy.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=6922@debbugs.gnu.org \
--cc=mt_void@warpmail.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).