all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: darthandrus@gmail.com, 11068@debbugs.gnu.org
Subject: bug#11068: 24.0.94; Face-remapped background does not extend to end of window
Date: Tue, 27 Mar 2012 14:40:22 -0400	[thread overview]
Message-ID: <E1SCbJe-0003vP-7I@fencepost.gnu.org> (raw)
In-Reply-To: <4F718710.4040203@gmx.at> (message from martin rudalics on Tue, 27 Mar 2012 11:23:28 +0200)

> Date: Tue, 27 Mar 2012 11:23:28 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: darthandrus@gmail.com, monnier@iro.umontreal.ca, 
>  cyd@stupidchicken.com, 11068@debbugs.gnu.org
> 
> Earlier you said
> 
>    "No, the return character has no face, and in fact it has no glyphs."
> 
> and I stubbornly believe that it has a face I can specify, that face has
> an effect on what I see on the screen and apparently even produces a
> stretch glyph I can see.

That's my sloppy wording, sorry.  I meant to say that a newline has no
face _on_display_, because it simply isn't displayed.  It certainly
has a face _in_the_buffer_, which I believe is what you mean.

>  > Your code simply forces the display iterator to switch faces after the
>  > last character of a line.  That's it.  The newline doesn't enter this
>  > game at any point, because it is never drawn.  IOW, what's important
>  > is the _position_ where the new face gets in effect, not what
>  > character it is on.
> 
> Fully agreed.  But since I switch faces back immediately _after_ the
> newline character it does not affect visible characters but only what
> appears between them.

Right.

> But some part of the text is IMO confusing: In
> 
>       "Normally, the cursor is displayed at the end of any overlay and
>       text property strings present at the current buffer position."
> 
> I understand that an "overlay string" is a before- or after-string or a
> display property string.  But what is a "text property string"?  A
> display property of the text?

Yes, a `display' text property on buffer text.

>       "it specifies the number of buffer's
>       character positions associated with the overlay string"
> 
> clashes with my understanding that this number is already specified by
> the start and end position of the overlay.

That's because you think that the code which positions the cursor has
the overlay in hand to get this information.  But that assumption is
false: the code in question, which needs this property on overlay
strings (set_cursor_from_row) doesn't know what overlay produced the
glyphs in the glyph rows it considers as candidates for cursor
positioning.  All it has is the glyphs, whereby each glyph includes a
reference to the object from which it came.  For glyphs that came from
an overlay string, that object is the string, but the information
about the overlay where the string came from is lost.  By putting the
integer property on the string itself, you allow the
cursor-positioning code to find out how many buffer positions are
covered by the overlay string, without knowing what overlay is that.

>       "this way,
>       Emacs will display the cursor on the character with that property
>       regardless of whether the current buffer position is actually
>       covered by the overlay."
> 
> doesn't make it clearer for me because what is "the character with that
> property" and what is "the current buffer position" here?

"the character" is the one from the overlay string on which you put
the `cursor' property; "current buffer position" is point (which
normally determines where to display the cursor).

> I tried to play around with it but don't see what this means for an
> overlay with a display, before- or after-string property.  So the
> fact that overlays with such a property are affected by the `cursor'
> property remains obscure to me after reading this text.

It's a hard issue to explain, and I obviously failed.  You can see
this feature in action in cua-rectangle; after you play with it,
perhaps you could suggest how to improve the documentation.





  reply	other threads:[~2012-03-27 18:40 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 20:49 bug#11068: 24.0.94; Face-remapped background does not extend to end of window Ivan Andrus
     [not found] ` <handler.11068.B.13324512277363.ack@debbugs.gnu.org>
2012-03-22 21:18   ` bug#11068: Acknowledgement (24.0.94; Face-remapped background does not extend to end of window) Ivan Andrus
2012-03-22 21:33     ` Glenn Morris
2012-03-22 21:31 ` bug#11069: 24.0.94; Face-remapped background does not extend to end of window Glenn Morris
2012-03-23 10:36 ` bug#11068: " Eli Zaretskii
2012-03-23 10:48   ` Ivan Andrus
2012-03-24 12:37   ` Eli Zaretskii
2012-03-24 13:42     ` martin rudalics
2012-03-24 14:12       ` Eli Zaretskii
2012-03-24 19:48         ` martin rudalics
2012-03-24 20:47           ` Eli Zaretskii
2012-03-25 12:54             ` martin rudalics
2012-03-25 17:22               ` Eli Zaretskii
2012-03-25 19:19                 ` martin rudalics
2012-03-25 19:53                   ` Stefan Monnier
2012-03-25 20:44                     ` martin rudalics
2012-03-25 21:49                   ` Eli Zaretskii
2012-03-25 21:53                     ` Eli Zaretskii
2012-03-26  7:05                     ` martin rudalics
2012-03-26 19:32                       ` Eli Zaretskii
2012-03-27  9:23                         ` martin rudalics
2012-03-27 18:40                           ` Eli Zaretskii [this message]
2012-03-30  7:35                             ` martin rudalics
2012-03-30  8:18                               ` Eli Zaretskii
2012-03-30 10:14                                 ` martin rudalics
2012-03-30 11:42                                   ` Eli Zaretskii
2012-03-31 10:29                                     ` Eli Zaretskii
2012-03-30 10:47                                 ` martin rudalics
2012-03-24 18:04       ` Stefan Monnier
2012-03-24 19:48         ` martin rudalics
2012-03-24 14:17     ` Chong Yidong
2012-03-24 14:40       ` Eli Zaretskii
2012-03-25  3:01         ` Chong Yidong
2012-03-25  4:02           ` Eli Zaretskii
2012-03-25  6:20             ` Chong Yidong
2012-03-25 12:55               ` martin rudalics
2012-03-25 17:26                 ` Eli Zaretskii
2012-03-25 19:20                   ` martin rudalics
2012-03-25 17:51               ` Eli Zaretskii
2012-03-26  4:16                 ` Chong Yidong
2012-03-26 19:35                   ` Eli Zaretskii
2012-03-30  8:49                   ` Eli Zaretskii
2012-03-25 12:54             ` martin rudalics
2012-03-25 17:25               ` Eli Zaretskii
2012-03-25 19:19                 ` martin rudalics
2012-03-25 21:50                   ` 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

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

  git send-email \
    --in-reply-to=E1SCbJe-0003vP-7I@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=11068@debbugs.gnu.org \
    --cc=darthandrus@gmail.com \
    --cc=rudalics@gmx.at \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.