[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysterious gzipped images

From: Eli Zaretskii
Subject: Re: Mysterious gzipped images
Date: Wed, 14 Aug 2013 18:12:24 +0300

> From: Lars Magne Ingebrigtsen <address@hidden>
> Date: Wed, 14 Aug 2013 15:09:24 +0200
> Eval the following:
> (url-retrieve "https://icons.duckduckgo.com/i/a-z-animals.com.ico";
>               (lambda (&rest ignore)
>                 (message "%s" (point))
>                 (switch-to-buffer (current-buffer))))
> I get a message saying "1", but after switching to the buffer, point is
> visibly at the end of the buffer.
> What's up with that?

Did you look at the source of switch-to-buffer?  This portion sounds

      (let* ((entry (assq buffer (window-prev-buffers)))
             (displayed (and (eq switch-to-buffer-preserve-window-point
                             (get-buffer-window buffer 0))))
        (set-window-buffer nil buffer)
        (when (and entry
                   (or (eq switch-to-buffer-preserve-window-point t)
          ;; Try to restore start and point of buffer in the selected
          ;; window (Bug#4041).
          (set-window-start (selected-window) (nth 1 entry) t)
          (set-window-point nil (nth 2 entry))))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]