Kevin Ryde | 20 May 2013 02:07
Picon
Picon

[emacs-w3m:12018] buffer:// under home directory

With recent debian i386 emacs 24.3 and the current cvs w3m, if you have
a file foo.html in your home directory then

    M-x find-file ~/foo.html        # into buffer foo.html
    M-x w3m-browse-url buffer://foo.html

gets

    Cannot retrieve URL: file://~/foo.html

default-directory starts with a "~" when under the home directory which
it seems is no good for file://.

An expand-file-name per below does the trick.  But then I wondered if
perhaps

    (buffer-file-name (get-buffer ...))

would help if the buffer name isn't the filename, eg. foo.html<2>.

Is buffer:// a documented feature?  I suppose it could do something like
w3m-region to take the buffer content instead of the file content in
case you haven't saved, or for a non-file buffer.  But perhaps it's not
that sophisticated yet.

I struck this when tinkering with a way to have w3m preview html while
editing, and perhaps rendering buffers like a tar file member if
browsing source archive etc.  I made a copy to a temp file, but that
loses the current directory for relative links.  Perhaps there's
something better already which I don't know.
(Continue reading)

jidanni | 1 May 2013 03:14
Favicon
Gravatar

[emacs-w3m:12009] This form's method has not been supported: internal

Can no longer edit any wiki anywhere!

No MediaWiki wiki can be edited no matter how old...
please try an experiment via
http://ja.wikipedia.org/wiki/Help:サンドボックス

jidanni | 27 Apr 2013 00:43
Favicon
Gravatar

[emacs-w3m:12008] Can no longer edit Wikipedia

I now get
This form's method has not been supported: internal
when I edit
http://zh.wikipedia.org/w/index.php?title=中華民國國民身分證

jidanni | 26 Apr 2013 03:31
Favicon
Gravatar

[emacs-w3m:12005] cookies dropped

Here is a problem that happens in emacs-w3m but works fine in w3m.

The problem is that cookies are all dropped in this case...

GET /wp/wp-login.php HTTP/1.0
User-Agent: Emacs-w3m/1.4.513 w3m/0.5.3+cvs-1.1055
Host: www.bdsm.com.tw

HTTP/1.1 200 OK
Connection: close
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Set-Cookie: wordpress_test_cookie=WP+Cookie+check; path=/
Set-Cookie: wordpress_test_cookie=WP+Cookie+check; path=/wp/
X-Frame-Options: SAMEORIGIN

OK... now why aren't those cookies attached to this:

POST /wp/wp-login.php HTTP/1.0
User-Agent: Emacs-w3m/1.4.513 w3m/0.5.3+cvs-1.1055
Host: www.bdsm.com.tw
Referer: http://www.bdsm.com.tw/wp/wp-login.php

log=....

Please check the above interaction. You don't need an account to test
it. Just fill in any name and password. You can even disconnect your
computer before sending it. I used tcpflow(1) to record it.  All I
know is w3m allowed me to login, but emacs-w3m didn't remember the
(Continue reading)

jidanni | 19 Apr 2013 01:44
Favicon
Gravatar

[emacs-w3m:11999] user has no relief (other than lynx) when text is too wide

http://kml4earth.appspot.com/kmlBestPractice.html goes off the edge of
the screen and there is nothing the user can hit to fix it.

My screen is *only* 123 characters wide.

P.S., after the latest snapshot,

