3

I would like to improve my notes capture flow to do the following:

  1. Use C-c c then n to create a note.
  2. Get a minibuffer that searches for an existing file to add the note to (ie. probably with helm), and creates a new file if the supplied file name doesn't exist.
  3. Then resuming my typical capture flow.

My current config handles 1 and 3, but not 2.

  (setq org-capture-templates
  (quote
   (("l" "link" entry
     (file+headline "~/org/notes/links.org" "Buffer")
     "* %^L")
    (...)))
  • You might want to look at the package deft, which provides an interface for quickly finding or creating notes via simple text search. Notes can be plain text or org files. github.com/jrblevin/deft – glucas Dec 28 '18 at 22:36
2

The file+headline form can be replaced with a function form that visits a file of yr choice and moves point therein to the right place. Do C-h v on org-capture-templates for more details.

1

I think the usual way to accomplish your workflow is:

  1. C-c c n to capture a new note
  2. Enter the note in your capture buffer
  3. C-c C-w to refile the note in the location you choose.

You can't refile to an arbitrary file that you pick via helm, but you can set it up to specify all org files in a directory, or all files that are included in your agenda, with a fair bit of flexibility. The options are determined by the variable org-refile-targets. You can read the full documentation, and change the settings, with M-x customize-variable org-refile-targets.

  • Thanks. Is there a way I could have distinct refile targets depending on the capture type? – maurelian Dec 28 '18 at 17:49
  • Not that I know of. But there are additional options available that might more closely suit your needs: see the info node Refile and copy in the org-info manual. – Tyler Dec 28 '18 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.