[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.6 Creating, killing and moving across buffers

Sooner or later, you will be addicted to emacs-w3m, and you’ll have to manage all your browsing needs with it. To help you with this daunting task, we have imagined many different ways to work with emacs-w3m buffers.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.6.1 Creating and killing buffers

It is sometimes useful to just create a new buffer without opening a web page in it. This operation is called “creating a twin copy” of a buffer, in emacs-w3m lingo. It will simply create a new buffer whose contents are identical to the currently active buffer.

The opposite of this is closing buffers: you can just close one buffer (because you’re not interested in its contents anymore) or you can decide to close all buffers but the current one. Emacs-w3m lets you do this with the following commands:

C-c C-t
M-n

Create an identical copy of the currently active buffer, under a new name. This is used to start a new session without loading a web page in the new buffer (w3m-copy-buffer).

C-c C-w

Close the current emacs-w3m buffer (w3m-delete-buffer).

C-c M-w

Close all emacs-w3m buffers, but the active one (w3m-delete-other-buffers).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.6.2 Moving across buffers

The commands you will probably use most often are those who allow you to go to an adjacent buffer; that is a buffer just “after” or “before” the current one. The meaning of this will be obvious if you use tabs: the next buffer is the one just after the active one, on the right, and the previous buffer is the one on the left. However, XEmacs displays tabs in random order unfortunately, so you need to pay attention to the number which is displayed in each tab in order to know what is the adjacent buffer if you are using XEmacs. The key bindings for these commands are C-c C-p and C-c C-n.

These commands understand the numeric argument convention, i.e. if you call them with a number N as argument, you will be taken N buffers away from the current one. For example, to go two buffers on the right from the current position, use 2 C-c C-n(3).

C-c C-p

Move to the previous emacs-w3m buffer. This is usually the next buffer to the left in the tabs line. If called with a numeric argument N, move N buffers to the previous (w3m-previous-buffer).

C-c C-n

Move to the next emacs-w3m buffer. This is usually the next buffer to the right in the tabs line. If called with a numeric argument N, move N buffers to the next (w3m-next-buffer).

If you are a GNU Emacs user, you can also move an emacs-w3m buffer to the adjacent place on the tabs line using the following commands:

C-c C-.
C-c C->

Move the selected emacs-w3m buffer to the right hand adjacent place on the tabs line. If called with a numeric argument N, move N tabs to the right (w3m-tab-move-right).

C-c C-,
C-c C-<

Move the selected emacs-w3m buffer to the left hand adjacent place on the tabs line. If called with a numeric argument N, move N tabs to the left (w3m-tab-move-left).

Also note that if these commands don’t fit you well despite our efforts, you might find what you need in “generalist” buffer management packages such as ibuffer or iswitchb—since emacs-w3m buffers are regular Emacs buffers, they will work fine too.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.6.3 Selecting buffers from a list

There are two ways to select emacs-w3m buffers from a list. The first one is a minibuffer-based interface, called with C-c C-a. You can choose the buffer you want to display using the M-p and M-n keys (or the <up> and <down> arrow keys), they will make you cycle through the list. You can also edit the prompt and type the title of an existing web page, using <TAB> for completion. For example, if you have a “Google Search” page opened, you can type “Goo” then hit <TAB> and the page title will be completed. After the page name, the buffer name is given (between brackets). Then use <RET> to switch to the buffer you have chosen.

The second and more sophisticated interface is called the emacs-w3m buffer list, it is invoked with C-c C-s. It shows you the list of all opened buffers in a separate window (either a vertical or a horizontal window—C-c C-s toggles between the two modes) and allows you to view the buffers in real-time: when you move the point in the buffer list, the buffer under point is displayed in the main window, which allows you to have direct visual feedback of the buffer you’re switching to.

To move in the buffer list, you can use the p and n keys (or the arrow keys). In the buffer list, <DEL> and <SPC> allow you to scroll the buffer displayed in the main window, which is handy if you want to check that you’re seeing the right buffer. To select the buffer under point, you can use the <RET> key, in which case the buffer list will be buried, or the w key, in which case the buffer list will remain visible and the focus given to the main window.

You can also close and create buffers from this menu, using the same bindings as the one used in regular buffers (see section Creating and killing buffers).

Finally, the ? key shows a short help, g refreshes the list and the q key exits the buffer list, not changing the active buffer.

C-c C-a

Prompt for a buffer name in the minibuffer. M-p and M-n cycle through the list of existing buffers and <TAB> completes (w3m-switch-buffer).

C-c C-s

Show the buffer list in a separate window (w3m-select-buffer). In this window, C-c C-s toggles between horizontal and vertical modes, <RET> selects the buffer under point and buries the buffer list, w selects the buffer under point and gives it the focus, n, p and the arrow keys can be used to move down or up.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by TSUCHIYA Masatoshi on January 30, 2019 using texi2html 1.82.