Commit 1c1e6280615c

Vincent Demeester <vincent@sbr.pm>
2020-02-27 08:49:11
Update org-mode configuration ๐Ÿ“–
Add tag, log and starting on refile Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent c70f99f
Changed files (2)
config/setup-org.el
@@ -34,7 +34,22 @@
                                        (done ("WAITING"))
                                        ("TODO" ("WAITING") ("CANCELLED"))
                                        ("NEXT" ("WAITING") ("CANCELLED"))
-                                       ("DONE" ("WAITING") ("CANCELLED"))))
+                                       ("DONE" ("WAITING") ("CANCELLED")))
+        org-use-tag-inheritance t
+        org-tag-alist '(("linux") ("nixos") ("emacs") ("org")
+                        ("openshift") ("redhat") ("tektoncd") ("kubernetes") ("knative" ) ("docker")
+                        ("docs") ("code") ("review")
+                        (:startgroup . nil)
+                        ("@home" . ?h) ("@work" . ?w) ("@errand" . ?e) ("@health" . ?l)
+                        (:endgroup . nil)
+                        (:startgroup . nil)
+                        ("@link" . ?i) ("@read" . ?r) ("@project" . ?p)
+                        (:endgroup . nil))
+        org-use-property-inheritance t
+        org-log-done 'time
+        org-log-redeadline 'time
+        org-log-reschedule 'time
+        org-log-into-drawer t)
   :bind (("C-c o l" . org-store-link)
          ("C-c o r r" . org-refile)))
 
@@ -121,8 +136,6 @@
                       org-protocol))
   (setq org-blank-before-new-entry '((heading . t)
                                      (plain-list-item . nil)))
