I use a program I found called "mini-ibfn.el". It depends on having buffer-file-name set. Why not set that to the current URL (same as w3m-print-current-url), instead of nil? This might also make various C-x C-b buffer lists look better.