Improve org-agenda
This commit is contained in:
parent
8c10c1bc7a
commit
703101c4bd
3 changed files with 54 additions and 12 deletions
30
custom/periodise.el
Normal file
30
custom/periodise.el
Normal file
|
@ -0,0 +1,30 @@
|
|||
(defun periodise ()
|
||||
(setq periodfile "~/Documents/drive/org/period.org")
|
||||
(find-file-noselect periodfile)
|
||||
(setq thebuffer (file-name-nondirectory periodfile))
|
||||
(with-current-buffer thebuffer
|
||||
(setq theyear (string-to-number (buffer-substring-no-properties 2 6)))
|
||||
(setq themonth (string-to-number (buffer-substring-no-properties 7 9)))
|
||||
(setq thedate (string-to-number (buffer-substring-no-properties 10 12)))
|
||||
(kill-buffer thebuffer))
|
||||
(setq dayof nil)
|
||||
(push theyear dayof)
|
||||
(push thedate dayof)
|
||||
(push themonth dayof)
|
||||
(setq thatday (calendar-absolute-from-gregorian dayof))
|
||||
(setq today (calendar-absolute-from-gregorian (calendar-current-date)))
|
||||
(setq days (+ 1 (- today thatday)))
|
||||
(insert (concat "Day " (format "%S" days))))
|
||||
|
||||
(defun menstruate ()
|
||||
(interactive)
|
||||
(setq periodfile "~/Documents/drive/org/period.org")
|
||||
(find-file-noselect periodfile)
|
||||
(setq thebuffer (file-name-nondirectory periodfile))
|
||||
(with-current-buffer thebuffer
|
||||
(goto-char (point-min))
|
||||
(insert "\n")
|
||||
(goto-char (point-min))
|
||||
(org-time-stamp '(16) nil)
|
||||
(write-file periodfile)
|
||||
(kill-buffer thebuffer)))
|
Loading…
Add table
Add a link
Reference in a new issue