unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: move-beginning-of-line
Date: Mon, 14 Mar 2005 18:31:17 +0100	[thread overview]
Message-ID: <x5d5u2m8wq.fsf@lola.goethe.zz> (raw)
In-Reply-To: <d14f75$5ph$1@sea.gmane.org> (Ralf Angeli's message of "Mon, 14 Mar 2005 17:48:40 +0100")

Ralf Angeli <angeli@iwi.uni-sb.de> writes:

> * Kim F. Storm (2005-03-14) writes:
>
>> I wonder how preview-latex handles this, as it uses images over
>> multiline text _a lot_ ...?
>
> A typical example would be LaTeX code like
>
> Foo\footnote{Bar
> baz} blah
>
> which, with the help of preview-latex (or AUCTeX's folding
> functionality), will get displayed as
>
> Foo¹ blah
>
>> Does beginning-of-line work ok
>> with images in the middle of lines?  If so, how?
>
> That depends.  With point at the end of the line in the example
> `C-a' will move to the beginning of the line.  With
> `beginning-of-line' point will end up inside of the overlay.
>
> One can test this quite easily (circumventing preview-latex's
> provisions for playing with point)

But preview-latex's provisions for playing with point are actually
what is interesting to the user.

preview-latex uses post-command-hook to move point out of images after
each command.  It also uses pre-command-hook to remember point before
each command.  If the command moved backwards when ending up inside of
the image, preview-latex will move it to the start of the image,
otherwise to the end of the image.  As a result, pressing C-a to the
right of a multi-line image should move point to the front of the
image.  Similar with pressing C-e to the left of such an image.

> with code like
>
> (progn
>   (insert "\nwww xxx\nyyy zzz")
>   (overlay-put (make-overlay (- (point) 11) (- (point) 4)) 'display "111"))
>
> If found it a bit peculiar that `M-x beginning-of-line RET' and `M-:
> (beginning-of-line) RET' yielded different results.  In the former
> case point will end up on the first "1" and in the latter case after
> the last "1".

Hm, no idea about that one.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

  reply	other threads:[~2005-03-14 17:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-01 23:01 move-beginning-of-line Kim F. Storm
2005-03-14  2:58 ` move-beginning-of-line Luc Teirlinck
2005-03-14  8:20   ` move-beginning-of-line Kim F. Storm
2005-03-14 16:48     ` move-beginning-of-line Ralf Angeli
2005-03-14 17:31       ` David Kastrup [this message]
2005-03-14 17:52         ` move-beginning-of-line Ralf Angeli
2005-03-14 18:48       ` move-beginning-of-line Stefan Monnier
2005-03-15 18:38         ` move-beginning-of-line Richard Stallman
2005-03-15 18:39     ` move-beginning-of-line Richard Stallman
2005-03-15 22:23     ` move-beginning-of-line David Kastrup
     [not found] ` <m364zqibx2.fsf@zsu.sush.org>
2005-03-17 15:34   ` move-beginning-of-line Kim F. Storm

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=x5d5u2m8wq.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).