(add-hook 'w3m-mode-hook
	  (lambda ()
	    (define-key w3m-mode-map "\M-t" 'w3m-redisplay-invert-render-table)
	    (define-key w3m-mode-map "\M-T" 'w3m-redisplay-toggle-render-table))))

(defvar w3m-no-render-table nil
  "*If non-nil, do not render any table tag.")
(defun w3m-redisplay-invert-render-table (&optional arg)
  (interactive "P")
  (let ((w3m-no-render-table (not w3m-no-render-table)))
    (w3m-redisplay-this-page arg)
    (message (format "Display with%s rendering table"
		     (if w3m-no-render-table " NO" "")))))

(defun w3m-redisplay-toggle-render-table (&optional arg)
  (interactive "P")
  (setq w3m-no-render-table (not w3m-no-render-table))
  (w3m-redisplay-this-page arg)
  (message (format "Change redering table to %s"
		   (if w3m-no-render-table "nil" "TRUE"))))

(eval-after-load "w3m-filter"
  '(nconc w3m-filter-rules '((".*" w3m-filter-no-render-table))))
(Continue reading)

REN Lifeng | 12 Apr 2013 05:13

[emacs-w3m:11997] strange behavior of w3m-session-rename

Hi,

Please kindly CC me, so that I get the reply.

Suppose I open a session-select buffer by w3m-session-select, and find
"Crash recovery sessions[n]" contains couple of pages for learning w3m.
I want rename it to "w3m tutorials". So, I press 'r' and input the name
and expect the session in question be renamed, but emacs-w3m refuse to
do this for me. It keeps asking me "Again New session title: "

Ah. I took a look at the function w3m-session-delete. It seems the
following patch will help it to do what I want.

    --- w3m-session.el.~1.34.~	2012-02-13 08:46:40.000000000 +0800
    +++ w3m-session.el	2013-04-12 10:49:22.193344150 +0800
     <at>  <at>  -731,7 +731,9  <at>  <at> 
     	     ((assoc title sessions)
     	      (when (y-or-n-p (format "\"%s\" is exist. Overwrite? " title))
     		(setq overwrite t)
    -		(throw 'loop t))))
    +		(throw 'loop t)))
    +         (t
    +          (throw 'loop t)))
     	    (setq prompt "Again New session title: ")))
     	(when overwrite
     	  (setq sessions (delete (assoc title sessions) sessions)))

I wonder whether this is what the what the author mean to do. Or, I just
have a another way of rename the sessions in "*w3m-session select*"
buffer.
(Continue reading)

jidanni | 10 Apr 2013 04:42
Favicon
Gravatar

[emacs-w3m:11995] No such anchors

# su - nobody
$ HOME=/tmp emacs -nw -f w3m
http://docs.basex.org/wiki/Geo_Module
No such anchor: Spatial_Predicate_Functions
Package: w3m-el-snapshot
Version: 1.4.513+0.20130405-1
emacs-snapshot  2:20130403-1
w3m             0.5.3-8

Kevin Ryde | 5 Apr 2013 23:59
Picon
Picon

[emacs-w3m:11990] error on <select> with empty name

With recent debian i386 emacs 24.2.1 and cvs w3m, the file foo.html
below viewed with M-x w3m-find-file gets an error

    Wrong type argument: stringp, ("1" ("1" . "AAA") ("2" . "BBB"))

backtrace.txt below from the debugger.

Dunno if foo.html is legal html or not, but even if not I hoped it
wouldn't error out but display some sort of approximation.

I wonder if it's related to the <select name=""> being empty "".
Putting something non-empty in there works.

  w3m-form-resume(([w3m-form-object get "file:///tmp/foo.html" nil
application/x-www-form-urlencoded (1 (:value ("" "1" ("1" . "AAA") ("2" . "BBB"))))]))
  w3m-form-parse-and-fontify(nil)
  w3m-fontify-forms()
  w3m-fontify()
  w3m-create-text-page("file:///tmp/foo.html" "text/html" nil #<buffer *w3m*≥)
  w3m-create-page("file:///tmp/foo.html" "text/html" nil #<buffer *w3m*≥)
  #[(G15992 G15993 G15994 G15995 G15996 G15997 G15998 G15999 G16000 type) "\306J!\203
jidanni | 29 Mar 2013 21:46
Favicon
Gravatar

[emacs-w3m:11983] tfoot should be rendered after tbody

w3m and lynx just renders these in order.
<table>
  <thead></thead>
  <tfoot></tfoot>
  <tbody></tbody>
</table>
Only midori, firefox, and chromium know that tfoot should be rendered
after tbody!
Seen in http://eaip.caa.gov.tw/eaip/history/2013-05-02-AIRAC/html/eAIP/RC-ENR-3.3-en-TW.html

jidanni | 6 Mar 2013 03:33
Favicon
Gravatar

[emacs-w3m:11980] no back button on tool bar

$ emacs -q -f w3m
shows a toolbar with no Back or Forward buttons, unlike any other browser...

jidanni | 10 Feb 2013 14:09
Favicon
Gravatar

[emacs-w3m:11978] labels is an obsolete macro

../../../../usr/share/emacs-snapshot/site-lisp/w3m/w3m.el: `labels' is an obsolete macro (as of
24.3); use `cl-labels' instead.


Gmane