unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22320: Overlays with an 'invisible property break stacking of overlay faces
@ 2016-01-06 18:04 Clément Pit--Claudel
  2016-01-07 15:54 ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Clément Pit--Claudel @ 2016-01-06 18:04 UTC (permalink / raw)
  To: 22320

[-- Attachment #1: Type: text/plain, Size: 6318 bytes --]

Hi all,

Adding an 'invisible property to an overlay seems to break stacking of faces.
To reproduce, run the following snippet. The whole buffer should have a red
background, but the invisible section does not inherit that background.

(with-current-buffer (get-buffer-create "bug")
  (erase-buffer)
  (fundamental-mode)
  (add-to-invisibility-spec '(outline . t))
  (insert "line1 line2 line3")
  (let ((ov (make-overlay 7 12)))
    (overlay-put ov 'invisible 'outline))
  (let ((ov (make-overlay 7 8)))
    (overlay-put ov 'face '(:underline t)))
  (let ((ov (make-overlay (point-min) (point-max))))
    (overlay-put ov 'face '(:background "red")))
  (pop-to-buffer (current-buffer)))

I initially thought this was an issue of priorities, but removing the overlay with
the invisible property makes the issue disappear. Similarly, removing the
underline overlay makes the issue disappear.

Here is another (more "real-world") way to reproduce this issue (run the
snippet, then use C-x h in the newly created buffer to mark all text: the
invisible section isn't highlighted)

(with-current-buffer (get-buffer-create "org-bug")
  (erase-buffer)
  (org-mode)
  (insert "* line1\n** line2\n* line3")
  (org-shifttab)
  (pop-to-buffer (current-buffer)))

Yet another way it to reproduce it is given below

(with-current-buffer (get-buffer-create "flyspell-bug")
  (erase-buffer)
  (text-mode)
  (add-to-invisibility-spec '(outline . t))
  (insert "line1\nline2\nline3")
  (flyspell-check-region-doublons (point-min) (point-max))
  (let ((ov (make-overlay 7 12)))
    (overlay-put ov 'invisible 'outline))
  (pop-to-buffer (current-buffer)))

Interestingly, the first example is broken in both 24.4 and emacs-25; but the second one is broken only in emacs-25 (the third one does not run in Emacs 24.4).

I wonder if this is connected to another issue that I've seen, where having a composition (using prettify-symbols-mode) just before an invisible region would cause the background of the invisible region to be incorrect, but setting prettify-symbols-unprettify-at-point and moving the point to the edge of the symbol would cause the background to be fine. Unfortunately I don't have a good repro for that issue.

Cheers,
Clément.

In GNU Emacs 25.0.50.8 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
 of 2015-12-29 built on clem-w50-mint
Repository revision: a21bb238ce7bcc9c13a9cf66db77918304daa2fc
Windowing system distributor 'The X.Org Foundation', version 11.0.11501000
System Description:	Linux Mint 17.2 Rafaela

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  recentf-mode: t
  ido-ubiquitous-mode: t
  keybindings-global-mode: t
  keybindings-minor-mode: t
  ido-everywhere: t
  flycheck-pos-tip-mode: t
  global-company-mode: t
  company-mode: t
  global-page-break-lines-mode: t
  which-key-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  save-place-mode: t
  savehist-mode: t
  xterm-mouse-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Features:
(shadow sort ws-butler flyspell ispell ruler-mode gnus-util mail-extr
emacsbug message dired format-spec rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr
mail-utils smex recentf tree-widget company-math math-symbol-lists
company-files company-oddmuse company-keywords company-etags etags xref
project company-gtags company-dabbrev-code company-dabbrev company-capf
company-cmake company-xcode company-clang company-semantic company-eclim
company-template company-css company-nxml company-bbdb ido-ubiquitous s
ucs-normalize ido-completing-read+ cus-edit cus-start cus-load wid-edit
autoloads ido haskell-prettify flycheck-pos-tip pos-tip flycheck
find-func rx subr-x jka-compr let-alist proof-site proof-autoloads
pg-vars company agda2 smart-mode-line-dark-theme smart-mode-line
rich-minority page-break-lines diminish which-key which-func imenu
elapsed time eml-mode derived demo-mode dash always-make-directory
easy-escape easy-mmode delsel paren saveplace savehist xt-mouse
finder-inf edmacro kmacro advice tex-site cl-seq cl eieio eieio-core
cl-macs info package epg-config compatibility seq byte-opt gv compile
comint ansi-color ring bytecomp byte-compile cl-extra help-mode easymenu
cl-loaddefs pcase cl-lib cconv tangomod-dark-theme time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 433672 15194)
 (symbols 48 33265 1)
 (miscs 40 54 211)
 (strings 32 81160 11716)
 (string-bytes 1 2094594)
 (vectors 16 42572)
 (vector-slots 8 774284 7488)
 (floats 8 294 55)
 (intervals 56 2934 164)
 (buffers 976 14)
 (heap 1024 43373 1840))


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2016-01-08 10:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06 18:04 bug#22320: Overlays with an 'invisible property break stacking of overlay faces Clément Pit--Claudel
2016-01-07 15:54 ` Eli Zaretskii
2016-01-07 17:03   ` Clément Pit--Claudel
2016-01-07 17:36     ` Clément Pit--Claudel
2016-01-07 18:52       ` Eli Zaretskii
2016-01-07 19:07         ` Clément Pit--Claudel
2016-01-07 20:12           ` Eli Zaretskii
2016-01-07 21:02             ` Eli Zaretskii
2016-01-07 18:46     ` Eli Zaretskii
2016-01-07 19:28       ` Clément Pit--Claudel
2016-01-07 20:35         ` Eli Zaretskii
2016-01-08  0:27           ` Clément Pit--Claudel
2016-01-08 10:28             ` Eli Zaretskii

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