Subject: Re: bug#9296: 24.0.50; next-line/prev-line on lines with images
From: Eli Zaretskii <[email-masked]>
To: Lars Magne Ingebrigtsen <[email-masked]>
Cc: [email-masked]
Date: Sun, 14 Aug 2011 19:52:32 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Lars Magne Ingebrigtsen <[email-masked]>
> Cc: [email-masked]
> Date: Sun, 14 Aug 2011 16:16:02 +0200
> MailScanner-NULL-Check: 1313936207.48825@iYqLddN/OGrzFGkFNPyD2A
> 
> (url-retrieve
>  "http://quimby.gnus.org/circus/jukebox.php?image=thumbnail.png&group=Various&album=Bossa%20Nova%20and%20the%20Rise%20of%20Brazilian%20Music%20in%20the%201960s%20%281%29"
>  (lambda (status)
>    (goto-char (point-min))
>    (search-forward "\n\n")
>    (let ((data (buffer-substring (point) (point-max))))
>      (pop-to-buffer "*image*")
>      (setq truncate-lines t)
>      (let ((image (create-image data 'png t)))
>        (dotimes (i 50)
> 	 (insert-image image)
> 	 (insert " Bossa Nova and the Rise of Brazilian Music in the 1960s (1) -> Various/Bossa Nova and the Rise of Brazilian Music in the 1960s (1)\n"))))))

Thanks for the test case.  This problem exists in Emacs 23 as well, so
it's not new.  I suggest to file a separate bug for it.  For now,
being not worse than Emacs 23.3 is good enough for me.

In general, the DWIM-ish operation of next/previous-line, especially
its ideas of what exactly is the goal column, is darn hard to get
right, and it certainly has its surprises.  If you look at the
convoluted code in move_it_in_display_line_to, you will understand
why.