From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: How do you store web pages for reference? Date: Wed, 22 Mar 2017 19:01:05 -0500 Message-ID: <87wpbgkgji.fsf@alphapapa.net> References: <2017-01-16T15-41-12@devnull.Karl-Voit.at> <2017-01-16T17-27-24@devnull.Karl-Voit.at> <8760j9rqk9.fsf@bobnewell.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cqqC3-00077n-Be for emacs-orgmode@gnu.org; Wed, 22 Mar 2017 20:01:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cqqC0-00061W-8i for emacs-orgmode@gnu.org; Wed, 22 Mar 2017 20:01:31 -0400 Received: from [195.159.176.226] (port=50512 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cqqC0-00061I-2X for emacs-orgmode@gnu.org; Wed, 22 Mar 2017 20:01:28 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cqqBm-0001cS-Gh for emacs-orgmode@gnu.org; Thu, 23 Mar 2017 01:01:14 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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