-
-  (setq org-use-property-inheritance t)
   (setq org-enforce-todo-dependencies t)
 
   (setq org-refile-use-outline-path 'file
@@ -136,11 +149,6 @@
                                     (--map (format "%s/%s" org-default-projects-dir it))
                                     (--map `(,it :level . 1)))))
 
-  (setq org-log-done (quote time))
-  (setq org-log-redeadline (quote time))
-  (setq org-log-reschedule (quote time))
-  (setq org-log-into-drawer t)
-
   (setq org-fontify-whole-heading-line t)
 
   (setq org-pretty-entities t)
@@ -149,18 +157,7 @@
 
   (setq org-yank-adjusted-subtrees t)
 
-  (setcar (nthcdr 4 org-emphasis-regexp-components) 10)
-
-  (setq org-tag-alist (quote (("linux") ("nixos") ("emacs") ("org")
-                              ("openshift") ("redhat") ("tektoncd") ("kubernetes") ("knative" ) ("docker")
-                              ("docs") ("code") ("review")
-                              (:startgroup . nil)
-                              ("@home" . ?h) ("@work" . ?w) ("@errand" . ?e) ("@health" . ?l)
-                              (:endgroup . nil)
-                              (:startgroup . nil)
-                              ("@link" . ?i) ("@read" . ?r) ("@project" . ?p)
-                              (:endgroup . nil)
-                              )))
+  (setcar (nthcdr 4 org-emphasis-regexp-components) 10
 
   (use-package org-super-agenda
     :config (org-super-agenda-mode))
emacs.org
@@ -678,8 +678,28 @@
   into =incubate.org= and I don't seem to use =WAITING=).
 
   /I need to update and document =org-todo-state-tags-triggers= too/
-- Tags ::
-- Refile ::
+- Tags :: I am using generic tags and some groups. Groups allow to define mutually
+  exclusive tags, like =@home= and =@work= (can't be both). This is achieve by using
+  =:startgroup= and =:endgroup= in the =org-tag-alist= variable. It is also possible to
+  define [[https://orgmode.org/manual/Tag-Hierarchy.html#Tag-Hierarchy][tag hierarchies]] but I didn't look into it yet.
+
+  I also want to have tag inheritance, aka children entry inherits their parent's tag โ€”
+  even though it may have a cost (search, โ€ฆ), it allows to reduce lots of /duplications/.
+- Refile :: In the =org-mode= jargon, this means moving an entry from one heading (parent
+  entry) to another. This move can be done across files. =org-mode= displays a list of
+  choice, this list is controlled by the =org-refile-targets= variable.
+- User Interface ::
+- Logging :: =org-mode= allows to write the time (or a note) on a entry state change, this
+  is achieved by the =org-log-*= variables. On marking entries as =DONE= or when
+  rescheduling them (or changing the deadline), I want to mark the time.
+
+  Additionally, when I log those state changes, I don't want them to pollute the content
+  of the to-do (aka description, โ€ฆ). Setting =org-log-int-drawer= will insert those logs
+  in a =LOGBOOK= drawer (same as the property drawer).
+- Miscellaneous ::
+  + I am setting up =org-use-property-inheritance= to make children node inherit their
+    parent property. It has a cost on search but I feel, as for tag inheritance, it is
+    worth the cost.
 
 /The =ensure org-plus-contrib= is there to make sure I am loading the =org= module from my
 nix configuration and not the built-in =org= module (that might lag in terms of version)/
@@ -704,7 +724,22 @@
                                        (done ("WAITING"))
                                        ("TODO" ("WAITING") ("CANCELLED"))
                                        ("NEXT" ("WAITING") ("CANCELLED"))
-                                       ("DONE" ("WAITING") ("CANCELLED"))))
+                                       ("DONE" ("WAITING") ("CANCELLED")))
+        org-use-tag-inheritance t
+        org-tag-alist '(("linux") ("nixos") ("emacs") ("org")
+                        ("openshift") ("redhat") ("tektoncd") ("kubernetes") ("knative" ) ("docker")
+                        ("docs") ("code") ("review")
+                        (:startgroup . nil)
+                        ("@home" . ?h) ("@work" . ?w) ("@errand" . ?e) ("@health" . ?l)
+                        (:endgroup . nil)
+                        (:startgroup . nil)
+                        ("@link" . ?i) ("@read" . ?r) ("@project" . ?p)
+                        (:endgroup . nil))
+        org-use-property-inheritance t
+        org-log-done 'time
+        org-log-redeadline 'time
+        org-log-reschedule 'time
+        org-log-into-drawer t)
   :bind (("C-c o l" . org-store-link)
          ("C-c o r r" . org-refile)))
 #+end_src
@@ -2945,8 +2980,6 @@
                       org-protocol))
   (setq org-blank-before-new-entry '((heading . t)
                                      (plain-list-item . nil)))
-
-  (setq org-use-property-inheritance t)
   (setq org-enforce-todo-dependencies t)
 
   (setq org-refile-use-outline-path 'file
@@ -2960,11 +2993,6 @@
                                     (--map (format "%s/%s" org-default-projects-dir it))
                                     (--map `(,it :level . 1)))))
 
-  (setq org-log-done (quote time))
-  (setq org-log-redeadline (quote time))
-  (setq org-log-reschedule (quote time))
-  (setq org-log-into-drawer t)
-
   (setq org-fontify-whole-heading-line t)
 
   (setq org-pretty-entities t)
@@ -2973,18 +3001,7 @@
 
   (setq org-yank-adjusted-subtrees t)
 
-  (setcar (nthcdr 4 org-emphasis-regexp-components) 10)
-
-  (setq org-tag-alist (quote (("linux") ("nixos") ("emacs") ("org")
-                              ("openshift") ("redhat") ("tektoncd") ("kubernetes") ("knative" ) ("docker")
-                              ("docs") ("code") ("review")
-                              (:startgroup . nil)
-                              ("@home" . ?h) ("@work" . ?w) ("@errand" . ?e) ("@health" . ?l)
-                              (:endgroup . nil)
-                              (:startgroup . nil)
-                              ("@link" . ?i) ("@read" . ?r) ("@project" . ?p)
-                              (:endgroup . nil)
-                              )))
+  (setcar (nthcdr 4 org-emphasis-regexp-components) 10
 
   (use-package org-super-agenda
     :config (org-super-agenda-mode))