(Omnibus reply to both parts) markus.hiereth@freenet.de wrote: >>> -cookie >>> Process cookies. >>> -no-cookie >>> Don't process cookies. > > The explanation on new manpage provides more information For my work-in-progress version of MANUAL.html (attached) I still haven't got round to the stage of importing improvements from the manpage; I've got bogged down in the sheer quantity of content that needs reworking. [...] >>> -ppc count >>> Specify the number of pixels per character (default 8.0). Larger values >>> will make tables narrower. >> >> (What no -ppl?) > > Neither -ppc nor -ppl had an effect in our tests nor they are > important from my point of view. Well, one of them did *something*, we just couldn't work out what the point was meant to be (my vague suspicion was that it had something to do with fullwidth versus halfwidth characters in CJK charsets, but my subsequent tests got nowhere). [...] >>> g,M-< Go to the first line >>> G,M-> Go to the last line >> >> Why does this represent "meta-foo" as "M-foo" instead of "ESC foo" >> like everywhere else? > > In a comment section on top of the keymap.default file, Meta-key and > Escape-key are declared to be equivalent. Even a third key combination > "^[" appears Yes, control-openbracket; I've needed to use that when I was stuck with a keyboard that had no alt or escape keys. Not much fun. I've inserted an explanation of the notation at the top. [...] >>> RET Follow hyperlink >>> a, ESC RET Save link to file >>> u Peek link URL >>> i Peek image URL >> >> How is "Peek" different from "Show"? > > Probably peek is used to indicate that the target addresse is > presented, not used as this reaction is described as "follow > hyperlink" or in "View inline image" I understand what it does, but I don't think there's any need to use the more obscure word when it could just say "show". ("View" would imply launching a viewer, in this case presumably meaning a browser.) >>> I View inline image >>> ESC I Save inline image to file >>> : Mark URL-like strings as anchors > >> This file repeatedly refers to "anchors", but always seems to mean the >> subcategory of anchor tags that have an "href" attribute and function >> as hyperlinks. So just say "Mark URL-like strings as hyperlinks". > > Yes. Or "Transform URL-like string into hyperlink" > > >>> ESC : Mark Message-ID-like strings as news anchors >> >> This is even sillier, since "news anchors" are celebrities. Say "news >> links". > > I cannot find a differencs between ":" and "ESC :". Maybe MARK_MID is > not implemented and MARK_URL is the only function. This would make > sense as presence of the a scheme or a protocol part (http:// and > nntp://) seems obligatory for transformation. MARK_MID ought to mean that it linkifies message-IDs (e.g. in References: headers). In "w3m -n $newsgroup" mode those already are automatically marked as links; this command is only useful if I'm using w3m as a pager on a saved mail or news post, where M-: does indeed seem to linkify different things from :. >>> c Peek current URL >>> = Display information about current document >>> C-g Show current line number >>> C-h View history of URL >> >> No, "browsing history". >> >>> F Render frame >>> M Browse current document using external browser (use 2M and 3M >>> to invoke second and third browser) > > I do not have the phantasy to imagine what is "2M" and "3M" > Second and third browser do not appear as functions in Help > They only appear as configuration variables extbrowser2 and extbrowser3. It works for me. I've got extbrowser2 set to "x-www-browser %s" and extbrowser3 set to "x-terminal-emulator -e w3m %s &"; as a result, hitting "2 M" (okay, in my keybindings it's "2 TAB") gives me the same page in my currently configured graphical browser. Is this a vote for an addition to the notation key? >>> @ Execute shell command and load >>> # Execute shell command and browse > >> I don't understand these. I can see that they're different from >> EXEC_SHELL, but what's the point, and why are there two different >> versions (READ_SHELL and PIPE_SHELL)? >> >> Reading the w3m source, I find "@" invokes getshell(), "#" invokes >> getpipe(), but I still don't follow... maybe the idea is that the >> second one can watch the output of a long-running process? Nope, >> using "watch date" just makes both of them hang, running a game gives >> the same delayed display of output. Any ideas? > > No idea too Well, it could be worse, one of the functions might have been self-destruct. ------------------------------ suture -------------------------------- markus.hiereth@freenet.de wrote: > proceeding with MANUAL.html Oh, your timing's good today, this arrived as I was about to hit send on my reply to the first half. > This morning again, no idea. I made tests with command that produce an > URL string as output. Both READ_SHELL and PIPE_SHELL lead to the same: > The URL string is displayed in a new buffer that is called shellout or > stream(closed). But the URL string is not used as target as "and > browse" is maybe promised. > > >>> Buffer operation >> >> This whole buffer-centric viewpoint seems pointless to me, but I'll >> just complain about it here instead of trying to completely rewrite >> the section. I'm finding that difficult, since the manual needs a whole new parallel section for browser-tabs (C-t, C-q and so on), but once that exists it becomes more obvious that a lot of the stuff in the "Buffer operation" section doesn't really belong there... >>> B Back to the previous buffer > > The command not only brings the next buffer below in the stack of > buffers onto the w3m window, it also shuts the buffer that has been > left. So it is the complete reversion of the GOTO command > > The explanation should be "Close current buffer and go down one position in the stack of buffers. That's too long, though... could we get away with B Back to the previous buffer, closing this one I'm still a bit baffled by why it lets you backstep through page-internal movements, though. Does w3m really switch to a whole new buffer with identical contents when you navigate from "http://example.org/faq.html#q1" to "http://example.org/faq.html#q2"? >>> v View HTML source >> >> Actually this toggles HTML rendering on and off; you can even use it >> to turn *on* the interpret-as-text/html mode for a plain text file. > > This VIEW command opens an additional buffer that contains code when > VIEW was applied to a rendered file and vice versa rendered content > when VIEW was applied to source code. In this respect, it is > toggling. But more fundamentally, it is creating another buffer and > then toggling between the two. The fact that (like everything else) it's implemented in terms of a LIFO stack doesn't make it sensible to expect users to understand it that way. Users should be introduced to it in terms of its useful effects: it toggles in and out of HTML-rendering mode. I've currently got it as v Toggle viewing as text or rendered HTML and I've moved it to "Miscellany" for now. >>> s Select buffer >> >> This doesn't select a buffer, it offers a menu for you to select from. > > s "Open the select buffer menu" > or > s "Show the stack of buffers" I've got it as s, C-h Show buffer-stack menu >>> E Edit buffer source >> >> You don't edit the *buffer*, you edit the *original file*. > > E Edit the currently shown, local file > > Besides the EDIT command, there is as well an EDIT_SCREEN command. It > opens rendered content in the editor. But, when closing the editor, > the edited version of the text gets lost if it is not explicitly > stored. Yes, M-e just below. These two should obviously be together, but I'm not sure where; for now I've left them here as E Edit local file M-e Edit rendered copy of page >>> C-l Redraw screen >> >> Why would I be looking for this under "Buffer operation"? > > What does redraw mean? So far, I just needed RELOAD. It's traditional ^L behaviour, just repainting the screen without updating anything - useful with w3m-img if you need to refresh the images without trying to fetch any data. But it shouldn't be in the buffers section. >> > R Reload buffer > S Save buffer > ESC s Save source > ESC e Edit >> buffer image A "buffer-centric" approach makes more sense here, >> especially if for instance you're viewing a site made up of multiple >> frames: "S" saves the whole rendered page, "ESC s" saves a sort of >> hypothetical all-in-one source HTML file. > > Interesting. The file produced by "ESC s" reveals that w3m internally > converts frames to a table. > > key binding "ESC e" corresponds to the command EDIT_SCREEN. The noun > "image" is misleading here. The rendered content of a file is meant. Yes, my "rendered copy" above. >>> Buffer selection mode >>> >>> k, C-p Select previous buffer >>> j, C-n Select next buffer >>> D Delect current buffer >>> RET Go to the selected buffer > >> How do you get into this mode? It doesn't seem to correspond to the >> popup menu you get with "s"="select buffer" (where for instance it's >> "SPC", not "RET"), so what does it mean? >> >> s/Delect/Delete/. > > You get in this buffer selection mode with s. But "next" and > "previous" buffer are misleading. The explanations should be > > k, C-p Go up one position in the stack of buffers > j, C-n Go down one position in the stack of buffers > D Delete selected buffer from the stack > RET Display selected buffer Except that it *isnt* a buffer selection menu; it's a generic selection menu that's also invoked on the tabs-list when you invoke M-t. And as well as "k" and "C-p" you can use the up-arrow key; pointing that out ought to simplify the description. I'm moving this mode (along with the line-editing one) to the end, with an intro: Two special operational modes exist which have built-in (not redefinable) keymappings: Menu selection mode k, C-p, UP Select previous item j, C-n, DOWN Select next item D Delete current item SPC, RET Go to the selected item Line-editing mode ... (Then not repeating it under Lynx mode, since it doesn't vary.) >> And meanwhile there's no mention at all of -N, and no default >> keymappings to make it useful. > > Your comment is astonishing. By default, my w3m uses a stack of > buffers and the buffer selection menu is useful. It's a relic of the UIs of the eighties, when people worked in text consoles and programs could only use one window. These days if I need to open three different web pages in w3m I'll open them in tabs. Even if I was stuck on a VT, googling for "how do I fix my graphics card", I would be running w3m under screen. The "single window with a stack of invisible buffers" model is never necessary. I mean, imagine what people would think about it if Mozilla declared they were switching from a model where Firefox has tabs by default to one where there's only one browser window and users are expected to keep track of their pages in a LIFO registry of *virtual* windows. "It's just like browser tabs, but with the advantage of being completely non-discoverable!" >>> Bookmark operation >>> >>> ESC b Load bookmark >>> ESC a Add current to bookmark >> >> Fix the same way as last time it mentioned bookmarking. > >>> Search >>> >>> /,C-s Search forward >>> ?,C-r Search backward >>> n Search next >>> N Search previous >>> C-w Toggle wrap search mode >> >> I'd completely forgotten that the default bindings use "N" for >> "previous". > > This is the complete list of search commands > > ISEARCH Incremental search forward C-s > ISEARCH_BACK Incremental search backward C-r > SEARCH Search forward > SEARCH_BACK Search backward ? > SEARCH_FORE Search forward / > SEARCH_NEXT Search next regexp n > SEARCH_PREV Search previous regexp N > ^ > My impression about the mapping ---------------^ keymap.default says it's SEARCH / SEARCH_BACK ? ISEARCH C-s ISEARCH_BACK C-r SEARCH_NEXT n SEARCH_PREV N There _is_ a SEARCH_FORE, but I can't see how it's different from plain SEARCH. > My suggestions > > /,C-s Search forward > ?,C-r Search backward > C-s Start an incremental regexp seach forward > C-r Start an incremental regexp search backward > n Next occurence of regexp | regular expression > N Previous occurence of regexp | regular expression > C-w Toggle wrapping in regexp searches As far as I can tell, they all use regexps, and SEARCH_NEXT/PREV will show the next match for any existing search, so it can afford to be simpler: / Search forward ? Search backward C-s Incremental search forward C-r Incremental search backward n Next match N Previous match C-w Toggle wrapping mode in searches >>> Mark operation >>> >>> C-SPC Set/unset mark >>> ESC p Go to previous mark >>> ESC n Go to next mark >>> " Mark by regular expression > > " Mark all occurences of a regular expression You're right, I'd missed that. (But s/occurence/occurrence/.) >>> Miscellany >>> >>> ! Execute shell command >>> H Help (load this file) >> >> It doesn't load MANUAL.html. > > The HELP command is better than that. Available commands are listed > the their actual key binding. On the other hand, there will be things > to be sorted out for internationalization of the HELP panel (see > Debian Bug report log 765682) > > H Show help panel Good way to phrase it, yes. >>> o Set option >> >> "Show options panel" >> >>> C-k Show cookie jar >>> C-c Stop > > C-c Close an open menu It seems to do all sorts of other things too, depending on what it is that w3m is starting when it gets the SIGINT. >>> C-z Suspend >> >> Hitting control-C might be expected to shoot w3m dead, whereas >> "Suspend" might just mean "pause download", so say "Stop loading" and >> "Suspend w3m". (I changed my mind - at present it's labelled "Interrupt", but I'm not sure it should be listed at all.) > C-z SUSPEND works the same way as in emacs, the terminal window > disappears in X, a shell prompt appears. "fg" makes w3m > reappear. Probably C-z is related to a feature of bash. Well, the shell or terminal or something, yes. It's another feature that was really handy in the days when the user only had access to one window. But ^Z=SUSPEND is an actual function that you can allocate an arbitrary keymapping to, whereas ^C is an external SIGINT that w3m just catches. >>> q Quit (with confirmation, if you like) >>> Q Quit without confirmation >> >> The "q" command is "with confirmation" whether you like it or not. >> Say "(with confirmation dialog)". >> >>> Line-edit mode >> ^ing > > Now I comes to my mind that the followin commands refer to the command > line of w3m for typing in commands and arguments. Perhaps Prompt line > editing would be a better heading. I've moved this and the menu modes together as a special section. >>> C-f Move cursor forward >>> C-b Move cursor backward >>> C-h Delete previous character >>> C-d Delete current character >>> C-k Kill everything after cursor >>> C-u Kill everything before cursor >>> C-a Move to the top of line >>> C-e Move to the bottom of line >> >> s/top/beginning/, s/bottom/end/ >> >>> C-p Fetch the previous string from the history list >>> C-n Fetch the next string from the history list >>> TAB,SPC Complete filename > > TAB, SPC Try to complete filename Yes, I suppose so. >>> RETURN Accept -- JBR with qualifications in linguistics, experience as a Debian sysadmin, and probably no clue about this particular packageTitle: w3m manual
w3m is a pager/text-based WWW browser. You can browse local documents and/or documents on the WWW using a terminal emulator.
Command line usage is
w3m [options] [file|URL]
If you specify filenames/URLs on the command line, these documents are displayed. If you specify nothing, w3m will read a document from standard input and display it. If it doesn't find a document there either then (normally) w3m will terminate without displaying anything.
Options include:
Move to the specified line-number.
Specify tab width. Default is 8.
When displaying text/plain documents, prohibit emphasis using
backspace. If you don't specify this option, A^H_
is
interpreted as an underlined A
and A^HA
as a bold
A
.
Specify the number of lines that should be cached while reading a text/plain document from standard input. Default is 10,000.
Specify display/output charset.
Specify document charset.
Specify document type. Without this option, document type is determined from the extension of a file. If the determination fails, the document is regarded as text/plain. For example:
Read HTML document from standard input and display it
cat example.html | w3m -T text/html
Display HTML source
w3m -T text/plain example.html
Display document using Internet message mode
. With this
option, w3m determines document type from header information.
This is useful when reading e-mail or Usenet news posts.
Show w3m's startup page.
Show w3m's bookmarks page.
Specify a custom bookmarks file.
Monochrome display mode.
Automatically render HTML frames.
Squeeze blank lines.
Upon exit, do not reinitialize the terminal.
Toggle wrapping mode in searches.
Specify option. The available option names and values are the same as in ~/.w3m/config.
Process cookies.
Don't process cookies.
Show line-numbers.
Read document specified by URL and dump page rendered as text into standard output. An 80 column width is used unless set with the -cols option.
Specify document width. Used with -dump option.
Specify the number of pixels per character (default 8.0). Larger values will make tables narrower.
Read document specified by URL and dump the source.
Read document specified by URL and dump headers.
Read document specified by URL and dump headers and the source.
Read document specified by URL and dump extra informations, headers, and the source.
Use POST method with file content.
Insert string as a header.
Don't use proxy server.
Use ASCII characters to draw frames rather than graphical ones.
Deactivate mouse support.
Specify config file.
Links and images are displayed as follows.
Color mode | Monochrome mode | |
---|---|---|
links | blue | underline |
inline images | green | reverse |
form input | red | reverse |
These colors can be customized using the option setting command
o
.
After invoking w3m, you can control it with keyboard commands.
Here's the original key-binding table. If you are using Lynx-like
key bindings, see the Lynx-like key
bindings. Throughout, the C- and M- notations indicate the
modifiers control
and meta
(which can be replaced
with alt
or ESC).
SPC, C-v, +, PGDN | Forward page |
b, M-v, -, PGUP | Backward page |
l, C-f, RIGHT | Cursor right |
h, C-b, LEFT | Cursor left |
j, C-n, DOWN | Cursor down |
k, C-p, UP | Cursor up |
J | Scroll screen up one line |
K | Scroll screen down one line |
^, C-a | Go to the beginning of line |
$, C-e | Go to the end of line |
w | Go to next word |
W | Go to previous word |
> | Shift screen right |
< | Shift screen left |
. | Shift screen one column right |
, | Shift screen one column left |
g, M-<, HOME | Go to the first line |
G, M->, END | Go to the last line |
M-g | Go to specified line |
Z | Center on cursor column |
z | Center on cursor line |
TAB | Move to next hyperlink |
C-u, M-TAB | Move to previous hyperlink |
[ | Move to the first hyperlink |
] | Move to the last hyperlink |
RET | Follow hyperlink |
a, M-RET | Save link to file |
u | Show link URL |
i | Show image URL |
I | View inline image |
M-I | Save inline image to file |
: | Mark URL-like strings as hyperlinks |
M-: | Mark Message-ID-like strings as news links |
c | Show current URL |
= | Show information about current document |
C-g | Show current position in page |
C-h | Show browsing history |
F | Render HTML frames |
M | Browse current document using external browser (prefix 2 or 3 to invoke alternate configured browsers, e.g. 3 M) |
M-M | Browse link using external browser (prefixed as above, e.g. 3 M-M) |
M-b | Go to bookmarks page |
M-a | Bookmark current page |
U | Open new URL |
V | Open new file |
@ | Execute shell command and view output |
# | Execute shell command and browse output |
B | Back to the previous buffer, closing this one |
s | Show buffer-stack menu |
E | Edit local file |
M-e | Edit rendered copy of page |
R | Reload buffer |
S | Save buffer |
M-s | Save source |
T | Open current page as new tab |
C-t | Open link as new tab |
} | Switch to next tab |
{ | Switch to previous tab |
M-t | Show tab menu |
C-q | Close current tab |
/ | Search forward |
? | Search backward |
C-s | Incremental search forward |
C-r | Incremental search backward |
n | Next match |
N | Previous match |
C-w | Toggle wrapping mode in searches |
C-SPC | Set/unset mark |
M-p | Go to previous mark |
M-n | Go to next mark |
" | Mark all occurrences of a regular _expression_ |
! | Execute shell command |
v | Toggle viewing as text or rendered HTML |
C-l | Redraw screen |
H | Show help panel |
o | Show options panel |
C-k | Show cookie jar |
C-c | Interrupt |
C-z | Suspend w3m |
q | Quit (with confirmation dialog) |
Q | Quit without confirmation |
Two special operational modes exist which have built-in (not redefinable) keymappings:
k, C-p, UP | Select previous item |
j, C-n, DOWN | Select next item |
D | Delete current item |
SPC, RET | Go to the selected item |
C-f | Move cursor forward |
C-b | Move cursor backward |
C-h | Delete previous character |
C-d | Delete current character |
C-k | Kill everything after cursor |
C-u | Kill everything before cursor |
C-a | Move to the beginning of line |
C-e | Move to the end of line |
C-p | Fetch the previous string from the history list |
C-n | Fetch the next string from the history list |
TAB, SPC | Try to complete filename |
RET | Accept |
If w3m was compiled with Lynx-like key bindings
, you can use
the following key bindings.
SPC, C-v, + | Forward page |
b, M-v, - | Backward page |
l | Cursor right |
h | Cursor left |
j | Cursor down |
k | Cursor up |
J | Scroll screen up one line |
K | Scroll screen down one line |
^ | Go to the beginning of line |
$ | Go to the end of line |
> | Shift screen right |
< | Shift screen left |
C-a | Go to the first line |
C-e | Go to the last line |
G | Go to the specified line |
Z | Center on cursor line |
z | Center on cursor column |
TAB, C-n, DOWN | Move to next hyperlink |
M-TAB, C-p, UP | Move to previous link |
C-g | Show current position in page |
RET, C-f, RIGHT | Follow hyperlink |
d, M-RET | Save link to file |
u | Show link URL |
i | Show image URL |
I | View inline image |
M-I | Save inline image to file |
: | Mark URL-like strings as hyperlinks |
M-: | Mark Message-ID-like strings as news anchors |
c | Show current URL |
= | Show information about current document |
C-h | Show browsing history |
F | Render HTML frames |
M | Browse current document using external browser (prefix 2 or 3 to invoke alternate configured browsers, e.g. 3 M) |
M-M | Browse link using external browser (prefixed as above, e.g. 3 M-M) |
v, M-b | Go to bookmarks page |
a, M-a | Bookmark current page |
g, U | Open new URL |
V | Open new file |
@ | Execute shell command and view output |
# | Execute shell command and browse output |
B, C-b, LEFT | Back to the previous buffer, closing this one |
s, C-h | Show buffer-stack menu |
E | Edit source |
R, C-r | Reload buffer |
S, p | Save buffer |
M-s | Save source |
M-e | Edit buffer image |
/, C-s | Search forward |
n | Next match |
w | Toggle wrapping mode in searches |
C-SPC | Set/unset mark |
P | Go to previous mark |
N | Go to next mark |
" | Mark all occurrences of a regular _expression_ |
! | Execute shell command |
\ | Toggle viewing as text or rendered HTML |
C-l, C-w | Redraw screen |
H, ? | Show help panel |
o | Show options panel |
C-k | Show cookie jar |
C-c | Interrupt |
C-z | Suspend w3m |
q | Quit (with confirmation dialog) |
Q | Quit without confirmation |
The Lynx-like configuration leaves keymappings unchanged in the menu-selection and line-editing modes.
If w3m is compiled with mouse support and you are using either
xterm/kterm/rxvt (in the latter case, you have to set the TERM
environment variable to xterm
or kterm
) or GPM,
you can use the mouse for navigation.
left click | Move the cursor to the place indicated by the mouse cursor. If you click the cursor and it is on a hyperlink, follow the link. |
middle click | Back to the previous buffer. |
right click | Open pop-up menu. You can choose an item by clicking it. |
left drag | Scroll document. The default behavior is to grab the document and drag it. You can reverse the behavior (grab the window and drag it) with the option setting panel. |
You can customize the key bindings (except the line-editing keymap) in a ~/.w3m/keymap file. For example,
keymap C-o NEXT_PAGE
binds the NEXT_PAGE
function (normally bound to SPC and C-v)
to control-o. See README.func for a
list of available functions. Original and Lynx-like keymap
definitions are provided (keymap.default
and keymap.lynx) as examples.
You can run CGI scripts using w3m, without any HTTP server. This means that w3m behaves like an HTTP server and runs the CGI script, then reads the output of the script and displays it. The bookmark registration system and helper-app editor are realized as local CGI scripts. Local CGI scripts allow w3m to be used as a general purpose form interface.
For security reason, CGI scripts invoked by w3m must be in one of the following directories:
Directory corresponds to /cgi-binfield). You can specify multiple paths separated by
:, like /usr/local/cgi-bin:/home/aito/cgi-bin. To use a /cgi-bin/ directory, you must use a file:/cgi-bin URL as follows:
w3m -o cgi_bin=/path/to/cgi-bin file:/cgi-bin/script.cgiIt is not recommended to include the current directory to this path.
The CGI script can use the special header w3m-control:
to
control w3m. This field can take any function (see
README.func), and the specified function
is invoked after the document is displayed. For example, the CGI
output
Content-Type: text/plain W3m-control: BACK
will display a blank page and delete that buffer immediately. This is useful when you don't want to display any page after the script is invoked. The next example
Content-Type: text/plain W3m-control: DELETE_PREVBUF contents.....
will override the current buffer.
Each w3m-control: header can contain only one function, but you can include more than one w3m-control: line in the HTTP header. In addition, you can specify an argument to the GOTO function:
Content-Type: text/plain W3m-control: GOTO http://www.example.org/
This example works exactly the same way as the Location header:
Content-Type: text/plain Location: http://www.example.org/
Note that this header has no effect when the CGI script is invoked through an HTTP server.