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

Re: w3m man file: List of options



Hello Justin,

Justin B Rye  schrieb am 28. Oct 2014 um 22:27

> Markus Hiereth wrote:
> > second attempt. I got the csv-File back 
> 
> Tab-separated columns are much easier to read (and write comments
> about).  I'll start by just repeating it back with tabs; to make it
> easier to spot displaced columns I'll also standardise on "---" for
> all empty cells.

OK. The advantages of the tab as a field separator are obvious. A
couple of annotions, but none of them is important.

Best regards
Markus

---------------------------------------------------------------------------------------------------

> Okay, going through again for comments...

> |Option		Takes	Affects	Affects	Affects	Affects Mystery	Pager	Browser Special	Filter
> |		Arg	t/plain	t/html	display	STDOUT		Mode	Mode	Startup	Mode
> 
> W3M doesn't really have a "pager mode/browser mode" distinction; it
> has a "handle text verbatim/pass text through HTML rendering engine"
> distinction (mostly controlled by whether it knows the material is
> HTML), and then a "send to STDOUT/display in full-console viewer"
> distinction (mostly controlled by whether STDOUT is a pipe).

OK.

[...]

| -r		---	---	---	---	---	yes	---	---	---	---
> 
> Just like "less -r" aka --raw-control-chars; try "man w3m | w3m -r".
> I'd say:
> 
>  -r		no	yes	no	yes	yes	no	yes	no	no	yes

OK

> | -l		int	---	---	---	---	yes	---	---	---	---
> 
> We've worked this out; it's "how many lines should W3M remember when
> displaying an unrendered text buffer from STDIN?"  (So it won't affect
> anything recognised as HTML.)

OK


>   -l		int	yes	no	yes	no	no	yes	no	no	no
> 
> | -I		string	---	---	---	---	no	---	---	---	x
> | -O		string	---	---	---	---	no	---	---	---	---
> 
> Is the "x" just a typo?

Yes it was. 


>   -I		string	yes	yes	yes	yes	no	yes	yes	no	yes
>   -O		string	yes	yes	yes	yes	no	yes	yes	no	yes
> 
> Telling w3m to use "us-ascii" input or output can garble a page of
> Japanese very effectively, which means a lot of yeses.

OK

 
> | -B		---	---	yes	yes	no	---	---	yes	---	---
> 
> Bookmarks mode.  This is a sort of special startup, in that "w3m -B"
> will launch showing the bookmarks page.  But it's only a default;
> "w3m -N -B URL" will still open just the URL and not the bookmarks
> (even as a second browser tab).
> 
> Note that the bookmarks file is HTML by default, but doesn't have to
> be.  And if you do "w3m -B | line" then -B affects STDOUT...

It is a strange that w3m sends data to STDOUT. But You are right. 


>   -B		---	no	no	yes	yes	no	yes	yes	(yes)	no
> 
> | -bookmark	string	---	---	---	---	no	---	---	yes	---
> 
> This *isn't* a special startup; it just changes what happens if you
> ask to see the bookmarks file, either interactively or via -B.  (If
> you do ask with -B, it can affect both display and STDOUT.)  So:
> 
>   -bookmark	string	no	no	yes	yes	no	yes	yes	no	no
> 
> Notice the evidence that "pager mode" isn't a real mode: you can call
> the bookmarks page directly from an invocation of "ls | w3m".
> It would make sense to group this option with the ones that define the
> location of the config files, cookie jar, etc.

OK

 
> | -T		string	yes	yes	yes	yes	no	yes	yes	---	yes
> 
> MIME type.  Must be a valid type, and there's no guarantee that W3M
> will have any way of handling that type, but it can tell W3M whether
> to use the so-called "browser mode".  It would make sense to group
> this with -I.
> 
> | -m		---	---	---	---	---	yes	---	---	---	---
> 
> No apparent function.  Somehow connected with handling of headers (and
> therefore encodings?) in NNTP (and IMAP?).
> | -v		---	---	---	---	---	no	---	---	yes	---
> 
> A special startup in the same sense as -B, but instead of saying to
> fall back on the bookmarks file it uses a compiled-in start page
> (which seems to come as ready-rendered HTML, with no viewable source).
> 
> | -M		---	---	yes	yes	---	no	---	---	---	---
> 
> Monochrome mode.  Shouldn't this be "browser mode: yes"?

Yes and no. All the empty cells in my table are a consequence of the
difficulties how you look on the option.


