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

[SOLUTION PROPOSAL] w3m buffers not displaying in iBuffer list



I think I've solved a problem that has been bothering me for over a
year, and has been the topic of discussion in several emails, including
#12584, #12585, and #12587.

To summarize the symptoms of the problem (excerpted from #12584):

On 2016-08-04 01:02, Boruch Baum wrote:
> I've started using the newest CVS version of emacs-w3m, and it's
> behaving differently in how it represents its buffers.
>
> The (older) release version displays each w3m buffer as a separate
> entry on the iBuffer list, each labeled "*w3m*" along with a number
> and a web page title. The CVS version doesn't display any entry
> whatsoever in iBuffer.
>
> Furthermore, while the mode line of the CVS version identifies the
> buffer as "*server*-nnnnnn [ - ] / webpage-title", where you would
> replace 'nnnnnn' with a number and 'webpage-title' with that
> information, the emacs command 'switch-to-buffer' (C-x b) does not
> recognize even that.
>
> It is still possible to display the hidden w3m buffer by typing 'M-x
> w3m'.
>

1] The first element towards understanding the problem was discovering
   that the mysterious "invisible buffers" were quasi-intentional, in
   that the emacs ibuffer display suppresses display of buffers
   beginning with a space. I didn't know that, and I didn't realize that
   my set of "invisible buffers" had leading spaces (I discovered the
   facts as a side-effect of recently beginning to use a minibuffer
   completion package called ivy / counsel / swiper).

2] The discovery re-charged my motivation to search for a solution, and
   what I've come up with is a small change to function
   `w3m-goto-url-new-session' that seems to fix the problem for me.
   however, I'm hesitant to propose it as a complete solution until
   others can test it or verify that it has no unwanted side-effects.


-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
--- w3m.el	2017-09-11 02:44:41.650388838 -0400
+++ w3m_patched.el	2017-09-24 22:53:38.195215110 -0400
@@ -9931,7 +9931,7 @@
 	  ;; Store the current position in the history structure.
 	  (w3m-history-store-position)
 	  (switch-to-buffer
-	   (setq buffer (w3m-copy-buffer nil nil
+	   (setq buffer (w3m-copy-buffer nil  "*w3m*"
 					 w3m-new-session-in-background
 					 'empty)))
 	  (w3m-display-progress-message url)