|
|
|
|
@ -350,26 +350,28 @@ |
|
|
|
|
#+END_SRC |
|
|
|
|
* Main major modes |
|
|
|
|
** TODO org-mode |
|
|
|
|
*** Hooks |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(add-hook 'org-mode-hook (lambda () |
|
|
|
|
(turn-on-auto-fill))) |
|
|
|
|
#+END_SRC |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(require 'org-install) |
|
|
|
|
(require 'org-pomodoro) |
|
|
|
|
|
|
|
|
|
(require 'org-install) |
|
|
|
|
(require 'org-pomodoro) |
|
|
|
|
|
|
|
|
|
(setq org-agenda-files |
|
|
|
|
' ("~/org/notes.org" "~/org/orgzly/work.org" "~/org/orgzly/hack.org" "~/org/orgzly/live.org" "~/org/orgzly/refile.org")) |
|
|
|
|
(setq org-agenda-files |
|
|
|
|
' ("~/org/notes.org" "~/org/orgzly/work.org" "~/org/orgzly/hack.org" "~/org/orgzly/live.org" "~/org/orgzly/refile.org")) |
|
|
|
|
|
|
|
|
|
(add-hook 'org-mode-hook (lambda () |
|
|
|
|
(turn-on-auto-fill))) |
|
|
|
|
(setq org-default-notes-file "~/org/notes.org") |
|
|
|
|
(global-set-key (kbd "C-c a") 'org-agenda) |
|
|
|
|
(global-set-key (kbd "C-c c") 'org-capture) |
|
|
|
|
(setq org-default-notes-file "~/org/notes.org") |
|
|
|
|
(global-set-key (kbd "C-c a") 'org-agenda) |
|
|
|
|
(global-set-key (kbd "C-c c") 'org-capture) |
|
|
|
|
|
|
|
|
|
(add-to-list 'org-structure-template-alist |
|
|
|
|
(add-to-list 'org-structure-template-alist |
|
|
|
|
'("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC")) |
|
|
|
|
|
|
|
|
|
(setq org-src-fontify-natively t) |
|
|
|
|
(setq org-src-fontify-natively t) |
|
|
|
|
|
|
|
|
|
(setq org-capture-templates |
|
|
|
|
(setq org-capture-templates |
|
|
|
|
'(("t" "TODO today" entry (file+headline "~/org/notes.org" "Tasks") |
|
|
|
|
"* TODO %?\n SCHEDULED: %t" :clock-in t :clock-resume t) |
|
|
|
|
("n" "TODO next" entry (file+headline "~/org/notes.org" "Tasks") |
|
|
|
|
@ -387,22 +389,21 @@ |
|
|
|
|
("r" "Reply to" entry (file+headline "~/org/notes.org" "E-mails") |
|
|
|
|
"* DONE mailto:%?"))) |
|
|
|
|
|
|
|
|
|
(setq org-clock-persist 'history) |
|
|
|
|
(org-clock-persistence-insinuate) |
|
|
|
|
|
|
|
|
|
(setq org-agenda-span 1) |
|
|
|
|
(setq org-clock-persist 'history) |
|
|
|
|
(org-clock-persistence-insinuate) |
|
|
|
|
|
|
|
|
|
;; Separate drawers for clocking and logs |
|
|
|
|
(setq org-drawers (quote ("PROPERTIES" "CLOCKBOOK"))) |
|
|
|
|
;; Save clock data and state changes and notes in the CLOCK drawer |
|
|
|
|
(setq org-clock-into-drawer "CLOCKBOOK") |
|
|
|
|
;; Sometimes I change tasks I'm clocking quickly - this removes clocked tasks with 0:00 duration |
|
|
|
|
(setq org-clock-out-remove-zero-time-clocks t) |
|
|
|
|
;; Clock out when moving task to a done state |
|
|
|
|
(setq org-clock-out-when-done t) |
|
|
|
|
(setq org-agenda-span 1) |
|
|
|
|
|
|
|
|
|
;; Separate drawers for clocking and logs |
|
|
|
|
(setq org-drawers (quote ("PROPERTIES" "CLOCKBOOK"))) |
|
|
|
|
;; Save clock data and state changes and notes in the CLOCK drawer |
|
|
|
|
(setq org-clock-into-drawer "CLOCKBOOK") |
|
|
|
|
;; Sometimes I change tasks I'm clocking quickly - this removes clocked tasks with 0:00 duration |
|
|
|
|
(setq org-clock-out-remove-zero-time-clocks t) |
|
|
|
|
;; Clock out when moving task to a done state |
|
|
|
|
(setq org-clock-out-when-done t) |
|
|
|
|
|
|
|
|
|
(setq org-agenda-custom-commands |
|
|
|
|
(setq org-agenda-custom-commands |
|
|
|
|
'(("h" "Agenda and Android tasks" |
|
|
|
|
((agenda "") |
|
|
|
|
(tags-todo "Android"))) |
|
|
|
|
@ -417,11 +418,11 @@ |
|
|
|
|
(tags-todo "5m") |
|
|
|
|
(tags-todo "20m"))))) |
|
|
|
|
|
|
|
|
|
;; some super-clever stuff |
|
|
|
|
;; [https://emacs.stackexchange.com/questions/39032/tangle-the-same-src-block-to-different-files] |
|
|
|
|
(defun org-babel-tangle-collect-blocks-handle-tangle-list (&optional language tangle-file) |
|
|
|
|
;; some super-clever stuff |
|
|
|
|
;; [https://emacs.stackexchange.com/questions/39032/tangle-the-same-src-block-to-different-files] |
|
|
|
|
(defun org-babel-tangle-collect-blocks-handle-tangle-list (&optional language tangle-file) |
|
|
|
|
"Can be used as :override advice for `org-babel-tangle-collect-blocks'. |
|
|
|
|
Handles lists of :tangle files." |
|
|
|
|
Handles lists of :tangle files." |
|
|
|
|
(let ((counter 0) last-heading-pos blocks) |
|
|
|
|
(org-babel-map-src-blocks (buffer-file-name) |
|
|
|
|
(let ((current-heading-pos |
|
|
|
|
@ -450,9 +451,9 @@ Handles lists of :tangle files." |
|
|
|
|
;; Ensure blocks are in the correct order. |
|
|
|
|
(mapcar (lambda (b) (cons (car b) (nreverse (cdr b)))) blocks))) |
|
|
|
|
|
|
|
|
|
(defun org-babel-tangle-single-block-handle-tangle-list (oldfun block-counter &optional only-this-block) |
|
|
|
|
(defun org-babel-tangle-single-block-handle-tangle-list (oldfun block-counter &optional only-this-block) |
|
|
|
|
"Can be used as :around advice for `org-babel-tangle-single-block'. |
|
|
|
|
If the :tangle header arg is a list of files. Handle all files" |
|
|
|
|
If the :tangle header arg is a list of files. Handle all files" |
|
|
|
|
(let* ((info (org-babel-get-src-block-info)) |
|
|
|
|
(params (nth 2 info)) |
|
|
|
|
(tfiles (cdr (assoc :tangle params)))) |
|
|
|
|
@ -477,8 +478,8 @@ If the :tangle header arg is a list of files. Handle all files" |
|
|
|
|
(list (cons (cl-caaar ret) (mapcar #'cadar ret))) |
|
|
|
|
ret))))) |
|
|
|
|
|
|
|
|
|
(advice-add 'org-babel-tangle-collect-blocks :override #'org-babel-tangle-collect-blocks-handle-tangle-list) |
|
|
|
|
(advice-add 'org-babel-tangle-single-block :around #'org-babel-tangle-single-block-handle-tangle-list) |
|
|
|
|
(advice-add 'org-babel-tangle-collect-blocks :override #'org-babel-tangle-collect-blocks-handle-tangle-list) |
|
|
|
|
(advice-add 'org-babel-tangle-single-block :around #'org-babel-tangle-single-block-handle-tangle-list) |
|
|
|
|
#+END_SRC |
|
|
|
|
** TODO split --- LaTeX |
|
|
|
|
|
|
|
|
|
|