emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Capture templates with "function" type


From: Brett Viren
Subject: [O] Capture templates with "function" type
Date: Sat, 26 Oct 2013 17:18:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Hi,

I'm trying to set up a capture template of type "function" in order to
produce a daily log file named after today's date.

It mostly works.  However, after doing the C-cC-c to close the capture
buffer the window is left holding the daily log file which the capture
just updated instead of going back to whatever buffer I was in when I
initiated the capture.  This returning-to-previous-buffer behavior is
what I see when I use the file+headline capture type.

Can someone say how I might get this behavior for the "function" capture
type as well?  Here is my setup:

(defun bv-daily-log-file ()
  (find-file (concat "~/org/web/notes/" 
                  (format-time-string "%Y-%m-%d") ".org"))
  (goto-char (point-max))
  (newline 2)
)
(setq org-capture-templates 
 (quote 
  (
   ("n" "Note" entry
    (function bv-daily-log-file)
    "\* %U %^{title}\n  %a\n\n%?"
    :empty-lines 1)
   )))


Thanks,
-Brett.

Attachment: pgpZOGdxE4P6M.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]