Move Org configuration from configuration.org to init.el
This commit is contained in:
parent
8a6353b2c5
commit
395504b1ea
@ -312,426 +312,6 @@ It also provides some nice commands to navigate between change sets.
|
||||
(add-to-list 'completion-at-point-functions #'cape-elisp-symbol))
|
||||
#+end_src
|
||||
|
||||
* Org mode
|
||||
|
||||
** ~outline~
|
||||
|
||||
This is the mode Org is based on. It’s technically a built-in, but i configure it here so it remains together with other Org setup.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package outline
|
||||
:ensure nil
|
||||
:custom-face
|
||||
(outline-1 ((t (:inherit font-lock-function-name-face :overline t :weight bold :height 1.2))))
|
||||
(outline-2 ((t (:inherit font-lock-variable-name-face :overline t :weight bold :height 1.1))))
|
||||
(outline-3 ((t (:inherit font-lock-keyword-face :overline t :weight bold)))))
|
||||
#+end_src
|
||||
|
||||
** Function to set up Org-mode buffers
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun gpolonkai/setup-org-mode ()
|
||||
(org-indent-mode 1)
|
||||
(variable-pitch-mode 1)
|
||||
(auto-fill-mode 0)
|
||||
(visual-line-mode 1))
|
||||
#+end_src
|
||||
|
||||
** Display horizontal rulers as a full-width line
|
||||
|
||||
From [[https://matrix.to/#/@suckless_shill:matrix.org][viz]] in the [[https://matrix.to/#/#org-mode:matrix.org][org-mode]] Matrix room.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun vz/org-fontify-horizontal-break ()
|
||||
"Display Org’s horizontal break (-----) as a full-width horizontal line"
|
||||
(push '("^[[:space:]]*\\(------*\\)\n"
|
||||
(0 (progn
|
||||
(put-text-property (match-beginning 1) (match-end 1)
|
||||
'display (make-string (- (match-end 1) (match-beginning 1)) ?\s))
|
||||
(put-text-property (match-beginning 1) (match-end 0)
|
||||
'face '(:strike-through t :extend t)))))
|
||||
org-font-lock-extra-keywords)
|
||||
(setq-local font-lock-extra-managed-props (cons 'display font-lock-extra-managed-props)))
|
||||
|
||||
(add-hook 'org-font-lock-set-keywords-hook #'vz/org-fontify-horizontal-break)
|
||||
#+end_src
|
||||
|
||||
** Main ~org~ configuration
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org
|
||||
:demand
|
||||
:custom-face
|
||||
(org-block ((t (:inherit fixed-pitch))))
|
||||
(org-code ((t (:inherit (shadow fixed-pitch)))))
|
||||
(org-indent ((t (:inherit (org-hide fixed-pitch)))))
|
||||
(org-verbatim ((t (:inherit (shadow fixed-pitch)))))
|
||||
(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
|
||||
(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch)))))
|
||||
(org-checkbox ((t (:inherit fixed-pitch))))
|
||||
(org-table ((t (:inherit (shadow fixed-pitch)))))
|
||||
(org-_drawer ((t (:inherit (shadow fixed-pitch)))))
|
||||
:init
|
||||
(require 'xdg-paths)
|
||||
(defface org-checkbox-todo-text
|
||||
'((t (:inherit org-todo)))
|
||||
"Face for the text part of an unchecked org-mode checkbox.")
|
||||
(defface org-checkbox-done-text
|
||||
'((t (:inherit org-done)))
|
||||
"Face for the text part of a checked org-mode checkbox.")
|
||||
(font-lock-add-keywords
|
||||
'org-mode
|
||||
`(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?: \\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 1 'org-checkbox-todo-text prepend))
|
||||
'append)
|
||||
(font-lock-add-keywords
|
||||
'org-mode
|
||||
`(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 12 'org-checkbox-done-text prepend))
|
||||
'append)
|
||||
(setq-default org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||
org-agenda-files `(,org-directory)
|
||||
org-time-stamp-formats '("<%Y-%m-%d>" . "<%Y-%m-%d %H:%M>")
|
||||
org-todo-keywords '((sequence "TODO(t)"
|
||||
"DOING(w@/!)"
|
||||
"BLOCKED(b@/!)"
|
||||
"SOMEDAY(s!)"
|
||||
"|"
|
||||
"CANCELED(c@/!)"
|
||||
"REVIEW(r@/!)"
|
||||
"DONE(d@/!)"))
|
||||
org-todo-keyword-faces '(("SOMEDAY" . (:foreground "goldenrod"))
|
||||
("CANCELED" . (:foreground "#228b22" :strike-through t)))
|
||||
org-html-checkbox-types
|
||||
'((unicode (on . "<span class=\"task-done\">☑</span>")
|
||||
(off . "<span class=\"task-todo\">☐</span>")
|
||||
(trans . "<span class=\"task-in-progress\">▣</span>"))))
|
||||
:config
|
||||
;; Load the markdown exporter
|
||||
(require 'ox-md)
|
||||
;; Handle org-protocol:// links
|
||||
(require 'org-protocol)
|
||||
;; Make it possible to encrypt headings
|
||||
(require 'org-crypt)
|
||||
;; Make it possible to use inline tasks
|
||||
(require 'org-inlinetask)
|
||||
;; Make sure we load Python babel stuff
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((python . t)))
|
||||
;; Track habits
|
||||
(require 'org-habit)
|
||||
:custom
|
||||
(org-log-into-drawer t)
|
||||
(org-ellipsis "…#")
|
||||
(org-startup-folded 'content)
|
||||
(org-log-done 'time)
|
||||
(org-src-preserve-indentation t)
|
||||
(org-tags-column 0)
|
||||
(org-startup-indented t)
|
||||
(org-special-ctrl-a/e t)
|
||||
(org-return-follows-link t)
|
||||
(org-src-fontify-natively t)
|
||||
(org-goto-interface 'outline-path-completion)
|
||||
(org-goto-max-level 10)
|
||||
(org-html-checkbox-type 'unicode)
|
||||
(org-src-window-setup 'current-window)
|
||||
(org-pretty-entities t)
|
||||
(org-pretty-entities-include-sub-superscripts t)
|
||||
(org-use-speed-commands t)
|
||||
(org-hide-leading-stars t)
|
||||
(org-enforce-todo-dependencies t)
|
||||
(org-enforce-todo-checkbox-dependencies t)
|
||||
(org-catch-invisible-edits 'show)
|
||||
(org-log-reschedule 'time)
|
||||
(org-log-redeadline 'note)
|
||||
(org-refile-use-outline-path 'file)
|
||||
(org-outline-path-complete-in-steps nil)
|
||||
(org-refile-allow-creating-parent-nodes 'confirm)
|
||||
(org-crypt-key "B0740C4C")
|
||||
(org-speed-commands-user '(("m" . org-mark-subtree)))
|
||||
(org-refile-targets '((nil :maxlevel . 6)
|
||||
(org-agenda-files :maxlevel . 3)))
|
||||
(org-agenda-custom-commands '(("c" "Simple agenda view"
|
||||
((tags "PRIORITY=\"A\""
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "High priority unfinished tasks")))
|
||||
(agenda "")
|
||||
(alltodo ""
|
||||
((org-agenda-skip-function
|
||||
'(or (air-org-skip-subtree-if-habit)
|
||||
(air-org-skip-subtree-if-priority ?A)
|
||||
(gpolonkai/org-skip-subtree-if-state "SOMEDAY")
|
||||
(org-agenda-skip-if nil '(scheduled deadline))))
|
||||
(org-agenda-overriding-header "ALL normal priority tasks"))))
|
||||
((org-agenda-compact-blocks t)))))
|
||||
(org-log-note-clock-out t)
|
||||
(org-capture-templates '(("L" "Org-protocol capture" entry
|
||||
(file+headline
|
||||
(lambda ()
|
||||
(expand-file-name "index.org" org-directory))
|
||||
"Captures")
|
||||
"** %:description\n:PROPERTIES:\n:SOURCE: %:link\n:END:\n\n%:initial"
|
||||
:empty-lines 1)
|
||||
("R" "Region to Current Clocked Task" plain
|
||||
(clock)
|
||||
"%i"
|
||||
:immediate-finish t
|
||||
:empty-lines 1)
|
||||
("K" "Kill-ring to Current Clocked Task" plain
|
||||
(clock)
|
||||
"%c"
|
||||
:immediate-finish t
|
||||
:empty-lines 1)
|
||||
("c" "Item to current Clocked Task" item
|
||||
(clock)
|
||||
"%i%?"
|
||||
:empty-lines 1)
|
||||
("g" "GT2 note" entry
|
||||
(file+headline
|
||||
(lambda ()
|
||||
(expand-file-name "gt2-notes.org" org-directory))
|
||||
"Captures")
|
||||
"** %^{Title}\n:PROPERTIES:\n:CREATED: %T\n:END:\n\n%a\n\n%i%?")
|
||||
("p" "Blog post" entry
|
||||
(file+olp+datetree
|
||||
(lambda ()
|
||||
(expand-file-name "blog.org" org-directory)))
|
||||
"* %^{Title} :blog:\n:PROPERTIES:\n:CREATED: %T\n:END:\n\n%i%?")))
|
||||
(org-read-date-force-compatible-dates nil)
|
||||
(org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s")
|
||||
(todo . " %i %-12:c %(concat \"[ \"(org-format-outline-path (org-get-outline-path)) \" ]\") ")
|
||||
(tags . " %i %-12:c %(concat \"[ \"(org-format-outline-path (org-get-outline-path)) \" ]\") ")
|
||||
(timeline . " % s")
|
||||
(search . " %i %-12:c")))
|
||||
(org-agenda-dim-blocked-tasks t)
|
||||
(org-link-descriptive t)
|
||||
(org-hide-emphasis-markers t)
|
||||
(org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled)
|
||||
(org-deadline-warning-days 7)
|
||||
:hook
|
||||
(ediff-select . f-ediff-org-unfold-tree-element)
|
||||
(ediff-unselect . f-ediff-org-fold-tree)
|
||||
(org-mode . gpolonkai/setup-org-mode)
|
||||
:bind
|
||||
(:map gpolonkai/pers-map
|
||||
("a" . gpolonkai/org-agenda-list)
|
||||
("C" . org-capture)
|
||||
("l" . org-store-link)
|
||||
:map org-mode-map
|
||||
("SPC" . gpolonkai/org-space-key)
|
||||
("C-c l" . org-toggle-link-display)
|
||||
("C-a" . gpolonkai/move-to-beginning-of-line)
|
||||
("C-e" . gpolonkai/move-to-end-of-line)
|
||||
("C-c h" . outline-previous-heading)
|
||||
("C-c ." . gpolonkai/org-insert-current-timestamp)
|
||||
("C-c ;" . org-toggle-timestamp-type)))
|
||||
#+end_src
|
||||
|
||||
** ~org-roam~
|
||||
|
||||
Let’s see if i can get my brain more organised this way…
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-roam
|
||||
:after org
|
||||
:ensure t
|
||||
:config
|
||||
(setq org-roam-node-display-template (concat "${title:*} "
|
||||
(propertize "${tags:10}" 'face 'org-tag)))
|
||||
(org-roam-db-autosync-mode)
|
||||
(require 'org-roam-dailies)
|
||||
(require 'org-roam-protocol)
|
||||
:custom
|
||||
(org-roam-directory (file-truename (expand-file-name "roam" org-directory)))
|
||||
(org-roam-dailies-directory (file-truename (expand-file-name "roam/journal" org-directory)))
|
||||
(org-roam-completion-everywhere t)
|
||||
(org-roam-capture-templates '(("d" "default" plain "\n%?"
|
||||
:target (file+head
|
||||
"${slug}-%<%Y%m%d%H%M%S>.org"
|
||||
"#+title: ${title}")
|
||||
:unnarrowed t)))
|
||||
(org-roam-dailies-capture-templates '(
|
||||
("d" "default" entry "* %<%H:%M>: %?"
|
||||
:if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n"))))
|
||||
:bind
|
||||
(("C-c n c" . org-roam-capture)
|
||||
("C-c n g" . org-roam-graph)
|
||||
("C-c n i" . org-roam-node-insert)
|
||||
("C-c n l" . org-roam-buffer-toggle)
|
||||
:map org-mode-map
|
||||
("C-M-i" . completion-at-point)
|
||||
:map org-roam-dailies-map
|
||||
("d" . org-roam-dailies-capture-date)
|
||||
("j" . org-roam-dailies-capture-today)
|
||||
("Y" . org-roam-dailies-capture-yesterday)
|
||||
("T" . org-roam-dailies-capture-tomorrow))
|
||||
:bind-keymap
|
||||
("C-c n d" . org-roam-dailies-map))
|
||||
#+end_src
|
||||
|
||||
** ~org-roam-timestamps~
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-roam-timestamps
|
||||
:after org-roam
|
||||
:config
|
||||
(org-roam-timestamps-mode)
|
||||
:custom
|
||||
(org-roam-timestamps-remember-timestamps t)
|
||||
(org-roam-timestamps-timestamp-parent-file t))
|
||||
#+end_src
|
||||
|
||||
** ~org-roam-ui~
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-roam-ui
|
||||
:after org-roam
|
||||
:custom
|
||||
(org-roam-ui-sync-theme t)
|
||||
(org-roam-ui-follow t)
|
||||
(org-roam-ui-update-on-save t)
|
||||
(org-roam-ui-open-on-start nil))
|
||||
#+end_src
|
||||
|
||||
** ~org-bullets~ for more beautiful bullet points
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-bullets
|
||||
:custom
|
||||
(org-bullets-face-name 'org-bullet-face)
|
||||
(org-bullets-bullet-list '("✙" "♱" "♰" "☥" "✞" "✟" "✝" "†" "✠" "✚" "✜" "✛" "✢" "✣" "✤" "✥"))
|
||||
:hook
|
||||
(org-mode . org-bullets-mode))
|
||||
#+end_src
|
||||
|
||||
** ~org-sticky-header~ so i always know where i am
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-sticky-header
|
||||
:custom
|
||||
(org-sticky-header-full-path 'full)
|
||||
:hook
|
||||
(org-mode . org-sticky-header-mode))
|
||||
#+end_src
|
||||
|
||||
** ~org-random-todo~ to show a random ToDo every hour
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-random-todo
|
||||
:demand
|
||||
:config
|
||||
;; Don’t bug me too often…
|
||||
(setq org-random-todo-how-often 3600)
|
||||
:custom
|
||||
(org-random-todo-skip-keywords '("SOMEDAY"))
|
||||
:bind
|
||||
(:map gpolonkai/pers-map
|
||||
("r" . org-random-todo)))
|
||||
#+end_src
|
||||
|
||||
** ~org-autolist~ for better list management
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-autolist
|
||||
:hook
|
||||
(org-mode . org-autolist-mode))
|
||||
#+end_src
|
||||
|
||||
** ~secretaria~ to remind me of my tasks
|
||||
|
||||
And because even secretaries need a secretary today.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package secretaria
|
||||
:after
|
||||
alert
|
||||
:hook
|
||||
;; use this for getting a reminder every 30 minutes of those tasks
|
||||
;; scheduled for today and which have no time of day defined.
|
||||
(after-init . secretaria-unknown-time-always-remind-me))
|
||||
#+end_src
|
||||
|
||||
** ~org-clock-waybar~ to export currently clocked task for status bar display
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-clock-waybar
|
||||
:ensure nil
|
||||
:vc (:url "https://gitea.polonkai.eu/gergely/org-clock-waybar.git")
|
||||
:config
|
||||
(org-clock-waybar-setup))
|
||||
#+end_src
|
||||
|
||||
** ~consult-org-roam~
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package consult-org-roam
|
||||
:config
|
||||
(consult-org-roam-mode)
|
||||
:bind (:map goto-map
|
||||
("r" . consult-org-roam-search)
|
||||
:map global-map
|
||||
("C-c n f" . consult-org-roam-file-find)))
|
||||
#+end_src
|
||||
|
||||
** ~org-appear~, to display markup only when it’s actually needed
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-appear
|
||||
:hook
|
||||
(org-mode . org-appear-mode)
|
||||
:custom
|
||||
(org-appear-autosubmarkers t)
|
||||
(org-appear-autolinks t)
|
||||
(org-appear-autoemphasis t))
|
||||
#+end_src
|
||||
|
||||
** ~ob-mermaid~, to generate Mermaid diagrams
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ob-mermaid
|
||||
:custom
|
||||
(ob-mermaid-cli-path "/home/polesz/.local/node/bin/mmdc"))
|
||||
#+end_src
|
||||
|
||||
** ~plantuml-mode~ to edit PlantUML files in and out of Org documents
|
||||
|
||||
Before using this, make sure the latest PlantUML JAR file is downloaded into the downloads
|
||||
directory. It is available from [[http://plantuml.com/download][here]].
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package plantuml-mode
|
||||
:init
|
||||
(setq plantuml-jar-path
|
||||
(expand-file-name
|
||||
;; Make sure we have a download location even if XDG is not working
|
||||
(cond
|
||||
((xdg-user-dir "DOWNLOAD")
|
||||
(expand-file-name "plantuml.jar" (xdg-user-dir "DOWNLOAD")))
|
||||
(t
|
||||
"~/Downloads/plantuml.jar"))))
|
||||
(defvaralias 'org-plantuml-jar-path 'plantuml-jar-path)
|
||||
:config
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((plantuml . t))))
|
||||
#+end_src
|
||||
|
||||
** ~ox-rst~ to export to ReSTructured text
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package ox-rst
|
||||
:after org)
|
||||
#+end_src
|
||||
|
||||
** ~orgit~ and ~orgit-forge~ to store link to Git stuff
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package orgit
|
||||
:after magit org)
|
||||
|
||||
(use-package orgit-forge
|
||||
:after magit org orgit)
|
||||
#+end_src
|
||||
|
||||
* Mailing
|
||||
|
||||
** Set up whitespace handling in mu4e buffers
|
||||
|
351
init.el
351
init.el
@ -855,6 +855,357 @@ order."
|
||||
(use-package rg
|
||||
:commands (rg))
|
||||
|
||||
(use-package outline
|
||||
:ensure nil
|
||||
:custom-face
|
||||
(outline-1 ((t (:inherit font-lock-function-name-face
|
||||
:overline t
|
||||
:weight bold
|
||||
:height 1.2))))
|
||||
(outline-2 ((t (:inherit font-lock-variable-name-face
|
||||
:overline t
|
||||
:weight bold
|
||||
:height 1.1))))
|
||||
(outline-3 ((t (:inherit font-lock-keyword-face
|
||||
:overline t
|
||||
:weight bold)))))
|
||||
|
||||
(defun gpolonkai/setup-org-mode ()
|
||||
"Setup Org related variables."
|
||||
(org-indent-mode 1)
|
||||
(variable-pitch-mode 1)
|
||||
(auto-fill-mode 0)
|
||||
(visual-line-mode 1))
|
||||
|
||||
;; From @suckless_shill:matrix.org (viz) in the #org-mode:matrix.org Matrix room
|
||||
|
||||
(defun vz/org-fontify-horizontal-break ()
|
||||
"Display Org’s horizontal break (-----) as a full-width horizontal line."
|
||||
(push '("^[[:space:]]*\\(------*\\)\n"
|
||||
(0 (progn
|
||||
(put-text-property (match-beginning 1) (match-end 1)
|
||||
'display (make-string
|
||||
(- (match-end 1)
|
||||
(match-beginning 1))
|
||||
?\s))
|
||||
(put-text-property (match-beginning 1) (match-end 0)
|
||||
'face '(:strike-through t :extend t)))))
|
||||
org-font-lock-extra-keywords)
|
||||
(setq-local font-lock-extra-managed-props
|
||||
(cons 'display font-lock-extra-managed-props)))
|
||||
|
||||
(add-hook 'org-font-lock-set-keywords-hook #'vz/org-fontify-horizontal-break)
|
||||
|
||||
(use-package org
|
||||
:demand
|
||||
:custom-face
|
||||
(org-block ((t (:inherit fixed-pitch))))
|
||||
(org-code ((t (:inherit (shadow fixed-pitch)))))
|
||||
(org-indent ((t (:inherit (org-hide fixed-pitch)))))
|
||||
(org-verbatim ((t (:inherit (shadow fixed-pitch)))))
|
||||
(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch)))))
|
||||
(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch)))))
|
||||
(org-checkbox ((t (:inherit fixed-pitch))))
|
||||
(org-table ((t (:inherit (shadow fixed-pitch)))))
|
||||
(org-_drawer ((t (:inherit (shadow fixed-pitch)))))
|
||||
:init
|
||||
(require 'xdg-paths)
|
||||
(defface org-checkbox-todo-text
|
||||
'((t (:inherit org-todo)))
|
||||
"Face for the text part of an unchecked org-mode checkbox.")
|
||||
(defface org-checkbox-done-text
|
||||
'((t (:inherit org-done)))
|
||||
"Face for the text part of a checked org-mode checkbox.")
|
||||
(font-lock-add-keywords
|
||||
'org-mode
|
||||
`(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?: \\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 1 'org-checkbox-todo-text prepend))
|
||||
'append)
|
||||
(font-lock-add-keywords
|
||||
'org-mode
|
||||
`(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)" 12 'org-checkbox-done-text prepend))
|
||||
'append)
|
||||
(setq-default org-default-notes-file (expand-file-name "notes.org" org-directory)
|
||||
org-agenda-files `(,org-directory)
|
||||
org-time-stamp-formats '("<%Y-%m-%d>" . "<%Y-%m-%d %H:%M>")
|
||||
org-todo-keywords '((sequence "TODO(t)"
|
||||
"DOING(w@/!)"
|
||||
"BLOCKED(b@/!)"
|
||||
"SOMEDAY(s!)"
|
||||
"|"
|
||||
"CANCELED(c@/!)"
|
||||
"REVIEW(r@/!)"
|
||||
"DONE(d@/!)"))
|
||||
org-todo-keyword-faces '(("SOMEDAY" . (:foreground "goldenrod"))
|
||||
("CANCELED" . (:foreground "#228b22"
|
||||
:strike-through t)))
|
||||
org-html-checkbox-types
|
||||
'((unicode (on . "<span class=\"task-done\">☑</span>")
|
||||
(off . "<span class=\"task-todo\">☐</span>")
|
||||
(trans . "<span class=\"task-in-progress\">▣</span>"))))
|
||||
:config
|
||||
;; Load the markdown exporter
|
||||
(require 'ox-md)
|
||||
;; Handle org-protocol:// links
|
||||
(require 'org-protocol)
|
||||
;; Make it possible to encrypt headings
|
||||
(require 'org-crypt)
|
||||
;; Make it possible to use inline tasks
|
||||
(require 'org-inlinetask)
|
||||
;; Make sure we load Python babel stuff
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((python . t)))
|
||||
;; Track habits
|
||||
(require 'org-habit)
|
||||
:custom
|
||||
(org-log-into-drawer t)
|
||||
(org-ellipsis "…#")
|
||||
(org-startup-folded 'content)
|
||||
(org-log-done 'time)
|
||||
(org-src-preserve-indentation t)
|
||||
(org-tags-column 0)
|
||||
(org-startup-indented t)
|
||||
(org-special-ctrl-a/e t)
|
||||
(org-return-follows-link t)
|
||||
(org-src-fontify-natively t)
|
||||
(org-goto-interface 'outline-path-completion)
|
||||
(org-goto-max-level 10)
|
||||
(org-html-checkbox-type 'unicode)
|
||||
(org-src-window-setup 'current-window)
|
||||
(org-pretty-entities t)
|
||||
(org-pretty-entities-include-sub-superscripts t)
|
||||
(org-use-speed-commands t)
|
||||
(org-hide-leading-stars t)
|
||||
(org-enforce-todo-dependencies t)
|
||||
(org-enforce-todo-checkbox-dependencies t)
|
||||
(org-catch-invisible-edits 'show)
|
||||
(org-log-reschedule 'time)
|
||||
(org-log-redeadline 'note)
|
||||
(org-refile-use-outline-path 'file)
|
||||
(org-outline-path-complete-in-steps nil)
|
||||
(org-refile-allow-creating-parent-nodes 'confirm)
|
||||
(org-crypt-key "B0740C4C")
|
||||
(org-speed-commands-user '(("m" . org-mark-subtree)))
|
||||
(org-refile-targets '((nil :maxlevel . 6)
|
||||
(org-agenda-files :maxlevel . 3)))
|
||||
(org-agenda-custom-commands '(("c" "Simple agenda view"
|
||||
((tags "PRIORITY=\"A\""
|
||||
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
|
||||
(org-agenda-overriding-header "High priority unfinished tasks")))
|
||||
(agenda "")
|
||||
(alltodo ""
|
||||
((org-agenda-skip-function
|
||||
'(or (air-org-skip-subtree-if-habit)
|
||||
(air-org-skip-subtree-if-priority ?A)
|
||||
(gpolonkai/org-skip-subtree-if-state "SOMEDAY")
|
||||
(org-agenda-skip-if nil '(scheduled deadline))))
|
||||
(org-agenda-overriding-header "ALL normal priority tasks"))))
|
||||
((org-agenda-compact-blocks t)))))
|
||||
(org-log-note-clock-out t)
|
||||
(org-capture-templates '(("L" "Org-protocol capture" entry
|
||||
(file+headline
|
||||
(lambda ()
|
||||
(expand-file-name "index.org" org-directory))
|
||||
"Captures")
|
||||
"** %:description\n:PROPERTIES:\n:SOURCE: %:link\n:END:\n\n%:initial"
|
||||
:empty-lines 1)
|
||||
("R" "Region to Current Clocked Task" plain
|
||||
(clock)
|
||||
"%i"
|
||||
:immediate-finish t
|
||||
:empty-lines 1)
|
||||
("K" "Kill-ring to Current Clocked Task" plain
|
||||
(clock)
|
||||
"%c"
|
||||
:immediate-finish t
|
||||
:empty-lines 1)
|
||||
("c" "Item to current Clocked Task" item
|
||||
(clock)
|
||||
"%i%?"
|
||||
:empty-lines 1)
|
||||
("g" "GT2 note" entry
|
||||
(file+headline
|
||||
(lambda ()
|
||||
(expand-file-name "gt2-notes.org" org-directory))
|
||||
"Captures")
|
||||
"** %^{Title}\n:PROPERTIES:\n:CREATED: %T\n:END:\n\n%a\n\n%i%?")
|
||||
("p" "Blog post" entry
|
||||
(file+olp+datetree
|
||||
(lambda ()
|
||||
(expand-file-name "blog.org" org-directory)))
|
||||
"* %^{Title} :blog:\n:PROPERTIES:\n:CREATED: %T\n:END:\n\n%i%?")))
|
||||
(org-read-date-force-compatible-dates nil)
|
||||
(org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s")
|
||||
(todo . " %i %-12:c %(concat \"[ \"(org-format-outline-path (org-get-outline-path)) \" ]\") ")
|
||||
(tags . " %i %-12:c %(concat \"[ \"(org-format-outline-path (org-get-outline-path)) \" ]\") ")
|
||||
(timeline . " % s")
|
||||
(search . " %i %-12:c")))
|
||||
(org-agenda-dim-blocked-tasks t)
|
||||
(org-link-descriptive t)
|
||||
(org-hide-emphasis-markers t)
|
||||
(org-agenda-skip-deadline-prewarning-if-scheduled 'pre-scheduled)
|
||||
(org-deadline-warning-days 7)
|
||||
:hook
|
||||
(ediff-select . f-ediff-org-unfold-tree-element)
|
||||
(ediff-unselect . f-ediff-org-fold-tree)
|
||||
(org-mode . gpolonkai/setup-org-mode)
|
||||
:bind
|
||||
(:map gpolonkai/pers-map
|
||||
("a" . gpolonkai/org-agenda-list)
|
||||
("C" . org-capture)
|
||||
("l" . org-store-link)
|
||||
:map org-mode-map
|
||||
("SPC" . gpolonkai/org-space-key)
|
||||
("C-c l" . org-toggle-link-display)
|
||||
("C-a" . gpolonkai/move-to-beginning-of-line)
|
||||
("C-e" . gpolonkai/move-to-end-of-line)
|
||||
("C-c h" . outline-previous-heading)
|
||||
("C-c ." . gpolonkai/org-insert-current-timestamp)
|
||||
("C-c ;" . org-toggle-timestamp-type)))
|
||||
|
||||
(use-package org-roam
|
||||
:after org
|
||||
:ensure t
|
||||
:config
|
||||
(setq org-roam-node-display-template (concat "${title:*} "
|
||||
(propertize "${tags:10}" 'face 'org-tag)))
|
||||
(org-roam-db-autosync-mode)
|
||||
(require 'org-roam-dailies)
|
||||
(require 'org-roam-protocol)
|
||||
:custom
|
||||
(org-roam-directory (file-truename (expand-file-name "roam" org-directory)))
|
||||
(org-roam-dailies-directory (file-truename (expand-file-name "roam/journal" org-directory)))
|
||||
(org-roam-completion-everywhere t)
|
||||
(org-roam-capture-templates '(("d" "default" plain "\n%?"
|
||||
:target (file+head
|
||||
"${slug}-%<%Y%m%d%H%M%S>.org"
|
||||
"#+title: ${title}")
|
||||
:unnarrowed t)))
|
||||
(org-roam-dailies-capture-templates '(
|
||||
("d" "default" entry "* %<%H:%M>: %?"
|
||||
:if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n"))))
|
||||
:bind
|
||||
(("C-c n c" . org-roam-capture)
|
||||
("C-c n g" . org-roam-graph)
|
||||
("C-c n i" . org-roam-node-insert)
|
||||
("C-c n l" . org-roam-buffer-toggle)
|
||||
:map org-mode-map
|
||||
("C-M-i" . completion-at-point)
|
||||
:map org-roam-dailies-map
|
||||
("d" . org-roam-dailies-capture-date)
|
||||
("j" . org-roam-dailies-capture-today)
|
||||
("Y" . org-roam-dailies-capture-yesterday)
|
||||
("T" . org-roam-dailies-capture-tomorrow))
|
||||
:bind-keymap
|
||||
("C-c n d" . org-roam-dailies-map))
|
||||
|
||||
(use-package org-roam-timestamps
|
||||
:after org-roam
|
||||
:config
|
||||
(org-roam-timestamps-mode)
|
||||
:custom
|
||||
(org-roam-timestamps-remember-timestamps t)
|
||||
(org-roam-timestamps-timestamp-parent-file t))
|
||||
|
||||
(use-package org-roam-ui
|
||||
:after org-roam
|
||||
:custom
|
||||
(org-roam-ui-sync-theme t)
|
||||
(org-roam-ui-follow t)
|
||||
(org-roam-ui-update-on-save t)
|
||||
(org-roam-ui-open-on-start nil))
|
||||
|
||||
(use-package org-bullets
|
||||
:custom
|
||||
(org-bullets-face-name 'org-bullet-face)
|
||||
(org-bullets-bullet-list '("✙" "♱" "♰" "☥" "✞" "✟" "✝" "†" "✠" "✚" "✜" "✛" "✢" "✣" "✤" "✥"))
|
||||
:hook
|
||||
(org-mode . org-bullets-mode))
|
||||
|
||||
(use-package org-sticky-header
|
||||
:custom
|
||||
(org-sticky-header-full-path 'full)
|
||||
:hook
|
||||
(org-mode . org-sticky-header-mode))
|
||||
|
||||
(use-package org-random-todo
|
||||
:demand
|
||||
:config
|
||||
;; Don’t bug me too often…
|
||||
(setq org-random-todo-how-often 3600)
|
||||
:custom
|
||||
(org-random-todo-skip-keywords '("SOMEDAY"))
|
||||
:bind
|
||||
(:map gpolonkai/pers-map
|
||||
("r" . org-random-todo)))
|
||||
|
||||
(use-package org-autolist
|
||||
:hook
|
||||
(org-mode . org-autolist-mode))
|
||||
|
||||
(use-package secretaria
|
||||
:after
|
||||
alert
|
||||
:hook
|
||||
;; use this for getting a reminder every 30 minutes of those tasks
|
||||
;; scheduled for today and which have no time of day defined.
|
||||
(after-init . secretaria-unknown-time-always-remind-me))
|
||||
|
||||
(use-package org-clock-waybar
|
||||
:ensure nil
|
||||
:vc (:url "https://gitea.polonkai.eu/gergely/org-clock-waybar.git")
|
||||
:config
|
||||
(org-clock-waybar-setup))
|
||||
|
||||
(use-package consult-org-roam
|
||||
:config
|
||||
(consult-org-roam-mode)
|
||||
:bind (:map goto-map
|
||||
("r" . consult-org-roam-search)
|
||||
:map global-map
|
||||
("C-c n f" . consult-org-roam-file-find)))
|
||||
|
||||
(use-package org-appear
|
||||
:hook
|
||||
(org-mode . org-appear-mode)
|
||||
:custom
|
||||
(org-appear-autosubmarkers t)
|
||||
(org-appear-autolinks t)
|
||||
(org-appear-autoemphasis t))
|
||||
|
||||
(use-package ob-mermaid
|
||||
:custom
|
||||
(ob-mermaid-cli-path "/home/polesz/.local/node/bin/mmdc"))
|
||||
|
||||
;; Before using this, make sure the latest PlantUML JAR file is downloaded into
|
||||
;; the downloads directory. It is available from here:
|
||||
;; http://plantuml.com/download
|
||||
|
||||
(use-package plantuml-mode
|
||||
:init
|
||||
(setq plantuml-jar-path
|
||||
(expand-file-name
|
||||
;; Make sure we have a download location even if XDG is not working
|
||||
(cond
|
||||
((xdg-user-dir "DOWNLOAD")
|
||||
(expand-file-name "plantuml.jar" (xdg-user-dir "DOWNLOAD")))
|
||||
(t
|
||||
"~/Downloads/plantuml.jar"))))
|
||||
(defvaralias 'org-plantuml-jar-path 'plantuml-jar-path)
|
||||
:config
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((plantuml . t))))
|
||||
|
||||
(use-package ox-rst
|
||||
:after org)
|
||||
|
||||
(use-package orgit
|
||||
:after magit org)
|
||||
|
||||
(use-package orgit-forge
|
||||
:after magit org orgit)
|
||||
|
||||
;; I started moving my configuration to this Org file. It’s easier to document this way.
|
||||
(org-babel-load-file (expand-file-name "configuration.org" user-emacs-directory))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user