From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: 25.1.50; revert-buffer error in CC mode Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jul 2016 13:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24094 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24094@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.146971385325079 (code B ref -1); Thu, 28 Jul 2016 13:51:01 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jul 2016 13:50:53 +0000 Received: from localhost ([127.0.0.1]:48955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSli8-0006WQ-VB for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:50:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSli7-0006WD-2b for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:50:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSli0-0005L8-Qn for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:50:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSli0-0005KE-MK for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:50:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSlhy-00043Q-60 for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 09:50:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSlhw-0005Iv-Ev for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 09:50:41 -0400 Received: from mail-vk0-x22e.google.com ([2607:f8b0:400c:c05::22e]:34631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSlhw-0005IA-0y for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 09:50:40 -0400 Received: by mail-vk0-x22e.google.com with SMTP id s189so32333707vkh.1 for ; Thu, 28 Jul 2016 06:50:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=hVuLwCh+HsUTC7RjDFiyB4pBUogXoZasb3VLJF3YeYw=; b=KL28FbIO0eKM47LXArfOBA+4gyng0/+mLGnzcN8D/Z40CZRS7ub00mCr+OL48KUm92 Bjq9Lw4BQTZHiwSJgsKK1vzNsYlrVxeapXBYAlvHA1geolEtzRnhbinrMTY8TXCKkOwm 6kyWJqde/0sjkIpT+qC1b30zRI3nfnGW0uhkNxA8illVoZLR/TZqPZPZEomDWO+gChU7 45FDohJuB0ZqS4uozQK7wneR5LeUbMXA3HzBFvtS/1FKxAbAr9ZU0EZpk45iEHIgvfOh VeAokNCy3JCNQ3HUjiI++F25Zn1FefcKamK27FjnlTFOm6MOh3Tw7J9Ytg33kAlrDl4j wHMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hVuLwCh+HsUTC7RjDFiyB4pBUogXoZasb3VLJF3YeYw=; b=EC6zy82oSbzl7KjwwU+uOX3AxH5H19ERHICykaVZRvOf5JsZHRjaS+ojKEJqCfxGXH IgPHFYDzpRxZdnRhK5yq+Lo6dEKZ1CNdVGEdo4Um8SNxzhkvusOuURVJewfLouV2y9Nw PIx4M8Pm6ANE6ltmg6ZV7ehU0LBfLw7mJMDaPtmMyFC7r1ufPhbj60xlvmN6nylKZu3o ZvLzWfRPiJC/ZIC23nPMyeMiMgAmLYKzw2Nv7Xi1RmfaTaGgmfCVP0BYUgTKknK1SPg4 gYkn6vyiKkqqjrZg+2YfvOJhWC2/Ti3YJ9kusFxXcd0ASRD68G5mc7Ba7yrQxacwfnCI 1u+w== X-Gm-Message-State: AEkoouvUwlObnvKqfnSzNSp1t/mrR5LdOJRUs0sXecBD9XVaxQ/qJboSJN5I8k+7I9BwogawWQUzN4B3ECIpdA== X-Received: by 10.31.220.66 with SMTP id t63mr15159682vkg.113.1469713838866; Thu, 28 Jul 2016 06:50:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.41 with HTTP; Thu, 28 Jul 2016 06:50:09 -0700 (PDT) From: Richard Copley Date: Thu, 28 Jul 2016 14:50:09 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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). 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". 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... Configured using: 'configure --prefix /C/emacs/emacs-20160725-215227 --with-modules --without-imagemagick --disable-dependency-tracking --enable-locallisppath=%emacs_dir%/../site-lisp CFLAGS=-O3 CPPFLAGS=-D_WIN32_WINNT=_WIN32_WINNT_WIN7' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES Important settings: value of $LANG: ENG locale-coding-system: cp1252 Major mode: Debugger Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t global-hi-lock-mode: t hi-lock-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail debug cus-start cus-load log-edit message subr-x puny format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log smerge-mode hippie-exp cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl hl-line ffap vc-cvs vc-rcs dired dired-loaddefs view diff-mode misearch multi-isearch jka-compr shell pcomplete vc-svn perl-mode ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff hi-lock grep compile comint ansi-color ring paren server pascal opascal finder-inf tex-site info package epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib advice time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify dbusbind w32 multi-tty make-network-process emacs) Memory information: ((conses 16 309928 44864) (symbols 56 34963 0) (miscs 48 368 1555) (strings 32 62494 6202) (string-bytes 1 2004295) (vectors 16 28361) (vector-slots 8 650573 30264) (floats 8 270 254) (intervals 56 12859 249) (buffers 976 83)) From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: Acknowledgement (25.1.50; revert-buffer error in CC mode) Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Jul 2016 13:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24094 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24094@debbugs.gnu.org, GNU bug tracker automated control server Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.146971410525656 (code B ref 24094); Thu, 28 Jul 2016 13:56:02 +0000 Received: (at 24094) by debbugs.gnu.org; 28 Jul 2016 13:55:05 +0000 Received: from localhost ([127.0.0.1]:49092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSlmC-0006fZ-RN for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:55:04 -0400 Received: from mail-vk0-f46.google.com ([209.85.213.46]:33076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSlmA-0006cq-PE; Thu, 28 Jul 2016 09:55:03 -0400 Received: by mail-vk0-f46.google.com with SMTP id x130so32457561vkc.0; Thu, 28 Jul 2016 06:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=65IyP0UQr0eGuBGr4fFQ0Z31hMWuuOq2ywWPm4r0PIE=; b=lFc/NUNikaWMpEkMWNnBpklTqzUo3ExemST8JX43PnDiqkUTCo9xaGxuoeJSM3kPpj fChApBcQRwrJ+CEAoBOx1m0+uYIXH8v8kHHYzIbF14u5fskrQEv9XIxE40BqQioyDKwn 7SbtOOfR00xTzuIDD8ngPACkv9NGy2sbYE/fu06y2t7cHu6Xob85wDY5NBdL/msWB3cE 9whsMOPUAz9WMwiv21XiAvjXJmmDfyZO1xMEUjdWDCLzF1fqx14/222C9Y7l1sALLRmz KnplkxhDTFhR8ZtA9l3YqYc+K4dGU6TJzEGa+drlBGklbkR7XjOhTrvRRxEG2ZogZyZp UCVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=65IyP0UQr0eGuBGr4fFQ0Z31hMWuuOq2ywWPm4r0PIE=; b=Gc9adVXMRZ0etUc9jO1Yf9qzoTqGT3TsM+byfUqK7u02HwfZIKIc34O7028KVJaWGg nNnEyI7fST0ILiGucZw0ESuWQJH43ARBgNUpYim7U+Tsjw07zh4/AY2KxWA2/0mco/Wk sdZzyd2r7pE0hRoZmfCmAH0tFzuuy3pGZUl+Q8ZJAR0pnOaRfUWz5s50VmMA4+hzDVts 4h49MXm8wQAZbzfVQGbsrE2ARKuZS2dhEoWXZZx2HVUGVBsWR62JB1xXnrtrlo5tVXfZ mcO4inUjjx2omsyYo9JFZCiBaJHEMIVcU/Me8LRjlb4BJ0F1jhL5SC02Mhdtuica2Pto xWyg== X-Gm-Message-State: AEkoousYUA/76BB81UT9m2OLjbT5pJgqDYNiYlqtsFg4DwmrpDeRsPYVaHflVGL0VnCQeMcUUWyq6VXye+BoqQ== X-Received: by 10.31.162.4 with SMTP id l4mr9953418vke.136.1469714097137; Thu, 28 Jul 2016 06:54:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.41 with HTTP; Thu, 28 Jul 2016 06:54:27 -0700 (PDT) In-Reply-To: References: From: Richard Copley Date: Thu, 28 Jul 2016 14:54:27 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) forcemerge 24094 24074 thanks Apologies for the noise. This is the same as bug #24074. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 28 10:00:20 2016 Received: (at control) by debbugs.gnu.org; 28 Jul 2016 14:00:21 +0000 Received: from localhost ([127.0.0.1]:49349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSlrI-0007At-P4 for submit@debbugs.gnu.org; Thu, 28 Jul 2016 10:00:20 -0400 Received: from mail-vk0-f44.google.com ([209.85.213.44]:33864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSlrH-00074p-TY; Thu, 28 Jul 2016 10:00:20 -0400 Received: by mail-vk0-f44.google.com with SMTP id s189so32539847vkh.1; Thu, 28 Jul 2016 07:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HifLw9Fjw5g353KLMof1qv9UTZ5Xq5z7piQuOzFw3tM=; b=ZDoUczCa+uJxZ2vydBa/I07UYZ9fum6xb/rGwEE9z5CJ597gcr+GtVaQbsPGAm/TOt J4I0LOIQ7TbOUossKVhum2//ugNJAlNSrzuPHtYSuyciDOpOH7l4H6xNl1MhQJUMtVyE L37g73ytT4ldUpLa1amqFwGav2KoSQdAXD8QwEY/rx5ROZeg9TgPQZ0cXzPHVyO1DqcT m+RsHBqyP/K6pv4y3hbTi+Qbga2xMCElSEudGJcICDabDFOWXuGQPUXhFFYJngq8ss5t +ciFYwT4wsBGYRquc4sirSZXBjhXZU6ikkJB3y50gc+4otn+J6dkKMpeZDcQPk9eKOBS vlbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HifLw9Fjw5g353KLMof1qv9UTZ5Xq5z7piQuOzFw3tM=; b=U6XQgtEhMIQOkqh/I5SQHUm6AKN/jbllT3/d97p120yFiXv54CQEkZZtTxnkdQdUbn +DdJP3WCOjCLchZ/dy8MdGqsgE0EUH1capraES85gPAPjR0JthF1KpWYnNPrMM2Xzo6D /okuE6ITZqVx8nbAx/wBa0VtNU1BSRsDlzbtUGrSwMp3ggBFCB5QgHLfy9y0q0/+C7F6 dPzG42VU3cMfUV/o1rqZLuvZFqsC5LBgyWzafnMm1iZbWMJqP/MPeww1SAnPnAdvKvGS fN6hQye8A6OXw7A6aR3rgEvxtgBc8Dg9nZQY890yjRpn/INn/riL/2MoWYgOWOqMZ0rs pbZg== X-Gm-Message-State: AEkooutdX5BE7XfXIPgUvCYiU9+oW56PwEzXaBqVY18PDll/gLRXosd509aDiNjHg1BYAugqa31aYWucapSCSw== X-Received: by 10.31.214.66 with SMTP id n63mr15153437vkg.95.1469714414280; Thu, 28 Jul 2016 07:00:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.41 with HTTP; Thu, 28 Jul 2016 06:59:44 -0700 (PDT) In-Reply-To: References: From: Richard Copley Date: Thu, 28 Jul 2016 14:59:44 +0100 Message-ID: Subject: Re: Processed (with 1 errors): Re: bug#24094: Acknowledgement (25.1.50; revert-buffer error in CC mode) To: GNU bug tracker automated control server Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control Cc: tracker@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) reassign 24094 emacs, cc-mode forcemerge 24094 24074 quit From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: 25.1.50; revert-buffer error in CC mode References: 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: To: Richard Copley Cc: 24094@debbugs.gnu.org, 24074@debbugs.gnu.org Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.14698151692525 (code B ref 24094); Fri, 29 Jul 2016 18:00:03 +0000 Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 17:59:29 +0000 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 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 Received: (qmail 11812 invoked by uid 3782); 29 Jul 2016 17:59:24 -0000 Date: 29 Jul 2016 17:59:24 -0000 Message-ID: <20160729175924.11811.qmail@mail.muc.de> From: Alan Mackenzie Organization: muc.de e.V. In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.3.1-20141224 ("Tallant") (UNIX) (FreeBSD/10.3-RELEASE-p4 (amd64)) X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) 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). From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: 25.1.50; revert-buffer error in CC mode Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 29 Jul 2016 18:18:02 +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: To: Alan Mackenzie Cc: 24094@debbugs.gnu.org, 24074@debbugs.gnu.org Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.14698162484269 (code B ref 24094); Fri, 29 Jul 2016 18:18:02 +0000 Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 18:17:28 +0000 Received: from localhost ([127.0.0.1]:50930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTCLf-00016m-HY for submit@debbugs.gnu.org; Fri, 29 Jul 2016 14:17:27 -0400 Received: from mail-ua0-f170.google.com ([209.85.217.170]:36584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTCLd-00016T-CE; Fri, 29 Jul 2016 14:17:25 -0400 Received: by mail-ua0-f170.google.com with SMTP id j59so67372671uaj.3; Fri, 29 Jul 2016 11:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BemMDKUG6UYAbvkR5QkHZZM5FUKyViXJXxfcSyk61f8=; b=GiRko4/XOj+LblRNn+yeagMVYmDQNlWZ2uGnoSoslHz/oOSqVCMNEo9dE1iaD/tBkm skofW81kDYiDAUZrFE7IUGcC7BfxLGNrKw/tFCyxQG+qnz6XQ/bR8ZHr71Opmw65Eo2x bB7wLfz1clwuCYwzfkpgsjq+/D2dgHlxT4zq/+hUv9s31wF7o/uPoIkkL/26Cu8j3xZN wW1ReD4NAUmCs/QCHWjxMnCpZkscv64HHaS5WL8Ck9rb31t201+d1a/dgftUd5cLqHs6 PAU5mnTT6yC4KSHgqBuFVMcg04GwoiRA1ASDPGkKRiaeYiybs/6VBoG5ZmvAyAUEZ3NQ BB7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BemMDKUG6UYAbvkR5QkHZZM5FUKyViXJXxfcSyk61f8=; b=gHKaCHPAQ7GPWaeviT8KOqpQzwykHaW3J9E2vxViUVliGRQSh6Q1jl30Z5eOt2QbGr rbpKTYpJDfOhw9ZETRMVXCoe/YbSsiwR87+f5nedc5SKwTA1f0fjCZirMdf0ezXiB95G wD4I9B8J97t2O/yf2j7rbAr3UA3cOYEaw71Yrv8gi7DHATU2GBfH0FW6z3tvIG2JWtFF PXlB8I+5VZhecywa4arOnPkFImrMKtBoXyGBrvJ5uQBZodxnz82rn0cjBj80Q/yVWMRC 40Bxz58Q+xwADqdFRcD85KzI/lBv4Xm90f/399jE5VgDVqSLbHyc8e79FiapsxgMnC/6 KMpQ== X-Gm-Message-State: AEkooutXS4/yHkhYyyZxRh5+Hh1mPiB/iBCx3czW/ELm9kSF38/h5gnL1Qoa8mkRWbfPg7f5Z9wHRPVZH7cC+g== X-Received: by 10.159.54.202 with SMTP id p68mr16659169uap.59.1469816239711; Fri, 29 Jul 2016 11:17:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.41 with HTTP; Fri, 29 Jul 2016 11:16:50 -0700 (PDT) In-Reply-To: <20160729175924.11811.qmail@mail.muc.de> References: <20160729175924.11811.qmail@mail.muc.de> From: Richard Copley Date: Fri, 29 Jul 2016 19:16:50 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 29 July 2016 at 18:59, Alan Mackenzie wrote: > Hello, Richard. Hi! > 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. Yes, I think it is likely the same bug (if I'd noticed #24074 sooner, I would have sent the backtrace there). Happy to help. > 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? It's hard to describe precisely (especially as I don't have a corrupted buffer here and now), but being guided by your question, we're talking about one or two larger chunks and not at the end of the buffer but in the "middle". My impression FWIW is that it is *as if* Emacs has done "diff-buffer-with-file" and is attempting to apply the resulting patch to the buffer (perhaps with the laudable intention of saving space in the undo buffer), and has failed after a deletion and before an insertion. But that is uninformed speculation. >> 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. That's useful to know. Thanks Alan. From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: 25.1.50; revert-buffer error in CC mode Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 29 Jul 2016 18:31:02 +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: To: Alan Mackenzie Cc: Richard Copley , 24094@debbugs.gnu.org, 24074@debbugs.gnu.org Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.14698170035460 (code B ref 24094); Fri, 29 Jul 2016 18:31:02 +0000 Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 18:30:03 +0000 Received: from localhost ([127.0.0.1]:50940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTCXr-0001Pu-C6 for submit@debbugs.gnu.org; Fri, 29 Jul 2016 14:30:03 -0400 Received: from relaycp02.dominioabsoluto.net ([217.116.26.74]:43403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTCXn-0001Or-9R; Fri, 29 Jul 2016 14:30:01 -0400 Received: from smtp.movistar.es (smtp09.acens.net [86.109.99.133]) by relaycp02.dominioabsoluto.net (Postfix) with ESMTP id AB81CD232E; Fri, 29 Jul 2016 20:29:57 +0200 (CEST) X-Junkmail-Premium-Raw: score=8/50, refid=2.7.2:2016.7.29.130618:17:8.317, ip=, rules=__HAS_FROM, __FRAUD_WEBMAIL_FROM, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __HAS_CC_HDR, __MULTIPLE_RCPTS_CC_X2, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __REFERENCES, __IN_REP_TO, __HAS_MSGID, __SANE_MSGID, __USER_AGENT, __MIME_VERSION, __CT, __CT_TEXT_PLAIN, __UNUSABLE_MSGID, __ANY_URI, __URI_NO_WWW, __SUBJ_ALPHA_NEGATE, __FORWARDED_MSG, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1000_1099, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, __FRAUD_WEBMAIL, MULTIPLE_RCPTS, __PHISH_SPEAR_STRUCTURE_1, BODY_SIZE_2000_LESS, IN_REP_TO, REFERENCES, BODY_SIZE_7000_LESS, NO_URI_HTTPS, MSG_THREAD, __TO_REAL_NAMES, __CC_REAL_NAMES, LEGITIMATE_SIGNS, LEGITIMATE_NEGATE Received: from qcore (83.58.75.30) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 579A2B0C0012C7B3; Fri, 29 Jul 2016 18:29:51 +0000 From: =?UTF-8?Q?=C3=93scar?= Fuentes References: <20160729175924.11811.qmail@mail.muc.de> Date: Fri, 29 Jul 2016 20:29:49 +0200 In-Reply-To: <20160729175924.11811.qmail@mail.muc.de> (Alan Mackenzie's message of "29 Jul 2016 17:59:24 -0000") Message-ID: <87r3ac2t7m.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Alan Mackenzie writes: > 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? It just happened again here. The missing chunk is everything below the first 9 lines (the file has ~400 lines). Those preserved lines are simply #include's. The final preserved line was truncated to #include < The original was #include Prior the revert, the point was much below that 9nth line. The reported failure is not always the same. In this case was: c-determine-+ve-limit: Args out of range: #, -7246, -6746 Or course, now that I'm trying to cause the error for obtaining an stack trace, it doesn't happen :-( As mentioned on my bug report, it seems that the problem is triggered when the point falls on certain places on the reverted file's contents, but that's just my guess. From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: 25.1.50; revert-buffer error in CC mode Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 29 Jul 2016 18:43:02 +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: To: =?UTF-8?Q?=C3=93scar?= Fuentes Cc: Alan Mackenzie , 24094@debbugs.gnu.org, 24074@debbugs.gnu.org Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.14698177386593 (code B ref 24094); Fri, 29 Jul 2016 18:43:02 +0000 Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 18:42:18 +0000 Received: from localhost ([127.0.0.1]:50945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTCji-0001iF-I8 for submit@debbugs.gnu.org; Fri, 29 Jul 2016 14:42:18 -0400 Received: from mail-vk0-f52.google.com ([209.85.213.52]:33947) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTCje-0001hv-6x; Fri, 29 Jul 2016 14:42:17 -0400 Received: by mail-vk0-f52.google.com with SMTP id s189so60442303vkh.1; Fri, 29 Jul 2016 11:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=8E075ndsi2xX8emFfOXGAQu5n3Pnv/6CwdxONngaD+Q=; b=pR5HDbmr2RsDB8bW8kZ+IKQDS/0lbS57nYt4cjH8wB5AJuxOAaST32DqniSX/safsc dxBQEF6neyZOVS8XKaJxZLBYTaoHe8S4hHGtJjtmFdFzkQ1xGeMN8RiCxcBjwPNsaiMJ j92IPB4LTF/qJ/Oy4kprYBjkjkmnCxXRXvUr/2eBJRu7nEtf6eLSeGCFirqKTaxUad9e c50fyK05qaetucvnkrBfQIlhSYAFqajC49NPnmbFYeB/7IzdXXCjZRcFR/V7DFq8VgFs mrg7OuOr+6ni7GQrai7uujzNybAOdVnvzgQ2nHrtuRW3DICwrmvYrFOsavcAqpNyThFy ibiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8E075ndsi2xX8emFfOXGAQu5n3Pnv/6CwdxONngaD+Q=; b=m/kK05yxpZpOjfzlFfjdyCQ+s1geTVP+z6hcZ/1tJee13kUiz5ucpdjvGrfa9iLurK GUHCx8YsSfCFcJmAZ+Uc3v9r3IVTOgJZOVRIehWb6S/eMhft2eJeaEe3dBuOhT107ff/ 4O2FTrPvJoLzxeqcHSVEWzZAcaYWU+Mp0D1ny7sDw4ioOJ2tO8nj0FQIzG8pAXKA0Ny+ 2aLpzVv3EutqQ1Ux1vAFGpvmT5acpbjiik2GsrZQdOLBSlpH+197/K6O/IQmhvq680b4 plOPSAA5ZCm1+UfmP2yqtcw0x6WG3SQ6kbd5spWf+gyDQ/7wuzKSF5kg0lifJrDeE/ld aGng== X-Gm-Message-State: AEkoouux5/Kbqo9k6m2mPDCMG/zFlSmrFxOFp3voDImY34uqL14t/KCEhG0arNoMx/jL7vRbs7G5xyZ1VfQ/bg== X-Received: by 10.31.115.140 with SMTP id o134mr19970457vkc.0.1469817728719; Fri, 29 Jul 2016 11:42:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.41 with HTTP; Fri, 29 Jul 2016 11:41:39 -0700 (PDT) In-Reply-To: <87r3ac2t7m.fsf@wanadoo.es> References: <20160729175924.11811.qmail@mail.muc.de> <87r3ac2t7m.fsf@wanadoo.es> From: Richard Copley Date: Fri, 29 Jul 2016 19:41:39 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 29 July 2016 at 19:29, =C3=93scar Fuentes wrote: > Alan Mackenzie writes: > >> 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? > > It just happened again here. The missing chunk is everything below the > first 9 lines (the file has ~400 lines). Those preserved lines are > simply #include's. The final preserved line was truncated to > > #include < > > The original was > > #include > > Prior the revert, the point was much below that 9nth line. > > The reported failure is not always the same. In this case was: > > c-determine-+ve-limit: Args out of range: #, -7246, -6= 746 > > > Or course, now that I'm trying to cause the error for obtaining an stack > trace, it doesn't happen :-( As mentioned on my bug report, it seems > that the problem is triggered when the point falls on certain places > on the reverted file's contents, but that's just my guess. Here is a recipe. Prepare a file "test0.cpp" as follows: (< Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 29 Jul 2016 18:45:02 +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: To: Richard Copley Cc: Alan Mackenzie , 24094@debbugs.gnu.org, 24074@debbugs.gnu.org Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.14698178796882 (code B ref 24094); Fri, 29 Jul 2016 18:45:02 +0000 Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 18:44:39 +0000 Received: from localhost ([127.0.0.1]:50954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTCls-0001mk-Nt for submit@debbugs.gnu.org; Fri, 29 Jul 2016 14:44:39 -0400 Received: from relaycp01.dominioabsoluto.net ([217.116.26.68]:41668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTCla-0001jw-KW; Fri, 29 Jul 2016 14:44:24 -0400 Received: from smtp.movistar.es (smtp09.acens.net [86.109.99.133]) by relaycp01.dominioabsoluto.net (Postfix) with ESMTP id 7D9A642E3; Fri, 29 Jul 2016 20:43:04 +0200 (CEST) X-Junkmail-Premium-Raw: score=8/50, refid=2.7.2:2016.7.29.130618:17:8.317, ip=, rules=__HAS_FROM, __FRAUD_WEBMAIL_FROM, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __HAS_CC_HDR, __MULTIPLE_RCPTS_CC_X2, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __REFERENCES, __IN_REP_TO, __HAS_MSGID, __SANE_MSGID, __USER_AGENT, __MIME_VERSION, __CT, __CT_TEXT_PLAIN, __UNUSABLE_MSGID, __ANY_URI, __FRAUD_BODY_WEBMAIL, __URI_NO_WWW, __SUBJ_ALPHA_NEGATE, __FORWARDED_MSG, BODY_SIZE_1500_1599, BODYTEXTP_SIZE_3000_LESS, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, __FRAUD_WEBMAIL, MULTIPLE_RCPTS, __PHISH_SPEAR_STRUCTURE_1, BODY_SIZE_2000_LESS, IN_REP_TO, REFERENCES, BODY_SIZE_7000_LESS, NO_URI_HTTPS, MSG_THREAD, __TO_REAL_NAMES, __CC_REAL_NAMES, LEGITIMATE_SIGNS, LEGITIMATE_NEGATE Received: from qcore (83.58.75.30) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 579A2B0C0012FB8B; Fri, 29 Jul 2016 18:43:04 +0000 From: =?UTF-8?Q?=C3=93scar?= Fuentes References: <20160729175924.11811.qmail@mail.muc.de> Date: Fri, 29 Jul 2016 20:43:03 +0200 In-Reply-To: (Richard Copley's message of "Fri, 29 Jul 2016 19:16:50 +0100") Message-ID: <87mvl02slk.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Richard Copley writes: > It's hard to describe precisely (especially as I don't have a > corrupted buffer here and now), but being guided by your question, > we're talking about one or two larger chunks and not at the end of the > buffer but in the "middle". Yes, sometimes the missing chunk(s) are in the middle of the file. AFAIR they are always quite large. I can't confirm the case of more than one chunk, though. Appreciating the damage is complicated by the fact that it not evident what's missing at first sight: in the case I describe on my previous email, when the error happened and swtiched to the affected buffer it only displayed one line (the first one); then, pressed cursor-down and the other eight lines appeared from nowhere. > My impression FWIW is that it is *as if* Emacs has done > "diff-buffer-with-file" and is attempting to apply the resulting patch > to the buffer (perhaps with the laudable intention of saving space in > the undo buffer), and has failed after a deletion and before an > insertion. But that is uninformed speculation. I suspected some undo-related problem when I experienced the problem some weeks ago. Then, disabled undo before the revert on my Magit code: - (revert-buffer t t) + (progn + (setq buffer-undo-list t) + (revert-buffer t t) to no avail. It looks more like a cache issue to me now: c-mode is using some stale info computed before the revert. From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: 25.1.50; revert-buffer error in CC mode Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 29 Jul 2016 19:02:02 +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: To: Richard Copley Cc: Alan Mackenzie , 24094@debbugs.gnu.org, 24074@debbugs.gnu.org Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.14698189028501 (code B ref 24094); Fri, 29 Jul 2016 19:02:02 +0000 Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 19:01:42 +0000 Received: from localhost ([127.0.0.1]:50972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTD2U-0002Cy-FI for submit@debbugs.gnu.org; Fri, 29 Jul 2016 15:01:42 -0400 Received: from relaycp01.dominioabsoluto.net ([217.116.26.68]:42633) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTD2T-0002Ch-7X; Fri, 29 Jul 2016 15:01:41 -0400 Received: from smtp.movistar.es (smtp10.acens.net [86.109.99.134]) by relaycp01.dominioabsoluto.net (Postfix) with ESMTP id 886E342A0; Fri, 29 Jul 2016 21:01:35 +0200 (CEST) X-Junkmail-Premium-Raw: score=8/50, refid=2.7.2:2016.7.29.130618:17:8.317, ip=, rules=__HAS_FROM, __FRAUD_WEBMAIL_FROM, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __HAS_CC_HDR, __MULTIPLE_RCPTS_CC_X2, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __REFERENCES, __IN_REP_TO, __HAS_MSGID, __SANE_MSGID, __USER_AGENT, __MIME_VERSION, __CT, __CT_TEXT_PLAIN, __UNUSABLE_MSGID, __ANY_URI, __FRAUD_BODY_WEBMAIL, __URI_NO_WWW, __SUBJ_ALPHA_NEGATE, __FORWARDED_MSG, BODY_SIZE_700_799, BODYTEXTP_SIZE_3000_LESS, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, __FRAUD_WEBMAIL, MULTIPLE_RCPTS, __PHISH_SPEAR_STRUCTURE_1, BODY_SIZE_1000_LESS, BODY_SIZE_2000_LESS, IN_REP_TO, REFERENCES, BODY_SIZE_7000_LESS, NO_URI_HTTPS, MSG_THREAD, __TO_REAL_NAMES, __CC_REAL_NAMES, LEGITIMATE_SIGNS, LEGITIMATE_NEGATE Received: from qcore (83.58.75.30) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 5746394E0336C775; Fri, 29 Jul 2016 19:01:36 +0000 From: =?UTF-8?Q?=C3=93scar?= Fuentes References: <20160729175924.11811.qmail@mail.muc.de> <87r3ac2t7m.fsf@wanadoo.es> Date: Fri, 29 Jul 2016 21:01:34 +0200 In-Reply-To: (Richard Copley's message of "Fri, 29 Jul 2016 19:41:39 +0100") Message-ID: <87fuqs2rqp.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Richard Copley writes: > Here is a recipe. > > Prepare a file "test0.cpp" as follows: (< int main () { > int a = 0; > int b = 1; > int c = 2; > int d = 3; > } > END > > In a shell: cp test0.cpp test.cpp > In Emacs: visit test.cpp, transpose "line b" and "line c", save the > buffer, and put point between the transposed lines (i.e., at the > beginning of "line b"). > In the shell: cp test0.cpp test.cpp > In Emacs: revisit test.cpp (C-x f M-n RET). Great! I can reproduce here with `emacs -Q'. It is important to note that the `transpose' step above means `M-x transpose-lines' (or its corresponding shorcut). Transposing with C-k C-y invalidates the recipe. From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: 25.1.50; revert-buffer error in CC mode 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 21:20:02 +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: To: Richard Copley Cc: =?UTF-8?Q?=C3=93scar?= Fuentes , 24094@debbugs.gnu.org, 24074@debbugs.gnu.org Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.146982714921651 (code B ref 24094); Fri, 29 Jul 2016 21:20:02 +0000 Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 21:19:09 +0000 Received: from localhost ([127.0.0.1]:50982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTFBV-0005d5-3q for submit@debbugs.gnu.org; Fri, 29 Jul 2016 17:19:09 -0400 Received: from mail.muc.de ([193.149.48.3]:43895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTFBS-0005cm-Sn for 24094@debbugs.gnu.org; Fri, 29 Jul 2016 17:19:07 -0400 Received: (qmail 59371 invoked by uid 3782); 29 Jul 2016 21:19:05 -0000 Received: from acm.muc.de (p548C6EF4.dip0.t-ipconnect.de [84.140.110.244]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 29 Jul 2016 23:19:02 +0200 Received: (qmail 5154 invoked by uid 1000); 29 Jul 2016 21:18:24 -0000 Date: Fri, 29 Jul 2016 21:18:24 +0000 Message-ID: <20160729211824.GB3300@acm.fritz.box> References: <20160729175924.11811.qmail@mail.muc.de> <87r3ac2t7m.fsf@wanadoo.es> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) Hello, Richard and Óscar. I've cracked it! On Fri, Jul 29, 2016 at 07:41:39PM +0100, Richard Copley wrote: > Here is a recipe. > Prepare a file "test0.cpp" as follows: (< int main () { > int a = 0; > int b = 1; > int c = 2; > int d = 3; > } > END > In a shell: cp test0.cpp test.cpp > In Emacs: visit test.cpp, transpose "line b" and "line c", save the > buffer, and put point between the transposed lines (i.e., at the > beginning of "line b"). > In the shell: cp test0.cpp test.cpp > In Emacs: revisit test.cpp (C-x C-f M-n RET). > I hope that helps. Very much indeed. What is happening in that sequence is that the C-x C-f calls the hook after-change-functions without having first called before-change-functions. This screws up CC Mode. The function doing this, insert-file-contents, is called as follows: (insert-file-contents "test.cpp" t nil nil t) | | | | | | | replace | | end | beg visit The section of Finsert_file_contents which calls before-change-functions (through prepare_to_modify_buffer) looks like this: if (NILP (visit) && total > 0) { if (!NILP (BVAR (current_buffer, file_truename)) /* Make binding buffer-file-name to nil effective. */ && !NILP (BVAR (current_buffer, filename)) && SAVE_MODIFF >= MODIFF) we_locked_file = true; prepare_to_modify_buffer (PT, PT, NULL); <====================== } The brace block will not be executed since `visit' is t. The section of code which calls after-change-functions looks like this: if (inserted > 0 && total > 0 && (NILP (visit) || !NILP (replace))) { signal_after_change (PT, 0, inserted); <===================== update_compositions (PT, PT, CHECK_BORDER); } The brace block here _will_ get called, since `replace' is non-nil. There are thus two different, conflicting, conditions governing whether to call the change hooks. At a guess, the `if' condition around the after-change-functions call was modified at some stage, without the same change being made to the condition around the before-change-functions call. I'll look into this further over the weekend. -- Alan Mackenzie (Nuremberg, Germany). From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: 25.1.50; revert-buffer error in CC mode Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 29 Jul 2016 21:36:02 +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: To: Alan Mackenzie Cc: =?UTF-8?Q?=C3=93scar?= Fuentes , 24094@debbugs.gnu.org, 24074@debbugs.gnu.org Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.146982813723078 (code B ref 24094); Fri, 29 Jul 2016 21:36:02 +0000 Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 21:35:37 +0000 Received: from localhost ([127.0.0.1]:50987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTFRR-00060A-I4 for submit@debbugs.gnu.org; Fri, 29 Jul 2016 17:35:37 -0400 Received: from mail-vk0-f42.google.com ([209.85.213.42]:35807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTFRO-0005zt-6x; Fri, 29 Jul 2016 17:35:36 -0400 Received: by mail-vk0-f42.google.com with SMTP id w127so63273357vkh.2; Fri, 29 Jul 2016 14:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=XZaA+dNDDgHo7KnTnx00mMfa1CBDtT2IsWxPCpwub4M=; b=wQqemZXMsF48/4D2QGwLFZrdt+YEZhe2kP4It7cCQIoY5d2L4MB+sotPDe1vVYrhth SSRxCGhySiI40wk6h71zokptJsXcCmdS6Vht3jnwYgsItgTlQmt2Yz6VR3wa101c0a1x 1y1atu+2aMaoUFQsBBM/jiPO+bS28dU4b3klSbInSWKFELeTABJdyrbjg+VmAl7J3vAy fslWVdCtmMoDJADuZSHf62l4B9opJlupAMpu4eFGM03M03mVicnQ5mfWDG5HEkLgXmVt WQh8nW4Tyz0NDoQdUpNiSGDC2U3JedO/aF2KGYvC9EO4psJP95YOl+gv812vMFXak8hg Nklw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=XZaA+dNDDgHo7KnTnx00mMfa1CBDtT2IsWxPCpwub4M=; b=PLIzEhXSHU4PC1+JF3pbTsfnQoYXeG0p/hABe3QFpO5xWC6aOS5ffX0+BAPMcrg0ZH x7YzkHab0hMc4cOj86rg3/YFhXeOUS+9W5vXjCW9SpOTGmQUz/r9D/JbHlRnNlfubcFb 2n+cLICGoGRvQSpxy0Lac0OFmdIHEqDeV8hossWTAIJv/2t8hl5yTWUNWOmLOfh0MEYR sdmkhTYfgz322c+jTPJhvk2U9PKY3RMoFmPDvdZ4RCPg6bs5TW+ZOkxEGiJnNOEqNUL7 LYnlcjBXDOeksox9hRJ57YbwLS1LDNUmgE3ULDFlw0UijSCfbxrpDR/gANdKydxawKxN d/FQ== X-Gm-Message-State: AEkoousCLZQXGG/csOLLZlWh1kY9D4wXdupY5byaKs9T+wEeyf6XuHm+TcSh3gXlZxvtpD8vK/b9q4Uo+cpdsg== X-Received: by 10.31.115.140 with SMTP id o134mr20372346vkc.0.1469828128792; Fri, 29 Jul 2016 14:35:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.41 with HTTP; Fri, 29 Jul 2016 14:34:59 -0700 (PDT) In-Reply-To: <20160729211824.GB3300@acm.fritz.box> References: <20160729175924.11811.qmail@mail.muc.de> <87r3ac2t7m.fsf@wanadoo.es> <20160729211824.GB3300@acm.fritz.box> From: Richard Copley Date: Fri, 29 Jul 2016 22:34:59 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 29 July 2016 at 22:18, Alan Mackenzie wrote: > Hello, Richard and =C3=93scar. > > I've cracked it! In record time! Great stuff, and thanks for the explanation. From unknown Sun Jun 22 04:19:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24094: 25.1.50; revert-buffer error in CC mode Resent-From: =?UTF-8?Q?=C3=93scar?= Fuentes Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 29 Jul 2016 22:02:02 +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: To: Alan Mackenzie Cc: Richard Copley , 24094@debbugs.gnu.org, 24074@debbugs.gnu.org Received: via spool by 24094-submit@debbugs.gnu.org id=B24094.146982970025428 (code B ref 24094); Fri, 29 Jul 2016 22:02:02 +0000 Received: (at 24094) by debbugs.gnu.org; 29 Jul 2016 22:01:40 +0000 Received: from localhost ([127.0.0.1]:50997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTFqe-0006bz-4L for submit@debbugs.gnu.org; Fri, 29 Jul 2016 18:01:40 -0400 Received: from smtp21.acens.net ([86.109.99.145]:43416 helo=smtp.movistar.es) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bTFqc-0006be-8a; Fri, 29 Jul 2016 18:01:39 -0400 X-Junkmail-Premium-Raw: score=8/50, refid=2.7.2:2016.7.29.130618:17:8.317, ip=, rules=__HAS_FROM, __FRAUD_WEBMAIL_FROM, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __HAS_CC_HDR, __MULTIPLE_RCPTS_CC_X2, __CC_NAME, __CC_NAME_DIFF_FROM_ACC, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __REFERENCES, __IN_REP_TO, __HAS_MSGID, __SANE_MSGID, __USER_AGENT, __MIME_VERSION, __CT, __CT_TEXT_PLAIN, __CTE, __UNUSABLE_MSGID, __ANY_URI, __URI_NO_WWW, __SUBJ_ALPHA_NEGATE, BODY_SIZE_100_199, BODYTEXTP_SIZE_400_LESS, BODYTEXTP_SIZE_3000_LESS, __MIME_TEXT_ONLY, __URI_NS, HTML_00_01, HTML_00_10, BODY_SIZE_5000_LESS, __FRAUD_WEBMAIL, MULTIPLE_RCPTS, __PHISH_SPEAR_STRUCTURE_1, BODY_SIZE_1000_LESS, BODY_SIZE_2000_LESS, IN_REP_TO, SMALL_BODY, REFERENCES, BODY_SIZE_7000_LESS, NO_URI_HTTPS, MSG_THREAD, __TO_REAL_NAMES, __CC_REAL_NAMES, LEGITIMATE_SIGNS, LEGITIMATE_NEGATE Received: from qcore (83.58.75.30) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 574060E7037E3ABB; Fri, 29 Jul 2016 21:59:55 +0000 From: =?UTF-8?Q?=C3=93scar?= Fuentes References: <20160729175924.11811.qmail@mail.muc.de> <87r3ac2t7m.fsf@wanadoo.es> <20160729211824.GB3300@acm.fritz.box> Date: Fri, 29 Jul 2016 23:59:53 +0200 In-Reply-To: <20160729211824.GB3300@acm.fritz.box> (Alan Mackenzie's message of "Fri, 29 Jul 2016 21:18:24 +0000") Message-ID: <87bn1g2jhi.fsf@wanadoo.es> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Alan Mackenzie writes: > Hello, Richard and =C3=93scar. > > I've cracked it! [snip] As expected :-) > I'll look into this further over the weekend. Thank you Alan. From unknown Sun Jun 22 04:19:43 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Richard Copley Subject: bug#24094: closed (Re: bug#24094: 25.1.50; revert-buffer error in CC mode) Message-ID: References: <20160809162149.GC4893@acm.fritz.box> X-Gnu-PR-Message: they-closed 24094 X-Gnu-PR-Package: emacs,cc-mode Reply-To: 24094@debbugs.gnu.org Date: Tue, 09 Aug 2016 16:23:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1470759782-11050-1" This is a multi-part message in MIME format... ------------=_1470759782-11050-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #24094: 25.1.50; revert-buffer error in CC mode which was filed against the emacs,cc-mode package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 24094@debbugs.gnu.org. --=20 24094: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24094 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1470759782-11050-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 24094-done) by debbugs.gnu.org; 9 Aug 2016 16:22:26 +0000 Received: from localhost ([127.0.0.1]:33308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX9nN-0002rT-TY for submit@debbugs.gnu.org; Tue, 09 Aug 2016 12:22:26 -0400 Received: from mail.muc.de ([193.149.48.3]:54235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX9nM-0002rK-2q for 24094-done@debbugs.gnu.org; Tue, 09 Aug 2016 12:22:24 -0400 Received: (qmail 23086 invoked by uid 3782); 9 Aug 2016 16:22:22 -0000 Received: from acm.muc.de (p4FC46C02.dip0.t-ipconnect.de [79.196.108.2]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 09 Aug 2016 18:22:21 +0200 Received: (qmail 15130 invoked by uid 1000); 9 Aug 2016 16:21:49 -0000 Date: Tue, 9 Aug 2016 16:21:49 +0000 To: 24094-done@debbugs.gnu.org Subject: Re: bug#24094: 25.1.50; revert-buffer error in CC mode Message-ID: <20160809162149.GC4893@acm.fritz.box> References: <20160729175924.11811.qmail@mail.muc.de> <87r3ac2t7m.fsf@wanadoo.es> <20160729211824.GB3300@acm.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 24094-done Cc: Richard Copley , =?iso-8859-1?Q?=D3scar?= Fuentes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Bug fixed in savannah master branch. -- Alan Mackenzie (Nuremberg, Germany). ------------=_1470759782-11050-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Jul 2016 13:50:53 +0000 Received: from localhost ([127.0.0.1]:48955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSli8-0006WQ-VB for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:50:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bSli7-0006WD-2b for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:50:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSli0-0005L8-Qn for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:50:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSli0-0005KE-MK for submit@debbugs.gnu.org; Thu, 28 Jul 2016 09:50:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSlhy-00043Q-60 for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 09:50:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSlhw-0005Iv-Ev for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 09:50:41 -0400 Received: from mail-vk0-x22e.google.com ([2607:f8b0:400c:c05::22e]:34631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSlhw-0005IA-0y for bug-gnu-emacs@gnu.org; Thu, 28 Jul 2016 09:50:40 -0400 Received: by mail-vk0-x22e.google.com with SMTP id s189so32333707vkh.1 for ; Thu, 28 Jul 2016 06:50:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=hVuLwCh+HsUTC7RjDFiyB4pBUogXoZasb3VLJF3YeYw=; b=KL28FbIO0eKM47LXArfOBA+4gyng0/+mLGnzcN8D/Z40CZRS7ub00mCr+OL48KUm92 Bjq9Lw4BQTZHiwSJgsKK1vzNsYlrVxeapXBYAlvHA1geolEtzRnhbinrMTY8TXCKkOwm 6kyWJqde/0sjkIpT+qC1b30zRI3nfnGW0uhkNxA8illVoZLR/TZqPZPZEomDWO+gChU7 45FDohJuB0ZqS4uozQK7wneR5LeUbMXA3HzBFvtS/1FKxAbAr9ZU0EZpk45iEHIgvfOh VeAokNCy3JCNQ3HUjiI++F25Zn1FefcKamK27FjnlTFOm6MOh3Tw7J9Ytg33kAlrDl4j wHMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hVuLwCh+HsUTC7RjDFiyB4pBUogXoZasb3VLJF3YeYw=; b=EC6zy82oSbzl7KjwwU+uOX3AxH5H19ERHICykaVZRvOf5JsZHRjaS+ojKEJqCfxGXH IgPHFYDzpRxZdnRhK5yq+Lo6dEKZ1CNdVGEdo4Um8SNxzhkvusOuURVJewfLouV2y9Nw PIx4M8Pm6ANE6ltmg6ZV7ehU0LBfLw7mJMDaPtmMyFC7r1ufPhbj60xlvmN6nylKZu3o ZvLzWfRPiJC/ZIC23nPMyeMiMgAmLYKzw2Nv7Xi1RmfaTaGgmfCVP0BYUgTKknK1SPg4 gYkn6vyiKkqqjrZg+2YfvOJhWC2/Ti3YJ9kusFxXcd0ASRD68G5mc7Ba7yrQxacwfnCI 1u+w== X-Gm-Message-State: AEkoouvUwlObnvKqfnSzNSp1t/mrR5LdOJRUs0sXecBD9XVaxQ/qJboSJN5I8k+7I9BwogawWQUzN4B3ECIpdA== X-Received: by 10.31.220.66 with SMTP id t63mr15159682vkg.113.1469713838866; Thu, 28 Jul 2016 06:50:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.41 with HTTP; Thu, 28 Jul 2016 06:50:09 -0700 (PDT) From: Richard Copley Date: Thu, 28 Jul 2016 14:50:09 +0100 Message-ID: Subject: 25.1.50; revert-buffer error in CC mode To: "bug-gnu-emacs@gnu.org" Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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). 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". 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... Configured using: 'configure --prefix /C/emacs/emacs-20160725-215227 --with-modules --without-imagemagick --disable-dependency-tracking --enable-locallisppath=%emacs_dir%/../site-lisp CFLAGS=-O3 CPPFLAGS=-D_WIN32_WINNT=_WIN32_WINNT_WIN7' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS MODULES Important settings: value of $LANG: ENG locale-coding-system: cp1252 Major mode: Debugger Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t global-hi-lock-mode: t hi-lock-mode: t show-paren-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail debug cus-start cus-load log-edit message subr-x puny format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log smerge-mode hippie-exp cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl hl-line ffap vc-cvs vc-rcs dired dired-loaddefs view diff-mode misearch multi-isearch jka-compr shell pcomplete vc-svn perl-mode ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff hi-lock grep compile comint ansi-color ring paren server pascal opascal finder-inf tex-site info package epg-config url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp byte-compile cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib advice time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote w32notify dbusbind w32 multi-tty make-network-process emacs) Memory information: ((conses 16 309928 44864) (symbols 56 34963 0) (miscs 48 368 1555) (strings 32 62494 6202) (string-bytes 1 2004295) (vectors 16 28361) (vector-slots 8 650573 30264) (floats 8 270 254) (intervals 56 12859 249) (buffers 976 83)) ------------=_1470759782-11050-1-- From unknown Sun Jun 22 04:19:43 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?=C3=93scar?= Fuentes Subject: bug#24074: closed (Re: bug#24094: 25.1.50; revert-buffer error in CC mode) Message-ID: References: <20160809162149.GC4893@acm.fritz.box> <878two4cvv.fsf@telefonica.net> X-Gnu-PR-Message: they-closed 24074 X-Gnu-PR-Package: emacs,cc-mode Reply-To: 24074@debbugs.gnu.org Date: Tue, 09 Aug 2016 16:23:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1470759782-11050-3" This is a multi-part message in MIME format... ------------=_1470759782-11050-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #24094: 25.1.50; c-before-after-change-digit-quote: Invalid search bound (w= rong side of point) which was filed against the emacs,cc-mode package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 24074@debbugs.gnu.org. --=20 24094: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D24094 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1470759782-11050-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 24094-done) by debbugs.gnu.org; 9 Aug 2016 16:22:26 +0000 Received: from localhost ([127.0.0.1]:33308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX9nN-0002rT-TY for submit@debbugs.gnu.org; Tue, 09 Aug 2016 12:22:26 -0400 Received: from mail.muc.de ([193.149.48.3]:54235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX9nM-0002rK-2q for 24094-done@debbugs.gnu.org; Tue, 09 Aug 2016 12:22:24 -0400 Received: (qmail 23086 invoked by uid 3782); 9 Aug 2016 16:22:22 -0000 Received: from acm.muc.de (p4FC46C02.dip0.t-ipconnect.de [79.196.108.2]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 09 Aug 2016 18:22:21 +0200 Received: (qmail 15130 invoked by uid 1000); 9 Aug 2016 16:21:49 -0000 Date: Tue, 9 Aug 2016 16:21:49 +0000 To: 24094-done@debbugs.gnu.org Subject: Re: bug#24094: 25.1.50; revert-buffer error in CC mode Message-ID: <20160809162149.GC4893@acm.fritz.box> References: <20160729175924.11811.qmail@mail.muc.de> <87r3ac2t7m.fsf@wanadoo.es> <20160729211824.GB3300@acm.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 24094-done Cc: Richard Copley , =?iso-8859-1?Q?=D3scar?= Fuentes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) Bug fixed in savannah master branch. -- Alan Mackenzie (Nuremberg, Germany). ------------=_1470759782-11050-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Jul 2016 15:50:54 +0000 Received: from localhost ([127.0.0.1]:38304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bS4dC-0000Nr-Gy for submit@debbugs.gnu.org; Tue, 26 Jul 2016 11:50:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bS4d9-0000Nc-NF for submit@debbugs.gnu.org; Tue, 26 Jul 2016 11:50:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bS4d3-0001sS-Em for submit@debbugs.gnu.org; Tue, 26 Jul 2016 11:50:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bS4d3-0001s8-Bb for submit@debbugs.gnu.org; Tue, 26 Jul 2016 11:50:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bS4d1-00064b-1D for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2016 11:50:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bS4cw-0001r0-L9 for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2016 11:50:42 -0400 Received: from relaycp04.dominioabsoluto.net ([217.116.26.100]:39343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bS4cw-0001p4-CT for bug-gnu-emacs@gnu.org; Tue, 26 Jul 2016 11:50:38 -0400 Received: from smtp.movistar.es (smtp10.acens.net [86.109.99.134]) by relaycp04.dominioabsoluto.net (Postfix) with ESMTP id C9A636430E; Tue, 26 Jul 2016 17:50:29 +0200 (CEST) X-CTCH-RefID: str=0001.0A0B0205.579786C5.00E3, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Received: from qcore (83.58.75.30) by smtp.movistar.es (8.6.122.03) (authenticated as 981711563$telefonica.net) id 5746394E03065FE7; Tue, 26 Jul 2016 15:50:30 +0000 From: =?utf-8?Q?=C3=93scar_Fuentes?= To: bug-gnu-emacs@gnu.org, "Alan Mackenzie" Subject: 25.1.50; c-before-after-change-digit-quote: Invalid search bound (wrong side of point) Date: Tue, 26 Jul 2016 17:50:28 +0200 Message-ID: <878two4cvv.fsf@telefonica.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) >From time to time, after performing a git operation that changes files' contents (switch branch, apply a stash, etc) and automatically reverting the associated buffers, the error mentioned on the subject line happens. In that case the affected buffer's contents is truncated and is marked as modified. This only happens with C++ buffers and I suspect that it depends on the cursor position at the time of the revert. Sadly, I have no recipe for replicating it. The problem was first observed a few weeks ago, which coincides with the introduction of the mentioned function. An Emacs version built on 6th of June works fine. In GNU Emacs 25.1.50.3 (x86_64-pc-linux-gnu, X toolkit) of 2016-07-24 built on qcore Windowing system distributor 'The X.Org Foundation', version 11.0.11803000 System Description: Ubuntu 16.04.1 LTS Configured using: 'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid' Configured features: XAW3D XPM JPEG TIFF GIF PNG SOUND GSETTINGS NOTIFY GNUTLS LIBXML2 FREETYPE XFT ZLIB LUCID X11 Important settings: value of $LANG: C locale-coding-system: nil Major mode: Emacs-Lisp Minor modes in effect: TeX-PDF-mode: t show-paren-mode: t diff-auto-refine-mode: t global-git-commit-mode: t shell-dirtrack-mode: t column-overflow-mode: t ido-grid-mode: t flx-ido-mode: t ido-hacks-mode: t ido-everywhere: t buffer-flip-mode: t evil-leader-mode: t evil-paredit-mode: t paredit-mode: t evil-mode: t evil-local-mode: t global-anzu-mode: t anzu-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t ------------=_1470759782-11050-3--