emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: How do you store web pages for reference?
Date: Wed, 22 Mar 2017 19:01:05 -0500	[thread overview]
Message-ID: <87wpbgkgji.fsf@alphapapa.net> (raw)
In-Reply-To: 8760j9rqk9.fsf@bobnewell.net

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

  parent reply	other threads:[~2017-03-23  0:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16  8:48 How do you store web pages for reference? Alan Schmitt
2017-01-16  9:22 ` Michael Welle
2017-01-16  9:57   ` Alan Schmitt
2017-01-16 10:03     ` Michael Welle
2017-01-16 15:58     ` William Denton
2017-01-16 18:09       ` Alan Schmitt
2017-01-16 10:38 ` Charles A. Roelli
2017-01-16 13:06   ` Alan Schmitt
2017-01-16 14:43 ` Karl Voit
2017-01-16 15:41   ` Alan Schmitt
2017-01-16 16:35     ` Karl Voit
2017-01-16 16:52       ` Robert Horn
2017-01-16 17:40         ` Scott Otterson
2017-03-16 19:04           ` Bob Newell
2017-03-17  8:05             ` Alan Schmitt
2017-03-23  0:01             ` Adam Porter [this message]
2017-03-13 17:43 ` Peter Salazar
2017-03-14 12:17   ` Adonay Felipe Nogueira
2017-03-15  7:08   ` Alan Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpbgkgji.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).