title: How to type a dynamic file entry for org capture
body: <p>I'm trying to figure out if there is some way to create a dynamic file name for capture in emacs org-mode.</p>
  
  <pre><code>("z" "test" entry (file+headline ***A date specific headline*** "Notes"))
      "** %^{prompt}")
  </code></pre>
  
  <p>Is there some simple way to pass a date and year to the file part, so that I can have a file dynamically created for each month.  What I'd like is something like this:</p>
  
  <pre><code>(concat "/home/me/file/report_notes_" (format-time-string "%m_%Y") ".org")
  </code></pre>
  
  <p>Edit - I've finally got it working, using backquoting:</p>
  
  <pre><code>`(("z" "test" entry (file+headline ,(capture-report-date-file "/path/path/name_")
     "Notes")
     "** %^{prompt}")))
  </code></pre>
  
  <p>then writing a function like this:</p>
  
  <pre><code>(defun capture-report-date-file (path)
    (concat path (format-time-string "%m_%Y")))
  </code></pre>
  
  <p>I got to the answer after reading  <a href="https://stackoverflow.com/a/6809986/233057">this answer</a> to a similar question.</p>