From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#64063: smerge-mode highlight gets stuck if buffer autoreverted "delicately" Date: Wed, 14 Jun 2023 14:16:47 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22781"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.48.2 To: 64063@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 14 13:18:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9OW2-0005cL-6B for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Jun 2023 13:18:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q9OVo-00029z-CU; Wed, 14 Jun 2023 07:18:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9OVm-00029b-9B for bug-gnu-emacs@gnu.org; Wed, 14 Jun 2023 07:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q9OVm-0008TQ-0I for bug-gnu-emacs@gnu.org; Wed, 14 Jun 2023 07:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q9OVl-0006Yt-Pp for bug-gnu-emacs@gnu.org; Wed, 14 Jun 2023 07:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Jun 2023 11:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64063 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.168674142625145 (code B ref -1); Wed, 14 Jun 2023 11:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jun 2023 11:17:06 +0000 Original-Received: from localhost ([127.0.0.1]:43854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9OUr-0006XU-LT for submit@debbugs.gnu.org; Wed, 14 Jun 2023 07:17:06 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37358) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9OUp-0006XA-0s for submit@debbugs.gnu.org; Wed, 14 Jun 2023 07:17:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9OUn-0001yJ-6d for bug-gnu-emacs@gnu.org; Wed, 14 Jun 2023 07:17:01 -0400 Original-Received: from forward100b.mail.yandex.net ([2a02:6b8:c02:900:1:45:d181:d100]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9OUj-0008GT-KP for bug-gnu-emacs@gnu.org; Wed, 14 Jun 2023 07:17:00 -0400 Original-Received: from mail-nwsmtp-smtp-production-main-91.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-91.sas.yp-c.yandex.net [IPv6:2a02:6b8:c14:2991:0:640:bb47:0]) by forward100b.mail.yandex.net (Yandex) with ESMTP id A7A886013D for ; Wed, 14 Jun 2023 14:16:48 +0300 (MSK) Original-Received: by mail-nwsmtp-smtp-production-main-91.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id lGZWJD5DY8c0-QnAdUpyy; Wed, 14 Jun 2023 14:16:48 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1686741408; bh=MLqGncXykoLLpVwa1qobosMc7Wlsv6XpyCOKKKoyFig=; h=Date:To:From:Subject:Message-ID; b=kGF+S3j14LAzsgJ4+0tfbWto8h2pTr3lyJicqe5hob9CrPxpHnQteGtJEPNUW6yy0 QV2h/R6YZiToGAhDDBHvGcEh+v1RiM03FWLxyCWdOh/uiOVzTw7tDXSDY+yhhFMKvb blAK06JHCnsE3LUugP1rAWDiv70GrRekzTvcyC00= Authentication-Results: mail-nwsmtp-smtp-production-main-91.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Received-SPF: pass client-ip=2a02:6b8:c02:900:1:45:d181:d100; envelope-from=hi-angel@yandex.ru; helo=forward100b.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263360 Archived-At: Basically, when autorevert is on and the file reverted contains a conflict,= the conflict is highlighted. Then if you remove the conflict by external means,= and Emacs autoreverts the buffer again, the conflict highlight usually gets rem= oved. However, if autorevert is using `revert-buffer-insert-file-contents-delicat= ely`, the highlight gets stuck. # Steps to reproduce 1. Create `/tmp/.emacs` with the following content: (require 'autorevert) ;; Do not break markers in a buffer upon reverting a buffer. Details: ;; https://github.com/magit/magit/issues/4442 (setq revert-buffer-insert-file-contents-function 'revert-buffer-insert= - file-contents-delicately) (global-auto-revert-mode 1) 2. In a terminal, enter Emacs source-code repository, and create a conflict= by executing: git checkout 5cace109d2 && git cherry-pick f24ea84f430 3. Open Emacs as `HOME=3D/tmp emacs etc/NEWS`. Note a conflict line that Em= acs automatically jumped to. 4. In a terminal, execute `git cherry-pick --abort` and wait for Emacs to r= evert the buffer. Note that buffer no longer has conflict. ## Expected The reverted buffer does not have word "user option" highlighted ## Actual The reverted buffer has word "user option" highlighted in red. ------------------ In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-05-31 built on constantine-N61Ja Repository revision: 5cace109d2bce98a7d486e44378286031465f40f Repository branch: fix-smerge-highlight Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Arch Linux Configured using: 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --mandir=3D/usr/share/man --with-gameuser=3D:games --with-modules --without-libotf --without-m17n-flt --without-gconf --enable-link-time-optimization --with-native-compilation=3Dyes --with-xinput2 --with-x-toolkit=3Dgtk3 --without-xaw3d --with-sound=3Dno --with-tree-sitter --without-gpm --without-compress-install '--program-transform-name=3Ds/\([ec]tags\)/\1.emacs/' 'CFLAGS=3D-Wno-error -flto=3D2 -march=3Dnative -O3 -pipe -fno-stack-protector -fweb -fmerge-all-constants -fno-plt -fcommon' 'LDFLAGS=3D-flto=3D2 -O3 -march=3Dnative -fweb -fmerge-all-constants -floop-nest-optimize -Wl,--sort-common,-z,relro -fno-plt -fcommon'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_TIME: ru_RU.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Shell-script Minor modes in effect: sh-electric-here-document-mode: t yas-global-mode: t yas-minor-mode: t company-box-mode: t global-git-commit-mode: t server-mode: t projectile-mode: t winum-mode: t global-color-identifiers-mode: t symbol-overlay-mode: t global-symbol-overlay-mode: t global-highlight-parentheses-mode: t highlight-parentheses-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-global-mode: t smartparens-mode: t global-highlight-numbers-mode: t delete-selection-mode: t highlight-numbers-mode: t evil-goggles-mode: t global-evil-surround-mode: t evil-surround-mode: t shell-dirtrack-mode: t evil-mode: t evil-local-mode: t windmove-mode: t global-auto-revert-mode: t auto-revert-mode: t company-flx-mode: t global-company-mode: t company-mode: t override-global-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 column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: ~/.emacs.d/lisp/popup hides /home/constantine/.emacs.d/elpa/popup- 20211231.1823/popup ~/.emacs.d/lisp/idomenu hides /home/constantine/.emacs.d/elpa/idomenu- 20141123.2120/idomenu /home/constantine/.emacs.d/elpa/cmake-mode-20220322.1258/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode /home/constantine/.emacs.d/elpa/ninja-mode-20181024.1439/ninja-mode hides /usr/share/emacs/site-lisp/ninja-mode /home/constantine/.emacs.d/elpa/transient-20220406.1156/transient hides /usr/share/emacs/30.0.50/lisp/transient /home/constantine/.emacs.d/elpa/use-package-20210207.1926/use-package hides /usr/share/emacs/30.0.50/lisp/use-package/use-package /home/constantine/.emacs.d/elpa/use-package-20210207.1926/use-package-lint = hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-lint /home/constantine/.emacs.d/elpa/use-package-20210207.1926/use-package-jump = hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-jump /home/constantine/.emacs.d/elpa/use-package-20210207.1926/use-package-ensur= e hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-ensure /home/constantine/.emacs.d/elpa/use-package-20210207.1926/use-package-dimin= ish hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-diminish /home/constantine/.emacs.d/elpa/use-package-20210207.1926/use-package-delig= ht hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-delight /home/constantine/.emacs.d/elpa/use-package-20210207.1926/use-package-core = hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-core /home/constantine/.emacs.d/elpa/use-package-20210207.1926/use-package-bind-= key hides /usr/share/emacs/30.0.50/lisp/use-package/use-package-bind-key /home/constantine/.emacs.d/elpa/bind-key-20210210.1609/bind-key hides /usr/share/emacs/30.0.50/lisp/use-package/bind-key /home/constantine/.emacs.d/elpa/let-alist-1.0.6/let-alist hides /usr/share/emacs/30.0.50/lisp/emacs-lisp/let-alist Features: (shadow sort mail-extr emacsbug shortdoc help-fns radix-tree emacs-news-mode woman man cua-base goto-chg dabbrev vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view vc bug-reference term/xterm xterm tabify flx quail misearch multi-isearch tramp-archive tramp-gvfs tramp-cache time-stamp zeroconf dbus xml tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat xdg parse-time iso8601 ls-lisp conf-mode yaml-mode dockerfile-mode smartparens-python python vimrc-mode sh-script treesit executable smartparens-markdown markdown-mode noutline outline yasnippet-snippets yasnippet vc-git vc-dispatcher face-remap meson-mode smie desktop frameset smex company-box company-box-doc frame-local company-box-icons evil-magit magit-submodule magit-obsolete magit-popup magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff git-commit log-edit message sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util time-date 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 magit-core magit-autorevert magit-margin magit-transient magit-process with-editor server magit-mode transient magit-git magit-base magit-section format-spec crm compat projectile lisp-mnt grep compile text-property-search ibuf-ext ibuffer ibuffer-loaddefs smerge-mode diff-mode diff derived winum color-identifiers-mode symbol-overlay highlight-parentheses sp-sublimetext-like smartparens-config smartparens-text smartparens loadhist dash delsel highlight-numbers parent-mode ido emvil evil-goggles pulse color evil-surround evil evil-keybindings evil-integration evil-maps evil-commands reveal flyspell ispell evil-jumps evil-command-window evil-search evil-ex shell pcomplete comint ansi-osc ansi-color evil-types evil-macros evil-repeat evil-states evil-core comp comp-cstr warnings icons advice evil-common windmove calc calc-loaddefs calc-macs thingatpt rect evil-digraphs evil-vars use-package-ensure avy autorevert filenotify company-oddmuse company-keywords company-etags etags fileloop generator xref project ring company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company-flx company cl-extra help-mode use-package-bind-key use-package-core edmacro kmacro bind-key easy-mmode cus-load string-inflection-autoloads php-mode-autoloads elixir-mode-autoloads yaml-mode-autoloads ninja-mode-autoloads lsp-mode-autoloads smartparens-autoloads company-flx-autoloads flx-autoloads treepy-autoloads bitbucket-autoloads request-autoloads vimrc-mode-autoloads posframe-autoloads company-box-autoloads frame-local-autoloads projectile-autoloads js2-mode-autoloads csv-mode-autoloads rx cc-styles cc-align cc-engine cc-vars cc-defs magit-autoloads pcase magit-section-autoloads compat-autoloads dash-autoloads company-autoloads info package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine 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 composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 830707 760363) (symbols 48 33187 0) (strings 32 209268 43537) (string-bytes 1 6269384) (vectors 16 101229) (vector-slots 8 3036394 730693) (floats 8 456 39245) (intervals 56 35797 24006) (buffers 984 61))