From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Nov 2015 03:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 21824@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.144660639120627 (code B ref -1); Wed, 04 Nov 2015 03:07:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Nov 2015 03:06:31 +0000 Received: from localhost ([127.0.0.1]:52044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtoP8-0005Mc-J9 for submit@debbugs.gnu.org; Tue, 03 Nov 2015 22:06:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40867) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtoP6-0005MS-AO for submit@debbugs.gnu.org; Tue, 03 Nov 2015 22:06:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtoP3-0002Ii-T9 for submit@debbugs.gnu.org; Tue, 03 Nov 2015 22:06:27 -0500 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]:59584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtoP3-0002Ie-PD for submit@debbugs.gnu.org; Tue, 03 Nov 2015 22:06:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtoP1-00015f-Tb for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 22:06:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtoOz-0002HD-W1 for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 22:06:23 -0500 Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:34567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtoOz-0002H9-PX for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 22:06:21 -0500 Received: by iody8 with SMTP id y8so40462186iod.1 for ; Tue, 03 Nov 2015 19:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=Tbgf+wCcNqs+lw5xSe4Q5aamhnpfAxEDgzNaYn1PFUE=; b=o+eImzFPUdEXZa5Arga25JkQH+1glGuiDyDUMSQpBrEFIOgNAV5CSzlBNqQ8y5AdKu foFgX7OrbmaW9XbW2RH68zx6dZ7YfV1/KDgfPNGRsVtNWWv+acdPEmjHNaDiunLTCeTp pfu4DW/XX3P8O9Y72zs/rBSEHGT3VT37I8hpvfTbB2qMwCq43FHfWhXc2zdBLTv0fVfn d4P4xhel8D1td6gBCOGMl0jo11a0I+lOC0LD/LpNkGcBzKVp+Q1I19NnkTBxHY1nB7Fk IwwxmrP9+pfxy31Ha5BBARr4DbU0jxhH+Q2G8AhSsn3Ksy1jFRnFowg2pWWlwTo8W9dY IfYg== MIME-Version: 1.0 X-Received: by 10.107.35.16 with SMTP id j16mr564034ioj.120.1446606380760; Tue, 03 Nov 2015 19:06:20 -0800 (PST) Received: by 10.79.119.2 with HTTP; Tue, 3 Nov 2015 19:06:20 -0800 (PST) Date: Tue, 3 Nov 2015 22:06:20 -0500 X-Google-Sender-Auth: uf4ZkYIVJoyTR3YKfhQ9QXWuNoc Message-ID: From: Noam Postavsky Content-Type: multipart/mixed; boundary=001a11405fc074a97f0523ae4ba0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.15 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 (----) --001a11405fc074a97f0523ae4ba0 Content-Type: text/plain; charset=UTF-8 The circumstances that trigger this seem to be a combination of overlays and timers. Attached is an init.el file that installs several packages needed to trigger the problem. I have not yet managed to find a simpler way of reproducing this. After installing the packages, and running M-x irony-install-server (requires libclang), the problem can be triggered by a C++ mode buffer with the following contents: void func(int x); int main() { fun| } where | represents the cursor. Press TAB y C-f C-b C-f C-b, this results in a (wrong-type-argument overlayp nil) which is due to yas--on-field-overlay-modification being called with *Messages* as the current buffer, rather than the C++ buffer where the yasnippet's overlay is in. The begin and end positions passed correspond to *Messages* buffer positions (i.e. they are too big to be from the C++ buffer). According to the lisp backtrace (see below), it seems to be triggered by a call to `message' via a timer. Original report is at https://github.com/capitaomorte/yasnippet/issues/607 Debugger entered--Lisp error: (wrong-type-argument overlayp nil) overlay-get(nil yas--snippet) (let* ((inhibit-modification-hooks t) (field (overlay-get overlay (quote yas--field))) (snippet (overlay-get yas--active-field-overlay (quote yas--snippet)))) (cond (after\? (yas--advance-end-maybe field (overlay-end overlay)) (save-excursion (yas--field-update-display field)) (yas--update-mirrors snippet)) (field (if (and (not after\?) (not (progn nil (or ... ...) (aref field 7))) (eq (point) (if (markerp ...) (marker-position ...) (progn nil ... ...)))) (progn (yas--skip-and-clear field))) (progn nil (or (progn nil (and (vectorp field) (>= ... 9) (memq ... cl-struct-yas--field-tags) t)) (signal (quote wrong-type-argument) (list (quote yas--field) field))) (let* ((v field)) (aset v 7 t)))))) (if (or yas--inhibit-overlay-hooks (yas--undo-in-progress)) nil (message "yas--on-field-ov-mod(%S %S %S %S %S): buffer = %s" overlay after\? _beg _end _length (current-buffer)) (let* ((inhibit-modification-hooks t) (field (overlay-get overlay (quote yas--field))) (snippet (overlay-get yas--active-field-overlay (quote yas--snippet)))) (cond (after\? (yas--advance-end-maybe field (overlay-end overlay)) (save-excursion (yas--field-update-display field)) (yas--update-mirrors snippet)) (field (if (and (not after\?) (not (progn nil ... ...)) (eq (point) (if ... ... ...))) (progn (yas--skip-and-clear field))) (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... field))) (let* ((v field)) (aset v 7 t))))))) yas--on-field-overlay-modification(# t 3008 3008 33) message("%s" "use of undeclared identifier 'y'") display-message-or-buffer("use of undeclared identifier 'y'" "*Flycheck error messages*") (let ((messages (mapcar (function flycheck-error-format-message-and-id) errors))) (display-message-or-buffer (string-join messages "\n\n") flycheck-error-message-buffer)) (progn (let ((messages (mapcar (function flycheck-error-format-message-and-id) errors))) (display-message-or-buffer (string-join messages "\n\n") flycheck-error-message-buffer))) (if (and errors (flycheck-may-use-echo-area-p)) (progn (let ((messages (mapcar (function flycheck-error-format-message-and-id) errors))) (display-message-or-buffer (string-join messages "\n\n") flycheck-error-message-buffer)))) flycheck-display-error-messages(([cl-struct-flycheck-error # irony "/tmp/el-get-test-home/foo.cpp" 5 8 "use of undeclared identifier 'y'" error nil])) funcall(flycheck-display-error-messages ([cl-struct-flycheck-error # irony "/tmp/el-get-test-home/foo.cpp" 5 8 "use of undeclared identifier 'y'" error nil])) (progn (funcall flycheck-display-errors-function errors)) (if flycheck-display-errors-function (progn (funcall flycheck-display-errors-function errors))) flycheck-display-errors(([cl-struct-flycheck-error # irony "/tmp/el-get-test-home/foo.cpp" 5 8 "use of undeclared identifier 'y'" error nil])) (progn (flycheck-display-errors errors)) (if errors (progn (flycheck-display-errors errors))) (let ((errors (flycheck-overlay-errors-at (point)))) (if errors (progn (flycheck-display-errors errors)))) (progn (let ((errors (flycheck-overlay-errors-at (point)))) (if errors (progn (flycheck-display-errors errors))))) (if flycheck-mode (progn (let ((errors (flycheck-overlay-errors-at (point)))) (if errors (progn (flycheck-display-errors errors)))))) (progn (flycheck-cancel-error-display-error-at-point-timer) (if flycheck-mode (progn (let ((errors (flycheck-overlay-errors-at (point)))) (if errors (progn (flycheck-display-errors errors))))))) (condition-case err (progn (flycheck-cancel-error-display-error-at-point-timer) (if flycheck-mode (progn (let ((errors (flycheck-overlay-errors-at ...))) (if errors (progn (flycheck-display-errors errors))))))) ((debug error) (message "Flycheck error display error: %s" err) nil)) flycheck-display-error-at-point() apply(flycheck-display-error-at-point nil) timer-event-handler([t 22073 29035 116958 nil flycheck-display-error-at-point nil nil 308000]) In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit) of 2015-11-03 Repository revision: 2390d890765983ed1e5ece1711c470351705e7c8 Windowing system distributor 'The X.Org Foundation', version 11.0.11702000 Configured using: 'configure --cache-file=../config.cache 'CFLAGS=-O2 -march=native' --with-crt-dir=/usr/lib/x86_64-linux-gnu --with-x-toolkit=lucid --without-toolkit-scroll-bars --with-gif=no' Configured features: XPM JPEG TIFF PNG SOUND DBUS NOTIFY GNUTLS LIBXML2 ZLIB LUCID X11 Important settings: value of $LANG: en_CA.UTF-8 locale-coding-system: utf-8-unix Major mode: Debugger Minor modes in effect: global-flycheck-mode: t yas-global-mode: t yas-minor-mode: t global-company-mode: t company-mode: t global-highlight-parentheses-mode: t highlight-parentheses-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 transient-mark-mode: t Recent messages: [yas] Loading snippet files from /tmp/el-get-test-home/.emacs.d/elpa/yasnippet-20151101.1535/snippets/c++-mode [yas] Loading for `cc-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /tmp/el-get-test-home/.emacs.d/elpa/yasnippet-20151101.1535/snippets/cc-mode) (quote cc-mode)))! [yas] Loading snippet files from /tmp/el-get-test-home/.emacs.d/elpa/yasnippet-20151101.1535/snippets/cc-mode Debug on Error enabled globally [yas] snippet expanded. yas--on-field-ov-mod(# nil 41 41 nil): buffer = foo.cpp yas--on-field-ov-mod(# t 41 42 0): buffer = foo.cpp use of undeclared identifier 'y' yas--on-field-ov-mod(# t 3008 3008 33): buffer = *Messages* Entering debugger... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message dired format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils debug cus-start cus-load thingatpt lisp-mnt irony-cdb-libclang irony-cdb-json pp json irony-cdb-clang-complete irony-cdb cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs company-files company-oddmuse company-keywords company-etags etags xref project eieio byte-opt bytecomp byte-compile cconv eieio-core company-gtags company-dabbrev-code company-dabbrev company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb company-irony irony-completion irony-snippet flycheck-irony irony-diagnostics irony flycheck find-func rx subr-x dash jka-compr compile comint ansi-color ring let-alist yasnippet cl-extra derived help-mode company edmacro kmacro highlight-parentheses cl-macs easy-mmode cl gv cl-seq finder-inf info cl-loaddefs pcase cl-lib package easymenu epg-config time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd 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 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 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 dbusbind inotify dynamic-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 300138 13183) (symbols 48 31710 0) (miscs 40 474 275) (strings 32 53496 8101) (string-bytes 1 1682695) (vectors 16 23094) (vector-slots 8 660438 6306) (floats 8 740 352) (intervals 56 288 0) (buffers 976 16) (heap 1024 31399 1018)) --001a11405fc074a97f0523ae4ba0 Content-Type: application/octet-stream; name="init.el" Content-Disposition: attachment; filename="init.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_igk7ze9q0 Ozs7IGVtYWNzIC0tLSBFbWFjcyBjb25maWd1cmF0aW9uIC0qLSBtb2RlOiBlbWFjcy1saXNwIC0q LQoKOzsgQXV0aG9yOiBZdXRpYW4gTGkgPGhvdHB4bGVzc0BnbWFpbC5jb20+Cgo7OzsgQ29tbWVu dGFyeToKCjs7OyBDb2RlOgoKOzsgIyBQYWNrYWdlcwoocmVxdWlyZSAncGFja2FnZSkKKHJlcXVp cmUgJ2NsLWxpYikKOzsgKGFkZC10by1saXN0ICdwYWNrYWdlLWFyY2hpdmVzCjs7ICAgICAgICAg ICAgICAnKCJlbHB5IiAuICJodHRwczovL2pvcmdlbnNjaGFlZmVyLmdpdGh1Yi5pby9wYWNrYWdl cy8iKSkKKGFkZC10by1saXN0ICdwYWNrYWdlLWFyY2hpdmVzCiAgICAgICAgICAgICAnKCJtZWxw YSIgLiAiaHR0cDovL21lbHBhLm9yZy9wYWNrYWdlcy8iKSB0KQoocGFja2FnZS1pbml0aWFsaXpl KQooZGVmdmFyIHJlcXVpcmVkLXBhY2thZ2VzCiAgJyhoaWdobGlnaHQtcGFyZW50aGVzZXMKICAg IDs7ZGlmZi1obAogICAgY29tcGFueQogICAgZmx5Y2hlY2sK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aXJlICdmbHljaGVjay1pcm9u eSkKCihhZnRlciAnY29tcGFueQogIChhZGQtdG8tbGlzdAogICAnY29tcGFueS1iYWNrZW5kcyAn Y29tcGFueS1pcm9ueSkpCg== --001a11405fc074a97f0523ae4ba0-- From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Nov 2015 15:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Noam Postavsky Cc: 21824@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.144665113213922 (code B ref 21824); Wed, 04 Nov 2015 15:33:02 +0000 Received: (at 21824) by debbugs.gnu.org; 4 Nov 2015 15:32:12 +0000 Received: from localhost ([127.0.0.1]:53486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zu02l-0003cT-Hc for submit@debbugs.gnu.org; Wed, 04 Nov 2015 10:32:11 -0500 Received: from mtaout21.012.net.il ([80.179.55.169]:36317) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zu02i-0003cI-DQ for 21824@debbugs.gnu.org; Wed, 04 Nov 2015 10:32:09 -0500 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NXA00100R2A3B00@a-mtaout21.012.net.il> for 21824@debbugs.gnu.org; Wed, 04 Nov 2015 17:31:28 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXA0003ZR4GO0B0@a-mtaout21.012.net.il>; Wed, 04 Nov 2015 17:31:28 +0200 (IST) Date: Wed, 04 Nov 2015 17:31:27 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83611hvl0w.fsf@gnu.org> References: X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (+) > Date: Tue, 3 Nov 2015 22:06:20 -0500 > From: Noam Postavsky > > The circumstances that trigger this seem to be a combination of > overlays and timers. Attached is an init.el file that installs several > packages needed to trigger the problem. I have not yet managed to find > a simpler way of reproducing this. After installing the packages, and > running M-x irony-install-server (requires libclang) Thanks. Unfortunately, I don't really have enough time at the moment to install all of that, certainly not libclang. Is it okay if I ask questions and make observations, and you then try digging into this problem, find the answers, and post them here? > the problem can be triggered by a C++ mode buffer with the following > contents: > void func(int x); > int main() { > fun| > } > where | represents the cursor. Press TAB y C-f C-b C-f C-b, this > results in a (wrong-type-argument overlayp nil) which is due to > yas--on-field-overlay-modification being called with *Messages* as the > current buffer, rather than the C++ buffer where the yasnippet's > overlay is in. The begin and end positions passed correspond to > *Messages* buffer positions (i.e. they are too big to be from the C++ > buffer). According to the lisp backtrace (see below), it seems to be > triggered by a call to `message' via a timer. I see that yas-global-mode is turned on, which (AFAIU) means yasnippet tries to do its thing in every buffer, including *Messages*, right? That in turn means every modification of the *Messages* buffer will, quite correctly, call yas--on-field-overlay-modification, provided that the buffer has overlays in it. Normally, *Messages* doesn't have any overlays, but in this case it evidently did, or Emacs somehow thought it did, which might be part of the problem. A call to 'message' switches to the *Messages* buffer as part of doing its job, which explains why yas--on-field-overlay-modification is called with buffer positions from *Messages* -- assuming there are overlays there, this all is expected behavior. So far so good, and now we come to the problematic part. yas--on-field-overlay-modification is called thusly: yas--on-field-overlay-modification(# t 3008 3008 33) IOW, the overlay it is called with belongs to buffer foo.cpp, not to *Messages*. So the question now becomes: how come an overlay whose buffer is foo.cpp winds up in *Messages*? Can you try finding out? (Is that even possible?) After this error happens, what does the following produce if invoked with *Messages* being the current buffer: M-: (overlays-in (point-min) (point-max)) RET Maybe instrument yas--on-field-overlay-modification to show the current buffer when it is called, and see if it is invoked with *Messages* as the current buffer in this scenario. Thanks. From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Nov 2015 00:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Eli Zaretskii Cc: 21824@debbugs.gnu.org Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.144668277118716 (code B ref 21824); Thu, 05 Nov 2015 00:20:02 +0000 Received: (at 21824) by debbugs.gnu.org; 5 Nov 2015 00:19:31 +0000 Received: from localhost ([127.0.0.1]:53838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zu8H4-0004rn-GC for submit@debbugs.gnu.org; Wed, 04 Nov 2015 19:19:30 -0500 Received: from mail-ig0-f170.google.com ([209.85.213.170]:37785) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zu8H2-0004rf-Df for 21824@debbugs.gnu.org; Wed, 04 Nov 2015 19:19:28 -0500 Received: by igbhv6 with SMTP id hv6so48190712igb.0 for <21824@debbugs.gnu.org>; Wed, 04 Nov 2015 16:19:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=BHUTbbreVf5FHZd9n2/u6lx5Qg/zJvJSgRgalMbf8h8=; b=tPj1w+g9Y8Fb6t78869jx35xfMZyU66pBHHOQhYsalB3lkIasicPaf82ThmuOA2K45 arQ1x8ROVZEIUkdcvLAn1w9qcuLK2HRdlTy18DSw1pvUcAPcufKYxicGwgII88Bx03ao l/VupI6g8zoyynEu00LyWvVKgE/EIlGoLIhHQjWM55rXQAEg4QA3gK9yW2ZKR3S4kekt NaJUUN0Of9RJ8Bl7vHqjUpsIgce6d1yvRvSpA9b9aLH3iyMvTfzZv1PY35xom81I+vVx FCh3PWjbnWDAY/tAZDmMBTuEn+VqaFsuueknFkCdFq+5nG67hk9wGpNCGw/Q6JGKQah0 juHw== MIME-Version: 1.0 X-Received: by 10.50.32.69 with SMTP id g5mr27429979igi.35.1446682767679; Wed, 04 Nov 2015 16:19:27 -0800 (PST) Received: by 10.79.119.2 with HTTP; Wed, 4 Nov 2015 16:19:27 -0800 (PST) In-Reply-To: <83611hvl0w.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> Date: Wed, 4 Nov 2015 19:19:27 -0500 X-Google-Sender-Auth: Yusj8cfZYUoZZ0eSuPx1KriwOK4 Message-ID: From: Noam Postavsky Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 Wed, Nov 4, 2015 at 10:31 AM, Eli Zaretskii wrote: > Thanks. Unfortunately, I don't really have enough time at the moment > to install all of that, certainly not libclang. Is it okay if I ask > questions and make observations, and you then try digging into this > problem, find the answers, and post them here? Yup, totally understandable. > I see that yas-global-mode is turned on, which (AFAIU) means yasnippet > tries to do its thing in every buffer, including *Messages*, right? > I can reproduce the problem with yas-minor-mode enabled only in the C++ buffer. But I *can't* reproduce the problem with highlight-parenthesis-mode only in the C++ buffer. It seems global-highlight-parenthesis-mode is required. > That in turn means every modification of the *Messages* buffer will, > quite correctly, call yas--on-field-overlay-modification, provided > that the buffer has overlays in it. To clarify, yas--on-field-overlay-modification is *only* called as a modification-hooks property of overlays that yasnippet creates. Yasnippet never calls it directly. Yasnippet only creates overlays after expanding a snippet, so this should never occur in the *Messages* buffer (unless the user decides to start typing and expanding snippets there). However, there are several other packages involved. > After this error happens, what does the following produce if invoked > with *Messages* being the current buffer: > > M-: (overlays-in (point-min) (point-max)) RET Evaluating in the stackframe where the error is triggered: (# # # # # # # #) Afterwards it gives nil. The "from 1 to 1" suggests overlays created by highlight-parentheses, as I see it has a (make-overlay 0 0 nil t) call in a loop. From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Nov 2015 03:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Eli Zaretskii Cc: 21824@debbugs.gnu.org Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.14466944475467 (code B ref 21824); Thu, 05 Nov 2015 03:35:02 +0000 Received: (at 21824) by debbugs.gnu.org; 5 Nov 2015 03:34:07 +0000 Received: from localhost ([127.0.0.1]:53924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuBJO-0001Q7-U2 for submit@debbugs.gnu.org; Wed, 04 Nov 2015 22:34:07 -0500 Received: from mail-ig0-f182.google.com ([209.85.213.182]:36078) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuBJ4-0001PN-Dz for 21824@debbugs.gnu.org; Wed, 04 Nov 2015 22:34:04 -0500 Received: by igdg1 with SMTP id g1so2528582igd.1 for <21824@debbugs.gnu.org>; Wed, 04 Nov 2015 19:33:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=AUfMkz1JoghSeTlnEsCBrcrMKmZcFkRz6UjIxqNoJx0=; b=tAZ2EkUWm4O/brGjz5xUoRa25stl4eagaOtLxBvOC+tChWur8IMn4S0IAlQ84Z4Ul8 4Abpii8XXGYWU++3SVNf5RUFCJZYRXLLSodE+nY5XVdKLd1rJQiqOU5RfdZVwdXjB2wF SMRKBwinHtN58cfvnscklwI9TmLsWCNagdzaTHdjtGAnT/kuEc+oYxM87vOpjYjvS4yO lOSUX/z1A0ciAiSaYEVowU3RSNXyXLfLsu9Ms2FuXozhcvOCLEkrofLWFDXUnOjEkFIz 32DhzjNKNvUo3NG+LVGC7rYrJAOUFNdaYwxBZCipvnDTbFyf//75lm/rS/DvjOG9xFVF rCeQ== MIME-Version: 1.0 X-Received: by 10.50.117.5 with SMTP id ka5mr664673igb.58.1446694425930; Wed, 04 Nov 2015 19:33:45 -0800 (PST) Received: by 10.79.119.2 with HTTP; Wed, 4 Nov 2015 19:33:45 -0800 (PST) In-Reply-To: References: <83611hvl0w.fsf@gnu.org> Date: Wed, 4 Nov 2015 22:33:45 -0500 X-Google-Sender-Auth: arDvyuxPy4Dx0zPohcLdIkiaUXc Message-ID: From: Noam Postavsky Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) I've boiled it down to just highlight-parentheses and flycheck (plus some overlay creating code), will try to remove flycheck tomorrow. https://gist.githubusercontent.com/npostavs/50517534125b8d48029f/raw/cd049ecf58a2ac9fb73536490ac3d6296807f31a/.emacs From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Nov 2015 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Noam Postavsky Cc: 21824@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.144673979929569 (code B ref 21824); Thu, 05 Nov 2015 16:10:02 +0000 Received: (at 21824) by debbugs.gnu.org; 5 Nov 2015 16:09:59 +0000 Received: from localhost ([127.0.0.1]:54864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuN6p-0007gm-2r for submit@debbugs.gnu.org; Thu, 05 Nov 2015 11:09:59 -0500 Received: from mtaout27.012.net.il ([80.179.55.183]:53604) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuN6R-0007gB-EJ for 21824@debbugs.gnu.org; Thu, 05 Nov 2015 11:09:53 -0500 Received: from conversion-daemon.mtaout27.012.net.il by mtaout27.012.net.il (HyperSendmail v2007.08) id <0NXC00200N1JL800@mtaout27.012.net.il> for 21824@debbugs.gnu.org; Thu, 05 Nov 2015 18:04:49 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout27.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXC00I5ZNC1J290@mtaout27.012.net.il>; Thu, 05 Nov 2015 18:04:49 +0200 (IST) Date: Thu, 05 Nov 2015 18:09:19 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <8337wktols.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (+) > Date: Wed, 4 Nov 2015 22:33:45 -0500 > From: Noam Postavsky > Cc: 21824@debbugs.gnu.org > > I've boiled it down to just highlight-parentheses and flycheck (plus > some overlay creating code), will try to remove flycheck tomorrow. Thanks. If yasnippet is no longer part of the issue, can you post the backtrace you get without it? If possible, please load the *.el files of the add-on packages, so that the backtrace includes more Lisp and less byte-code. TIA From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Nov 2015 03:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Eli Zaretskii Cc: 21824@debbugs.gnu.org Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.14467796708613 (code B ref 21824); Fri, 06 Nov 2015 03:15:01 +0000 Received: (at 21824) by debbugs.gnu.org; 6 Nov 2015 03:14:30 +0000 Received: from localhost ([127.0.0.1]:55163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuXTx-0002Er-Tj for submit@debbugs.gnu.org; Thu, 05 Nov 2015 22:14:30 -0500 Received: from mail-io0-f181.google.com ([209.85.223.181]:34967) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuXTw-0002Ek-KO for 21824@debbugs.gnu.org; Thu, 05 Nov 2015 22:14:29 -0500 Received: by ioc74 with SMTP id 74so46063368ioc.2 for <21824@debbugs.gnu.org>; Thu, 05 Nov 2015 19:14:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=cGJ6EGb2T/C0qOtaqxhsotL/wJk2525nli8XfykdLK4=; b=P0UftazpJY/ZJ4N2j0HWydHDSfQlbSxcIUWSRuFUU892l10l/7/zzJK7VjXFEDvpLS 4PWVwPTBBPI/yPOIxXPHs8qK3Vo8TTqL2LlCYpecDQZQyRDCj1G5FOKQVBIW3rfIgwwd 6cx3rwHYqBOc11GFOJjUWGbW2cbPVgmsMUhE7POBrVAQn+J5qUfsHSf33fDhvYojPaiA GqXLfke0QG6veUiiz3X6z8u8nkWC76aGK6D93djlmBpDvKb5Ugfwb0sqMPSlWIi1n1iE nushqUIvUgMnXd5995iFiUHTY1WyzaXdop8jxkq+l4/mhC1aWgSpb44scZm1QTN5UjgD Fv2g== MIME-Version: 1.0 X-Received: by 10.107.7.210 with SMTP id g79mr7032249ioi.81.1446779668113; Thu, 05 Nov 2015 19:14:28 -0800 (PST) Received: by 10.79.119.2 with HTTP; Thu, 5 Nov 2015 19:14:28 -0800 (PST) In-Reply-To: <8337wktols.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> Date: Thu, 5 Nov 2015 22:14:28 -0500 X-Google-Sender-Auth: 3u_IfL-dxbqpSxSQtYTUZACzvOk Message-ID: From: Noam Postavsky Content-Type: multipart/mixed; boundary=001a113f8ebc2fca9a0523d6a4af X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) --001a113f8ebc2fca9a0523d6a4af Content-Type: text/plain; charset=UTF-8 Okay, turned out flycheck was basically irrelevant except that it calls message a lot. And highlight-parentheses' only significance is that it makes overlays all over the place. I have a simple reproducer, run as emacs -Q -l bug-21824.el -f 21824-trigger The required circumstances appear to be that after a modification-hook has been run and there is an overlay in the *Messages* buffer, the message coalescing (the "[2 times]" thing) wrongly causes runs the modification-hook of the overlay in the 1st buffer, but with parameters from the *Messages* buffer modification. A sample backtrace (I put a call to `debug' when the current-buffer is incorrect). Debugger entered: (# t 223 223 10 #) (if (eq (current-buffer) (overlay-buffer overlay)) (message "21842-mod-overlay(%s %s %s %s %s), buf = %s" overlay afterp beg end len (current-buffer)) (setq 21842-repeat-message) (debug nil overlay afterp beg end len (current-buffer))) 21824-mod-overlay(# t 223 223 10) message("a message") 21824-trigger() command-line-1(("-l" "bug-21824.el" "-f" "21824-trigger")) command-line() normal-top-level() --001a113f8ebc2fca9a0523d6a4af Content-Type: application/octet-stream; name="bug-21824.el" Content-Disposition: attachment; filename="bug-21824.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ign332zo0 Ozs7IGVtYWNzIC1RIC1sIGJ1Zy0yMTgyNC5lbCAtZiAyMTgyNC10cmlnZ2VyCgooZGVmdW4gMjE4 MjQtbW9kLW92ZXJsYXkgKG92ZXJsYXkgYWZ0ZXJwIGJlZyBlbmQgJm9wdGlvbmFsIGxlbikKICAo aWYgKGVxIChjdXJyZW50LWJ1ZmZlcikgKG92ZXJsYXktYnVmZmVyIG92ZXJsYXkpKQogICAgICAo bWVzc2FnZSAiMjE4NDItbW9kLW92ZXJsYXkoJXMgJXMgJXMgJXMgJXMpLCBidWYgPSAlcyIKICAg ICAgICAgICAgICAgb3ZlcmxheSBhZnRlcnAgYmVnIGVuZCBsZW4gKGN1cnJlbnQtYnVmZmVyKSkK ICAgIChzZXRxIDIxODQyLXJlcGVhdC1tZXNzYWdlKQogICAgKGRlYnVnIG5pbCBvdmVybGF5IGFm dGVycCBiZWcgZW5kIGxlbiAoY3VycmVudC1idWZmZXIpKSkpCgooZGVmdW4gMjE4MjQtdHJpZ2dl ciAoKQogIChzd2l0Y2gtdG8tYnVmZmVyICJmb28uY3BwIikKICAodmlldy1lY2hvLWFyZWEtbWVz c2FnZXMpCiAgKGVyYXNlLWJ1ZmZlcikKICAoaW5zZXJ0ICJ4eXkiKQogIChzZWFyY2gtYmFja3dh cmQgInl5IikKICAobGV0KiAoKGJlZyAobWF0Y2gtYmVnaW5uaW5nIDApKQogICAgICAgICAoZW5k IChtYXRjaC1lbmQgMCkpCiAgICAgICAgIChtb2QtaG9vay1vdiAobWFrZS1vdmVybGF5IGJlZyBl bmQgbmlsIG5pbCB0KSkpCiAgICAob3ZlcmxheS1wdXQgbW9kLWhvb2stb3YgJ2ZhY2UgJ2hpZ2hs aWdodCkKICAgIChvdmVybGF5LXB1dCBtb2QtaG9vay1vdiAnbW9kaWZpY2F0aW9uLWhvb2tzICco MjE4MjQtbW9kLW92ZXJsYXkpKQogICAgKGdvdG8tY2hhciAoMS0gZW5kKSkKICAgIChpbnNlcnQg InkiKSkgOyB0cmlnZ2VyIG1vZGlmaWNhdGlvbi1ob29rcwoKICAod2l0aC1jdXJyZW50LWJ1ZmZl ciAiKk1lc3NhZ2VzKiIKICAgIChtYWtlLW92ZXJsYXkgMSAyKSkKCiAgKG1lc3NhZ2UgImEgbWVz c2FnZSIpCiAgKG1lc3NhZ2UgImEgbWVzc2FnZSIpKQoK --001a113f8ebc2fca9a0523d6a4af-- From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Nov 2015 15:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: Noam Postavsky Cc: 21824@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.144682343622713 (code B ref 21824); Fri, 06 Nov 2015 15:24:01 +0000 Received: (at 21824) by debbugs.gnu.org; 6 Nov 2015 15:23:56 +0000 Received: from localhost ([127.0.0.1]:55985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zuirr-0005uG-EM for submit@debbugs.gnu.org; Fri, 06 Nov 2015 10:23:55 -0500 Received: from mtaout24.012.net.il ([80.179.55.180]:35778) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zuiro-0005u6-5m for 21824@debbugs.gnu.org; Fri, 06 Nov 2015 10:23:53 -0500 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NXE00J00FKXZA00@mtaout24.012.net.il> for 21824@debbugs.gnu.org; Fri, 06 Nov 2015 17:17:06 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXE009HSFSIDY90@mtaout24.012.net.il>; Fri, 06 Nov 2015 17:17:06 +0200 (IST) Date: Fri, 06 Nov 2015 17:23:41 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83twozqhhe.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (+) > Date: Thu, 5 Nov 2015 22:14:28 -0500 > From: Noam Postavsky > Cc: 21824@debbugs.gnu.org > > Okay, turned out flycheck was basically irrelevant except that it > calls message a lot. And highlight-parentheses' only significance is > that it makes overlays all over the place. I have a simple reproducer, > run as > > emacs -Q -l bug-21824.el -f 21824-trigger > > The required circumstances appear to be that after a modification-hook > has been run and there is an overlay in the *Messages* buffer, the > message coalescing (the "[2 times]" thing) wrongly causes runs the > modification-hook of the overlay in the 1st buffer, but with > parameters from the *Messages* buffer modification. Thanks for this. I didn't even need to run the test case to see the problem very clearly. (It sounds like a very old bug, as all the pieces of the puzzle were not touched in at least 15 years.) Please see if the original bug is solved by the latest master. Btw, any idea how come overlays wound up in *Messages* in the original scenario? Thanks again for working on this. I will see about adding a test for this tricky failure. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 06 10:23:06 2015 Received: (at control) by debbugs.gnu.org; 6 Nov 2015 15:23:06 +0000 Received: from localhost ([127.0.0.1]:55982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zuir4-0005t3-3P for submit@debbugs.gnu.org; Fri, 06 Nov 2015 10:23:06 -0500 Received: from mail-io0-f181.google.com ([209.85.223.181]:35885) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zuiqk-0005sB-09 for control@debbugs.gnu.org; Fri, 06 Nov 2015 10:23:04 -0500 Received: by ioll68 with SMTP id l68so128497820iol.3 for ; Fri, 06 Nov 2015 07:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=u+pgmQy8WmbMTzqRDddu5LT2enPerkHpRp8etUb6SBo=; b=jYO86DPGpocNKCl3AUOlC1HmVdvb19/dy66Tt4lQWl/MYeSyxM/nrohIVAHT2vtpNj JwH6Z7sVBnxEWwlj2iq6E19pD3umtArjqjMqX1Zk9ooM8wSzwo87ukD8zngX6dg7F1X5 m2lx2xdtO2HUpypxCIVAzAFsCdKUyzK9GM9bkd8Y1QKGlYotV8x9N+SASUG3c6jyV6wn op3k0sHmlkK+EjB8r3vu4jlwVjAyUu6HYBBV5H5Fw8T6UkgaZz0JPlEf37QWXKKUDP9P 9E86RhmJmoGU+cDcaQwLo2L5Z3wimCDSjJFI1fq75513q4mHA6HbZRxeK0FC20Ofrz87 fkwA== MIME-Version: 1.0 X-Received: by 10.107.7.210 with SMTP id g79mr9555573ioi.81.1446823365365; Fri, 06 Nov 2015 07:22:45 -0800 (PST) Received: by 10.79.119.2 with HTTP; Fri, 6 Nov 2015 07:22:45 -0800 (PST) Date: Fri, 6 Nov 2015 10:22:45 -0500 X-Google-Sender-Auth: mcrBeHEQcjAb7sRWx9lj6S6sha8 Message-ID: Subject: merge bugs 21819 21824 From: Noam Postavsky To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) merge 21819 21824 quit Didn't notice Yutian Li had already reported. From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 06 Nov 2015 15:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo To: npostavs@users.sourceforge.net Cc: 21824@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.144682426530377 (code B ref 21824); Fri, 06 Nov 2015 15:38:02 +0000 Received: (at 21824) by debbugs.gnu.org; 6 Nov 2015 15:37:45 +0000 Received: from localhost ([127.0.0.1]:55992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zuj5F-0007ts-7S for submit@debbugs.gnu.org; Fri, 06 Nov 2015 10:37:45 -0500 Received: from mtaout26.012.net.il ([80.179.55.182]:56653) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zuj4u-0007tD-PV for 21824@debbugs.gnu.org; Fri, 06 Nov 2015 10:37:43 -0500 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NXE00700GFF9600@mtaout26.012.net.il> for 21824@debbugs.gnu.org; Fri, 06 Nov 2015 17:40:44 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXE0085NGVWJS00@mtaout26.012.net.il>; Fri, 06 Nov 2015 17:40:44 +0200 (IST) Date: Fri, 06 Nov 2015 17:37:13 +0200 From: Eli Zaretskii In-reply-to: <83twozqhhe.fsf@gnu.org> X-012-Sender: halo1@inter.net.il Message-id: <83poznqguu.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (+) > Date: Fri, 06 Nov 2015 17:23:41 +0200 > From: Eli Zaretskii > Cc: 21824@debbugs.gnu.org > > I will see about adding a test for this tricky failure. Actually, would you like converting your test case into a test, and post a patch to the test suite to that effect? TIA. From unknown Tue Aug 19 23:13:55 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Noam Postavsky Subject: bug#21824: closed (Re: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer) Message-ID: References: X-Gnu-PR-Message: they-closed 21824 X-Gnu-PR-Package: emacs Reply-To: 21824@debbugs.gnu.org Date: Sat, 07 Nov 2015 02:26:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1446863162-2571-1" This is a multi-part message in MIME format... ------------=_1446863162-2571-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #21824: 25.0.50; overlay modification-hooks called with wrong buffer which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 21824@debbugs.gnu.org. --=20 21824: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21824 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1446863162-2571-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 21824-done) by debbugs.gnu.org; 7 Nov 2015 02:25:11 +0000 Received: from localhost ([127.0.0.1]:56305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZutBm-0000eF-PL for submit@debbugs.gnu.org; Fri, 06 Nov 2015 21:25:11 -0500 Received: from mail-ig0-f178.google.com ([209.85.213.178]:38276) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZutBT-0000dU-19 for 21824-done@debbugs.gnu.org; Fri, 06 Nov 2015 21:25:09 -0500 Received: by igbxm8 with SMTP id xm8so22999940igb.1 for <21824-done@debbugs.gnu.org>; Fri, 06 Nov 2015 18:24:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ac4hlNC9TEJ71abx02EB0DHWEJZgf8RS2JsG1kaT0Bc=; b=pJT9zNVZ98Q+IxNMRu8cPj5iBTV6gXNMSH/33oya01xgKHa8mZ5K5Kb42TR6povPKF 5ll8fF4Fvnaz30FKf0H8ZrB9NjkCH+s8b3AazxmBvL4GSHGzhlcQwoV875WZ3oVJIdAa FQUI7X/lAiXfHGFMZZAFYsMcMe1nXyryOHiX9odHD7+iId/sWwHsVyRzQIR/dojKrFzX f+I6bXRsVyh6v65jNW/yDS0UnIUb0zvBGRjv7pGyqYnwn/3MESHhH/Aw/mfQXQ219D3J nDrYzmH6T1ch8wExl8tLsdxt80XvlJ0g9DwFssaJG5vfLQi3oShVichSa8J/C4BBaJn8 ZtVQ== MIME-Version: 1.0 X-Received: by 10.50.32.69 with SMTP id g5mr12468341igi.35.1446863090376; Fri, 06 Nov 2015 18:24:50 -0800 (PST) Received: by 10.79.119.2 with HTTP; Fri, 6 Nov 2015 18:24:50 -0800 (PST) In-Reply-To: <83twozqhhe.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> Date: Fri, 6 Nov 2015 21:24:50 -0500 X-Google-Sender-Auth: 5zP-LSFr85ToYqKlGjQpIV_tfrA Message-ID: Subject: Re: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21824-done Cc: 21824-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 Fri, Nov 6, 2015 at 10:23 AM, Eli Zaretskii wrote: > (It sounds like a very old bug, as all the > pieces of the puzzle were not touched in at least 15 years.) Quite likely, the circumstances required to trigger it are pretty specific. > > Please see if the original bug is solved by the latest master. Yes, it's fixed. > > Btw, any idea how come overlays wound up in *Messages* in the original > scenario? global-highlight-parentheses-mode puts overlays in every buffer. > Actually, would you like converting your test case into a test, and > post a patch to the test suite to that effect? TIA. Something like this? I'm not sure where to put it. (ert-deftest overlay-modification-hooks () "Test for bug#21824." (let ((buf nil)) (with-temp-buffer (insert "123") (overlay-put (make-overlay 1 3) 'modification-hooks (list (lambda (ov &rest _) (setq buf (current-buffer))))) (goto-char 2) (insert "x") (with-current-buffer "*Messages*" (make-overlay 1 1)) (message "a message") (message "a message") (should (eq buf (current-buffer)))))) ------------=_1446863162-2571-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 4 Nov 2015 03:06:31 +0000 Received: from localhost ([127.0.0.1]:52044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtoP8-0005Mc-J9 for submit@debbugs.gnu.org; Tue, 03 Nov 2015 22:06:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40867) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtoP6-0005MS-AO for submit@debbugs.gnu.org; Tue, 03 Nov 2015 22:06:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtoP3-0002Ii-T9 for submit@debbugs.gnu.org; Tue, 03 Nov 2015 22:06:27 -0500 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]:59584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtoP3-0002Ie-PD for submit@debbugs.gnu.org; Tue, 03 Nov 2015 22:06:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtoP1-00015f-Tb for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 22:06:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtoOz-0002HD-W1 for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 22:06:23 -0500 Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:34567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtoOz-0002H9-PX for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 22:06:21 -0500 Received: by iody8 with SMTP id y8so40462186iod.1 for ; Tue, 03 Nov 2015 19:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=Tbgf+wCcNqs+lw5xSe4Q5aamhnpfAxEDgzNaYn1PFUE=; b=o+eImzFPUdEXZa5Arga25JkQH+1glGuiDyDUMSQpBrEFIOgNAV5CSzlBNqQ8y5AdKu foFgX7OrbmaW9XbW2RH68zx6dZ7YfV1/KDgfPNGRsVtNWWv+acdPEmjHNaDiunLTCeTp pfu4DW/XX3P8O9Y72zs/rBSEHGT3VT37I8hpvfTbB2qMwCq43FHfWhXc2zdBLTv0fVfn d4P4xhel8D1td6gBCOGMl0jo11a0I+lOC0LD/LpNkGcBzKVp+Q1I19NnkTBxHY1nB7Fk IwwxmrP9+pfxy31Ha5BBARr4DbU0jxhH+Q2G8AhSsn3Ksy1jFRnFowg2pWWlwTo8W9dY IfYg== MIME-Version: 1.0 X-Received: by 10.107.35.16 with SMTP id j16mr564034ioj.120.1446606380760; Tue, 03 Nov 2015 19:06:20 -0800 (PST) Received: by 10.79.119.2 with HTTP; Tue, 3 Nov 2015 19:06:20 -0800 (PST) Date: Tue, 3 Nov 2015 22:06:20 -0500 X-Google-Sender-Auth: uf4ZkYIVJoyTR3YKfhQ9QXWuNoc Message-ID: Subject: 25.0.50; overlay modification-hooks called with wrong buffer From: Noam Postavsky To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary=001a11405fc074a97f0523ae4ba0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.15 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 (----) --001a11405fc074a97f0523ae4ba0 Content-Type: text/plain; charset=UTF-8 The circumstances that trigger this seem to be a combination of overlays and timers. Attached is an init.el file that installs several packages needed to trigger the problem. I have not yet managed to find a simpler way of reproducing this. After installing the packages, and running M-x irony-install-server (requires libclang), the problem can be triggered by a C++ mode buffer with the following contents: void func(int x); int main() { fun| } where | represents the cursor. Press TAB y C-f C-b C-f C-b, this results in a (wrong-type-argument overlayp nil) which is due to yas--on-field-overlay-modification being called with *Messages* as the current buffer, rather than the C++ buffer where the yasnippet's overlay is in. The begin and end positions passed correspond to *Messages* buffer positions (i.e. they are too big to be from the C++ buffer). According to the lisp backtrace (see below), it seems to be triggered by a call to `message' via a timer. Original report is at https://github.com/capitaomorte/yasnippet/issues/607 Debugger entered--Lisp error: (wrong-type-argument overlayp nil) overlay-get(nil yas--snippet) (let* ((inhibit-modification-hooks t) (field (overlay-get overlay (quote yas--field))) (snippet (overlay-get yas--active-field-overlay (quote yas--snippet)))) (cond (after\? (yas--advance-end-maybe field (overlay-end overlay)) (save-excursion (yas--field-update-display field)) (yas--update-mirrors snippet)) (field (if (and (not after\?) (not (progn nil (or ... ...) (aref field 7))) (eq (point) (if (markerp ...) (marker-position ...) (progn nil ... ...)))) (progn (yas--skip-and-clear field))) (progn nil (or (progn nil (and (vectorp field) (>= ... 9) (memq ... cl-struct-yas--field-tags) t)) (signal (quote wrong-type-argument) (list (quote yas--field) field))) (let* ((v field)) (aset v 7 t)))))) (if (or yas--inhibit-overlay-hooks (yas--undo-in-progress)) nil (message "yas--on-field-ov-mod(%S %S %S %S %S): buffer = %s" overlay after\? _beg _end _length (current-buffer)) (let* ((inhibit-modification-hooks t) (field (overlay-get overlay (quote yas--field))) (snippet (overlay-get yas--active-field-overlay (quote yas--snippet)))) (cond (after\? (yas--advance-end-maybe field (overlay-end overlay)) (save-excursion (yas--field-update-display field)) (yas--update-mirrors snippet)) (field (if (and (not after\?) (not (progn nil ... ...)) (eq (point) (if ... ... ...))) (progn (yas--skip-and-clear field))) (progn nil (or (progn nil (and ... ... ... t)) (signal (quote wrong-type-argument) (list ... field))) (let* ((v field)) (aset v 7 t))))))) yas--on-field-overlay-modification(# t 3008 3008 33) message("%s" "use of undeclared identifier 'y'") display-message-or-buffer("use of undeclared identifier 'y'" "*Flycheck error messages*") (let ((messages (mapcar (function flycheck-error-format-message-and-id) errors))) (display-message-or-buffer (string-join messages "\n\n") flycheck-error-message-buffer)) (progn (let ((messages (mapcar (function flycheck-error-format-message-and-id) errors))) (display-message-or-buffer (string-join messages "\n\n") flycheck-error-message-buffer))) (if (and errors (flycheck-may-use-echo-area-p)) (progn (let ((messages (mapcar (function flycheck-error-format-message-and-id) errors))) (display-message-or-buffer (string-join messages "\n\n") flycheck-error-message-buffer)))) flycheck-display-error-messages(([cl-struct-flycheck-error # irony "/tmp/el-get-test-home/foo.cpp" 5 8 "use of undeclared identifier 'y'" error nil])) funcall(flycheck-display-error-messages ([cl-struct-flycheck-error # irony "/tmp/el-get-test-home/foo.cpp" 5 8 "use of undeclared identifier 'y'" error nil])) (progn (funcall flycheck-display-errors-function errors)) (if flycheck-display-errors-function (progn (funcall flycheck-display-errors-function errors))) flycheck-display-errors(([cl-struct-flycheck-error # irony "/tmp/el-get-test-home/foo.cpp" 5 8 "use of undeclared identifier 'y'" error nil])) (progn (flycheck-display-errors errors)) (if errors (progn (flycheck-display-errors errors))) (let ((errors (flycheck-overlay-errors-at (point)))) (if errors (progn (flycheck-display-errors errors)))) (progn (let ((errors (flycheck-overlay-errors-at (point)))) (if errors (progn (flycheck-display-errors errors))))) (if flycheck-mode (progn (let ((errors (flycheck-overlay-errors-at (point)))) (if errors (progn (flycheck-display-errors errors)))))) (progn (flycheck-cancel-error-display-error-at-point-timer) (if flycheck-mode (progn (let ((errors (flycheck-overlay-errors-at (point)))) (if errors (progn (flycheck-display-errors errors))))))) (condition-case err (progn (flycheck-cancel-error-display-error-at-point-timer) (if flycheck-mode (progn (let ((errors (flycheck-overlay-errors-at ...))) (if errors (progn (flycheck-display-errors errors))))))) ((debug error) (message "Flycheck error display error: %s" err) nil)) flycheck-display-error-at-point() apply(flycheck-display-error-at-point nil) timer-event-handler([t 22073 29035 116958 nil flycheck-display-error-at-point nil nil 308000]) In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, X toolkit) of 2015-11-03 Repository revision: 2390d890765983ed1e5ece1711c470351705e7c8 Windowing system distributor 'The X.Org Foundation', version 11.0.11702000 Configured using: 'configure --cache-file=../config.cache 'CFLAGS=-O2 -march=native' --with-crt-dir=/usr/lib/x86_64-linux-gnu --with-x-toolkit=lucid --without-toolkit-scroll-bars --with-gif=no' Configured features: XPM JPEG TIFF PNG SOUND DBUS NOTIFY GNUTLS LIBXML2 ZLIB LUCID X11 Important settings: value of $LANG: en_CA.UTF-8 locale-coding-system: utf-8-unix Major mode: Debugger Minor modes in effect: global-flycheck-mode: t yas-global-mode: t yas-minor-mode: t global-company-mode: t company-mode: t global-highlight-parentheses-mode: t highlight-parentheses-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 transient-mark-mode: t Recent messages: [yas] Loading snippet files from /tmp/el-get-test-home/.emacs.d/elpa/yasnippet-20151101.1535/snippets/c++-mode [yas] Loading for `cc-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /tmp/el-get-test-home/.emacs.d/elpa/yasnippet-20151101.1535/snippets/cc-mode) (quote cc-mode)))! [yas] Loading snippet files from /tmp/el-get-test-home/.emacs.d/elpa/yasnippet-20151101.1535/snippets/cc-mode Debug on Error enabled globally [yas] snippet expanded. yas--on-field-ov-mod(# nil 41 41 nil): buffer = foo.cpp yas--on-field-ov-mod(# t 41 42 0): buffer = foo.cpp use of undeclared identifier 'y' yas--on-field-ov-mod(# t 3008 3008 33): buffer = *Messages* Entering debugger... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message dired format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils debug cus-start cus-load thingatpt lisp-mnt irony-cdb-libclang irony-cdb-json pp json irony-cdb-clang-complete irony-cdb cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs company-files company-oddmuse company-keywords company-etags etags xref project eieio byte-opt bytecomp byte-compile cconv eieio-core company-gtags company-dabbrev-code company-dabbrev company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb company-irony irony-completion irony-snippet flycheck-irony irony-diagnostics irony flycheck find-func rx subr-x dash jka-compr compile comint ansi-color ring let-alist yasnippet cl-extra derived help-mode company edmacro kmacro highlight-parentheses cl-macs easy-mmode cl gv cl-seq finder-inf info cl-loaddefs pcase cl-lib package easymenu epg-config time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd 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 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 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 dbusbind inotify dynamic-setting x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 300138 13183) (symbols 48 31710 0) (miscs 40 474 275) (strings 32 53496 8101) (string-bytes 1 1682695) (vectors 16 23094) (vector-slots 8 660438 6306) (floats 8 740 352) (intervals 56 288 0) (buffers 976 16) (heap 1024 31399 1018)) --001a11405fc074a97f0523ae4ba0 Content-Type: application/octet-stream; name="init.el" Content-Disposition: attachment; filename="init.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_igk7ze9q0 Ozs7IGVtYWNzIC0tLSBFbWFjcyBjb25maWd1cmF0aW9uIC0qLSBtb2RlOiBlbWFjcy1saXNwIC0q LQoKOzsgQXV0aG9yOiBZdXRpYW4gTGkgPGhvdHB4bGVzc0BnbWFpbC5jb20+Cgo7OzsgQ29tbWVu dGFyeToKCjs7OyBDb2RlOgoKOzsgIyBQYWNrYWdlcwoocmVxdWlyZSAncGFja2FnZSkKKHJlcXVp cmUgJ2NsLWxpYikKOzsgKGFkZC10by1saXN0ICdwYWNrYWdlLWFyY2hpdmVzCjs7ICAgICAgICAg ICAgICAnKCJlbHB5IiAuICJodHRwczovL2pvcmdlbnNjaGFlZmVyLmdpdGh1Yi5pby9wYWNrYWdl cy8iKSkKKGFkZC10by1saXN0ICdwYWNrYWdlLWFyY2hpdmVzCiAgICAgICAgICAgICAnKCJtZWxw YSIgLiAiaHR0cDovL21lbHBhLm9yZy9wYWNrYWdlcy8iKSB0KQoocGFja2FnZS1pbml0aWFsaXpl KQooZGVmdmFyIHJlcXVpcmVkLXBhY2thZ2VzCiAgJyhoaWdobGlnaHQtcGFyZW50aGVzZXMKICAg IDs7ZGlmZi1obAogICAgY29tcGFueQogICAgZmx5Y2hlY2sKICAgIHlhc25pcHBldAogICAgaXJv bnkKICAgIGNvbXBhbnktaXJvbnkKICAgIGZseWNoZWNrLWlyb255CiAgICApCiAgIlJlcXVpcmVk IHBhY2thZ2VzLiIpCgooZGVmdW4gaW5zdGFsbC1yZXF1aXJlZC1wYWNrYWdlcyAoKQogICJJbnN0 Y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VuIG15LWlyb255LW1vZGUtaG9vayAoKQogICJJcm9u eSBtb2RlIGhvb2suIgogIChkZWZpbmUta2V5IGlyb255LW1vZGUtbWFwIFtyZW1hcCBjb21wbGV0 aW9uLWF0LXBvaW50XQogICAgJ2lyb255LWNvbXBsZXRpb24tYXQtcG9pbnQtYXN5bmMpCiAgKGRl ZmluZS1rZXkgaXJvbnktbW9kZS1tYXAgW3JlbWFwIGNvbXBsZXRlLXN5bWJvbF0KICAgICdpcm9u eS1jb21wbGV0aW9uLWF0LXBvaW50LWFzeW5jKSkKKGFkZC1ob29rICdpcm9ueS1tb2RlLWhvb2sg J215LWlyb255LW1vZGUtaG9vaykKKGFkZC1ob29rICdpcm9ueS1tb2RlLWhvb2sgJ2lyb255LWNk Yi1hdXRvc2V0dXAtY29tcGlsZS1vcHRpb25zKQooYWRkLWhvb2sgJ2lyb255LW1vZGUtaG9vayAn Y29tcGFueS1pcm9ueS1zZXR1cC1iZWdpbi1jb21tYW5kcykKKGFmdGVyICdmbHljaGVjawogIChh ZGQtaG9vayAnZmx5Y2hlY2stbW9kZS1ob29rICMnZmx5Y2hlY2staXJvbnktc2V0dXApKQooZGVm dmFyIGZseWNoZWNrLWlyb255LWVycm9yLWZpbHRlcikKKHNldHEKIGZseWNoZWNrLWlyb255LWVy cm9yLWZpbHRlcgogKGxhbWJkYSAoZXJyb3JzKQogICAoY2wtcmVtb3ZlLWlmCiAgICAobGFtYmRh IChpKQogICAgICAoc3RyaW5nPSAoZmx5Y2hlY2stZXJyb3ItbWVzc2FnZSBpKSAiI3ByYWdtYSBv bmNlIGluIG1haW4gZmlsZSIpKQogICAgZXJyb3JzKSkpCihyZXF1aXJlICdmbHljaGVjay1pcm9u eSkKCihhZnRlciAnY29tcGFueQogIChhZGQtdG8tbGlzdAogICAnY29tcGFueS1iYWNrZW5kcyAn Y29tcGFueS1pcm9ueSkpCg== --001a11405fc074a97f0523ae4ba0-- ------------=_1446863162-2571-1-- From unknown Tue Aug 19 23:13:55 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Yutian Li | =?UTF-8?Q?=E6=9D=8E=E9=9B=A8=E7=94=B0?= Subject: bug#21819: closed (Re: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer) Message-ID: References: X-Gnu-PR-Message: they-closed 21819 X-Gnu-PR-Package: emacs Reply-To: 21819@debbugs.gnu.org Date: Sat, 07 Nov 2015 02:26:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1446863162-2571-3" This is a multi-part message in MIME format... ------------=_1446863162-2571-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #21824: 24.5; Overlay modification function called with wrong arguments which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 21819@debbugs.gnu.org. --=20 21824: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21824 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1446863162-2571-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 21824-done) by debbugs.gnu.org; 7 Nov 2015 02:25:11 +0000 Received: from localhost ([127.0.0.1]:56305 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZutBm-0000eF-PL for submit@debbugs.gnu.org; Fri, 06 Nov 2015 21:25:11 -0500 Received: from mail-ig0-f178.google.com ([209.85.213.178]:38276) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZutBT-0000dU-19 for 21824-done@debbugs.gnu.org; Fri, 06 Nov 2015 21:25:09 -0500 Received: by igbxm8 with SMTP id xm8so22999940igb.1 for <21824-done@debbugs.gnu.org>; Fri, 06 Nov 2015 18:24:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ac4hlNC9TEJ71abx02EB0DHWEJZgf8RS2JsG1kaT0Bc=; b=pJT9zNVZ98Q+IxNMRu8cPj5iBTV6gXNMSH/33oya01xgKHa8mZ5K5Kb42TR6povPKF 5ll8fF4Fvnaz30FKf0H8ZrB9NjkCH+s8b3AazxmBvL4GSHGzhlcQwoV875WZ3oVJIdAa FQUI7X/lAiXfHGFMZZAFYsMcMe1nXyryOHiX9odHD7+iId/sWwHsVyRzQIR/dojKrFzX f+I6bXRsVyh6v65jNW/yDS0UnIUb0zvBGRjv7pGyqYnwn/3MESHhH/Aw/mfQXQ219D3J nDrYzmH6T1ch8wExl8tLsdxt80XvlJ0g9DwFssaJG5vfLQi3oShVichSa8J/C4BBaJn8 ZtVQ== MIME-Version: 1.0 X-Received: by 10.50.32.69 with SMTP id g5mr12468341igi.35.1446863090376; Fri, 06 Nov 2015 18:24:50 -0800 (PST) Received: by 10.79.119.2 with HTTP; Fri, 6 Nov 2015 18:24:50 -0800 (PST) In-Reply-To: <83twozqhhe.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> Date: Fri, 6 Nov 2015 21:24:50 -0500 X-Google-Sender-Auth: 5zP-LSFr85ToYqKlGjQpIV_tfrA Message-ID: Subject: Re: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer From: Noam Postavsky To: Eli Zaretskii Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21824-done Cc: 21824-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 Fri, Nov 6, 2015 at 10:23 AM, Eli Zaretskii wrote: > (It sounds like a very old bug, as all the > pieces of the puzzle were not touched in at least 15 years.) Quite likely, the circumstances required to trigger it are pretty specific. > > Please see if the original bug is solved by the latest master. Yes, it's fixed. > > Btw, any idea how come overlays wound up in *Messages* in the original > scenario? global-highlight-parentheses-mode puts overlays in every buffer. > Actually, would you like converting your test case into a test, and > post a patch to the test suite to that effect? TIA. Something like this? I'm not sure where to put it. (ert-deftest overlay-modification-hooks () "Test for bug#21824." (let ((buf nil)) (with-temp-buffer (insert "123") (overlay-put (make-overlay 1 3) 'modification-hooks (list (lambda (ov &rest _) (setq buf (current-buffer))))) (goto-char 2) (insert "x") (with-current-buffer "*Messages*" (make-overlay 1 1)) (message "a message") (message "a message") (should (eq buf (current-buffer)))))) ------------=_1446863162-2571-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 3 Nov 2015 08:25:52 +0000 Received: from localhost ([127.0.0.1]:50392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtWue-0004OS-3l for submit@debbugs.gnu.org; Tue, 03 Nov 2015 03:25:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42937) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZtWuc-0004OL-OS for submit@debbugs.gnu.org; Tue, 03 Nov 2015 03:25:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtWub-0007Td-J9 for submit@debbugs.gnu.org; Tue, 03 Nov 2015 03:25:50 -0500 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]:58717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtWub-0007TX-GD for submit@debbugs.gnu.org; Tue, 03 Nov 2015 03:25:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtWua-00005L-8w for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 03:25:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtWuZ-0007Sh-4G for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 03:25:48 -0500 Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:35234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtWuY-0006lh-VO for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2015 03:25:47 -0500 Received: by oifu63 with SMTP id u63so4864529oif.2 for ; Tue, 03 Nov 2015 00:24:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=RrWPsxLcPEo7S6O04SzSj9GDnJQNi5n9Ms+EAHXHPzY=; b=LvudjsQZoua5SNyRsNZ3ISDDVK32oQenjNaGmGKiqe/1dNsv2bOJO3Y4JQb+bTChx9 n0i00X7R+hdqcn1D+Bv2DxE1G2up1XTsm6vKBznNLmXwPBtOsyJKLAMVbmB1IOF4/Xf/ K3A/OlMCwTugtNLRgHskY3tPb2csFbp/pmaqNu5/g8ItB5qiwdYPEhdB0MDxNLviz7Rr 9yVrzCkLM8Pj90uhT433kZVH50AeqMggHdiLXu+l3ufmuaSCYaOjENHI0suUKLYiCa27 IQw9P4u5UsBcbxSRqdftI6rC+3tSZKdcz2jMyJYK2zR2rA8lTIiDrwmPd9HIGSVKxH0A LroA== MIME-Version: 1.0 X-Received: by 10.202.173.142 with SMTP id w136mr16773452oie.128.1446539081677; Tue, 03 Nov 2015 00:24:41 -0800 (PST) Received: by 10.202.227.129 with HTTP; Tue, 3 Nov 2015 00:24:41 -0800 (PST) Date: Tue, 3 Nov 2015 00:24:41 -0800 Message-ID: Subject: 24.5; Overlay modification function called with wrong arguments From: =?UTF-8?B?WXV0aWFuIExpIHwg5p2O6Zuo55Sw?= To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). 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.15 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 (----) Hi. This happens on both Mac and GNU/Linux with latest release of Emacs. I also tried the master branch of `git://git.sv.gnu.org/emacs.git` and it still exists. The discussion that led to the discovery of the bug is [here](https://github.com/capitaomorte/yasnippet/issues/607). There is a stack trace on the OP. Some guesses in the bottom. There is also instructions to reproduce this. The direct cause is the modification hook registered with the overlay is called with apparently wrong arguments. The hook function is registered with an overlay in the C++ buffer, but called with `beg` and `end` referring to positions probably in the `*Messages*` buffer. As the stack trace shows, Flycheck called `message` to display a message indicating syntax errors, and `message` somehow invokes the modification hook function, which was defined in C++ buffer but called now in `*Messages*` buffer. I traced into the Emacs source file `src/buffer.c`. There is a function `report_overlay_modification`. It *should* (I guess) be called with `after` set to `false` and `true` alternatively. But on the erroneous invocation, it is called with `after` set to `true` twice consecutively. The first call `_beg` and `_end` are normal small integer (inside C++ buffer). The second call they are huge and must refer to the `*Messages*` buffer. Inside the call, it uses a global array to store overlay modification hook functions. Now it's called twice consecutively with `after` set to `true`, it must have reused old hook functions, hence the call to our function with correct overlay but wrong cursor. Because on a call with `after` set to `false`, it will "clear" the hook functions. Best regards, Yutian LI | =E6=9D=8E=E9=9B=A8=E7=94=B0 Mobile: +1 (650) 798-9092 E-mail: hotpxless@gmail.com Computer Science Department Stanford University ------------=_1446863162-2571-3-- From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2015 08:30:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Noam Postavsky Cc: 21824@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.14468849434328 (code B ref 21824); Sat, 07 Nov 2015 08:30:06 +0000 Received: (at 21824) by debbugs.gnu.org; 7 Nov 2015 08:29:03 +0000 Received: from localhost ([127.0.0.1]:56368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zuyru-00017k-FO for submit@debbugs.gnu.org; Sat, 07 Nov 2015 03:29:02 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]:47630) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZuyrZ-000170-Mo for 21824@debbugs.gnu.org; Sat, 07 Nov 2015 03:29:01 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NXF00600R7VFT00@a-mtaout23.012.net.il> for 21824@debbugs.gnu.org; Sat, 07 Nov 2015 10:28:39 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXF0065ARJRDD40@a-mtaout23.012.net.il>; Sat, 07 Nov 2015 10:28:39 +0200 (IST) Date: Sat, 07 Nov 2015 10:28:32 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <838u6aqklr.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (+) > Date: Fri, 6 Nov 2015 21:24:50 -0500 > From: Noam Postavsky > Cc: 21824-done@debbugs.gnu.org > > On Fri, Nov 6, 2015 at 10:23 AM, Eli Zaretskii wrote: > > > > Please see if the original bug is solved by the latest master. > > Yes, it's fixed. Thanks for testing. > > Btw, any idea how come overlays wound up in *Messages* in the original > > scenario? > > global-highlight-parentheses-mode puts overlays in every buffer. Does it really mean to do that in *Messages*? If not, perhaps we should suggest to the developers of highlight-parentheses to exempt *Messages* from that, as that buffer is pretty specialized anyway. In particular, due to the way the message logging in *Messages* is implemented, the overlay modification hooks will only ever be called in that buffer with AFTER non-nil, and even that will only happen when Emacs decides to delete some text from *Messages*; inserting a new message there will never call the overlay modification hooks. > > Actually, would you like converting your test case into a test, and > > post a patch to the test suite to that effect? TIA. > > Something like this? I'm not sure where to put it. Yes, this looks good to me. How about creating a new file buffer-tests.el (the offending code is in buffer.c)? Thanks. From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2015 16:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 21824@debbugs.gnu.org Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.144691337422164 (code B ref 21824); Sat, 07 Nov 2015 16:23:01 +0000 Received: (at 21824) by debbugs.gnu.org; 7 Nov 2015 16:22:54 +0000 Received: from localhost ([127.0.0.1]:57016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zv6GT-0005lP-TB for submit@debbugs.gnu.org; Sat, 07 Nov 2015 11:22:54 -0500 Received: from mail-ig0-f178.google.com ([209.85.213.178]:33494) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zv6GR-0005lG-1j for 21824@debbugs.gnu.org; Sat, 07 Nov 2015 11:22:51 -0500 Received: by igvi2 with SMTP id i2so51583764igv.0 for <21824@debbugs.gnu.org>; Sat, 07 Nov 2015 08:22:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=4edTswaOlcxYFkirEVmkJcF3cox8h1hk2pt+WuB0te8=; b=k4/ZhbiSxCVzOGpvTJPTzJMDBAju4Dc2G7f2EVmghhxPCnoOyCW60zjeWNJ3IN8eGx UtIkV9JbBTX7/77VPSQIlYEW7D+RN7hb1YXLOx9OXN1yTqKDlgWQxq8qQtbBB0ft20RJ z9CA6t8MUZiIKouWZGYIDliPhQ2WkyfENyV/zFNqrOb6GmHVw7nNpjalenMYwSV9XLPV S+p5Qeat7YfEmxGBRSMxy/K1hzqIv/AmZltyzlzQuALN8NS50gC13gMr7yE31U7pimXB gXQQfUzoqpG685pb++UYRNwBvKksaPozLSjD+N3/6Uh1dKNIIxzE54TmfLFZbPn9/ElC 2tFQ== MIME-Version: 1.0 X-Received: by 10.50.117.5 with SMTP id ka5mr14859791igb.58.1446913370295; Sat, 07 Nov 2015 08:22:50 -0800 (PST) Received: by 10.79.119.2 with HTTP; Sat, 7 Nov 2015 08:22:50 -0800 (PST) In-Reply-To: <838u6aqklr.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> <838u6aqklr.fsf@gnu.org> Date: Sat, 7 Nov 2015 11:22:50 -0500 X-Google-Sender-Auth: 6WqV7ICagHkF3xC17CZmAWQu0HI Message-ID: From: Noam Postavsky Content-Type: multipart/mixed; boundary=089e013a10e4752f330523f5c54e X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 (/) --089e013a10e4752f330523f5c54e Content-Type: text/plain; charset=UTF-8 On Sat, Nov 7, 2015 at 3:28 AM, Eli Zaretskii wrote: >> global-highlight-parentheses-mode puts overlays in every buffer. > > Does it really mean to do that in *Messages*? If not, perhaps we > should suggest to the developers of highlight-parentheses to exempt > *Messages* from that, as that buffer is pretty specialized anyway. In > particular, due to the way the message logging in *Messages* is > implemented, the overlay modification hooks will only ever be called > in that buffer with AFTER non-nil, and even that will only happen when > Emacs decides to delete some text from *Messages*; inserting a new > message there will never call the overlay modification hooks. Well, I suppose users may want parentheses highlighted in messages too. But note that the overlays created by highlight-parentheses-mode do *not* have any modification-hooks. It's the triggering modification-hooks of (yasnippet's) overlays in another buffer in addition to the existence of (highlight-parentheses') overlays in *Messages* that triggers the bug. > Yes, this looks good to me. How about creating a new file > buffer-tests.el (the offending code is in buffer.c)? Okay, see attached. --089e013a10e4752f330523f5c54e Content-Type: text/x-diff; charset=US-ASCII; name="0001-Add-test-for-bug-21824.patch" Content-Disposition: attachment; filename="0001-Add-test-for-bug-21824.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_igpat4r70 RnJvbSA1NjVkODc0NDI3MTI5MmJjY2IzMzQ0NjBhNjJmZjY2MjgwMmU2YWYzIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOb2FtIFBvc3RhdnNreSA8bnBvc3RhdnNAdXNlcn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UgbWVzc2FnZSBj b2FsZXNjaW5nIFsyIHRpbWVzXSB3cm9uZ2x5CitydW5zIHRoZSBtb2RpZmljYXRpb24taG9vayBv ZiB0aGUgb3ZlcmxheSBpbiB0aGUgMXN0IGJ1ZmZlciwgYnV0Cit3aXRoIHBhcmFtZXRlcnMgZnJv bSB0aGUgKk1lc3NhZ2VzKiBidWZmZXIgbW9kaWZpY2F0aW9uLiIKKyAgKGxldCAoKGJ1ZiBuaWwp CisgICAgICAgIChtc2ctb3YgbmlsKSkKKyAgICAod2l0aC10ZW1wLWJ1ZmZlcgorICAgICAgKGlu c2VydCAiMTIzIikKKyAgICAgIChvdmVybGF5LXB1dCAobWFrZS1vdmVybGF5IDEgMykKKyAgICAg ICAgICAgICAgICAgICAnbW9kaWZpY2F0aW9uLWhvb2tzCisgICAgICAgICAgICAgICAgICAgKGxp c3QgKGxhbWJkYSAoJnJlc3QgXykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGJ1 ZiAoY3VycmVudC1idWZmZXIpKSkpKQorICAgICAgKGdvdG8tY2hhciAyKQorICAgICAgKGluc2Vy dCAieCIpCisgICAgICAodW53aW5kLXByb3RlY3QKKyAgICAgICAgICAocHJvZ24KKyAgICAgICAg ICAgIChzZXRxIG1zZy1vdiAobWFrZS1vdmVybGF5IDEgMSAoZ2V0LWJ1ZmZlci1jcmVhdGUgIipN ZXNzYWdlcyoiKSkpCisgICAgICAgICAgICAobWVzc2FnZSAiYSBtZXNzYWdlIikKKyAgICAgICAg ICAgIChtZXNzYWdlICJhIG1lc3NhZ2UiKQorICAgICAgICAgICAgKHNob3VsZCAoZXEgYnVmIChj dXJyZW50LWJ1ZmZlcikpKSkKKyAgICAgICAgKHdoZW4gbXNnLW92IChkZWxldGUtb3ZlcmxheSBt c2ctb3YpKSkpKSkKKworOzs7IGJ1ZmZlci10ZXN0cy5lbCBlbmRzIGhlcmUKLS0gCjIuNi4xCgo= --089e013a10e4752f330523f5c54e-- From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Nov 2015 18:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Noam Postavsky Cc: 21824@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.14469196886065 (code B ref 21824); Sat, 07 Nov 2015 18:09:01 +0000 Received: (at 21824) by debbugs.gnu.org; 7 Nov 2015 18:08:08 +0000 Received: from localhost ([127.0.0.1]:57075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zv7uJ-0001Zk-T7 for submit@debbugs.gnu.org; Sat, 07 Nov 2015 13:08:08 -0500 Received: from mtaout29.012.net.il ([80.179.55.185]:54177) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zv7uG-0001ZZ-LL for 21824@debbugs.gnu.org; Sat, 07 Nov 2015 13:08:05 -0500 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NXG00A00I5AKW00@mtaout29.012.net.il> for 21824@debbugs.gnu.org; Sat, 07 Nov 2015 20:07:23 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXG004ZOICBKG50@mtaout29.012.net.il>; Sat, 07 Nov 2015 20:07:23 +0200 (IST) Date: Sat, 07 Nov 2015 20:07:57 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <8337whpts2.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> <838u6aqklr.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (+) > Date: Sat, 7 Nov 2015 11:22:50 -0500 > From: Noam Postavsky > Cc: 21824@debbugs.gnu.org > > On Sat, Nov 7, 2015 at 3:28 AM, Eli Zaretskii wrote: > >> global-highlight-parentheses-mode puts overlays in every buffer. > > > > Does it really mean to do that in *Messages*? If not, perhaps we > > should suggest to the developers of highlight-parentheses to exempt > > *Messages* from that, as that buffer is pretty specialized anyway. In > > particular, due to the way the message logging in *Messages* is > > implemented, the overlay modification hooks will only ever be called > > in that buffer with AFTER non-nil, and even that will only happen when > > Emacs decides to delete some text from *Messages*; inserting a new > > message there will never call the overlay modification hooks. > > Well, I suppose users may want parentheses highlighted in messages too. > > But note that the overlays created by highlight-parentheses-mode do > *not* have any modification-hooks. It's the triggering > modification-hooks of (yasnippet's) overlays in another buffer in > addition to the existence of (highlight-parentheses') overlays in > *Messages* that triggers the bug. Yes. My point was that *Messages* is a special buffer, and all kinds of stuff we take for granted behaves differently there. > > Yes, this looks good to me. How about creating a new file > > buffer-tests.el (the offending code is in buffer.c)? > > Okay, see attached. Thanks, pushed. Btw, the FSF copyright assignment lists a different email address for you. Which one is correct? From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Nov 2015 01:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 21824@debbugs.gnu.org Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.144694703315580 (code B ref 21824); Sun, 08 Nov 2015 01:44:01 +0000 Received: (at 21824) by debbugs.gnu.org; 8 Nov 2015 01:43:53 +0000 Received: from localhost ([127.0.0.1]:57173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvF1M-00043D-IO for submit@debbugs.gnu.org; Sat, 07 Nov 2015 20:43:52 -0500 Received: from mail-io0-f172.google.com ([209.85.223.172]:35128) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvF12-00042n-8G for 21824@debbugs.gnu.org; Sat, 07 Nov 2015 20:43:50 -0500 Received: by ioc74 with SMTP id 74so90869013ioc.2 for <21824@debbugs.gnu.org>; Sat, 07 Nov 2015 17:43:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=EwVkRcVXXpUPNAvZVfFbaFZsqSwN1A5j+RMkwdB7qdE=; b=hWh9cCg9Dzsl6qLSOJJJqIqCwY3+L0D3XuNLirklmfq87N/jTUMF0I5qEw6ibZveXG VbrzLav2F+nGAkegdJU3wTqbus0BNAjjed3jiLQcQhIcWM1EzlfKaTheY38Cz/2inyvZ 9/ebI9ENBdNVStVOah1oJT3xKmaGNC2IAI4QgR5VsvxCuo2hTcylX0A6Oz5kXak8Hx+h u+0BI+RpbY41pnZsBfxOiTX5L4qWEddj6Nc3jgYo8y/GBr4kfGwgq/gZdONnA72zou9b UZlnstq6xEHccIQQm1mW/OVI5rpHm8lLYUsWjD3bTUif3rP4365JjuipICZ3Q1y9Q2Lo Sb8w== MIME-Version: 1.0 X-Received: by 10.107.35.16 with SMTP id j16mr21502982ioj.120.1446947011483; Sat, 07 Nov 2015 17:43:31 -0800 (PST) Received: by 10.79.119.2 with HTTP; Sat, 7 Nov 2015 17:43:31 -0800 (PST) In-Reply-To: <8337whpts2.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> <838u6aqklr.fsf@gnu.org> <8337whpts2.fsf@gnu.org> Date: Sat, 7 Nov 2015 20:43:31 -0500 X-Google-Sender-Auth: Qzp1JI3_2D55GbFm03BYhDaWPp8 Message-ID: From: Noam Postavsky Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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 Sat, Nov 7, 2015 at 1:07 PM, Eli Zaretskii wrote: > Yes. My point was that *Messages* is a special buffer, and all kinds > of stuff we take for granted behaves differently there. Okay. I've suggested they disable highlight-parentheses in *Messages*. https://github.com/tsdh/highlight-parentheses.el/issues/14 > Btw, the FSF copyright assignment lists a different email address for > you. Which one is correct? Both, the sourceforge.net one is an alias. Can you update the list? This is the 2nd time you asked me about this. :) From unknown Tue Aug 19 23:13:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21824: 25.0.50; overlay modification-hooks called with wrong buffer Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Nov 2015 03:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Noam Postavsky Cc: 21824@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 21824-submit@debbugs.gnu.org id=B21824.144695408926283 (code B ref 21824); Sun, 08 Nov 2015 03:42:02 +0000 Received: (at 21824) by debbugs.gnu.org; 8 Nov 2015 03:41:29 +0000 Received: from localhost ([127.0.0.1]:57196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvGrB-0006pp-B6 for submit@debbugs.gnu.org; Sat, 07 Nov 2015 22:41:29 -0500 Received: from mtaout29.012.net.il ([80.179.55.185]:33900) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZvGr8-0006pg-RO for 21824@debbugs.gnu.org; Sat, 07 Nov 2015 22:41:27 -0500 Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NXH008008E2JW00@mtaout29.012.net.il> for 21824@debbugs.gnu.org; Sun, 08 Nov 2015 05:40:45 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NXH003ND8VX4150@mtaout29.012.net.il>; Sun, 08 Nov 2015 05:40:45 +0200 (IST) Date: Sun, 08 Nov 2015 05:41:20 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83vb9dnonz.fsf@gnu.org> References: <83611hvl0w.fsf@gnu.org> <8337wktols.fsf@gnu.org> <83twozqhhe.fsf@gnu.org> <838u6aqklr.fsf@gnu.org> <8337whpts2.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (+) > Date: Sat, 7 Nov 2015 20:43:31 -0500 > From: Noam Postavsky > Cc: 21824@debbugs.gnu.org > > > Btw, the FSF copyright assignment lists a different email address for > > you. Which one is correct? > > Both, the sourceforge.net one is an alias. Can you update the list? I can't, but if the sourceforge.net address is not the real one, the list already provides the correct address. Please use it in your submissions (in the log part, at least), to avoid confusion in the future. > This is the 2nd time you asked me about this. :) At least I'm consistent. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 15 10:12:29 2018 Received: (at control) by debbugs.gnu.org; 15 Sep 2018 14:12:29 +0000 Received: from localhost ([127.0.0.1]:41697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1BJF-0001gs-6o for submit@debbugs.gnu.org; Sat, 15 Sep 2018 10:12:29 -0400 Received: from mail-it0-f46.google.com ([209.85.214.46]:52723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1BJE-0001gf-7Y for control@debbugs.gnu.org; Sat, 15 Sep 2018 10:12:28 -0400 Received: by mail-it0-f46.google.com with SMTP id h3-v6so6127835ita.2 for ; Sat, 15 Sep 2018 07:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=2Mz9gEXZANbLT9AwXGB+oCedaAkW1WUNB9JX4wDodaw=; b=S1Z72O087+uYChKoZjo0SyvMhmC8WD2JLZE6JjcSSzUWBq8vYXLlVOiTFTZL6Wbk7m ZUGavbAIenuGo8MsVmrktufNnKXvlbnFC8z9amhhzNY116vEUzPr4q8/+511uVsIXW4f r8yNzwqqBtQCvx9YbL4AjTCEcwIGdMkjOjxO8Wuw4tfHsuhain8p+pPwtFYIoHG0y96w YMXAn1c3MZwMzEte3PFSETi7wfgwGA1cAVaUtavFux7FNUC1cC4X8jDUUIkIM+1uSlWx QCh7GMKczAeBqIW3JrrVD6H9oTXNK5jyGw0L4RbEt8RPWhCh4BXI9Da+b7hffLLrXYGx J3CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=2Mz9gEXZANbLT9AwXGB+oCedaAkW1WUNB9JX4wDodaw=; b=XW8hez4Uhzhs7RLROKRYWMtH8whmXF15yAanAjstXMkAZ84S1piHA4+l2hit+4FrFK VeP1lt4hDH9WK8wAWjW+AmvcMVkKO3gdywN98HTudypwJ5PwdZAdOgOWVnnguRD4aC7X r0VtJDQJBM11oTm7QJ1Oz+Al3834IIvVGzHYoavrpo1K6f0pndlguHJERB+hI1wIqGW3 AHcD54VTUPvHa3un2VqspbL3asHdILbathSHWrKwrMmGYd2ih36CHmZTYU2HbvanQN3y AavMY2ELhzKRXks3vWTsVz7+HRlAyMR86EcQ/ZJF6hR/sUbIq54N6+CEtimN5YCWnWhD G4dQ== X-Gm-Message-State: APzg51BYuNGkqt7rsL4BEYwVgulXlMvpgHTWvgsdVgrhF0tgQ/nITEP2 VipFlMZ1saSzzDchdLJF4syT9jID X-Google-Smtp-Source: ANB0VdbpTXEQJItPj8YGE7BKrC/GpMvT788mqz8d3tOpokDyYlGnVjlGzwVnKdEJn8NKXD5T+pXoOg== X-Received: by 2002:a24:ccc6:: with SMTP id x189-v6mr4072645itf.110.1537020742832; Sat, 15 Sep 2018 07:12:22 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id n187-v6sm5436900iod.66.2018.09.15.07.12.22 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Sep 2018 07:12:22 -0700 (PDT) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message for bug #21824 Date: Sat, 15 Sep 2018 10:12:21 -0400 Message-ID: <8736uasvcq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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.0 (-) unarchive 21824 quit