From 7ac07baeb3222e04a4b757105560c542a9f6ee16 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 2 Jan 2022 23:32:06 -0600 Subject: Add +org-capture --- init.el | 159 +++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 83 insertions(+), 76 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index a1efcaf..0866f17 100644 --- a/init.el +++ b/init.el @@ -343,10 +343,93 @@ ;; context-menu-dictionary)) (context-menu-mode +1))) +(setup org + ;; Plain org with the `setup' form for sorting, but I install with straight. + (:straight (org + :type git :host nil + :repo "https://git.savannah.gnu.org/git/emacs/org-mode.git" + :local-repo "org" + :depth full + :pre-build (straight-recipes-org-elpa--build) + :build (:not autoloads) + :files (:defaults + "lisp/*.el" + ("etc/styles/" "etc/styles/*"))) + (org-contrib + :type git :host nil + :repo "https://git.sr.ht/~bzg/org-contrib")) + ;; DO NOT load system-installed org !!! + (setq load-path (cl-remove-if (lambda (path) + (string-match-p "lisp/org\\'" path)) + load-path)) + (:also-load +org + ox-md) + (:option org-adapt-indentation nil + org-archive-mark-done t + org-catch-invisible-edits 'show-and-error + org-clock-clocked-in-display 'mode-line + org-clock-frame-title-format (cons + '(t org-mode-line-string) + (cons " --- " frame-title-format)) + org-clock-string-limit 7 ; just the clock bit + ;; org-clock-string-limit 25 ; gives enough information + org-clock-persist t + org-confirm-babel-evaluate nil + org-cycle-separator-lines 0 + org-directory "~/org" + org-ellipsis "…" + org-export-coding-system 'utf-8-unix + org-export-headline-levels 8 + org-export-with-section-numbers nil + org-export-with-smart-quotes t + org-export-with-sub-superscripts t + org-export-with-toc nil + org-fontify-done-headline t + org-fontify-quote-and-verse-blocks t + org-fontify-whole-heading-line t + org-hide-emphasis-markers t + org-html-coding-system 'utf-8-unix + org-image-actual-width (list (* (window-font-width) + (- fill-column 8))) + org-imenu-depth 3 + org-list-demote-modify-bullet '(("-" . "+") + ("+" . "*") + ("*" . "-")) + org-log-done 'time + org-log-into-drawer t + org-outline-path-complete-in-steps nil + org-pretty-entities t + org-pretty-entities-include-sub-superscripts nil + org-refile-use-outline-path 'file + org-special-ctrl-a/e t + org-special-ctrl-k t + org-src-fontify-natively t + org-src-tab-acts-natively t + org-src-window-setup 'current-window + org-startup-truncated nil + org-startup-with-inline-images t + org-tags-column (- (- fill-column (length org-ellipsis)))) + (:bind "RET" #'+org-return-dwim + "" #'+org-table-copy-down + "C-c C-l" #'+org-insert-link-dwim + "C-c C-n" #'+org-next-heading-widen + "C-c C-p" #'+org-previous-heading-widen) + (:local-hook before-save-hook #'+org-before-save@prettify-buffer) + (advice-add #'org-delete-backward-char :override #'+org-delete-backward-char) + (with-eval-after-load 'org + (org-clock-persistence-insinuate) + (org-link-set-parameters "tel" :follow #'+org-tel-open))) + (setup org-agenda (:option org-agenda-skip-deadline-if-done t) + (add-to-list '+custom-variable-allowlist 'org-agenda-file-regexp) + (add-to-list '+custom-variable-allowlist 'org-agenda-templates) (:+leader "a" #'org-agenda "C-a" #'org-agenda)) +(setup org-capture + (:require +org-capture) + (:+leader "c" #'org-capture "C-c" #'org-capture)) + (setup prog (:local-set comment-auto-fill-only-comments t) (:hook #'prettify-symbols-mode @@ -848,82 +931,6 @@ See also `crux-reopen-as-root-mode'." (setup (:straight orderless) (:option completion-styles '(orderless))) -(setup (:straight (org - :type git :host nil - :repo "https://git.savannah.gnu.org/git/emacs/org-mode.git" - :local-repo "org" - :depth full - :pre-build (straight-recipes-org-elpa--build) - :build (:not autoloads) - :files (:defaults - "lisp/*.el" - ("etc/styles/" "etc/styles/*"))) - (org-contrib - :type git :host nil - :repo "https://git.sr.ht/~bzg/org-contrib")) - ;; DO NOT load system-installed org !!! - (setq load-path (cl-remove-if (lambda (path) - (string-match-p "lisp/org\\'" path)) - load-path)) - (:also-load +org - ox-md) - (:option org-adapt-indentation nil - org-archive-mark-done t - org-catch-invisible-edits 'show-and-error - org-clock-clocked-in-display 'mode-line - org-clock-frame-title-format (cons - '(t org-mode-line-string) - (cons " --- " frame-title-format)) - org-clock-string-limit 7 ; just the clock bit - ;; org-clock-string-limit 25 ; gives enough information - org-clock-persist t - org-confirm-babel-evaluate nil - org-cycle-separator-lines 0 - org-directory "~/org" - org-ellipsis "…" - org-export-coding-system 'utf-8-unix - org-export-headline-levels 8 - org-export-with-section-numbers nil - org-export-with-smart-quotes t - org-export-with-sub-superscripts t - org-export-with-toc nil - org-fontify-done-headline t - org-fontify-quote-and-verse-blocks t - org-fontify-whole-heading-line t - org-hide-emphasis-markers t - org-html-coding-system 'utf-8-unix - org-image-actual-width (list (* (window-font-width) - (- fill-column 8))) - org-imenu-depth 3 - org-list-demote-modify-bullet '(("-" . "+") - ("+" . "*") - ("*" . "-")) - org-log-done 'time - org-log-into-drawer t - org-outline-path-complete-in-steps nil - org-pretty-entities t - org-pretty-entities-include-sub-superscripts nil - org-refile-use-outline-path 'file - org-special-ctrl-a/e t - org-special-ctrl-k t - org-src-fontify-natively t - org-src-tab-acts-natively t - org-src-window-setup 'current-window - org-startup-truncated nil - org-startup-with-inline-images t - org-tags-column (- (- fill-column (length org-ellipsis)))) - (:bind "RET" #'+org-return-dwim - "" #'+org-table-copy-down - "C-c C-l" #'+org-insert-link-dwim - "C-c C-n" #'+org-next-heading-widen - "C-c C-p" #'+org-previous-heading-widen) - (:+leader "c" #'org-capture "C-c" #'org-capture) - (:local-hook before-save-hook #'+org-before-save@prettify-buffer) - (advice-add #'org-delete-backward-char :override #'+org-delete-backward-char) - (with-eval-after-load 'org - (org-clock-persistence-insinuate) - (org-link-set-parameters "tel" :follow #'+org-tel-open))) - (setup (:straight org-appear) (:option org-appear-autoemphasis t org-appear-autoentities t -- cgit 1.4.1-21-gabe81