From unknown Tue Aug 19 14:22:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19307: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Dec 2014 15:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19307 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19307@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1418052841706 (code B ref -1); Mon, 08 Dec 2014 15:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Dec 2014 15:34:01 +0000 Received: from localhost ([127.0.0.1]:57796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy0K0-0000BC-Jh for submit@debbugs.gnu.org; Mon, 08 Dec 2014 10:34:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57997) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy0Jy-0000B4-It for submit@debbugs.gnu.org; Mon, 08 Dec 2014 10:33:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xy0Jr-0005zd-QC for submit@debbugs.gnu.org; Mon, 08 Dec 2014 10:33:58 -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]:54209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy0Jr-0005zZ-Mp for submit@debbugs.gnu.org; Mon, 08 Dec 2014 10:33:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy0Jl-0005tJ-HV for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 10:33:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xy0Jf-0005vL-Hk for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 10:33:45 -0500 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:35620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy0Jf-0005vH-BK for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 10:33:39 -0500 Received: by mail-wi0-f170.google.com with SMTP id bs8so7436089wib.5 for ; Mon, 08 Dec 2014 07:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=zcYIbMlobmyMxYY0z6mc3roy4nIDqp6rhs5JlXkNHKU=; b=pGsTWOl/qbfqGI4YpmhFJYi2xs0Dlhe67a1+hGPvS1amgNC/z1EHQKaRRfzITOg6/K RygDlF86tjpm0NcsCBSWFPGqAg34KSGYdO4wzCjoyYAKqbMValL82megTD4Sc/uONh8K s+tSLUnX9tUgYBoi1WrzeGNF+PRwmbZuDL/wD/5FsJaXxV2hwVOm9811ISc/yV/bPGSN RGyt1je99AE3n962C8Y7cMAjBBEH5x5Q/mGe54PViDPen7gjIP5pNPbTYR1n6e3EJ0nv aTcUBBS+RTE0Fj91MsvHNX5YhVQzOl1Bsng0eOUoM32LxW3CVwnCOBh29rq76tCLixBr EXZw== X-Received: by 10.194.191.227 with SMTP id hb3mr47456807wjc.79.1418052818634; Mon, 08 Dec 2014 07:33:38 -0800 (PST) Received: from axl (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by mx.google.com with ESMTPSA id js5sm10200847wid.11.2014.12.08.07.33.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 08 Dec 2014 07:33:38 -0800 (PST) From: Dmitry Gutov Date: Mon, 08 Dec 2014 17:33:36 +0200 Message-ID: <86d27uw3zj.fsf@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain 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 (----) In the example below, the `after-string' value is propertized with a face. But as long as there is ellipsis at its beginning, the after-string is rendered using the default face. (defun test () (interactive) (ignore-errors (kill-buffer "test")) (pop-to-buffer "test") (add-to-invisibility-spec '(... . t)) (insert (propertize "foo" 'invisible '...)) (let ((ov (make-overlay (point) (point)))) (overlay-put ov 'invisible t) (overlay-put ov 'window (selected-window)) (overlay-put ov 'after-string (propertize "xxx" 'face 'highlight)))) And here's a somewhat related scenario, with a surprising result: (defun testt () (interactive) (ignore-errors (kill-buffer "testt")) (pop-to-buffer "testt") (add-to-invisibility-spec '(... . t)) (insert " ") (let ((ov (make-overlay (1- (point)) (point)))) (overlay-put ov 'invisible t) (overlay-put ov 'window (selected-window)) (overlay-put ov 'after-string (propertize "xxx" 'face 'highlight))) (insert (propertize "foo" 'invisible '...))) If I modify the scenario to make the overlay empty (and maybe omit inserting the space at the beginning, though this makes no difference), then "xxx" is displayed and even highlighted as expected. In GNU Emacs 24.4.51.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2014-11-28 on axl Repository revision: 6b765b8facbdbb03f28028007885236601652515 Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.1 LTS From unknown Tue Aug 19 14:22:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19307: Acknowledgement (24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it) Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Feb 2015 03:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19307 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 19307@debbugs.gnu.org, Eli Zaretskii Received: via spool by 19307-submit@debbugs.gnu.org id=B19307.142284884328966 (code B ref 19307); Mon, 02 Feb 2015 03:48:01 +0000 Received: (at 19307) by debbugs.gnu.org; 2 Feb 2015 03:47:23 +0000 Received: from localhost ([127.0.0.1]:59979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YI7yt-0007X8-0O for submit@debbugs.gnu.org; Sun, 01 Feb 2015 22:47:23 -0500 Received: from mail-wg0-f43.google.com ([74.125.82.43]:59742) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YI7yq-0007Wu-Qu for 19307@debbugs.gnu.org; Sun, 01 Feb 2015 22:47:21 -0500 Received: by mail-wg0-f43.google.com with SMTP id y19so36381737wgg.2 for <19307@debbugs.gnu.org>; Sun, 01 Feb 2015 19:47:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=49flvLLQ3Ok1Z4aN1AsjE2PSoD+9omtMMwR7LV6xhTY=; b=oFK0/VCHN12hI3QussEIXly/BxhuxJ2jwwrte4SGDhf9dJ7+bNna570FOiIIROarmf FkzHrPmSxqWEzXmcb0fA+JKilBUjGwW345YZ+Rb6k4GeQN6vI3n/BncEFjdQ8LdRBQ8l KZigUyk12o31OuY04ahjSD1dt7aSqpXP4fMnQNCMDuwjuviEOCL26SmvNU1wK742e7W2 du9dQOptJlqW1GeVrK4g3xRwj2J9MznZClJRKndpIXBMRSOd6qrW33TeHASSX4RMTlFf g6fER8PNH4q/BDgLmWwt13c9ZLdxdHx+vJDAnoVeQy4ShW5y37jPwFta34/czlGVRO99 Srqw== X-Received: by 10.180.74.52 with SMTP id q20mr20404620wiv.0.1422848835196; Sun, 01 Feb 2015 19:47:15 -0800 (PST) Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id li7sm17889728wic.4.2015.02.01.19.47.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Feb 2015 19:47:14 -0800 (PST) Message-ID: <54CEF33F.3030704@yandex.ru> Date: Mon, 02 Feb 2015 05:47:11 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0 MIME-Version: 1.0 References: <86d27uw3zj.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 (/) Eli, Could you look into this? Thanks. From unknown Tue Aug 19 14:22:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19307: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Feb 2015 16:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19307 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 19307@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 19307-submit@debbugs.gnu.org id=B19307.14228945878820 (code B ref 19307); Mon, 02 Feb 2015 16:30:03 +0000 Received: (at 19307) by debbugs.gnu.org; 2 Feb 2015 16:29:47 +0000 Received: from localhost ([127.0.0.1]:60568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIJsg-0002IB-Jx for submit@debbugs.gnu.org; Mon, 02 Feb 2015 11:29:46 -0500 Received: from mtaout28.012.net.il ([80.179.55.184]:41465) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIJsd-0002Hw-Ck for 19307@debbugs.gnu.org; Mon, 02 Feb 2015 11:29:44 -0500 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NJ500L00KDLNY00@mtaout28.012.net.il> for 19307@debbugs.gnu.org; Mon, 02 Feb 2015 18:27:49 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJ500B1GKEDJV90@mtaout28.012.net.il>; Mon, 02 Feb 2015 18:27:49 +0200 (IST) Date: Mon, 02 Feb 2015 18:29:23 +0200 From: Eli Zaretskii In-reply-to: <54CEF33F.3030704@yandex.ru> X-012-Sender: halo1@inter.net.il Message-id: <83k300gtuk.fsf@gnu.org> References: <86d27uw3zj.fsf@yandex.ru> <54CEF33F.3030704@yandex.ru> 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: Mon, 02 Feb 2015 05:47:11 +0200 > From: Dmitry Gutov > > Eli, > > Could you look into this? Sorry, I somehow missed your original report. > In the example below, the `after-string' value is propertized with a > face. > > But as long as there is ellipsis at its beginning, the after-string is > rendered using the default face. > > (defun test () > (interactive) > (ignore-errors > (kill-buffer "test")) > (pop-to-buffer "test") > (add-to-invisibility-spec '(... . t)) > (insert (propertize "foo" 'invisible '...)) > (let ((ov (make-overlay (point) (point)))) > (overlay-put ov 'invisible t) > (overlay-put ov 'window (selected-window)) > (overlay-put ov 'after-string > (propertize "xxx" 'face 'highlight)))) This bug was introduced in Emacs 23, 10 years(!) ago. Now fixed in commit 27e11c0 on the emacs-24 branch. > And here's a somewhat related scenario, with a surprising result: > > (defun testt () > (interactive) > (ignore-errors > (kill-buffer "testt")) > (pop-to-buffer "testt") > (add-to-invisibility-spec '(... . t)) > (insert " ") > (let ((ov (make-overlay (1- (point)) (point)))) > (overlay-put ov 'invisible t) > (overlay-put ov 'window (selected-window)) > (overlay-put ov 'after-string > (propertize "xxx" 'face 'highlight))) > (insert (propertize "foo" 'invisible '...))) This is unrelated, AFAICT, and is not a bug: what you have here is 2 chunks of invisible text, one after another. The display engine skips all of that, and never examines any additional properties or overlays in the middle of the invisible text. Emacs always worked like that. > If I modify the scenario to make the overlay empty (and maybe omit > inserting the space at the beginning, though this makes no difference), > then "xxx" is displayed and even highlighted as expected. Each one of the measures you describe either removes one of the invisible chunks of text or makes it visible. That's why the overlay string becomes displayed then. (As for it being highlighted, the above bug affected the highlight only when the overlay string _follows_ the ellipsis; if it comes before the ellipsis, the bug won't rear its ugly head.) Is there some important real-life use case that bumped into this surprise? If so, please describe it. Thanks. From unknown Tue Aug 19 14:22:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19307: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Feb 2015 03:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19307 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 19307@debbugs.gnu.org Received: via spool by 19307-submit@debbugs.gnu.org id=B19307.142293439332401 (code B ref 19307); Tue, 03 Feb 2015 03:34:01 +0000 Received: (at 19307) by debbugs.gnu.org; 3 Feb 2015 03:33:13 +0000 Received: from localhost ([127.0.0.1]:60850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIUEj-0008QX-8U for submit@debbugs.gnu.org; Mon, 02 Feb 2015 22:33:13 -0500 Received: from mail-wg0-f53.google.com ([74.125.82.53]:40152) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIUEg-0008QI-D2 for 19307@debbugs.gnu.org; Mon, 02 Feb 2015 22:33:10 -0500 Received: by mail-wg0-f53.google.com with SMTP id a1so42150686wgh.12 for <19307@debbugs.gnu.org>; Mon, 02 Feb 2015 19:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=HziWrnjn5Bc6QdJEdi4ZZTXEaJFS/ZvGdWrusTjrMlE=; b=mJ6A6Wjqx6AW9v76AZ/Oz89aXhJrZGanEJmdY+tfCFNE08kiEcw2ZQOmUgb82BiXWJ 0wDltwNJMEpzneXvo2CQagod6QBtWR26RytUN7O4VxztG/FrXtQ0pmQK2rsPtCgSUhbs GWqA8AwERgnjhg1uyv35jEEhyI1iP28P8/4pmeDi3VZIIFYvgP/jLdFe9e9mp9KXsWUi M1fW60/yFoNt9eH8fqcKKyX/EXA9sgqTrWkr6CN4ddJ7dYa9KbUwFsMtQwYj3d8lkyHq 2TpcS3nIE33HGiZcQgC+fploWs3w30aHZhFMXyZM/gNhQ+KVkaL+t4fOGWmYYf4XAzHJ sxEg== X-Received: by 10.194.185.15 with SMTP id ey15mr49765949wjc.3.1422934384644; Mon, 02 Feb 2015 19:33:04 -0800 (PST) Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id cx3sm22548485wib.10.2015.02.02.19.33.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Feb 2015 19:33:04 -0800 (PST) Message-ID: <54D0416E.7090507@yandex.ru> Date: Tue, 03 Feb 2015 05:33:02 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0 MIME-Version: 1.0 References: <86d27uw3zj.fsf@yandex.ru> <54CEF33F.3030704@yandex.ru> <83k300gtuk.fsf@gnu.org> In-Reply-To: <83k300gtuk.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 02/02/2015 06:29 PM, Eli Zaretskii wrote: > This bug was introduced in Emacs 23, 10 years(!) ago. Don't know your feelings on this subject, but I'm kinda proud. :) > Now fixed in > commit 27e11c0 on the emacs-24 branch. Thanks, but it introduced a regression. Insert some text at the end, and "xxx" will get displayed twice: (defun test2 () (interactive) (ignore-errors (kill-buffer "test")) (pop-to-buffer "test") (add-to-invisibility-spec '(... . t)) (insert (propertize "foo" 'invisible '...)) (let ((ov (make-overlay (point) (point)))) (overlay-put ov 'invisible t) (overlay-put ov 'window (selected-window)) (overlay-put ov 'after-string (propertize "xxx" 'face 'highlight))) (insert " ")) >> And here's a somewhat related scenario, with a surprising result: >> ... > This is unrelated, AFAICT, and is not a bug: what you have here is 2 > chunks of invisible text, one after another. The display engine skips > all of that, and never examines any additional properties or overlays > in the middle of the invisible text. Emacs always worked like that. I see. Well, that unfortunate. I can only say that it goes against my expectations. > Is there some important real-life use case that bumped into this > surprise? If so, please describe it. Not into the second one, so far. But the first example caused the Company tooltip lose color when displayed after an outline. Not to diminish your efforts, but I've noticed that the fix for each display problem I've reported lately involved move added lines than removed ones. Which looks like adding more special cases. That's worrying. From unknown Tue Aug 19 14:22:18 2025 X-Loop: help-debbugs@gnu.org Subject: bug#19307: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Feb 2015 18:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19307 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: 19307@debbugs.gnu.org Reply-To: Eli Zaretskii Received: via spool by 19307-submit@debbugs.gnu.org id=B19307.142298980329468 (code B ref 19307); Tue, 03 Feb 2015 18:57:02 +0000 Received: (at 19307) by debbugs.gnu.org; 3 Feb 2015 18:56:43 +0000 Received: from localhost ([127.0.0.1]:33131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIieQ-0007fE-RR for submit@debbugs.gnu.org; Tue, 03 Feb 2015 13:56:43 -0500 Received: from mtaout26.012.net.il ([80.179.55.182]:57803) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIieN-0007ey-SN for 19307@debbugs.gnu.org; Tue, 03 Feb 2015 13:56:41 -0500 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NJ700E00LOX6N00@mtaout26.012.net.il> for 19307@debbugs.gnu.org; Tue, 03 Feb 2015 20:55:08 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJ70074FLVWML70@mtaout26.012.net.il>; Tue, 03 Feb 2015 20:55:08 +0200 (IST) Date: Tue, 03 Feb 2015 20:54:55 +0200 From: Eli Zaretskii In-reply-to: <54D0416E.7090507@yandex.ru> X-012-Sender: halo1@inter.net.il Message-id: <8361bihlkw.fsf@gnu.org> References: <86d27uw3zj.fsf@yandex.ru> <54CEF33F.3030704@yandex.ru> <83k300gtuk.fsf@gnu.org> <54D0416E.7090507@yandex.ru> 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, 03 Feb 2015 05:33:02 +0200 > From: Dmitry Gutov > CC: 19307@debbugs.gnu.org > > This bug was introduced in Emacs 23, 10 years(!) ago. > > Don't know your feelings on this subject, but I'm kinda proud. :) You should be. > > Now fixed in > > commit 27e11c0 on the emacs-24 branch. > > Thanks, but it introduced a regression. Insert some text at the end, and "xxx" will get displayed twice: Turns out the bug I fixed concealed another one that was also there for a long time (more than 9 years), and became exposed due to my fix. Now fixed in commit e589765 on the emacs-24 branch. > Not to diminish your efforts, but I've noticed that the fix for each display problem I've reported lately involved move added lines than removed ones. Which looks like adding more special cases. That's worrying. The bugs happened in special cases for which no one coded the solution, so catering to those cases often needs additional code. Isn't that natural? Say you have something like int reckless_division = a / b; and then someone reports a divide-by-zero crash, and you add protection against b being zero -- won't you expect the code to grow a little? Anyway, you should be happier with this last fix, since it removes more lines than it adds ;-) From unknown Tue Aug 19 14:22:18 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: Dmitry Gutov Subject: bug#19307: closed (Re: bug#19307: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it) Message-ID: References: <54D12FE6.40302@yandex.ru> <86d27uw3zj.fsf@yandex.ru> X-Gnu-PR-Message: they-closed 19307 X-Gnu-PR-Package: emacs Reply-To: 19307@debbugs.gnu.org Date: Tue, 03 Feb 2015 20:31:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1422995464-5693-1" This is a multi-part message in MIME format... ------------=_1422995464-5693-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #19307: 24.4.51; Ellipsis created with `invisible' removes highlighting fro= m overlay after-string after it 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 19307@debbugs.gnu.org. --=20 19307: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D19307 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1422995464-5693-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 19307-done) by debbugs.gnu.org; 3 Feb 2015 20:30:47 +0000 Received: from localhost ([127.0.0.1]:33150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIk7S-0001TM-U0 for submit@debbugs.gnu.org; Tue, 03 Feb 2015 15:30:47 -0500 Received: from mail-we0-f175.google.com ([74.125.82.175]:49367) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIk7K-0001T0-P3 for 19307-done@debbugs.gnu.org; Tue, 03 Feb 2015 15:30:39 -0500 Received: by mail-we0-f175.google.com with SMTP id p10so47259892wes.6 for <19307-done@debbugs.gnu.org>; Tue, 03 Feb 2015 12:30:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=y4vaGsR0p/Vgqs5lXxKtmdQe16MQHG8I3ZVC/0OhDe0=; b=zEP+Sr2ix4xvpPAtuOmYSmhBcRek15aq9qdAo3Yxl+PyjERnukzlqvajAlP/eWCMai 94AsSJZtj/DB9LEvV/12XTavi2iui5ufYRQDok6CEYsmsqerH7+F+nrmPbPORA2EoM4E PKRGSpI7L21JeQppQ0ciAf0hfERl8ui5gQ5IMY2fJ8PFfCgxyYlWhkAPrUEmkTEXs8Ak lekUdXfpJX2EE639NKPwNwfc+GBtkNf7/hKiqa3tZY/y9EOUR503Ghgd3vyOTsTPrb9E lwi+R9aqufHNB2syuSq1agqhS01QEFM4XJtW8401eFxirme484oRAz0+v6LMBs2ZLd3x rV8Q== X-Received: by 10.194.62.19 with SMTP id u19mr60652621wjr.0.1422995432626; Tue, 03 Feb 2015 12:30:32 -0800 (PST) Received: from [192.168.0.185] (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by mx.google.com with ESMTPSA id w16sm26040898wia.15.2015.02.03.12.30.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Feb 2015 12:30:31 -0800 (PST) Message-ID: <54D12FE6.40302@yandex.ru> Date: Tue, 03 Feb 2015 22:30:30 +0200 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Thunderbird/33.0 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#19307: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it References: <86d27uw3zj.fsf@yandex.ru> <54CEF33F.3030704@yandex.ru> <83k300gtuk.fsf@gnu.org> <54D0416E.7090507@yandex.ru> <8361bihlkw.fsf@gnu.org> In-Reply-To: <8361bihlkw.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19307-done Cc: 19307-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 02/03/2015 08:54 PM, Eli Zaretskii wrote: > Turns out the bug I fixed concealed another one that was also there > for a long time (more than 9 years), and became exposed due to my fix. > Now fixed in commit e589765 on the emacs-24 branch. Terrific. Works fine, AFAICS. > The bugs happened in special cases for which no one coded the > solution, so catering to those cases often needs additional code. > Isn't that natural? Okay. As long as you're confident that the cases are sufficiently special, I'm going to be content, too. > Anyway, you should be happier with this last fix, since it removes > more lines than it adds ;-) Thanks, I am. :-) ------------=_1422995464-5693-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 8 Dec 2014 15:34:01 +0000 Received: from localhost ([127.0.0.1]:57796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy0K0-0000BC-Jh for submit@debbugs.gnu.org; Mon, 08 Dec 2014 10:34:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57997) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy0Jy-0000B4-It for submit@debbugs.gnu.org; Mon, 08 Dec 2014 10:33:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xy0Jr-0005zd-QC for submit@debbugs.gnu.org; Mon, 08 Dec 2014 10:33:58 -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]:54209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy0Jr-0005zZ-Mp for submit@debbugs.gnu.org; Mon, 08 Dec 2014 10:33:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59682) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy0Jl-0005tJ-HV for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 10:33:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xy0Jf-0005vL-Hk for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 10:33:45 -0500 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:35620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xy0Jf-0005vH-BK for bug-gnu-emacs@gnu.org; Mon, 08 Dec 2014 10:33:39 -0500 Received: by mail-wi0-f170.google.com with SMTP id bs8so7436089wib.5 for ; Mon, 08 Dec 2014 07:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=zcYIbMlobmyMxYY0z6mc3roy4nIDqp6rhs5JlXkNHKU=; b=pGsTWOl/qbfqGI4YpmhFJYi2xs0Dlhe67a1+hGPvS1amgNC/z1EHQKaRRfzITOg6/K RygDlF86tjpm0NcsCBSWFPGqAg34KSGYdO4wzCjoyYAKqbMValL82megTD4Sc/uONh8K s+tSLUnX9tUgYBoi1WrzeGNF+PRwmbZuDL/wD/5FsJaXxV2hwVOm9811ISc/yV/bPGSN RGyt1je99AE3n962C8Y7cMAjBBEH5x5Q/mGe54PViDPen7gjIP5pNPbTYR1n6e3EJ0nv aTcUBBS+RTE0Fj91MsvHNX5YhVQzOl1Bsng0eOUoM32LxW3CVwnCOBh29rq76tCLixBr EXZw== X-Received: by 10.194.191.227 with SMTP id hb3mr47456807wjc.79.1418052818634; Mon, 08 Dec 2014 07:33:38 -0800 (PST) Received: from axl (static-nbl2-118.cytanet.com.cy. [212.31.107.118]) by mx.google.com with ESMTPSA id js5sm10200847wid.11.2014.12.08.07.33.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 08 Dec 2014 07:33:38 -0800 (PST) From: Dmitry Gutov To: bug-gnu-emacs@gnu.org Subject: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it Date: Mon, 08 Dec 2014 17:33:36 +0200 Message-ID: <86d27uw3zj.fsf@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain 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 (----) In the example below, the `after-string' value is propertized with a face. But as long as there is ellipsis at its beginning, the after-string is rendered using the default face. (defun test () (interactive) (ignore-errors (kill-buffer "test")) (pop-to-buffer "test") (add-to-invisibility-spec '(... . t)) (insert (propertize "foo" 'invisible '...)) (let ((ov (make-overlay (point) (point)))) (overlay-put ov 'invisible t) (overlay-put ov 'window (selected-window)) (overlay-put ov 'after-string (propertize "xxx" 'face 'highlight)))) And here's a somewhat related scenario, with a surprising result: (defun testt () (interactive) (ignore-errors (kill-buffer "testt")) (pop-to-buffer "testt") (add-to-invisibility-spec '(... . t)) (insert " ") (let ((ov (make-overlay (1- (point)) (point)))) (overlay-put ov 'invisible t) (overlay-put ov 'window (selected-window)) (overlay-put ov 'after-string (propertize "xxx" 'face 'highlight))) (insert (propertize "foo" 'invisible '...))) If I modify the scenario to make the overlay empty (and maybe omit inserting the space at the beginning, though this makes no difference), then "xxx" is displayed and even highlighted as expected. In GNU Emacs 24.4.51.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2014-11-28 on axl Repository revision: 6b765b8facbdbb03f28028007885236601652515 Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.1 LTS ------------=_1422995464-5693-1--