all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 19200@debbugs.gnu.org, Jonas Bernoulli <jonas@bernoul.li>
Subject: bug#19200: Point adjustemnt moves *into* invisible text
Date: Mon, 21 Mar 2016 08:08:59 -0400	[thread overview]
Message-ID: <jwvio0gyrg1.fsf-monnier+Inbox@gnu.org> (raw)
In-Reply-To: <87io0gbmpl.fsf@web.de> (Michael Heerdegen's message of "Mon, 21 Mar 2016 03:15:34 +0100")

>> Are you sure you're hitting exactly this same bug?
>> IOW can you circumvent the bug by adding M-: (point) RET ?
> First question: no, I'm not, it's similar, but maybe not exactly the
> same.  But second question: yes!

OK, if M-: (point) RET "fixes" the problem, then it's probably hitting
the same bug.

> The issue in Magit seems to be dependent to the setting
> goal-column -> 0.

I don't think that's very surprising: if goal-column is non-zero, then
point doesn't end in an invisible region since you only have invisible text
in column 0, IIUC.

> And I found that when I replace

>   (if (zerop col)
>       (beginning-of-line)
>     (move-to-column col))
>
> in the definition of line-move-to-column (at the beginning) with just
>
>   (move-to-column col)
>
> the Magit issue is fixed.  I have no clue why, however.

move-to-column moves forward from BOL, whereas beginning-of-line moves
only backward, so the two probably end up at opposite ends of the
invisible region.

BTW, regardless of fixing this bug, I think you have a problem: if the
exact position within the invisible text is so important that it can end up
selecting a different line, then fixing bug#19200 won't do you much
good: there are many cases where point-adjustment won't do what you want
(e.g. it won't move point at all, even though it's somewhere in the
middle of the invisible region) and hence it will end up "at the wrong place".

The way point-adjustment is defined is too conservative for that.
So I suggest you try and make you code more robust w.r.t the position of
point within an invisible region in any case.


        Stefan





  parent reply	other threads:[~2016-03-21 12:08 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 [this message]
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
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

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

  git send-email \
    --in-reply-to=jwvio0gyrg1.fsf-monnier+Inbox@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=19200@debbugs.gnu.org \
    --cc=jonas@bernoul.li \
    --cc=michael_heerdegen@web.de \
    /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.