[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `vertical-motion', `goto-line' set point to invisible text
From: |
Dmitry Kurochkin |
Subject: |
Re: `vertical-motion', `goto-line' set point to invisible text |
Date: |
Mon, 04 Jul 2011 06:08:45 +0400 |
User-agent: |
Notmuch/0.5-321-g41686e2 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) |
On Sun, 03 Jul 2011 16:33:54 +0300, Eli Zaretskii <address@hidden> wrote:
> > From: Dmitry Kurochkin <address@hidden>
> > Cc: address@hidden
> > Date: Sun, 03 Jul 2011 11:31:23 +0400
> >
> > Is there a way to ask Emacs to sync point to visible position, so
> > that I do not have to do it by hand?
>
> Not sure what that means. Can you explain more about what you are
> looking for?
>
I am looking for a function that does something like what you described
below. I.e. moves point to the next suitable character in the given
direction. At the moment I do it with smth like:
;; if point is invisible, skip forward to visible text
(while (invisible-p p)
(setq p (next-single-char-property-change p 'invisible)))
> > I.e. M-: (progn (backward-char) (point)) works fine. But after that
> > M-: (point) returns another position which corresponds to the
> > beginning of the hidden line. I guess this has to do command loop I
> > know nothing about.
>
> When a command finishes and Emacs is idle (i.e. has nothing else to
> do), it examines the position of point. If it finds that point is on
> some character where it shouldn't be, it moves point to the next
> "suitable" character in the direction of last move. Text where point
> shouldn't be includes: invisible text, non-base character that belongs
> to a composed character, and text covered by a "replacing" `display'
> property.
>
Thanks for the detailed explanation.
> > IMO Emacs should not touch the point in this case, because it is
> > already visible. Sounds like a bug to me.
>
> If no one comes up with a plausible explanation until tomorrow, feel
> free to submit a bug report.
>
ok
> Btw, I just tried past releases, and Emacs 21.4 didn't have this
> problem, but Emacs 22.3 did. I guess that's a side effect of point
> adjustment described above, which Emacs 21.4 didn't have: in Emacs
> 21.4, the cursor stays put for several C-f or C-b commands, as long as
> point is on invisible text.
I will put a reference in the bug report.
Regards,
Dmitry
- `vertical-motion', `goto-line' set point to invisible text, Dmitry Kurochkin, 2011/07/03
- Re: `vertical-motion', `goto-line' set point to invisible text, Stefan Monnier, 2011/07/03
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/03
- Re: `vertical-motion', `goto-line' set point to invisible text, Stefan Monnier, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Stefan Monnier, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Dmitry Kurochkin, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Eli Zaretskii, 2011/07/04
- Re: `vertical-motion', `goto-line' set point to invisible text, Dmitry Kurochkin, 2011/07/04