[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
using filter correctly?
- From: Samuel Wales <samologist@xxxxxxxxx>
- Date: Sun, 21 Jul 2013 18:53:55 -0700
- X-ml-name: emacs-w3m
- X-mail-count: 12096
- References: <CAJcAo8sSTjcrDN4FpUoUCua42sVc=v=MW=+vtNaCgZoJ1McEQA@xxxxxxxxxxxxxx> <CAJcAo8uNDFrbTQKfWSBGRN0ZnJU3QbUsbp+gwahg2PMxUxgHMg@xxxxxxxxxxxxxx>
Is this the correct way? Seems to not display the changes.
(setq w3m-use-filter t)
(require 'w3m-filter)
;; (setf w3m-filter-configuration nil)
(add-to-list 'w3m-filter-configuration
'(t
"whatever -- remove stuff at top"
"https://whatever.com"
alpha-w3m-fix-whatever))
(defun alpha-w3m-fix-whatever (_url)
(let ((b (and (goto-char (point-min))
(re-search-forward "whatever: begin" nil t)
(beginning-of-line)
(point)))
(e (and (re-search-forward "whatever: end" nil t)
(beginning-of-line)
(forward-line 1)
(point))))
(when (and b e)
(delete-region b e))))
Thanks.
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.