johnsu01 (johnsu01) wrote,

w3m and

This is a modification of a function posted on the EmacsWiki to post a url in w3m to your page. The improvement is that you can execute this from a non-w3m buffer with point on a url.

I use it to post urls from mail messages (which I read in Gnus). The function first loads the url in order to get the title information for the page to use in its description, then loads the posting page with the appropriate information for the url already filled in.

Don't forget to replace 'johnsu01' with your name.

(defun /john-delicious-url ()
  "Post either the url under point or the url of the current w3m page to delicious."
  (let ((w3m-async-exec nil))
    (if (thing-at-point-url-at-point)
        (unless (eq (current-buffer) (w3m-alive-p))
          (w3m-goto-url (thing-at-point-url-at-point))))
     (concat ""
             "url="    (w3m-url-encode-string w3m-current-url)
             "&title=" (w3m-url-encode-string w3m-current-title)))))
Tags:, emacs, lisp, w3m
  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.