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

Re: no buffer switch on `w3m-copy-buffer'

In [emacs-w3m:13593]
On Sat, 22 Feb 2020 05:30:02 +0100, Emanuel Berg wrote:
> It seems `w3m-copy-buffer' no longer switches
> to the new buffer it creates, that's the only
> thing I can think of that explains me suddenly
> getting lots of empty tabs while the action
> happening in the current tab, which might
> already display a useful webpage...

The doc-string for `w3m-copy-buffer' might have had to mention
as follows:

  If EMPTY is non-nil, an empty buffer is created, but with the current
- buffer's history and settings.
+ buffer's history and settings.  In that case, the new buffer will not
+ be showed up, so you may want to perform `switch-to-buffer' or the
+ like if necessary.

That behavior is necessary to render something in the new buffer
before displaying it.  So,

> I did solve it by putting `switch-to-buffer' in
> 3 files [1] which solved it but I'm not sure
> that's the way it ought to be.

your approach[2] should be very correct, I think.

[2] (switch-to-buffer (w3m-new-tab "new name"))

> I think this happened when I switched from the
> Debian Buster repo version of Emacs-w3m, or
> w3m-el-snapshot, which I had at (repo) version
> 1.4.632+0.20181112-2. Now I have MELPA version
> 20200113.2320. `emacs-w3m-version' is 1.4.632
> which sure sounds like my previous version, so
> actually I don't know, maybe I just didn't
> notice it earlier.

> I don't know, most likely you have good reasons
> to change the behavior, if that's what
> happened, just thought I'd let you know...
> Thanks for great software :)

Hmm, no such critical change was made in `w3m-copy-buffer' for
years AFAICT.

> [1] https://dataswamp.org/~incal/emacs-init/w3m/bookmarks.el
>     https://dataswamp.org/~incal/emacs-init/w3m/w3m-tabs.el
>     https://dataswamp.org/~incal/emacs-init/w3m/w3m-unisearch.el