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

Re: Suggestions for w3m


This is a mail of suggestions written by Christoph Conrad.

--- Begin Message ---
Hello Tsuchiya,

i tried to send the following mail to the emacs-w3m mailing list, but
i have to subscribe first. I saw on


that it's mainly in japanese, which unfortunately i can't speak; and
on the other side i have no time for developing emacs-w3m, but don't
want that (hopefully) helpful ideas got lost.

Would you please so kind to post this suggestions, so that the
developers can read them? Thank you. What should i do when having
other ideas for improvements? Where to mail?

To: emacs-w3m@namazu.org
X-Sent: 13 minutes, 24 seconds ago
User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.103


i am not subscribed to this mailing list, but found in the README that
i can write to this address. I have suggestions concerning the
presentation of tables, one concerning whitespaces and one with
anchors. Possibly an item is addressed already in the development
version, then simply ignore it.

GNU Emacs 21.0.103, emacs-w3m 1.0, w3m 0.2.1

base config:

(setq w3m-coding-system        'iso-8859-1
      w3m-input-coding-system  'iso-8859-1
      w3m-output-coding-system 'iso-8859-1
      w3m-display-inline-image t)

(setq w3m-use-toolbar nil)

(defvar w3m-root-path "/usr/local/cc/emacs-lisp/w3m-el")
(add-to-list 'load-path w3m-root-path)
(setq w3m-icon-directory (concat w3m-root-path "/icons"))
(autoload 'w3m "w3m" "Interface for w3m on Emacs." t)

********* Tables

In my (--unibyte) Emacs w3m buffer the table characters are displayed
as octal sequences. This effectively destroys the table layout. I
tried to

(add-to-list 'w3m-command-arguments          "-no-graph")
(add-to-list 'w3m-halfdump-command-arguments "-no-graph")

but it didn't help (why?). So i added a function to the

(defun cc-w3m-beautify-tables()
  (goto-char (point-min))
  (while (re-search-forward
          "\200\\|\203\\|\206\\|\211\\|\214\\|\202\\|\204\\|\210\\|\201" nil t)
    (replace-match "+"))
  (goto-char (point-min))
  (while (re-search-forward "\205" nil t)
    (replace-match "|"))
  (goto-char (point-min))
  (while (re-search-forward "\212" nil t)
    (replace-match "-")))

(add-hook 'w3m-fontify-after-hook 'cc-w3m-beautify-tables)

********* Whitespace

Often there's a lot of annoying whitespace before the end of lines:

(defun cc-w3m-del-trailing-ws()
  (goto-char (point-min))
  (while (re-search-forward "[ \t]+$" nil t)
    (replace-match "")))

(add-hook 'w3m-fontify-after-hook 'cc-w3m-del-trailing-ws)

********* Anchors

It is a little bit harassing that emacs-w3m re-renders the page even
when following an anchor which is in the buffer itself. I looked at
the text properties of anchor and link, it should be possible to
simply search (via the text property) for the target position. So
following such anchors would be MUCH faster. Especially on my mega
hyper super P133 Mhz / 64 MB machine ;-)

Best regards,
cu, -cc-
=> GNU Emacs Webring @ <http://www.gnusoftware.com/WebRing/> <=
Look Ma, this man can twist his fingers as if they were made of rubber,
isn't that amazing? -- Not really, he's been using emacs for years...!

--- End Message ---
TSUCHIYA Masatoshi