diff --git a/configuration.org b/configuration.org index c5470040870f25d55406f7375100967d1b3815fb..de146e646a71d3b30daf589e3a75e720e6363a7f 100644 --- a/configuration.org +++ b/configuration.org @@ -417,88 +417,106 @@ org with contributed packages added. ** Basics #+BEGIN_SRC emacs-lisp - (use-package org - :bind (("C-c l" . 'org-store-link) - ("C-c a" . 'org-agenda) - ("C-c c" . 'org-capture) - ) - :custom - ;; Tab keeps indenting in src blocks - (org-src-tab-acts-natively t) - ;; IDO for completion when applicable - (org-completion-use-ido t) - ;; hide emphasis markers - ;; (org-hide-emphasis-markers t) - (org-file-apps '(("org" . emacs) - ("rs" . emacs) - ("c" . emacs) - ("h" . emacs) - )) - ;; Define the right latexmk command to export to latex - (org-latex-pdf-process (list "latexmk -pdflatex='pdflatex -shell-escape -interaction nonstopmode' -output-directory=%o -pdf %f")) - - ;; Task management configuration - (org-log-done 'time) - (org-enforce-todo-dependencies t) - (org-enforce-todo-checkbox-dependencies t) - (org-todo-keywords '((sequence "TODO" "WAITING" "|" "DONE"))) - - ;; where org mode can find its files for archiving and capture - (org-directory "~/documents/org") - (org-archive-location "~/documents/org/archive.org::* From %s") - (org-agenda-files (list "~/documents/org/index.org" - "~/.emacs.d/configuration.org" - "~/documents/org/work.org" - "~/documents/org/archive.org")) - - ;; Agenda - ;; The week begin today - (org-agenda-start-on-weekday nil) - ;; 15 days in agenda view - (org-agenda-span 15) - ;; - ;; Define a custom agenda view. I want my agenda with tasks that are scheduled or have a deadline, - ;; but also all other tasks that do not have a date scheduled or as deadline. This is for tasks - ;; that I will eventualy do later. - - (org-agenda-custom-commands - '(("a" "Agenda" - ( - (agenda "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)))) - (alltodo "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled 'deadline 'todo 'done)))) - )))) - - ;; Define some capture template to be able to create tasks, or maybe - ;; other things later - - (org-capture-templates - '(("f" "Finished book" - table-line (file "~/Documents/org/books-read.org") - "| %^{Title} | %^{Author} | %u |") - - ("t" "Todo" - entry - (file+headline org-index-file "Tâches") - "* TODO %?\n:PROPERTIES:\nCREATED: %u\n:END:\n") - - ("b" "Bookmarks" - table-line (file "~/Documents/org/bookmarks.org") - "| %^{prompt|rust|other} | %^{url} | %^{what}") - - - ("c" "Cycling" - table-line (file "~/Documents/org/cycling.org") - "| %t | balade | %^{prompt|standard|électrique} | %^{Distance} |") - - ("w" "Cycling to work" - table-line (file "~/Documents/org/cycling.org") - "| %t | boulot | %^{prompt|électrique|standard} | 26.2 |"))) - :config - (add-to-list 'org-structure-template-alist - '("el" . "src emacs-lisp")) - (set-face-foreground 'org-verbatim "orange1") - ;; Define a document class that do not use parts and start with chapters for latex export - ) +(use-package org + :bind (("C-c l" . 'org-store-link) + ("C-c a" . 'org-agenda) + ("C-c c" . 'org-capture) + ) + :custom + ;; Tab keeps indenting in src blocks + (org-src-tab-acts-natively t) + ;; IDO for completion when applicable + (org-completion-use-ido t) + ;; hide emphasis markers + ;; (org-hide-emphasis-markers t) + (org-file-apps '(("org" . emacs) + ("rs" . emacs) + ("c" . emacs) + ("h" . emacs) + )) + ;; Define the right latexmk command to export to latex + (org-latex-pdf-process (list "latexmk -pdflatex='pdflatex -shell-escape -interaction nonstopmode' -output-directory=%o -pdf %f")) + + ;; Task management configuration + (org-log-done 'time) + (org-enforce-todo-dependencies t) + (org-enforce-todo-checkbox-dependencies t) + (org-todo-keywords '((sequence "TODO" "WAITING" "|" "DONE"))) + + ;; where org mode can find its files for archiving and capture + (org-directory "~/documents/org") + (org-archive-location "~/documents/org/archive.org::* From %s") + (org-agenda-files (list "~/documents/org/index.org" + "~/.emacs.d/configuration.org" + "~/documents/org/work.org" + "~/documents/org/archive.org")) + + ;; Agenda + ;; The week begin today + (org-agenda-start-on-weekday nil) + ;; 15 days in agenda view + (org-agenda-span 15) + ;; + ;; Define a custom agenda view. I want my agenda with tasks that are scheduled or have a deadline, + ;; but also all other tasks that do not have a date scheduled or as deadline. This is for tasks + ;; that I will eventualy do later. + + (org-agenda-custom-commands + '(("a" "Agenda" + ( + (agenda "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)))) + (alltodo "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled 'deadline 'todo 'done)))) + )))) + + ;; Define some capture template to be able to create tasks, or maybe + ;; other things later + + (org-capture-templates + '(("f" "Finished book" + table-line (file "~/Documents/org/books-read.org") + "| %^{Title} | %^{Author} | %u |") + + ("t" "Todo" + entry + (file+headline org-index-file "Tâches") + "* TODO %?\n:PROPERTIES:\nCREATED: %u\n:END:\n") + + ("b" "Bookmarks" + table-line (file "~/Documents/org/bookmarks.org") + "| %^{prompt|rust|other} | %^{url} | %^{what}") + + + ("c" "Cycling" + table-line (file "~/Documents/org/cycling.org") + "| %t | balade | %^{prompt|standard|électrique} | %^{Distance} |") + + ("w" "Cycling to work" + table-line (file "~/Documents/org/cycling.org") + "| %t | boulot | %^{prompt|électrique|standard} | 26.2 |"))) + + ;; + ;; Babel code blocks evaluation + (org-babel-load-languages + '((emacs-lisp . t) + (C . t) + (latex . t) + (gnuplot . t) + (dot . t) + (java . t) + (python . t) + (makefile . t) + (org . t) + (perl . t) + (sed . t) + (shell . t) + (rust . t) + )) + :config + (add-to-list 'org-structure-template-alist + '("el" . "src emacs-lisp")) + (set-face-foreground 'org-verbatim "orange1") + ;; Define a document class that do not use parts and start with chapters for latex export + ) #+END_SRC Add a shortcut to toggle display of emphasis characters @@ -536,7 +554,7 @@ Use bullets instead of asterisks ) #+end_src - + ** Tree slide Tree slide displays an org file as /slides/ @@ -623,31 +641,11 @@ Turn off validate link in org html export: ** Source code evaluation -So that source code blocks can be evaluated inside =org-mode=, we add -it to babel languages. =org-babel= is what executes code and outputs -its result in your org file. #+begin_src emacs-lisp (use-package gnuplot) (use-package gnuplot-mode) (use-package ob-rust) - - (org-babel-do-load-languages - 'org-babel-load-languages - '((emacs-lisp . t) - (C . t) - (latex . t) - (gnuplot . t) - (dot . t) - (java . t) - (python . t) - (makefile . t) - (org . t) - (perl . t) - (sed . t) - (shell . t) - (rust . t) - )) #+END_SRC