unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: 40857@debbugs.gnu.org
Subject: bug#40857: Invisibility specs do not apply to specified spaces
Date: Sun, 26 Apr 2020 18:20:55 +0300	[thread overview]
Message-ID: <83tv165l48.fsf@gnu.org> (raw)
In-Reply-To: <1f66e993-8835-4777-7252-9b6de7331fc7@gmail.com> (message from Clément Pit-Claudel on Sat, 25 Apr 2020 19:18:55 -0400)

> From: Clément Pit-Claudel <cpitclaudel@gmail.com>
> Date: Sat, 25 Apr 2020 19:18:55 -0400
> 
> 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

I don't think this is a bug.  A "replacing" display property in effect
forces the display engine to ignore the entire chunk of text "covered"
by that display property, so the fact that this chunk of text is in
this case invisible is never seen, nor acted upon.  Once the display
engine is done producing the stretch of white space for the display
property, it jumps to the end of the text "covered" by the property,
and continues from there.





  reply	other threads:[~2020-04-26 15:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83tv165l48.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=40857@debbugs.gnu.org \
    --cc=cpitclaudel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).