johnsu01 (johnsu01) wrote,
johnsu01
johnsu01

w3m and del.icio.us

This is a modification of a function posted on the EmacsWiki to post a url in w3m to your del.icio.us 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 del.icio.us description, then loads the del.icio.us 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."
  (interactive)
  (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))))
    (w3m-goto-url
     (concat "http://del.icio.us/johnsu01?"
             "url="    (w3m-url-encode-string w3m-current-url)
             "&title=" (w3m-url-encode-string w3m-current-title)))))
Tags: del.icio.us, emacs, lisp, w3m
Subscribe
  • Post a new comment

    Error

    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.
  • 0 comments