From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: move-beginning-of-line Date: Mon, 14 Mar 2005 18:31:17 +0100 Message-ID: References: <200503140258.j2E2wbI11194@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1110822810 20176 80.91.229.2 (14 Mar 2005 17:53:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 Mar 2005 17:53:30 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 14 18:53:30 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DAtR7-0004qj-28 for ged-emacs-devel@m.gmane.org; Mon, 14 Mar 2005 18:33:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAtgp-0005xU-Ig for ged-emacs-devel@m.gmane.org; Mon, 14 Mar 2005 12:49:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DAtg6-0005mc-Vq for emacs-devel@gnu.org; Mon, 14 Mar 2005 12:48:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DAtg0-0005ja-86 for emacs-devel@gnu.org; Mon, 14 Mar 2005 12:48:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DAtg0-0005iz-5A for emacs-devel@gnu.org; Mon, 14 Mar 2005 12:48:24 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DAtPo-0008Gj-GA for emacs-devel@gnu.org; Mon, 14 Mar 2005 12:31:40 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1DAtPS-00032r-KZ; Mon, 14 Mar 2005 12:31:25 -0500 Original-To: Ralf Angeli In-Reply-To: (Ralf Angeli's message of "Mon, 14 Mar 2005 17:48:40 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34585 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34585 Ralf Angeli 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=B9 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. --=20 David Kastrup, Kriemhildstr. 15, 44793 Bochum