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

using filter correctly?



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.