summaryrefslogtreecommitdiff
path: root/emacs/lisp/fcuny-org-custom.el
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-02-12 17:17:42 -0800
committerFranck Cuny <franck@fcuny.net>2021-02-12 17:17:42 -0800
commit37bcd39becdd9ad1bd908bce38277cb0aeed5b67 (patch)
tree9b84b9790dc96f0773d9f8dfe4d79dd7a1814e33 /emacs/lisp/fcuny-org-custom.el
parentemacs: set proper font size for linux (diff)
parentemacs: some updates to org's ui (diff)
downloademacs.d-37bcd39becdd9ad1bd908bce38277cb0aeed5b67.tar.gz
Merge branch 'master' of ssh://git.fcuny.net:222/fcuny/dotfiles
Diffstat (limited to 'emacs/lisp/fcuny-org-custom.el')
-rw-r--r--emacs/lisp/fcuny-org-custom.el10
1 files changed, 4 insertions, 6 deletions
diff --git a/emacs/lisp/fcuny-org-custom.el b/emacs/lisp/fcuny-org-custom.el
index d1b30cd..8992f2d 100644
--- a/emacs/lisp/fcuny-org-custom.el
+++ b/emacs/lisp/fcuny-org-custom.el
@@ -5,7 +5,7 @@
(calendar-gregorian-from-absolute (org-today))
'subtree-at-point))
-(defun org-refile-to-datetree (&optional file)
+(defun fcuny/org-refile-to-datetree (&optional file)
"Refile a subtree to a datetree corresponding to it's timestamp.
The current time is used if the entry has no timestamp. If FILE
is nil, refile in the current file. A datetree within a subheading
@@ -13,13 +13,12 @@ is possible if the heading has a property of DATE_TREE."
(interactive "f")
(let* ((datetree-date (or (org-entry-get nil "TIMESTAMP" t)
(org-read-date t nil "now")))
- (date (org-date-to-gregorian datetree-date))
- )
+ (date (org-date-to-gregorian datetree-date)))
(save-excursion
(with-current-buffer (current-buffer)
(org-cut-subtree)
(if file (find-file file))
- (widen)
+ (widen)
(org-datetree-find-date-create date)
(org-narrow-to-subtree)
(show-subtree)
@@ -27,7 +26,6 @@ is possible if the heading has a property of DATE_TREE."
(newline)
(goto-char (point-max))
(org-paste-subtree (+ org-datetree-base-level 3))
- (widen)
- ))))
+ (widen)))))
(provide 'fcuny-org-custom)