[Top][All Lists]

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

bug#19109: eww-setup-buffer: use set-buffer instead of switch-to-buffer

From: Ivan Shmakov
Subject: bug#19109: eww-setup-buffer: use set-buffer instead of switch-to-buffer
Date: Wed, 19 Nov 2014 17:10:02 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Package:  emacs
Severity: wishlist
X-Debbugs-Cc: address@hidden

>>>>> Lars Magne Ingebrigtsen <address@hidden> writes:
>>>>> Ivan Shmakov <address@hidden> writes:

 >> It’s also perfectly possible to create that buffer but do /not/
 >> switch to it until it’s ready.  It won’t help in the scenario being
 >> discussed, but to be honest, EWW already pops its buffers way to
 >> often to my taste.

 >> Consider, for instance, invoking eww-reload in a handful of buffers
 >> in a row, – EWW will switch to each of these buffers as soon as
 >> one’s done, which could very well happen in the middle of user
 >> interaction with some specific buffer.

 > I think this is a case of "don't do that, then".

        Yes.  And that means that eww-reload is essentially synchronous,
        – you can’t really invoke it and switch to doing some other
        thing; you have to wait until it completes.

 > Granted, it’s possible to switch to a EWW buffer, invoke eww-reload,
 > wait for it to complete, and only /then/ go to some other buffer
 > (whether EWW or not), but that kind of spoils the benefits of
 > asynchronous url-retrieve operation, doesn’t it?

        Personally, I just use the patch MIMEd, which makes EWW forget
        about its indiscreet habit of interrupting my activity.

        FWIW, ERC provides support for several possible behaviors when a
        new buffer gets created (see erc-join-buffer), and perhaps EWW
        should follow the suit.  OTOH, I fail to readily recall an Emacs
        package which would use switch-to-buffer on a priorly existing
        buffer as part of some background task.

FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -419,7 +419,7 @@
   (goto-char (point-min)))
 (defun eww-setup-buffer (&optional buffer)
-  (switch-to-buffer
+  (set-buffer
    (if (buffer-live-p buffer)
      (get-buffer-create "*eww*")))

reply via email to

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