From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Problem with undo and text properties. Date: Mon, 13 Apr 2015 17:23:46 -0400 Message-ID: References: <20150409111040.GA3337@acm.fritz.box> <20150413191040.GA6324@acm.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428960255 7385 80.91.229.3 (13 Apr 2015 21:24:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Apr 2015 21:24:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 13 23:24:08 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Yhlpv-0005ZP-Su for ged-emacs-devel@m.gmane.org; Mon, 13 Apr 2015 23:24:08 +0200 Original-Received: from localhost ([::1]:53471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhlpv-0001Ie-45 for ged-emacs-devel@m.gmane.org; Mon, 13 Apr 2015 17:24:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhlph-0001IZ-KC for emacs-devel@gnu.org; Mon, 13 Apr 2015 17:23:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yhlpd-0006F3-JQ for emacs-devel@gnu.org; Mon, 13 Apr 2015 17:23:53 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:54989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yhlpd-0006Eu-Du for emacs-devel@gnu.org; Mon, 13 Apr 2015 17:23:49 -0400 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t3DLNkEG016811; Mon, 13 Apr 2015 17:23:47 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 95FFA1078; Mon, 13 Apr 2015 17:23:46 -0400 (EDT) In-Reply-To: <20150413191040.GA6324@acm.fritz.box> (Alan Mackenzie's message of "Mon, 13 Apr 2015 19:10:40 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5275=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5275> : inlines <2701> : streams <1421974> : uri <1905901> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185386 Archived-At: >> 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