> | -N		---	---	---	---	---	no	---	---	---	---
> 
> Tabbed launch mode.  Does affect display (of both paged text and
> rendered web pages), doesn't affect output to STDOUT.

but this option is relevant for the browser mode

> | -N		---	---	---	---	---	no	yes	yes	---	---


> 
> | -F		---	---	yes	yes	yes	no	---	yes	---	---
> 
> Frames mode.  Tweaks the web page rendering.

> 
> | -dump		---	yes	yes	--	--	no	---	---	---	yes
> 
> "w3m -dump x.html" renders the page to STDOUT, which is just like what
> "lynx -dump x.html" does; but the w3m equivalent of "lynx -dump x.html
> | head" is simply "w3m x.html | head".  Sending stuff to STDOUT works
> automatically; what "-dump" means is "and exit without starting the
> "browser", which is more like a "special startup".

As mentioned above. Your strict view on the option -dump is
correct. With notice of all the situations where data are delivered to
STDOUT, a clear separation between special startups and filter mode
are not possible anymore.


> | -cols		int	no	yes	no	yes	no	no	no	---	yes
> 
> The one that's like setting $COLUMNS for rendered output to STDOUT.

You wrote to export such variables. A necessary hint because first, I
only defined only within xterm. After exporting, WWW_HOME was effective
as you described. 

But with COLUMNS, the following commands and requests for the actual
value would indicate, that it is not kept. After one invocation of
w3m, a value set to 40 is back to the previous system value of 80.

hiereth@lune:/tmp$ export COLUMNS=40
hiereth@lune:/tmp$ export | grep COLUMNS
declare -x COLUMNS="40"
hiereth@lune:/tmp$ cat 1.txt | w3m | more
1
hiereth@lune:/tmp$ export | grep COLUMNS
declare -x COLUMNS="80"

I am agin confused on which level these variables exist and are
available.

 
> | -ppc		int	---	---	---	---	yes	---	---	---	---
> | -ppl		int	---	---	---	---	yes	---	---	---	---
> 
> My best guess was that this had something to do with half- and
> fullwidth CJK glyphs, but "w3m -show-option | grep _wid" shows three
> *other* options that seem to deal with that.
 
> | -dump_source	---	---	---	---	---	---	---	---	---	---
> | -dump_head	---	---	---	---	---	---	---	---	---	---									
> | -dump_both	---	---	---	---	---	---	---	---	---	---									
> | -dump_extra	---	---	---	---	---	---	---	---	---	---									
> 
> All these add an "and exit" to w3m's behaviour, and tell it not to do
> any rendering even on things that it knows are text/html.  You can
> even do "w3m -dump_extra /etc/fstab" if you want it to show you what
> it was thinking while it read it.

If we renounce on something like a "date transfer information mode",
the options dump_* would be candidates for a option category
"Miscellaneous".

 
> Strangely, w3m -dump_source nntp://server/group/ gives me a page of
> HTML tags (though going to nntp://server/group/msgnum gives just the
> individual message).

Probably, this is due to a built in procedure that goes through
directories and shows the files therein. This procedure supports
browsing in local directories, in ftp archives. It appears that the
gathered information is drawn into an HTML file.


 
> Repeating the key since it's so far back now:
> |Option		Takes	Affects	Affects	Affects	Affects Mystery	Pager	Browser Special	Filter
> |		Arg	t/plain	t/html	display	STDOUT		Mode	Mode	Startup	Mode
> 
> | -post		string	---	---	---	---	yes	---	---	---	---

> The point of this seems to be to let you submit data through a
> <form method="post"> without ever actually visiting that page.
> Apparently that's a useful thing to be able to do, since lynx has
> the similar -post_date...

Nevertheless. w3m just gives me error messages with -post. I just
tried to use it the way it is described for lynx, i.e. with data from STDIN and the local apache2. 

  cat 1.txt | w3m -post http://lune/testen/test-formular.html

The file access.log shows no POST request. Therefor, this option shall
not be presented. Additionally, the is no documentation about the
syntax of this file containing values for POST variables.

 
> | -header	string	---	---	---	---	no*1	no	yes	---	---
> 
> A general-purpose override for things like user-agent strings?  

In this and all case of a used header and in others too, it is
apparently sent supplementar. In reqlog.txt there is an extra
line, provided the string matched the syntax var: value. 

