Created
December 7, 2011 08:15
-
-
Save syohex/1441961 to your computer and use it in GitHub Desktop.
create daily memo to specified directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; create daily org memo file | |
(defun open-daily-file () | |
(interactive) | |
(let* ((memodir (expand-file-name "~/memo/daily")) | |
(daily-path (concat memodir "/" (format-time-string "%Y/%m")))) | |
(unless (file-directory-p daily-path) | |
(make-directory daily-path t)) | |
(let ((daily-file (concat daily-path "/" (format-time-string "%d.org")))) | |
(unless (file-exists-p daily-file) | |
(with-temp-file daily-file | |
(insert (format-time-string "%Y年 %m月 %d日")))) | |
(find-file daily-file)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment