Thanks for sharing that, Bob.  You mentioned on that page that you
couldn't get it working with a capture template; here's what I use,
which does use a capture template.  Maybe this will be helpful:

#+BEGIN_SRC elisp
(defun ap/org-capture-w3m ()
    "Call org-capture with the `W' template.  Use this from within w3m.

Depends on Magnar Sveen's s.el package."
    (interactive)
    (if (use-region-p)
        (progn
          ;; Replace current kill with one wrapped in an org quote block
          (org-w3m-copy-for-org-mode)
          (kill-new (s-wrap (s-trim (current-kill 0 t)) "\n\n#+BEGIN_QUOTE\n" 
"\n#+END_QUOTE") t))
      ;; Prevent whatever happens to be in the kill-ring from being captured
      (kill-new ""))
    (org-capture nil "w3"))

;; Associated capture template
("w3" "w3m capture" entry
      (file "")
      "* %a :website:

%U %?%c")

#+END_SRC


Reply via email to