lang/org: major refactor

The motivation for this change was to rethink lang/org's flags. Many of
its former flags represented non-features. Therefore, its flags have
been reduced to five: +dragndrop, +ipython, +pandoc, +gnuplot and
+present. Everything else is included as org-load-hooks and treated as
reasonable defaults.

Other changes:
- Fixes #1502: don't autopair certain pairs when in a math region
- Fixes #1483: broken localleader in org-agenda
- Adds gnuplot support #1108
- Doom's org submodules have been moved into lang/org/contrib/, because
  I expect there will be *many* more to come, and I don't want to
  pollute the moudle's root.
This commit is contained in:
Henrik Lissner 2019-06-28 16:53:26 +02:00
parent 9752cc005c
commit 11bfb17894
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
17 changed files with 972 additions and 809 deletions

View file

@ -1,5 +1,4 @@
;;; lang/org/autoload/org-capture.el -*- lexical-binding: t; -*-
;;;###if (featurep! +capture)
(defvar org-capture-initial)
@ -29,12 +28,12 @@
(frame-parameter nil 'transient)))
;;;###autoload
(defun +org-capture/open-frame (&optional string key)
(defun +org-capture/open-frame (&optional initial-input key)
"Opens the org-capture window in a floating frame that cleans itself up once
you're done. This can be called from an external shell script."
(interactive)
(when (and string (string-empty-p string))
(setq string nil))
(when (and initial-input (string-empty-p initial-input))
(setq initial-input nil))
(when (and key (string-empty-p key))
(setq key nil))
(let* ((frame-title-format "")
@ -47,7 +46,7 @@ you're done. This can be called from an external shell script."
(cl-letf (((symbol-function #'pop-to-buffer)
(symbol-function #'switch-to-buffer)))
(switch-to-buffer (doom-fallback-buffer))
(let ((org-capture-initial string)
(let ((org-capture-initial initial-input)
org-capture-entry)
(when (and key (not (string-empty-p key)))
(setq org-capture-entry (org-capture-select-template key)))