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

w3m-switch-to-buffer and buffer-list order



When first opening up a w3m buffer, it's at the end of (buffer-list)
where I hoped it would be at the start, as per a usual switch-to-buffer.

    (progn
      (w3m-browse-url "file:///tmp")
      (buffer-list))
    =>
    *w3m* buffer at the end of the list, not the start

I see a newly created buffer goes through w3m-switch-to-buffer.  Is
there a reason it's not a plain `switch-to-buffer'?

I couldn't tell what w3m-switch-to-buffer is trying to do.  Is
select-window trying to provoke a buffer-list re-order for the newly set
buffer?  It doesn't seem to have that effect in emacs23.

I struck this when using a command to switch between current-buffer and
other-buffer,

    (defun my-switch-to-other-buffer ()
      (interactive)
      (switch-to-buffer (other-buffer)))
    (define-key global-map [(control ?6)] 'my-switch-to-other-buffer)
    (define-key global-map [(control ?^)] 'my-switch-to-other-buffer)

if you such an C-^ key twice it doesn't return to w3m,

    C-^     # goes to previously displayed buffer
    C-^     # supposed to return to *w3m*, but does not

Note it must through a key binding to see the problem, and as the very
first thing in the new w3m buffer.  If you M-x or M-: eval etc then the
automatic buffer selection stuff in emacs moves the *w3m* buffer up in
the buffer-list.

I think I'd like a newly created and displayed w3m buffer at the front
of the buffer-list (on its relevant frame, etc, etc) like other newly
created buffers.



-- 
The sigfile two-line movie reviews series:
"Cold Fever" -- of all the Japanese-Icelandic road movies ever made,
this is the best.