unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 19307@debbugs.gnu.org
Subject: bug#19307: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it
Date: Tue, 03 Feb 2015 05:33:02 +0200	[thread overview]
Message-ID: <54D0416E.7090507@yandex.ru> (raw)
In-Reply-To: <83k300gtuk.fsf@gnu.org>

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.





  reply	other threads:[~2015-02-03  3:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 15:33 bug#19307: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it Dmitry Gutov
     [not found] ` <handler.19307.B.1418052841706.ack@debbugs.gnu.org>
2015-02-02  3:47   ` bug#19307: Acknowledgement (24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it) Dmitry Gutov
2015-02-02 16:29     ` bug#19307: 24.4.51; Ellipsis created with `invisible' removes highlighting from overlay after-string after it Eli Zaretskii
2015-02-03  3:33       ` Dmitry Gutov [this message]
2015-02-03 18:54         ` Eli Zaretskii
2015-02-03 20:30           ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D0416E.7090507@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=19307@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).