From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#24094: 25.1.50; revert-buffer error in CC mode Date: 29 Jul 2016 17:59:24 -0000 Organization: muc.de e.V. Message-ID: <20160729175924.11811.qmail@mail.muc.de> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1469815240 23129 80.91.229.3 (29 Jul 2016 18:00:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 29 Jul 2016 18:00:40 +0000 (UTC) Cc: 24094@debbugs.gnu.org, 24074@debbugs.gnu.org To: Richard Copley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 29 20:00:25 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 1bTC5A-0008P7-Hg for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jul 2016 20:00:24 +0200 Original-Received: from localhost ([::1]:60892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTC54-0000mG-JM for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Jul 2016 14:00:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTC4u-0000a4-Dr for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2016 14:00:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTC4p-00062X-Tf for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2016 14:00:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTC4p-00062R-R0; Fri, 29 Jul 2016 14:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bTC4p-0000gV-L0; Fri, 29 Jul 2016 14:00:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 29 Jul 2016 18:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24094 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.14698151692525 (code B ref 24094); Fri, 29 Jul 2016 18:00:03 +0000 Original-Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 17:59:29 +0000 Original-Received: from localhost ([127.0.0.1]:50905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTC4G-0000ea-WD for submit@debbugs.gnu.org; Fri, 29 Jul 2016 13:59:29 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:43244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTC4D-0000eH-Uf for 24094@debbugs.gnu.org; Fri, 29 Jul 2016 13:59:26 -0400 Original-Received: (qmail 11812 invoked by uid 3782); 29 Jul 2016 17:59:24 -0000 In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.3-RELEASE-p4 (amd64)) 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" Xref: news.gmane.org gmane.emacs.bugs:121691 Archived-At: Hello, Richard. In article you wrote: > When editing C++ files, if I change visited files outside emacs (for > example, by doing "svn revert -R ."), then visit one of the changed > files and accept the offer to revert the buffer, in some cases there > is an error (see below) and the buffer contents are corrupted (chunks > are missing because the revert operation was interrupted). This looks like the same bug as bug #24074, but you've managed to capture a backtrace, for which many thanks. Could you be a bit more descriptive about the "chunks" that are missing, please? Are we talking about lots of isolated 2-character chunks, or just one or two larger chunks, or what? Are the chunks at the end of a buffer, or in the "middle" of it? > I haven't been able to reduce this to a recipe and I don't know if > the issue is present in the emacs-25 branch and/or in "emacs -Q". Almost certainly, the bug isn't in the emacs-25 branch, because the function c-before-after-change-digit-quote isn't in that branch. > Here is an example backtrace (control characters replaced): > Debugger entered--Lisp error: (error "Invalid search bound (wrong side > of point)") > re-search-forward("[0-9a-fA-F]'[0-9a-fA-F]" 175 t) > c-before-after-change-digit-quote(65 65 1625) > #[(fn) "^H \n^K#\207" [fn beg end old-len] > 4](c-before-after-change-digit-quote) > mapc(#[(fn) "^H \n^K#\207" [fn beg end old-len] 4] > (c-depropertize-new-text c-extend-font-lock-region-for-macros > c-before-after-change-digit-quote c-after-change-re-mark-raw-strings > c-neutralize-syntax-in-and-mark-CPP c-restore-<>-properties > c-change-expand-fl-region)) > c-after-change(65 65 1625) > insert-file-contents("g:/projects/polymorph/working3/src/settings.cpp" > t nil nil t) > revert-buffer-insert-file-contents--default-function("g:/projects/polymorph/working3/src/settings.cpp" > nil) > revert-buffer--default(t t) > revert-buffer(t t) > find-file-noselect("g:/projects/polymorph/working3/src/settings.cpp") > compilation-find-file(# "settings.cpp" nil) > apply(compilation-find-file # > "settings.cpp" nil nil) > compilation-next-error-function(1 nil) > next-error(nil) > funcall-interactively(next-error nil) > call-interactively(next-error nil nil) > command-execute(next-error) > In GNU Emacs 25.1.50.1 (x86_64-w64-mingw32) > of 2016-07-25 built on MACHINE > Repository revision: 6dc6b0079ed3632ed9082bc79d8cb6fc96d33f43 > Windowing system distributor 'Microsoft Corp.', version 10.0.10586 > Recent messages: > Undo! > Saving file g:/projects/polymorph/working3/src/model.cpp... > Wrote g:/projects/polymorph/working3/src/model.cpp > Reverted 'model.cpp' > Undo! > Saving file g:/projects/polymorph/working3/src/model.cpp... > Wrote g:/projects/polymorph/working3/src/model.cpp > Reverted 'model.cpp' > Undo! > Entering debugger... [ .... ] -- Alan Mackenzie (Nuremberg, Germany).