all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: Problem with undo and text properties.
Date: Mon, 13 Apr 2015 17:23:46 -0400	[thread overview]
Message-ID: <jwvpp7768l1.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20150413191040.GA6324@acm.fritz.box> (Alan Mackenzie's message of "Mon, 13 Apr 2015 19:10:40 +0000")

>> The problem is that those entries shouldn't be there in the first place.
>> Whoever puts them there needs a with-silent-modification.

> 1. M-w puts the string-version-of-the-entire-file (including text
> properties) into the kill ring.
> 2. C-y first appends that string to the buffer, ...
> 3. ... then separately removes the yank-excluded-properties from the
> buffer, creating (nil fontified nil 92222. 92237) in buffer-undo-list in
> so doing.

> The part of C-y that does 3 is remove-yank-excluded-properties.

Hmm... I don't quite understand why removing properties would add
entries like (nil fontified nil 92222 . 92237) which state that the
`fonfified' property was changed *from* nil to something else.
Tho I guess maybe removing a nil property still is considered as
"changing" it.

> I think you're suggesting we put a with-silent-modification around the
> critical bits in remove-yank-excluded-properties.  Maybe I'll
> try that.

Hmm... yes, I think with-silent-modification around the last three lines
of remove-yank-excluded-properties would be fine.


        Stefan



      reply	other threads:[~2015-04-13 21:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09 11:10 Problem with undo and text properties Alan Mackenzie
2015-04-09 11:19 ` João Távora
2015-04-09 13:17 ` Stefan Monnier
2015-04-13 19:10   ` Alan Mackenzie
2015-04-13 21:23     ` Stefan Monnier [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpp7768l1.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.