From e47856126d4114cfcef6fa1a2cf3d6fc94b5e7ff Mon Sep 17 00:00:00 2001 From: Frieder Schlesier Date: Mon, 3 Oct 2022 13:43:35 +0200 Subject: [PATCH] spacemacs: move org config to separate file --- .spacemacs | 127 ++------------------------------------------ spacemacs-custom.el | 123 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 123 deletions(-) create mode 100644 spacemacs-custom.el diff --git a/.spacemacs b/.spacemacs index 75c7e60..580efa8 100644 --- a/.spacemacs +++ b/.spacemacs @@ -573,129 +573,10 @@ you should place your code here." auto-completion-enable-snippets-in-popup t auto-completion-enable-help-tooltip t))) (with-eval-after-load 'org - (setq org-roam-directory (file-truename "~/org-roam")) - (org-roam-db-autosync-mode) - (require 'ox-publish) - (require 'ox-rss) - (setq org-export-html-coding-system 'utf-8-unix) - (setq org-html-doctype "html5") - (defvar fschlde-html-head "") - (setq fschlde-html-footer " ") - (setq org-publish-project-alist - '(("website" - :components ("org-journal", "project-notes", "org-sites", "blog-rss", "blog-images")) - ("org-journal" - :base-directory "~/Documents/Org/" - :base-extension "org" - :publishing-directory "~/projects/blog-fschlde/reads/" - :recursive nil - :publishing-function org-html-publish-to-html - - :headline-levels 4 - :with-author t - :with-creator nil - :with-date t - - :with-toc t - :with-drawers nil - - :html-link-home "/" - :html-head nil ;; cleans up anything that would have been in there. - ;; :html-head-extra ,my-blog-extra-head - :html-head-include-default-style nil - :html-head-include-scripts nil - - ;; :html-preamble my-blog-header - ;; :html-postamble ,my-blog-footer - ) - ("project-notes" - :base-directory "~/projects/" - :base-extension "org" - :publishing-directory "~/projects/blog-fschlde/projects/" - :recursive nil - :publishing-function org-html-publish-to-html - :headline-levels 4) - ("org-sites" - :base-directory "~/projects/fschlde-static/" - :base-extension "org" - :publishing-directory "~/projects/fschlde-static/" - :recursive t - :publishing-function org-html-publish-to-html - - :html-link-home "/" - ;; :html-head ,fschlde-html-head ;; cleans up anything that would have been in there. - :html-head-include-default-style nil - :html-head-include-scripts nil - :with-drawers nil - :with-creator nil - - ;; :html-head-extra fschlde-html-head - ;; :html-postamble fschlde-html-footer - :headline-levels 4) - ) - ) - (setq org-default-notes-file "~/Documents/Org/tasks.org") - (setq org-agenda-files - (quote ("~/Documents/Org/tasks.org" - "~/Documents/Org/journal.org" - "~/Documents/Org/private.org" - "~/Documents/Org/projects.org" - "~/Documents/Org/watchlist.org" - "~/Documents/Org/birthdays.org"))) - - (defun fschl/create-org-letter () - "Create a new letter in ~/Documents/letters/ with filename and date" - (interactive) - (let ((name (read-string "Filename: "))) - (expand-file-name (format "%s.org" name) "~/Documents/letters/") )) - - ;; https://orgmode.org/manual/Template-elements.html - ;; https://orgmode.org/manual/Template-expansion.html - (setq org-capture-templates - '(("t" "todo list item" entry - (file+olp+datetree "~/Documents/Org/tasks.org") - "* TODO %?\n SCHEDULED: %^T" - :tree-type month - ) - ("T" "todo list item with source" entry - (file+olp+datetree "~/Documents/Org/tasks.org") - "* TODO %?\n %a \n SCHEDULED: %^T \n %^G \n" - :tree-type month - ) - - ("r" "Todo research some website/software" entry - (file+olp+datetree "~/Documents/Org/tasks.org") - "* TODO %?\n SCHEDULED: %^T \n %^L \n" - :tree-type month - ) - ("l" "letter to Documents/letters/" - entry (file fschl/create-org-letter) - "* %? \n\n * \n\n " - ) - ("m" "Schedule a meeting" entry - (file+headline "~/Documents/Org/tasks.org") - "* MEETING %?\n SCHEDULED: %^T\n %a" - ) - - ("p" "Schedule a phone call" entry - (file+headline "~/Documents/Org/tasks.org") - "* PHONE %?\n SCHEDULED: %^T\\n %a" - ) - - ("a" "Articles: keep notes of online articles" - entry - (file+datetree "~/Documents/Org/journal.org") - "* %? \n%x \n %u\n- $?" - :tree-type month - :kill-buffer t - :empty-lines-before 1) - ) - ) - -) - (setq org-ref-default-bibliography '("~/Documents/WHZ/MA/latex/references.bib") - org-ref-pdf-directory "~/Documents/WHZ/MA/references/" - org-ref-bibliography-notes "~/Documents/WHZ/MA/notes.org") + (when (file-exists-p "~/dotfiles/spacemacs-custom.el") + (load-file "~/dotfiles/spacemacs-custom.el") + ) + ) ) ;; Do not write anything past this comment. This is where Emacs will diff --git a/spacemacs-custom.el b/spacemacs-custom.el new file mode 100644 index 0000000..f088489 --- /dev/null +++ b/spacemacs-custom.el @@ -0,0 +1,123 @@ + +(setq org-roam-directory (file-truename "~/org-roam")) +(org-roam-db-autosync-mode) +(require 'ox-publish) +(require 'org-projectile) +(setq org-export-html-coding-system 'utf-8-unix) +(setq org-html-doctype "html5") +(defvar fschlde-html-head "") +(setq fschlde-html-footer "
\nfschl.de 2018-2022\n
") +(setq org-publish-project-alist + '(("website" + :components ("org-journal", "project-notes", "org-sites", "blog-rss", "blog-images")) + ("org-journal" + :base-directory "~/Documents/Org/" + :base-extension "org" + :publishing-directory "~/projects/blog-fschlde/reads/" + :recursive nil + :publishing-function org-html-publish-to-html + + :headline-levels 4 + :with-author t + :with-creator nil + :with-date t + + :with-toc t + :with-drawers nil + + :html-link-home "/" + :html-head nil ;; cleans up anything that would have been in there. + ;; :html-head-extra ,my-blog-extra-head + :html-head-include-default-style nil + :html-head-include-scripts nil + + ;; :html-preamble my-blog-header + ;; :html-postamble ,my-blog-footer + ) + ("project-notes" + :base-directory "~/projects/" + :base-extension "org" + :publishing-directory "~/projects/blog-fschlde/projects/" + :recursive nil + :publishing-function org-html-publish-to-html + :headline-levels 4) + ("org-sites" + :base-directory "~/projects/fschlde-static/" + :base-extension "org" + :publishing-directory "~/projects/fschlde-static/" + :recursive t + :publishing-function org-html-publish-to-html + + :html-link-home "/" + ;; :html-head ,fschlde-html-head ;; cleans up anything that would have been in there. + :html-head-include-default-style nil + :html-head-include-scripts nil + :with-drawers nil + :with-creator nil + + ;; :html-head-extra fschlde-html-head + ;; :html-postamble fschlde-html-footer + :headline-levels 4) + ) + ) +(setq org-default-notes-file "~/Documents/Org/tasks.org") +(setq org-agenda-files + (quote ("~/Documents/Org/tasks.org" + "~/Documents/Org/journal.org" + "~/Documents/Org/private.org" + "~/Documents/Org/projects.org" + "~/Documents/Org/watchlist.org" + "~/Documents/Org/birthdays.org"))) + +(defun fschl/create-org-letter () + "Create a new letter in ~/Documents/letters/ with filename and date" + (interactive) + (let ((name (read-string "Filename: "))) + (expand-file-name (format "%s.org" name) "~/Documents/letters/") )) + +;; https://orgmode.org/manual/Template-elements.html +;; https://orgmode.org/manual/Template-expansion.html +(setq org-capture-templates + '(("t" "todo list item" entry + (file+olp+datetree "~/Documents/Org/tasks.org") + "* TODO %?\n SCHEDULED: %^T" + :tree-type month + ) + ("T" "todo list item with source" entry + (file+olp+datetree "~/Documents/Org/tasks.org") + "* TODO %?\n %a \n SCHEDULED: %^T \n %^G \n" + :tree-type month + ) + + ("r" "Todo research some website/software" entry + (file+olp+datetree "~/Documents/Org/tasks.org") + "* TODO %?\n SCHEDULED: %^T \n %^L \n" + :tree-type month + ) + ("l" "letter to Documents/letters/" + entry (file fschl/create-org-letter) + "* %? \n\n * \n\n " + ) + ("m" "Schedule a meeting" entry + (file+headline "~/Documents/Org/tasks.org") + "* MEETING %?\n SCHEDULED: %^T\n %a" + ) + + ("p" "Schedule a phone call" entry + (file+headline "~/Documents/Org/tasks.org") + "* PHONE %?\n SCHEDULED: %^T\\n %a" + ) + + ("a" "Articles: keep notes of online articles" + entry + (file+datetree "~/Documents/Org/journal.org") + "* %? \n%x \n %u\n- $?" + :tree-type month + :kill-buffer t + :empty-lines-before 1) + ) + ) + +(setq org-ref-default-bibliography '("~/Documents/WHZ/MA/latex/references.bib") + org-ref-pdf-directory "~/Documents/WHZ/MA/references/" + org-ref-bibliography-notes "~/Documents/WHZ/MA/notes.org")