[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] org-capture, :default-time and <...>
From: |
Erik Hetzner |
Subject: |
[O] [PATCH] org-capture, :default-time and <...> |
Date: |
Tue, 08 Jul 2014 21:19:20 -0700 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.4.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
Hi all,
I am pretty sure that the following org-capture setup used to work,
but it doesn’t seem to anymore. The intention is to manually select a
date and use this with a custom date format (e.g. %<%Y/%m/%d>). (The
custom date format is for ledger; I use this to capture ledger
transations.)
But it doesn’t work now (if it ever did – looking at git blame doesn’t
help me figure out why it might have worked) without the attached
patch, with passes along the custom time to format-time-string. Would
it be a problem if this patch were applied? Thank you.
best, Erik
(defun egh:org-capture-ledger-file ()
(let* ((date (org-read-date nil t))
(filename (format "~/c/finances/%s.lgr"
(format-time-string "%Y" date))))
(org-capture-put :default-time date)
(set-buffer (org-capture-target-buffer filename))
(goto-char (point-max))))
(setq org-capture-templates
'(("c" "Cash" plain
(function egh:org-capture-ledger-file)
"%<%Y/%m/%d> * %^{Payee}
Expenses:Erik:Cash
Expenses:%^{Account} $%^{Amount}"
:empty-lines 1)))
--
Sent from my free software system <http://fsf.org/>.
fix-custom-time-string.diff
Description: Text document
- [O] [PATCH] org-capture, :default-time and <...>,
Erik Hetzner <=