GNU bug report logs - #8914
23.3; Overlay overlapping buffer-invisibility-spec behaves oddly

Previous Next

Package: emacs;

Reported by: David Aspinall <David.Aspinall <at> ed.ac.uk>

Date: Tue, 21 Jun 2011 16:17:02 UTC

Severity: normal

Tags: notabug

Found in version 23.3

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: David Aspinall <David.Aspinall <at> ed.ac.uk>
Cc: 8914 <at> debbugs.gnu.org
Subject: bug#8914: 23.3; Overlay overlapping buffer-invisibility-spec behaves oddly
Date: Tue, 08 Dec 2020 16:03:27 +0100
David Aspinall <David.Aspinall <at> ed.ac.uk> writes:

> Insert the text below into a buffer,
>
>    M-x eval-buffer RET
>    M-x toggle-invis
>
> The smaller area remains visible, although there is a surrounding
> overlay which has an invisibility spec which should cover the revealed
> characters.  
>
> I suppose this is debatable, but intuitively I would expect the whole
> larger region to be made invisible.

(This bug report unfortunately got no response at the time.)

;;;
;;; === Test area for invisibility ===
;;;
(defvar vis nil)

(overlay-put (make-overlay 18 22) 'invisible 'smaller)
(overlay-put (make-overlay 9 43) 'invisible 'larger)

At this point, the entire region is invisible, because the default
invisible spec is t.

(add-to-invisibility-spec '(larger . t))

This makes the `smaller' part visible, because when
buffer-invisibility-spec is a list, only those types that are listed are
made invisible.

However, smaller overlays have priority over larger ones, so the small
part becomes visible.

This sounds confusing, but I think it's working as designed.  If you
want the larger overlay to take priority, you have to add priority specs
explicitly to the larger overlay?

So I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 165 days ago.

Previous Next


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