From: Eli Zaretskii <eliz@gnu.org>
To: "Göktuğ Kayaalp" <self@gkayaalp.com>
Cc: 34374@debbugs.gnu.org
Subject: bug#34374: 27.0.50; Outside an eww buffer, optionally use new buffer when calling eww instead of reusing *eww*
Date: Fri, 08 Feb 2019 08:52:28 +0200 [thread overview]
Message-ID: <83lg2qrcur.fsf@gnu.org> (raw)
In-Reply-To: <ygmwombs3dj.fsf@gkayaalp.com> (message from Göktuğ Kayaalp on Fri, 08 Feb 2019 00:19:36 +0300)
> From: Göktuğ Kayaalp <self@gkayaalp.com>
> Date: Fri, 08 Feb 2019 00:19:36 +0300
>
> Eww should support conveniently avoiding using the same buffer even when
> not in an eww buffer (M-x eww or browse-url). Currently, in an eww
> buffer, ‘eww-open-in-new-buffer’ opens the link under point in a new
> buffer, and ‘eww’ reuses the buffer. When running ‘eww’ outside an eww
> buffer, it reuses the ‘*eww*’ buffer. Attached is a patch where by
> default this behaviour is retained, but when a new custom,
> ‘eww-reuse-buffer’ is truthy (defaults to nil), Eww uses a new buffer
> (obtained via ‘generate-new-buffer’) instead, unless the current buffer
> is an eww buffer. The navigation behaviour in eww buffers is retained.
Wouldn't it be more convenient if you could invoke eww with a prefix
argument for that?
> I have manually tested the general use of EWW with this patch applied.
> But I haven’t found a test suite for EWW; if I missed it, I can run it,
> or any other suggested testing.
You could start a test suite, although testing eww should ideally work
even if no network connection is available.
> Subject: [PATCH] Support not reusing *eww* buffer when navigating from a
> non-eww one
It is best to reword this header line to be positive instead of
negative.
> +(defcustom eww-reuse-buffer t
> + "Reuse the *eww* buffer when not in an `eww-mode' buffer."
For a boolean option, the first line of the doc string should say
either
Non-nil means reuse the *eww* buffer ...
or
Whether to reuse the *eww* buffer ...
(the former is preferable).
> +When the current buffer is not in `eww-mode', if
> +`eww-reuse-buffer' is non-nil, the *eww* buffer will be reused if
> +available, otherwise generated; if set to nil instead, a new
> +buffer will be used in case *eww* is already in use."
Once this feature exists and is used, wouldn't it be better to program
it so it either reuses the current EWW buffer or creates a new one,
regardless of whether the current buffer's name is "*eww*"? IOW,
should we really hardcode "*eww*" in this feature?
> - (get-buffer-create "*eww*")))
> + (funcall
> + (if eww-reuse-buffer #'get-buffer-create #'generate-new-buffer)
> + "*eww*")))
Any particular reason to use funcall here, instead of calling the
functions literally?
Thanks.
next prev parent reply other threads:[~2019-02-08 6:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-07 21:19 bug#34374: 27.0.50; Outside an eww buffer, optionally use new buffer when calling eww instead of reusing *eww* Göktuğ Kayaalp
2019-02-08 6:52 ` Eli Zaretskii [this message]
2019-02-09 15:04 ` Göktuğ Kayaalp
2019-02-15 8:35 ` Eli Zaretskii
2019-02-16 9:45 ` Göktuğ Kayaalp
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83lg2qrcur.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=34374@debbugs.gnu.org \
--cc=self@gkayaalp.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.