Improve org-agenda
This commit is contained in:
parent
8c10c1bc7a
commit
703101c4bd
3 changed files with 54 additions and 12 deletions
|
@ -13,3 +13,8 @@
|
||||||
"mis Hedra" "mis Du" "mis Kevardhu"])
|
"mis Hedra" "mis Du" "mis Kevardhu"])
|
||||||
(setq org-todo-keywords
|
(setq org-todo-keywords
|
||||||
'((sequence "TODO" "|" "DONE" "CANCELLED")))
|
'((sequence "TODO" "|" "DONE" "CANCELLED")))
|
||||||
|
(setq org-agenda-time-grid
|
||||||
|
'((daily today require-timed remove-match)
|
||||||
|
(800 1000 1200 1400 1600 1800 2000)
|
||||||
|
"......" "----------------"))
|
||||||
|
(setq org-agenda-time-leading-zero t)
|
||||||
|
|
19
config.org
19
config.org
|
@ -267,7 +267,6 @@ Standard =elfeed= settings:
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun elfeed-load-db-and-open ()
|
(defun elfeed-load-db-and-open ()
|
||||||
"Wrapper to load the elfeed db from disk before opening"
|
|
||||||
(interactive)
|
(interactive)
|
||||||
(elfeed-db-load)
|
(elfeed-db-load)
|
||||||
(elfeed)
|
(elfeed)
|
||||||
|
@ -283,7 +282,6 @@ Standard =elfeed= settings:
|
||||||
'(define-key elfeed-search-mode-map (kbd "m") 'elfeed-toggle-star))
|
'(define-key elfeed-search-mode-map (kbd "m") 'elfeed-toggle-star))
|
||||||
|
|
||||||
(defun elfeed-save-db-and-bury ()
|
(defun elfeed-save-db-and-bury ()
|
||||||
"Wrapper to save the elfeed db to disk before burying buffer"
|
|
||||||
(interactive)
|
(interactive)
|
||||||
(elfeed-db-save)
|
(elfeed-db-save)
|
||||||
(quit-window))
|
(quit-window))
|
||||||
|
@ -348,7 +346,6 @@ I kind of hate markdown but I still have to use it sometimes.
|
||||||
("\\.markdown\\'" . markdown-mode))
|
("\\.markdown\\'" . markdown-mode))
|
||||||
:init
|
:init
|
||||||
(add-hook 'markdown-mode-hook 'auto-fill-mode)
|
(add-hook 'markdown-mode-hook 'auto-fill-mode)
|
||||||
(add-hook 'markdown-mode-hook 'typo-mode)
|
|
||||||
:config
|
:config
|
||||||
(setq markdown-asymmetric-header t)
|
(setq markdown-asymmetric-header t)
|
||||||
:custom
|
:custom
|
||||||
|
@ -551,11 +548,9 @@ Set the files to be included.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(unless (atwork)
|
(unless (atwork)
|
||||||
(setq org-agenda-files (list "~/Documents/drive/org/calendar"
|
(setq org-agenda-files (list "~/Documents/drive/org/calendar"
|
||||||
"~/Documents/drive/org/period.org"
|
|
||||||
"~/Documents/drive/org/habit.org")))
|
"~/Documents/drive/org/habit.org")))
|
||||||
(when (atwork)
|
(when (atwork)
|
||||||
(setq org-agenda-files (list "~/Documents/drive/org/calendar"
|
(setq org-agenda-files (list "~/Documents/drive/org/calendar"
|
||||||
"~/Documents/drive/org/period.org"
|
|
||||||
"~/Documents/drive/org/acwri.org")))
|
"~/Documents/drive/org/acwri.org")))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
@ -571,6 +566,15 @@ Set how the agenda looks.
|
||||||
(setq org-agenda-todo-ignore-deadlines t)
|
(setq org-agenda-todo-ignore-deadlines t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
Add period information to the agenda header (this has a very weird output, completely different when you insert a function from just using text, utterly bizarre).
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq org-agenda-custom-commands
|
||||||
|
'(("a" "Slightly modified agenda view"
|
||||||
|
((agenda ""
|
||||||
|
((org-agenda-overriding-header (periodise))))))))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
Use a horizontal line to divide each day from the next.
|
Use a horizontal line to divide each day from the next.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
@ -666,7 +670,7 @@ As previously described, “the big boy”. I know little about most of these se
|
||||||
|
|
||||||
** =typo=
|
** =typo=
|
||||||
|
|
||||||
Automatically use smart quotes. (Can’t be set to =text-mode-hook=, unfortunately, as this messes things up in LaTeX; but the only other text-modes I use are =org= and Markdown, I think.)
|
Automatically use smart quotes. (Can’t be set to =text-mode-hook=, unfortunately, as this messes things up in LaTeX; but the only other text-modes I use are =org= and Markdown, I think.) Also, best to /unset/ this mode in source blocks in =org=, [[https://emacs.stackexchange.com/questions/55944/disable-minor-mode-inside-source-blocks][hook taken from here]].
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package typo
|
(use-package typo
|
||||||
|
@ -675,6 +679,9 @@ Automatically use smart quotes. (Can’t be set to =text-mode-hook=, unfortunate
|
||||||
:init
|
:init
|
||||||
(add-hook 'org-mode-hook 'typo-mode)
|
(add-hook 'org-mode-hook 'typo-mode)
|
||||||
(add-hook 'markdown-mode-hook 'typo-mode))
|
(add-hook 'markdown-mode-hook 'typo-mode))
|
||||||
|
(defun unsmart-hook ()
|
||||||
|
(add-hook 'typo-disable-electricity-functions 'org-in-src-block-p nil :local))
|
||||||
|
(add-hook 'org-mode-hook 'unsmart-hook)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** =yasnippet=
|
** =yasnippet=
|
||||||
|
|
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