diff --git a/site-lisp/db-org.el b/site-lisp/db-org.el index 3570f35..c91d991 100644 --- a/site-lisp/db-org.el +++ b/site-lisp/db-org.el @@ -28,7 +28,9 @@ org-M-RET-may-split-line '((default . nil)) org-highlight-latex-and-related '(latex) org-use-sub-superscripts '{} - org-export-with-sub-superscripts '{}) + org-export-with-sub-superscripts '{} + org-src-fontify-natively t + org-src-preserve-indentation t) (bind-key [remap org-return] 'org-return-indent org-mode-map) @@ -66,6 +68,30 @@ (setq org-columns-default-format "%80ITEM(Task) %10Effort(Effort){:} %10CLOCKSUM") +(setq org-structure-template-alist + '(("s" "#+begin_src ?\n\n#+end_src" "\n\n") + ("e" "#+begin_example\n?\n#+end_example" "\n?\n") + ("q" "#+begin_quote\n?\n#+end_quote" "\n?\n") + ("Q" "#+begin_equation\n?\n#+end_equation" + "\n?\n") + ("v" "#+begin_verse\n?\n#+end_verse" "\n?\n") + ("V" "#+begin_verbatim\n?\n#+end_verbatim" "\n?\n") + ("c" "#+begin_center\n?\n#+end_center" "
\n?\n
") + ("l" "#+begin_latex\n?\n#+end_latex" + "\n?\n") + ("l" "#+latex: " "?") + ("h" "#+begin_html\n?\n#+end_html" + "\n?\n") + ("h" "#+html: " "?") + ("a" "#+begin_ascii\n?\n#+end_ascii" "") + ("a" "#+ascii: " "") + ("i" "#+index: ?" "#+index: ?") + ("i" "#+include: %file ?" + ""))) + + +;;; How to open files and links + ;; open directory links in emacs itself (add-to-list 'org-file-apps '(directory . emacs)) @@ -74,6 +100,13 @@ (add-to-list 'org-file-apps '("\\.pptx\\'" . system)) (add-to-list 'org-file-apps '("\\.xlsx\\'" . system)) +(when (eq system-type 'windows-nt) + (org-link-set-parameters "onenote" :follow #'db/org-onenote-open) + + (defun db/org-onenote-open (path) + "Visit OneNote document on PATH." + (start-process "OneNote" nil "OneNote" "/hyperlink" path))) + ;;; Faces @@ -718,33 +751,6 @@ _y_: ?y? year _q_: quit _L__l__c_: ?l? (setq org-refile-target-verify-function 'db/verify-refile-target) - -;;; Babel - -(setq org-structure-template-alist - '(("s" "#+begin_src ?\n\n#+end_src" "\n\n") - ("e" "#+begin_example\n?\n#+end_example" "\n?\n") - ("q" "#+begin_quote\n?\n#+end_quote" "\n?\n") - ("Q" "#+begin_equation\n?\n#+end_equation" - "\n?\n") - ("v" "#+begin_verse\n?\n#+end_verse" "\n?\n") - ("V" "#+begin_verbatim\n?\n#+end_verbatim" "\n?\n") - ("c" "#+begin_center\n?\n#+end_center" "
\n?\n
") - ("l" "#+begin_latex\n?\n#+end_latex" - "\n?\n") - ("l" "#+latex: " "?") - ("h" "#+begin_html\n?\n#+end_html" - "\n?\n") - ("h" "#+html: " "?") - ("a" "#+begin_ascii\n?\n#+end_ascii" "") - ("a" "#+ascii: " "") - ("i" "#+index: ?" "#+index: ?") - ("i" "#+include: %file ?" - ""))) - -(setq org-src-fontify-natively t - org-src-preserve-indentation t) - ;;; Reset checklists @@ -924,17 +930,6 @@ Current Task: %`org-clock-current-task; " (org-todo 'done) (org-save-all-org-buffers))))))) - - -;;; Custom links for Windows - -(when (eq system-type 'windows-nt) - (org-link-set-parameters "onenote" :follow #'db/org-onenote-open) - - (defun db/org-onenote-open (path) - "Visit OneNote document on PATH." - (start-process "OneNote" nil "OneNote" "/hyperlink" path))) - ;;; Drag-and-Drop images into org-mode buffer