From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Raphael 'kena' Poss Newsgroups: gmane.emacs.bugs Subject: bug#39390: 28.0.50; prettify-symbols-mode confuses display when start/end faces are different Date: Sun, 2 Feb 2020 15:45:46 +0100 Message-ID: <3184164c-5d94-6cb3-aca4-338b710bf97f@thaumogen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="130318"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 To: 39390@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 02 16:44:14 2020 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 1iyHPx-000XkS-Gh for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Feb 2020 16:44:14 +0100 Original-Received: from localhost ([::1]:57200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyHPw-0000EE-Ft for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Feb 2020 10:44:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47058) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyHPo-0000E8-83 for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 10:44:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyHPm-0006ov-IZ for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 10:44:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iyHPm-0006oe-6C for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 10:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iyHPm-00055K-4W for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 10:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Raphael 'kena' Poss Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Feb 2020 15:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39390 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.158065823119514 (code B ref -1); Sun, 02 Feb 2020 15:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Feb 2020 15:43:51 +0000 Original-Received: from localhost ([127.0.0.1]:40415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyHPa-00054g-RW for submit@debbugs.gnu.org; Sun, 02 Feb 2020 10:43:51 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:53342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iyGVZ-0003MI-Fa for submit@debbugs.gnu.org; Sun, 02 Feb 2020 09:46:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36483) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyGVW-0004qO-Sj for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 09:45:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyGVS-0001G8-Pc for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 09:45:54 -0500 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:59071) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iyGVS-00015P-BD for bug-gnu-emacs@gnu.org; Sun, 02 Feb 2020 09:45:50 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id BA329591 for ; Sun, 2 Feb 2020 09:45:47 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 02 Feb 2020 09:45:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thaumogen.net; h=to:from:subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=fm1; bh=2w0Vqbq9WqhYACh42rLmSB8OB7 yRkBnFblMkMkidV24=; b=C4Y1qdb5tu52otWJqXMCEqycrypEeLdI3wKxRY3iO3 vfkUcnp5RohWEQCYHLVSi1brY11nG0OW4m6oUAWdVu+QBAaQvoay2etv5+E01f22 2b1RrzvaiQYJhrDOLdMiOEz28aAdqXI+Y2U27IIy3B/CjQu3DQ3VUWG4YmVGUr50 duBXk7cpOH9JqMsx9nGNc+60kaGRNw6TLXWD2SHIUGwnhFPXP736LVp0ZEGoTZ5h AtMDlHXhV9TNbIBPUduAQfiG2sHBGUCFQe/NU7e9UELkDWhXLjN1C91QtTVSjEPj USpqXq2Yu+6XoYtGj6K2F8WrqoWTTTxTT4Y0nRhbaoNA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=2w0Vqb q9WqhYACh42rLmSB8OB7yRkBnFblMkMkidV24=; b=FcsYAGJQm7uX4S1mvQEqwQ EJfb0XnRTQLSWv4u62q+C8S9hgiyQAk0XLO5HNFyuOIRv2kpaJXKzZylHLEhO9XX rLVY6/+7IIzG3lj002OyXbh6W3N9+ZeRmUM9kbJ5iMI/9C59NtuyKAnlHyh+A8SW Jy3T+dlxlcNUwO2kLrKcs9JvFKoygAntr0FAcTHjC65XEIRZTKhduNZn952YNLel 4bNEkNSe1LlDO5RFLIlkyVMiVlGf2wxvHoV6GkJf++WGMPIe5TOOfoTa44fIJxAK q/e8JOTg8kfTbr4a23yV4PUs0ZGgb6iq2lRchtNhYi/8ttoLpoPfH7Q3Lzpd8epg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrgeehgdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepvffhuffkffgfgggtgfesthekredttd efjeenucfhrhhomheptfgrphhhrggvlhcukdhkvghnrgdkucfrohhsshcuoehknhiiseht hhgruhhmohhgvghnrdhnvghtqeenucfkphepkeeirdekjedrudeliedrjeenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehknhiisehthhgruhhm ohhgvghnrdhnvght X-ME-Proxy: Original-Received: from [192.168.2.14] (ip5657c407.direct-adsl.nl [86.87.196.7]) by mail.messagingengine.com (Postfix) with ESMTPA id E92A23280060 for ; Sun, 2 Feb 2020 09:45:46 -0500 (EST) Autocrypt: addr=knz@thaumogen.net; prefer-encrypt=mutual; keydata= mQSuBFN56cERDACePTTZjZwCCXm5d4VheFgjGYG9kY3FNlmGOP2UtwHnbhK5TIe+8GYjE+8R uNuf49+zvDFDtBgwGwi0WQndC/OOhRqg2OyTjNNJWtnvbpiwSGBI15acvL/7gLkZPHi4IR7q 6RnV+Uj76G8h0jyoLzkrdilvJe8xdkQ+zEPuqIxFRwr/Of2/fbt6icSiIpNvOKAD8xhNWWlF NW3QS4h4ug7v2ntrwZTam7I4W7GOubMhThZoCRWCVSN/V37yGOAvHdiaHb5cDdayQN3obH9c kpMTreichl6/0Gklx6OgGLjnRl7UeHSUa9VaINpbVPHZyye6KNCAYxF7ppCVfJOt6Xv+Wih9 F4G7D3nVlOxHeXUph+oqsiJXCX/niBPkb0NjQv0ZqDvEK6u/uZNSvM0y+1K64aE5oMdQd1EY DWZDWlBPcispKi6MQnRfw7PXrXGcuHJ5x5VbLRLOzMMyqP6XdJgcGwoMkH8HCdV+P8t8tc9+ En8diYj91GGPVQG542fB9asBALzvA44LMFPh0CmiJltaXXcp1VDUhyww7F/BBa6TW6OjC/4r 0xupaCFwIO74D1y4QuGwBZRrKFTxC0zyvtnKyAnNexpwDZFZmCuMxkZDAN0TcF5Slkr9k8SB 7rBGjkDfuHZ9YB1e8LQQMaYM4p743q6cQeGJ++YgaHQu/r4RulTICOeq1av0yYJ0i9gEZA6M OHKHvu0PxRD8jy3ybMdW2a8WYoHIL8Fg3BjWIV6gBkcYuwQYVLQCR8seMZl5+YafTLWU8YuF txDOXNWueeFbKALKb4 Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Mailman-Approved-At: Sun, 02 Feb 2020 10:43:49 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175593 Archived-At: When I am using the following substitution with prettify-symbols-mode, everything works fine and the word "err" is substituted with "⊙": (add-hook 'go-mode-hook (lambda () (push '("error" . ?⊙) prettify-symbols-alist) ;; (push '("err != nil" . "⊙?") prettify-symbols-alist) )) However if I then uncomment the second substitution for "err != nil": all hell breaks loose: moving the cursor up and down around a source line containing this text will mess up the display of the lines that follow in a way that is sometimes irrecoverable. The display bug is exacerbated (and thus easier to recognize/reproduce) when global-hl-line-mode is set. I have traced this down to substitutions where the font-lock face at the beginning and the end of the symbol composition is different: - replacing "String" is OK, replacing ".String()" is not - replacing "func" is OK, replacing "func(" is not - replacing "Fatal" is OK, replacing "t.Fatal" is not This probably needs to be fixed somehow, either by preventing the problem or by documenting the pitfall. I would like to know if a workaround is available? In GNU Emacs 28.0.50 (build 1, amd64-portbld-freebsd13.0) Repository revision: e31287e Repository branch: master System Description: 13.0-CURRENT Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --disable-build-details --localstatedir=/var --with-sound=no --with-x-toolkit=no --without-cairo --without-dbus --without-gconf --without-gif --without-gsettings --without-imagemagick --without-jpeg --without-lcms2 --without-libotf --without-m17n-flt --without-png --without-rsvg --without-tiff --without-toolkit-scroll-bars --without-x --without-xim --without-xpm --without-xwidgets --enable-acl --without-cairo --without-dbus --without-gconf --without-gif --with-gnutls --without-gsettings --without-harfbuzz --without-jpeg --with-json --with-file-notification=kqueue --without-lcms2 --without-m17n-flt --without-imagemagick --with-mailutils --with-modules --without-libotf --without-png --without-toolkit-scroll-bars --without-rsvg --with-threads --without-tiff --without-xft --without-xim --with-xml2 --without-xpm --without-xwidgets --with-x-toolkit=no --prefix=/usr/local --mandir=/usr/local/man --disable-silent-rules --infodir=/usr/local/share/emacs/info/ --build=amd64-portbld-freebsd13.0 'CFLAGS=-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing ' 'CPPFLAGS=-isystem /usr/local/include' 'LDFLAGS= -fstack-protector-strong -L/usr/local/lib '' Configured features: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB MODULES THREADS JSON PDUMPER GMP Important settings: value of $LC_COLLATE: C value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Go Minor modes in effect: lsp-ui-mode: t lsp-ui-doc-mode: t lsp-ui-sideline-mode: t global-pretty-mode: t global-hl-line-mode: t show-paren-mode: t electric-pair-mode: t go-guru-hl-identifier-mode: t lsp-managed-mode: t lsp-mode: t flymake-mode: t yas-global-mode: t yas-minor-mode: t company-mode: t helm-mode: t helm--remap-mouse-mode: t projectile-mode: t global-magit-file-mode: t magit-file-mode: t magit-auto-revert-mode: t auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t shell-dirtrack-mode: t global-flycheck-mode: t flycheck-mode: t global-whitespace-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t global-prettify-symbols-mode: t prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t global-visual-line-mode: t visual-line-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail winner helm-command helm-elisp helm-eval edebug backtrace helm-info mule-util lsp-ui lsp-ui-flycheck lsp-ui-doc goto-addr lsp-ui-imenu lsp-ui-peek lsp-ui-sideline view lsp-clients lsp-eslint lsp-verilog lsp-json lsp-csharp gnutls lsp-pwsh lsp-terraform lsp-yaml lsp-vhdl lsp-haxe lsp-erlang lsp-fsharp lsp-metals lsp-elm lsp-dart lsp-clojure lsp-go lsp-xml lsp-css lsp-intelephense lsp-vetur lsp-html lsp-solargraph lsp-rust lsp-pyls lsp company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-cmake company-xcode company-clang company-semantic company-eclim company-template company-bbdb company-capf company-anaconda anaconda-mode pythonic python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time iso8601 ls-lisp term/tmux term/xterm xterm pretty-mode cl swiper ivy flx delsel colir ivy-overlay ido hl-line paren elec-pair go-projectile vc-git go-rename go-guru go-eldoc go-mode url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf mailcap find-file ffap etags fileloop generator company-lsp lsp-mode xref url-util tree-widget wid-edit spinner network-stream nsm markdown-mode color noutline outline lv inline ht f s ewoc em-glob esh-util dash-functional bindat flymake-proc flymake mwheel warnings project yasnippet-snippets yasnippet company pcase helm-mode helm-projectile helm-files helm-tags helm-buffers helm-occur helm-grep helm-regexp helm-utils helm-locate helm-help helm-types helm-config helm-easymenu helm helm-source eieio-compat helm-multi-match helm-lib edmacro kmacro projectile grep compile ibuf-ext ibuffer ibuffer-loaddefs thingatpt magit-submodule magit-obsolete 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 smerge-mode diff diff-mode magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process magit-mode git-commit transient magit-git magit-section magit-utils crm log-edit easy-mmode message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search 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 with-editor cl-extra async-bytecomp advice async shell pcomplete comint ring server flycheck regexp-opt ansi-color find-func help-mode rx dash disp-table whitespace info tool-bar package easymenu browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer 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 composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray 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 threads kqueue multi-tty make-network-process emacs) Memory information: ((conses 16 382129 48543) (symbols 48 30567 1) (strings 32 115055 9348) (string-bytes 1 3699508) (vectors 16 54044) (vector-slots 8 769489 36090) (floats 8 286 445) (intervals 56 16026 8087) (buffers 1000 20)) -- Raphael 'kena' Poss