> Note that this doesn't care whether the thing you end up looking at
> is text or rendered HTML; all it cares about is whether you're
> getting it via a protocol that involves exchanging headers.

Aknowledged.
 
> | +		int	yes	yes	yes	no	no	yes	yes	---	no
> 
> A particularly pager-y option, but it also works when the content in
> your pager is HTML rendered as a web page.
> 
> | -num		---	---	---	---	---	---	---	---	---	---
> 
> Numbered lines, ditto.  Shouldn't it be mostly yeses as above?

Yes for pager and browser mode because it provides user information
about the present position within the displayed data

-num		---	---	---	---	---	---	yes	yes	---	---


 
> | -no-proxy	---	---	---	---	---	yes	---	---	---	---
> 
> This means if there's a proxy server in your environment, W3M
> shouldn't use it, and should just access remote servers directly. 
> Back in dialup days it often made sense to have a local cacheing HTTP
> proxy (or indeed gopher proxy etc), and it also often made sense to
> opt out of using it.

OK 

> | -4		---	---	---	---	---	yes	---	---	---	---	
> | -6		---	---	---	---	---	yes	---	---	---	---
> 
> "IPv4-only" and "IPv6-only".  I suppose you'd do this if you had to
> work around some sort of network breakage.
 
> | -no-mouse	---	---	---	yes	no	no	yes	yes	yes	---
> 
> I suppose this exists for when you want to be able to mouseclick on a
> web page to select text without having to worry that you might click
> on a link.

Yes. With this option, you can select text, which is static in the
terminal window. Otherwise, the content moves with the pressed mouse
button and mouse movement.

 
> | -cookie	---	---	---	---	---	no	no	yes	---	---
> | -no-cookie	---	---	---	---	---	no	no	yes	---	---
> 
> Whether W3M's HTTP processing should deal with cookies.
 
> | -graph		---	no	yes	yes	no	no	---	yes	---	no
> | -no-graph	---	no	yes	yes	no	no	---	yes	---	no
> 
> ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> ???Should W3M's rendering of antique HTML use graphical characters.???
> ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Yes, the aim here is a something antique and tiny. And though
complicated as it is connected to available glyphs. It is accidentally
that my system features such DEC line graphics and it seem
accidentally, whether some programm (emacs, xterm, ...) use them.


> | -S*2
> | -s		---	yes	no	yes	yes	no	yes	no	---	yes
> 
> Squeezing.  Another pager-y option, and in this case one that doesn't
> work when the content in your pager is HTML rendered as a web page.
> | -W		---	yes	yes	yes	---	no	yes	yes	---	---
> 
> Search wrap toggle.  Why is this the only thing that works as a toggle?

In this, we experience that w3m emerged from experimentalism :-).


> | -X		---	yes	yes	yes	no	yes	yes	yes	yes	no
> 
> Like "less -X", though in fact it's most dramatic for browser mode.

A drama I did neither miss nor wish to create. 

 
> | -title	?	yes	yes	yes	no	yes	yes	yes	yes	no
> 
> We've failed to work out the usefulness of -title=foo because we can't
> find a foo for which the results are anything besides "work" (with
> "=xterm", "=rxvt") or "fail" (with anything else).  Unless you count
> TERM=linux, which accurately simulates the situation when you aren't
> in an X window so there's nowhere to put a title...
> 
> Maybe this was useful on Windows 95?

I don't think it is worth further investigation.

 
> Oh! -title=screen does something different and innovatively broken.

screen is one of the filename listed in the output ov ls -R /lib/terminfo/.
It is you who knows something about terminfo and termcap.
 


> | -o		string	---	---	---	---	---	---	---	---	---
> 
> The format being of course "option=VALUE".
> 
> | -show-option	---	---	---	---	---	no	---	---	yes	---
> 
> An "and exit" special case.

OK

> 
> | -config	string	---	---	---	---	no	---	---	yes	---
> 
> This works more like "-bookmark string", changing where W3M looks for
> a file.
> | -help		---	---	---	---	---	no	---	---	yes	---
> | -version	---	---	---	---	---	no	---	---	yes	---
> 
> Two more "and exit" special cases.

> | -reqlog	---	---	---	---	---	no	---	---	---	---
> | -debug*3	---	---	---	---	---	---	---	---	---	---
> 
> Hmm, -reqlog with NNTP is odd; it just stores a copy of the headers
> for any message I browse to, nothing more.


Reply to: