unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Shmakov <ivan@siamics.net>
To: 19109@debbugs.gnu.org
Cc: emacs-devel@gnu.org
Subject: bug#19109: eww-setup-buffer: use set-buffer instead of switch-to-buffer
Date: Wed, 19 Nov 2014 17:10:02 +0000	[thread overview]
Message-ID: <87lhn73ymt.fsf_-___42565.510448958$1416417101$gmane$org@violet.siamics.net> (raw)
In-Reply-To: <m34mtvtbak.fsf@stories.gnus.org> (Lars Magne Ingebrigtsen's message of "Wed, 19 Nov 2014 17:17:23 +0100")

[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]

Package:  emacs
Severity: wishlist
X-Debbugs-Cc: emacs-devel@gnu.org

>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
>>>>> Ivan Shmakov <ivan@siamics.net> 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 256 bytes --]

--- 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)
        buffer
      (get-buffer-create "*eww*")))

       reply	other threads:[~2014-11-19 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3zjbqouyk.fsf@stories.gnus.org>
     [not found] ` <m3sihgfnq8.fsf@stories.gnus.org>
     [not found]   ` <87a93oh180.fsf@lifelogs.com>
     [not found]     ` <m3389gfmf9.fsf@stories.gnus.org>
     [not found]       ` <83h9xw9zg3.fsf@gnu.org>
     [not found]         ` <m37fyse6mz.fsf@stories.gnus.org>
     [not found]           ` <83d28k9yb9.fsf@gnu.org>
     [not found]             ` <m3egt0cr6m.fsf@stories.gnus.org>
     [not found]               ` <m3a93ocqys.fsf@stories.gnus.org>
     [not found]                 ` <m3389gcqhd.fsf@stories.gnus.org>
     [not found]                   ` <jwvd28ki6uj.fsf-monnier+emacs@gnu.org>
     [not found]                     ` <m3d28kuta6.fsf@stories.gnus.org>
     [not found]                       ` <jwvmw7ogcyw.fsf-monnier+emacs@gnu.org>
     [not found]                         ` <83ppcj9740.fsf@gnu.org>
     [not found]                           ` <jwvtx1vfgyh.fsf-monnier+emacs@gnu.org>
     [not found]                             ` <871toze1tl.fsf@lifelogs.com>
     [not found]                               ` <m3vbmbckpr.fsf@stories.gnus.org>
     [not found]                                 ` <87wq6rcidx.fsf@lifelogs.com>
     [not found]                                   ` <m3sihfp4yo.fsf@stories.gnus.org>
     [not found]                                     ` <87wq6r41b2.fsf_-_@violet.siamics.net>
     [not found]                                       ` <m34mtvtbak.fsf@stories.gnus.org>
2014-11-19 17:10                                         ` Ivan Shmakov [this message]
     [not found]                                         ` <87lhn73ymt.fsf_-_@violet.siamics.net>
2014-11-19 17:33                                           ` bug#19109: eww-setup-buffer: use set-buffer instead of switch-to-buffer Lars Magne Ingebrigtsen
2014-11-19 18:45                                             ` Ivan Shmakov
2014-11-23 18:55                                             ` bug#19109: eww.el: do not switch buffers asynchronously Ivan Shmakov
2014-11-23 19:28                                               ` Glenn Morris
2014-11-23 19:35                                                 ` bug#19109: mailing control@, but requesting that no replies be sent there Ivan Shmakov
     [not found]                                                 ` <87fvd9u2v3.fsf_-_@violet.siamics.net>
2014-11-24  5:00                                                   ` Stephen J. Turnbull
     [not found]                                       ` <jwvmw7mesj9.fsf-monnier+emacs@gnu.org>
2014-11-20  6:47                                         ` bug#19109: EWW buffers Ivan Shmakov

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='87lhn73ymt.fsf_-___42565.510448958$1416417101$gmane$org@violet.siamics.net' \
    --to=ivan@siamics.net \
    --cc=19109@debbugs.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).