Emacs-w3m buffer name disambiguation

One of my problems with Emacs-w3m is that all it’s buffers are named *w3m*, *w3m<2>* and so forth, which makes it hard to tell which is which when you have several.

This bit of code renames w3m buffers to include the page title (or URL, if there is no title), and works great for me.

(add-hook 'w3m-display-hook
          (lambda (url)
            (rename-buffer
             (format "*w3m: %s*" (or w3m-current-title
                                     w3m-current-url)) t)))
2008/09/10
Previously On Atomized:

Discussion

Hi,

Isn’t there a variable for this? Setting w3m-use-title-buffer-name to t works for me the same way I think.

bhappy
2008/09/10

Bhappy, I see no reference to that variable anywhere in the w3m source. There’s ‘w3m-modeline-title-string, but that has nothing to do with the buffer name, e.g. what you see in list-buffers / ibuffer.

Ian
2008/09/10

Ian,

well, I use w3m/0.5.2… I can also see notes about this variable on emacswiki:

http://www.emacswiki.org/cgi-bin/wiki/WThreeMTabs

bhappy
2008/09/10

Participate