[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
user has no relief (other than lynx) when text is too wide
- From: jidanni@xxxxxxxxxxx
- Date: Fri, 19 Apr 2013 07:44:29 +0800
- X-ml-name: emacs-w3m
- X-mail-count: 11999
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))))
(defun w3m-filter-no-render-table (&optional url)
(when w3m-no-render-table
(let ((case-fold-search t))
(goto-char (point-min))
(while (re-search-forward "</?\\(table\\)[ \t\r\f\n>]" nil t)
(goto-char (match-beginning 1))
(insert "NO_"))
(goto-char (point-min))
(while (re-search-forward "<\\(tr\\)[ \t\r\f\n>]" nil t)
(goto-char (match-beginning 1))
(insert "NO_")
(goto-char (match-beginning 0))
(insert "<br>"))
(goto-char (point-min))
(while (re-search-forward "</\\(tr\\)>" nil t)
(goto-char (match-beginning 1))
(insert "NO_")))))
doesn't work either.