From cfa596e97577cdae756bdf6083ead7a5d3c94691 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 11 Oct 2021 10:21:29 +0200 Subject: [PATCH] config/doom: integrate org configs --- .config/doom/config.el | 55 ++++++++++--------- .../doom/snippets/org-mode/reading-list-book | 2 +- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index 3b10760..834a50e 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -180,8 +180,32 @@ Version 2019-11-04 2021-02-16" ;;;; ORG (after! org + ;; Behavior + (set-file-template! 'org-mode :ignore t) + (setq org-read-date-prefer-future nil) + + ;; Visuals + ; https?[0-z.\/-]*\.(png|jpg)\?[^?]* + (setq org-image-actual-width nil) + (setq org-ellipsis "↴") + + ;; Org startup - https://orgmode.org/manual/In_002dbuffer-Settings.html + (setq org-startup-folded 'show2levels + org-display-remote-inline-images 'cache) + + ;; Fix xdg-open & pdfs - https://depp.brause.cc/dotemacs/#orgd97f08c + (setq org-file-apps '((remote . emacs) + ("\\.pdf\\'" . default) + (auto-mode . emacs) + (directory . emacs) + (system . "setsid -w xdg-open %s") + (t . system))) + + ;; Automated logging for todos - https://stackoverflow.com/questions/12262220/add-created-date-property-to-todos-in-org-mode/52815573#52815573 + (setq org-log-done 'time + org-log-into-drawer t + org-treat-insert-todo-heading-as-state-change t) - (setq org-ascii-text-width 999999) ;; https://stackoverflow.com/a/32353255/6723250 (defun org-convert-csv-table (beg end) ; convert csv to org-table considering "12,12" @@ -314,6 +338,7 @@ Version 2019-11-04 2021-02-16" org-export-with-todo-keywords nil org-export-with-toc nil org-export-with-section-numbers nil + org-ascii-text-width 999999 ) (add-to-list 'org-latex-classes @@ -328,36 +353,12 @@ Version 2019-11-04 2021-02-16" (require 'ox-extra) (ox-extras-activate '(ignore-headlines)) ) - -;; Behavior -(set-file-template! 'org-mode :ignore t) -(setq org-read-date-prefer-future nil) - -;; Visuals -; https?[0-z.\/-]*\.(png|jpg)\?[^?]* -(setq org-image-actual-width nil) -(setq org-ellipsis "↴") - -;; Org startup - https://orgmode.org/manual/In_002dbuffer-Settings.html -(setq org-startup-folded 'show2levels - org-display-remote-inline-images 'cache) - -;; Fix xdg-open & pdfs - https://depp.brause.cc/dotemacs/#orgd97f08c -(setq org-file-apps '((remote . emacs) - ("\\.pdf\\'" . default) - (auto-mode . emacs) - (directory . emacs) - (system . "setsid -w xdg-open %s") - (t . system))) ;; https://discord.com/channels/406534637242810369/406554085794381833/814175445004189706 +;; Fix xdg-open after setting process-connection-type +;(setq process-connection-type nil) ;(after! org ; (add-to-list 'org-file-apps '(system . "setsid -w xdg-open %s")) -;; Automated logging for todos - https://stackoverflow.com/questions/12262220/add-created-date-property-to-todos-in-org-mode/52815573#52815573 -(setq org-log-done 'time - org-log-into-drawer t - org-treat-insert-todo-heading-as-state-change t) - ;;;; PACKAGES (map! :map special-mode-map diff --git a/.config/doom/snippets/org-mode/reading-list-book b/.config/doom/snippets/org-mode/reading-list-book index f367d60..dd22175 100644 --- a/.config/doom/snippets/org-mode/reading-list-book +++ b/.config/doom/snippets/org-mode/reading-list-book @@ -6,7 +6,7 @@ $1 :PROPERTIES: :Author: ${2:+} -:LibErlangen: https://stadtbibliothek-recherche.erlangen.de/Mediensuche/Einfache-Suche?search=${1:$(replace-regexp-in-string " " "+" yas-text)}+${2:$(replace-regexp-in-string " " "+" yas-text)}&top=y&facets=v_____Sachb%C3%BCcher%7CJugendsachbuch%7CJugendroman%7CBuch+Romane%7CSachb%C3%BCcher+Weih.%2fOst&facetsc=_____15&pagesize=20 +:LibErlangen: https://stadtbibliothek-recherche.erlangen.de/Mediensuche/Einfache-Suche?search=${1:$(replace-regexp-in-string " " "+" yas-text)}+${2:$(replace-regexp-in-string " " "+" yas-text)}&top=y&facets=v_____Sachb%C3%BCcher%7CJugendsachbuch%7CJugendroman%7CBuch+Romane%7CSachb%C3%BCcher+Weih.%2fOst%7CSachbuch+Computer&facetsc=_____15&pagesize=20 :Medimops: https://www.medimops.de/produkte-C0/?fcIsSearch=1&searchparam=${1:$(replace-regexp-in-string " " "+" yas-text)}+${2:$(replace-regexp-in-string " " "+" yas-text)} :Ebay: https://www.ebay.de/sch/i.html?_nkw=${1:$(replace-regexp-in-string " " "+" yas-text)}+${2:$(replace-regexp-in-string " " "+" yas-text)}&_sop=15 :Amazon: https://smile.amazon.de/s?k=${1:$(replace-regexp-in-string " " "+" yas-text)}+${2:$(replace-regexp-in-string " " "+" yas-text)}&rh=n%3A186606