From 3967d6001b3f3e6355b146a2162ba27b49958712 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 18 Dec 2020 16:10:06 -0500 Subject: [PATCH] Comment/docstring revision --- core/core-editor.el | 4 ++-- modules/lang/org/config.el | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index a7e099763..b120f62e5 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -108,7 +108,7 @@ possible." ;; the purpose of a failsafe. This adds the risk of losing the data we ;; just deleted, but I believe that's VCS's jurisdiction, not ours. auto-save-include-big-deletions t - ;; ...but have directories set up in case we use it. + ;; Keep it out of `doom-emacs-dir' or the local directory. auto-save-list-file-prefix (concat doom-cache-dir "autosave/") tramp-auto-save-directory (concat doom-cache-dir "tramp-autosave/") auto-save-file-name-transforms @@ -119,7 +119,7 @@ possible." (add-hook! 'after-save-hook (defun doom-guess-mode-h () - "Guess mode when saving a file in `fundamental-mode'." + "Guess major mode when saving a file in `fundamental-mode'." (when (eq major-mode 'fundamental-mode) (let ((buffer (or (buffer-base-buffer) (current-buffer)))) (and (buffer-file-name buffer) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index fbcb152ab..6119d061b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -582,8 +582,7 @@ eldoc string." (add-hook! 'org-agenda-finalize-hook (defun +org-exclude-agenda-buffers-from-workspace-h () - "Prevent temporary agenda buffers being associated with current -workspace." + "Don't associate temporary agenda buffers with current workspace." (when (and org-agenda-new-buffers (bound-and-true-p persp-mode) (not org-agenda-sticky)) @@ -592,11 +591,12 @@ workspace." (get-current-persp) nil)))) (defun +org-defer-mode-in-agenda-buffers-h () - "Org agenda opens temporary agenda incomplete org-mode buffers. -These are great for extracting agenda information from, but what if the user -tries to visit one of these buffers? Then we remove it from the to-be-cleaned -queue and restart `org-mode' so they can grow up to be full-fledged org-mode -buffers." + "`org-agenda' opens temporary, incomplete org-mode buffers. +I've disabled a lot of org-mode's startup processes for these invisible buffers +to speed them up (in `+org--exclude-agenda-buffers-from-recentf-a'). However, if +the user tries to visit one of these buffers they'll see a gimped, half-broken +org buffer. To avoid that, restart `org-mode' when they're switched to so they +can grow up to be fully-fledged org-mode buffers." (dolist (buffer org-agenda-new-buffers) (with-current-buffer buffer (add-hook 'doom-switch-buffer-hook #'+org--restart-mode-h