unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#40857: Invisibility specs do not apply to specified spaces
@ 2020-04-25 23:18 Clément Pit-Claudel
  2020-04-26 15:20 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Clément Pit-Claudel @ 2020-04-25 23:18 UTC (permalink / raw)
  To: 40857

Consider the following program:

(with-current-buffer (get-buffer-create "*spaces*")
  (erase-buffer)
  (let ((indent (propertize " " 'display '(space :width 3))))
    (put-text-property (point) (progn (insert indent "r1\n") (point)) 'invisible 'a)
    (put-text-property (point) (progn (insert indent "r2\n") (point)) 'invisible 'b))
  (add-to-invisibility-spec 'a)
  (pop-to-buffer (current-buffer)))

The first record (r1) is hidden, but not the indentation that precedes it; so, instead of looking like this:

   r2

The buffer looks like this:

      r2

(This is because the invisible property doesn't apply to the display spec.)
It's easy to fix when the replacing display spec is a string (by putting the same invisibility spec on the string), but there doesn't seem to be a way to add an 'invisible property to the specified space.

Clément





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

end of thread, other threads:[~2020-04-27 15:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-25 23:18 bug#40857: Invisibility specs do not apply to specified spaces Clément Pit-Claudel
2020-04-26 15:20 ` Eli Zaretskii
2020-04-26 16:04   ` Clément Pit-Claudel
2020-04-26 17:01     ` Eli Zaretskii
2020-04-26 17:25       ` Clément Pit-Claudel
2020-04-26 17:45         ` Eli Zaretskii
2020-04-26 19:01   ` Pip Cet
2020-04-27 15:20     ` 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).