GNU bug report logs - #18285
24.3.92; A combination of `display' on text and `invisible' and `before/after-string' leads to the before/after string being displayed twice

Previous Next

Package: emacs;

Reported by: Dmitry <dgutov <at> yandex.ru>

Date: Sun, 17 Aug 2014 22:36:02 UTC

Severity: normal

Found in version 24.3.92

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 18285 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 18285 <at> debbugs.gnu.org
Subject: Re: bug#18285: 24.3.92;
 A combination of `display' on text and `invisible'
 and	`before/after-string' leads to the before/after string being	displayed
 twice
Date: Fri, 22 Aug 2014 15:41:51 +0400
On 08/22/2014 10:41 AM, Eli Zaretskii wrote:

> I have no idea how rare it will be.  FWIW, for the past year, all the
> display-related bugs are for pretty rare cases.  What does that tell
> you about user expectations?

I dunno. Something's changing? For example, I've encountered this 
specific bug now because the `report-emacs-bug' buffer uses `display' in 
Emacs 24.4, but 24.3 used `intangible' there.

(And only after I've fixed another `display'-related bug in Company 
popup rendering.)

>> Anyway, how about the other way around? I'll like this less, but why not
>> make `invisible' inactive when `display' is set?
>
> That's what Emacs does already.  The only place where invisible still
> matters in this situation is when deciding how and where to display
> overlay strings.  I thought I explained that earlier in this thread.

So, why not make it matter less? "If display is set, don't interpret 
invisible" should be a straightforward piece of logic.

If `display' takes priority over `invisible', I would expect

(let ((pt (point)))
  (insert (propertize "a" 'display "bbb"))
  (let ((o (make-overlay pt (point))))
    (overlay-put o 'after-string "foo\nbar")))

and

(let ((pt (point)))
  (insert (propertize "a" 'display "bbb"))
  (let ((o (make-overlay pt (point))))
    (overlay-put o 'invisible t)
    (overlay-put o 'after-string "foo\nbar")))

to be rendered the same.

> My opinion is that users and Lisp programmers should not enter these
> dark corners.

Yeah, maybe.




This bug report was last modified 3 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.