unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8914: 23.3; Overlay overlapping buffer-invisibility-spec behaves oddly
@ 2011-06-21 15:57 David Aspinall
  2020-12-08 15:03 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: David Aspinall @ 2011-06-21 15:57 UTC (permalink / raw)
  To: 8914

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.

It seems similar to the case where faces properties are not merged when
one might expect them to be, e.g. see how mouse highlighting in *info*
buffer obliterates underline and colouring of text underneath.  See report
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4911 (how can I find out the
status of this?)

 - David Aspinall


-------- snip ------

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

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

(defun toggle-invis ()
  (interactive)
  (if vis 
      (add-to-invisibility-spec '(larger . t))
    (remove-from-invisibility-spec '(larger . t)))
  (setq vis (not vis)))


In GNU Emacs 23.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.24.3)
 of 2011-03-22 on x86-15.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.10905000
configured using `configure  '--build=x86_64-redhat-linux-gnu' '--host=x86_64-red
hat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr
' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/e
tc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--l
ibexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--man
dir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--wit
h-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--wit
h-x-toolkit=gtk' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-lin
ux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexcept
ions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.utf8
  value of $XMODIFIERS: @im=none
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Features:
(shadow sort mail-extr message idna sendmail ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock
sha1 sha1-el hex-util hashcash mail-utils emacsbug pp parse-time vc-cvs
tar-mode jka-compr tabify man assoc make-mode preview prv-emacs byte-opt
warnings tex-bar tex-buf toolbar-x noutline outline font-latex bytecomp
byte-compile latexenc multi-isearch dired-aux latex edmacro kmacro
tex-style tex advice advice-preload bibtex dired regexp-opt
vc-dispatcher vc-svn help-mode easymenu view help-fns ansi-color shell
comint ring proof-site proof-autoloads pg-vars paren cus-start cus-load
preview-latex emacs-goodies-loaddefs easy-mmode tex-site auto-loads
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
font-setting tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#8914: 23.3; Overlay overlapping buffer-invisibility-spec behaves oddly
  2011-06-21 15:57 bug#8914: 23.3; Overlay overlapping buffer-invisibility-spec behaves oddly David Aspinall
@ 2020-12-08 15:03 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-08 15:03 UTC (permalink / raw)
  To: David Aspinall; +Cc: 8914

David Aspinall <David.Aspinall@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-08 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-21 15:57 bug#8914: 23.3; Overlay overlapping buffer-invisibility-spec behaves oddly David Aspinall
2020-12-08 15:03 ` Lars Ingebrigtsen

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).