diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 7b45f74ed..82415c5b5 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -436,12 +436,14 @@ with `org-cycle')." ;;;###autoload (defun +org-unfold-to-2nd-level-or-point-h () - "My version of the 'overview' #+STARTUP option: expand first-level headings. -Expands the first level, but no further. If point was left somewhere deeper, -unfold to point on startup." + "Alters '#+STARTUP overview' to only expand first-level headings. +Expands the first level, but no further. If a different startup option was +provided, do that instead." (unless org-agenda-inhibit-startup + ;; TODO Implement a custom #+STARTUP option? (when (eq org-startup-folded t) (outline-hide-sublevels +org-initial-fold-level)) + ;; If point was left somewhere deeper, unfold to point on startup. (when (outline-invisible-p) (ignore-errors (save-excursion diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 7f482b323..9cb4a0ad3 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -230,8 +230,8 @@ This forces it to read the background before rendering." (require lang nil t)) (add-to-list 'org-babel-load-languages (cons lang t))))) - ;; Lazy load babel packages for exporting (defadvice! +org--export-lazy-load-library-h () + "Lazy load a babel package when a block is executed during exporting." :before #'org-babel-exp-src-block (+org--babel-lazy-load-library-a (org-babel-get-src-block-info)))