From 9647cb0a496600dd9a318471c94ae8b0210cf143 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 19 Dec 2019 17:29:36 -0500 Subject: [PATCH] lang/org: add +brain feature No keybinding yet. --- docs/index.org | 2 +- modules/lang/org/README.org | 1 + modules/lang/org/config.el | 1 + modules/lang/org/contrib/brain.el | 21 +++++++++++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 modules/lang/org/contrib/brain.el diff --git a/docs/index.org b/docs/index.org index aec556773b1..a623084dea0 100644 --- a/docs/index.org +++ b/docs/index.org @@ -197,7 +197,7 @@ Modules that bring support for a language or group of languages to Emacs. + [[file:../modules/lang/nim/README.org][nim]] - TODO + nix - TODO + [[file:../modules/lang/ocaml/README.org][ocaml]] =+lsp= - TODO -+ [[file:../modules/lang/org/README.org][org]] =+dragndrop +gnuplot +hugo +ipython +journal +jupyter +pandoc +pomodoro +present= - TODO ++ [[file:../modules/lang/org/README.org][org]] =+brain +dragndrop +gnuplot +hugo +ipython +journal +jupyter +pandoc +pomodoro +present= - TODO + [[file:../modules/lang/perl/README.org][perl]] - TODO + [[file:../modules/lang/php/README.org][php]] =+lsp= - TODO + plantuml - TODO diff --git a/modules/lang/org/README.org b/modules/lang/org/README.org index 66104eb1d20..4ae9b568299 100644 --- a/modules/lang/org/README.org +++ b/modules/lang/org/README.org @@ -52,6 +52,7 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode #+end_quote ** Module Flags ++ =+brain= Enables [[https://github.com/Kungsgeten/org-brain][org-brain]] integration. + =+dragndrop= Enables drag-and-drop support for images and files; inserts inline previews for images and an icon+link for other media types. + =+gnuplot= Installs gnuplot & gnuplot-mode, which enables rendering images diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index d8eba297cac..78fb0e5384b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -995,6 +995,7 @@ compelling reason, so..." #'+org-init-smartparens-h) ;;; Custom org modules + (if (featurep! +brain) (load! "contrib/brain")) (if (featurep! +dragndrop) (load! "contrib/dragndrop")) (if (featurep! +ipython) (load! "contrib/ipython")) (if (featurep! +journal) (load! "contrib/journal")) diff --git a/modules/lang/org/contrib/brain.el b/modules/lang/org/contrib/brain.el new file mode 100644 index 00000000000..0193102846f --- /dev/null +++ b/modules/lang/org/contrib/brain.el @@ -0,0 +1,21 @@ +;;; lang/org/contrib/brain.el -*- lexical-binding: t; -*- +;;;###if (featurep! +brain) + +(use-package! org-brain + :defer t + :init + (setq org-id-track-globally t + org-id-locations-file (concat doom-etc-dir "org-id-locations") + org-brain-visualize-default-choices 'all + org-brain-title-max-length 24 + org-brain-include-file-entries nil + org-brain-file-entries-use-title nil) + + :config + (set-evil-initial-state! 'org-brain-visualize-mode 'emacs) + (set-popup-rule! "^\\*org-brain" :side 'right :size 1.00 :select t :ttl nil) + + (cl-pushnew '("b" "Brain" plain (function org-brain-goto-end) + "* %i%?" :empty-lines 1) + org-capture-templates + :key #'car :test #'equal))