diff options
author | JSDurand <mmemmew@gmail.com> | 2023-08-31 18:59:44 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-08-31 18:59:44 +0800 |
commit | 5fc43e2a75b2af4a38f6579087aadbc188af9da4 (patch) | |
tree | 192c30e6271760348973e8c9ca83c94d86920c50 | |
parent | 967c129a71738304fd1e7cee2ba200b68f9d6514 (diff) |
org: move account loading to the right place
The file "account.el" appends to the `org-agenda-custom-commands` and
org-capture-templates, whereas the codes in "org-conf.el" sets the
above two variables, so the file "account.el" needs to be loaded after
the variables are set.
-rw-r--r-- | org-conf.el | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/org-conf.el b/org-conf.el index 0d2d0c6..2cd4906 100644 --- a/org-conf.el +++ b/org-conf.el @@ -261,42 +261,6 @@ in Lisp code use `org-set-tags' instead." (advice-add 'org-set-tags-command :override 'durand-org-set-tags-command) -;;; Accounts - -(load-file "account.el") - -;; ;;;###autoload -;; (defvar durand-org-capture-account-which-list -;; '("breakfast" "brunch" "brunverage" "lunch" "dinner" "beverage" "snack" "fruit") -;; "The list of purposes of accounts in the capture-template for accounting.") - -;; ;;;###autoload -;; (defun durand-org-capture-account-template () -;; "Org capture template for account." -;; (let* ((shop-and-items (durand-org-complete-capture-account)) -;; (which (completing-read -;; "For what? " -;; durand-org-capture-account-which-list)) -;; (cost (number-to-string -;; (read-number "Cost: " 0))) -;; (from (completing-read "From: " '("Cash" "etique"))) -;; (active-time (format-time-string -;; (cdr org-time-stamp-formats))) -;; (inactive-time -;; (let ((temp active-time)) -;; (while (string-match "<\\|>" temp) -;; (setf temp -;; (replace-match -;; (cond -;; ((string= (match-string-no-properties 0 temp) "<") "[") -;; ((string= (match-string-no-properties 0 temp) ">") "]")) -;; nil nil temp))) -;; temp))) -;; (format "%s\n :PROPERTIES:\n :cost: %s\n :FROM: %s\n :RECORD_TIME: %s\n :END: \n %s%%?" -;; which cost from inactive-time shop-and-items))) - -(require 'org-protocol) - ;;; Capture templates (setq org-capture-templates @@ -411,6 +375,42 @@ in Lisp code use `org-set-tags' instead." ;; ((durand-agenda-command-sections-time))) )) +;;; Accounts + +(load-file "account.el") + +;; ;;;###autoload +;; (defvar durand-org-capture-account-which-list +;; '("breakfast" "brunch" "brunverage" "lunch" "dinner" "beverage" "snack" "fruit") +;; "The list of purposes of accounts in the capture-template for accounting.") + +;; ;;;###autoload +;; (defun durand-org-capture-account-template () +;; "Org capture template for account." +;; (let* ((shop-and-items (durand-org-complete-capture-account)) +;; (which (completing-read +;; "For what? " +;; durand-org-capture-account-which-list)) +;; (cost (number-to-string +;; (read-number "Cost: " 0))) +;; (from (completing-read "From: " '("Cash" "etique"))) +;; (active-time (format-time-string +;; (cdr org-time-stamp-formats))) +;; (inactive-time +;; (let ((temp active-time)) +;; (while (string-match "<\\|>" temp) +;; (setf temp +;; (replace-match +;; (cond +;; ((string= (match-string-no-properties 0 temp) "<") "[") +;; ((string= (match-string-no-properties 0 temp) ">") "]")) +;; nil nil temp))) +;; temp))) +;; (format "%s\n :PROPERTIES:\n :cost: %s\n :FROM: %s\n :RECORD_TIME: %s\n :END: \n %s%%?" +;; which cost from inactive-time shop-and-items))) + +(require 'org-protocol) + ;;; elisp in link confirmation (setq org-link-elisp-confirm-function 'y-or-n-p) |