summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-01-31 18:01:24 -0800
committerFranck Cuny <franck@fcuny.net>2023-01-31 18:01:24 -0800
commitecf12e9a60af098e188c1863f1fe4af30b3bc27f (patch)
tree28a6b946fda2b48ca96d8b63c84a924b572883b9
parentref(eshell): remove unnecessary variables (diff)
downloademacs.d-ecf12e9a60af098e188c1863f1fe4af30b3bc27f.tar.gz
ref(org-mode): a number of tweaks
- use org-cliplink to add bookmarks
- remove the sequence for TO-READ/READING/READ since I don't use it
- remove a projects.org since all tasks end up in tasks.org with
  tagging. This was adding a layer of complexity I don't need
- move habits to tasks.org
- add a capture template for TIL (today-I-learned)
- remove the heading decorations for the theme, I don't like the way it
  looks

Change-Id: I6e25015ec91242cc8b8797a92767a1afa9c08a96
-rw-r--r--emacs/custom/my-org.el25
-rw-r--r--emacs/custom/my-packages.el3
-rw-r--r--emacs/custom/my-ui.el12
3 files changed, 15 insertions, 25 deletions
diff --git a/emacs/custom/my-org.el b/emacs/custom/my-org.el
index f49bc6b..d4b7837 100644
--- a/emacs/custom/my-org.el
+++ b/emacs/custom/my-org.el
@@ -6,6 +6,7 @@
 (require 'org-agenda)
 (require 'org-capture)
 (require 'org-archive)
+(require 'org-cliplink)
 (require 'ox)
 (require 'ox-md)
 
@@ -35,8 +36,7 @@
 (setq org-log-into-drawer t)                      ;; insert state change in the drawer
 (setq org-cycle-separator-lines 0)
 (setq org-startup-folded 'content)
-(setq org-todo-keywords '((sequence "TODO" "STARTED" "WAITING" "|" "DONE" "CANCELED")
-                          (sequence "TO-READ(r/!)" "READING(/!)" "|" "READ(R@)")))
+(setq org-todo-keywords '((sequence "TODO" "STARTED" "WAITING" "|" "DONE" "CANCELED")))
 
 (setq org-priority-start-cycle-with-default nil) ;; Start one over/under default value.
 (setq org-highest-priority ?A)
@@ -45,8 +45,7 @@
 
 (setq org-refile-use-cache nil)
 (setq org-refile-targets `((,(expand-file-name "tasks.org" org-directory) :maxlevel . 1)
-                           (,(expand-file-name "notes.org" org-directory) :maxlevel . 1)
-                           (,(expand-file-name "projects.org" org-directory) :tag . "project")))
+                           (,(expand-file-name "notes.org" org-directory) :maxlevel . 1)))
 (setq org-refile-use-outline-path 'file)
 (setq org-outline-path-complete-in-steps nil)
 (setq org-refile-allow-creating-parent-nodes 'confirm)
@@ -74,8 +73,6 @@
 (setq org-agenda-files `(,(expand-file-name "inbox.org" org-directory)
                          ,(expand-file-name "notes.org" org-directory)
                          ,(expand-file-name "tasks.org" org-directory)
-                         ,(expand-file-name "habits.org" org-directory)
-                         ,(expand-file-name "projects.org" org-directory)
                          ,(expand-file-name "bookmarks.org" org-directory)
                          ,(expand-file-name "journal.org" org-directory)))
 (setq org-agenda-show-all-dates t)
@@ -102,21 +99,22 @@
 `(("t" "tasks" entry (file "inbox.org")
    "* TODO [#D] %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n")
 
+  ("T" "TIL" entry (file+headline "til.org" "Today I learnt")
+   "* %^{title} :%^{tag}:\n:PROPERTIES:\n:CREATED: %U\n:END:\n%?\nSource: %^C")
+
   ("n" "note" entry (file "notes.org")
    "* %?\n:PROPERTIES:\n:CREATED: %T\n:END:\n")
 
   ("f" "feed" entry (file "inbox.org")
-   ,(concat "* TO-READ %:elfeed-entry-title :feed:\n"
+   ,(concat "* TODO [#D] %:elfeed-entry-title :feed:\n"
             ":PROPERTIES:\n:CREATED: %T\n:END:\n"
             "%a\n"))
 
-  ("m" "email note" entry (file "inbox.org")
-   ,(concat "* TODO [#A] %:subject :mail:\n"
-            ":PROPERTIES:\n:CREATED: %T\n:END:\n"
-            "%a\n%i%?"))
+  ("b" "bookmark" entry (file "bookmarks.org")
+   ,(concat "* %(org-cliplink-capture) :%^{tag}:\n"
+            ":PROPERTIES:\n:CREATED: %T\n:END:%?\n") :prepend t :empty-lines 1)
 
-  ("j" "journal" entry
-   (file+olp+datetree "journal.org")
+  ("j" "journal" entry (file+olp+datetree "journal.org")
    "* %?\n:PROPERTIES:\n:CREATED: %T\n:END:\n" :tree-type day)))
 
 ;; https://stackoverflow.com/questions/20164918/how-to-untick-checkboxes-in-org-mode-for-the-next-cyclic-repetitive-task
@@ -133,7 +131,6 @@
 
 (add-hook 'org-after-todo-state-change-hook 'my/org-reset-checkbox-when-done)
 
-
 (provide 'my-org)
 
 ;;; my-org.el ends here
diff --git a/emacs/custom/my-packages.el b/emacs/custom/my-packages.el
index e802c14..dca13d1 100644
--- a/emacs/custom/my-packages.el
+++ b/emacs/custom/my-packages.el
@@ -47,6 +47,9 @@
     elfeed
     elfeed-org
 
+    ;; org-mode
+    org-cliplink
+
     ;; various text modes
     markdown-mode
 
diff --git a/emacs/custom/my-ui.el b/emacs/custom/my-ui.el
index 930f615..3ced78c 100644
--- a/emacs/custom/my-ui.el
+++ b/emacs/custom/my-ui.el
@@ -26,17 +26,7 @@
       ;; The following accept lists of properties
       standard-themes-links '(neutral-underline bold)
       standard-themes-region '(no-extend neutral intense)
-      standard-themes-prompts '(bold italic)
-
-      ;; more complex alist to set weight, height, and optional
-      ;; `variable-pitch' per heading level (t is for any level not
-      ;; specified):
-      standard-themes-headings
-      '((0 . (extrabold 1.3))
-        (1 . (bold 1.25))
-        (2 . (semibold 1.2))
-        (3 . (medium 1.15))
-        (t . (1.1))))
+      standard-themes-prompts '(bold italic))
 
 ;; Disable all other themes to avoid awkward blending:
 (mapc #'disable-theme custom-enabled-themes)