unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: michael_heerdegen@web.de, jonas@bernoul.li, 19200@debbugs.gnu.org
Subject: bug#19200: Point adjustemnt moves *into* invisible text
Date: Wed, 23 Mar 2016 17:42:34 +0200	[thread overview]
Message-ID: <83poul2ob9.fsf@gnu.org> (raw)
In-Reply-To: <jwvzitpb4nm.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Wed, 23 Mar 2016 11:32:29 -0400)

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: 19200@debbugs.gnu.org, michael_heerdegen@web.de, jonas@bernoul.li
> Date: Wed, 23 Mar 2016 11:32:29 -0400
> 
> >> No, you have it backwards: position 5 is invisible and position 3 is not.
> > So you are saying that we also have a display bug, in that what should
> > have been on the screen is "3" and not "5"? ;-)
> 
> No: the character after position 3 is invisible, but the position 3 is not.
> Inversely, the character after position 5 is visible while the position
> is not.

But we display characters, not positions.  And the cursor is displayed
"on" some character as well.

> > You are talking about a different kind of "invisible", the kind that
> > is different from how the display engine, and any cursor-motion
> > commands that use its layout routines, interprets "invisible".
> 
> No.  You just have to remember that characters are between positions and
> positions are between characters, so the two can't be conflated.

Thank you, I don't think I forgot that.

And it isn't important what I remember, because above I was talking
about what the display code does: it examines properties of characters
using the likes of get-char-property, and behaves accordingly.

> > (Personally, I think your notion of "invisible" is also confusing for
> > the user, in that it puts the cursor on a character whose position is
> > not the same as point.
> 
> That's not my choice and that's not hard coded.  It's the choice of the
> stickiness settings for that particular invisible property.  It can be
> controlled by text property stickiness and overlay's marker's
> insertion types.

That is not visible until you insert a character.  By contrast, the
characters and the cursor are visible at all times.

> > The other notion of "invisible" also has its disadvantages, so it's
> > not easy to decide which one is "right", but at least it doesn't fight
> > an uphill battle against the display engine.)
> 
> AFAIK there's no relevant interaction with the display engine.

Read the code: it's all over the place.  Why do you think
vertical-motion ends up at position 5 in the test case you presented
in this bug report?

> The secondary bug is pretty cosmetic and (at least in this case) is
> rather helpful, so I'm not sure it would be an improvement in itself.

OK, then I don't see what can be done here.

> The issue of the main bug is not so much that we don't know how to fix
> it, but that noone has bothered to investigate it to try and figure out
> what is actually happening.

Didn't I do that?  Doesn't the fact that the relevant code calls
get-char-property-and-overlay explain what happens?





  reply	other threads:[~2016-03-23 15:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 22:22 bug#19200: Point adjustemnt moves *into* invisible text Stefan Monnier
2016-03-20 22:58 ` Michael Heerdegen
2016-03-21  1:21   ` Stefan Monnier
2016-03-21  2:15     ` Michael Heerdegen
2016-03-21  2:23       ` Michael Heerdegen
2016-03-21 18:30         ` Eli Zaretskii
2016-03-21 12:08       ` Stefan Monnier
2016-03-21 14:52         ` Michael Heerdegen
2016-03-21 15:36           ` Stefan Monnier
2016-03-21 15:54             ` Michael Heerdegen
2016-03-21 18:08               ` Stefan Monnier
2016-03-21 18:28             ` Eli Zaretskii
2016-03-21 19:24               ` Michael Heerdegen
2016-03-21 19:40                 ` Eli Zaretskii
2016-03-21 20:10                   ` Michael Heerdegen
2016-03-21 20:21                     ` Michael Heerdegen
2016-03-21 20:43               ` Stefan Monnier
2016-03-22 16:39                 ` Eli Zaretskii
2016-03-22 18:36                   ` Stefan Monnier
2016-03-22 18:52                     ` Eli Zaretskii
2016-03-23  2:13                       ` Stefan Monnier
2016-03-23 15:15                         ` Eli Zaretskii
2016-03-23 15:32                           ` Stefan Monnier
2016-03-23 15:42                             ` Eli Zaretskii [this message]
2016-03-23 16:10                               ` Stefan Monnier
2016-03-31 17:17                                 ` Eli Zaretskii
2016-03-31 18:04                                   ` Stefan Monnier
2016-03-31 23:32                                     ` Michael Heerdegen
2016-03-26 21:49                             ` bug#19200: Point adjustment " John Wiegley
2016-03-21 18:31       ` bug#19200: Point adjustemnt " Eli Zaretskii
2016-03-21 18:50         ` Michael Heerdegen

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=83poul2ob9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=19200@debbugs.gnu.org \
    --cc=jonas@bernoul.li \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@IRO.UMontreal.CA \
    /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).