From: Eshel Yaron Date: Mon, 10 Oct 2022 15:34:55 +0000 (+0300) Subject: Update esy.org X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d8c428880bbee1e88f45820764c0fc08e4361432;p=dotfiles.git Update esy.org --- diff --git a/.emacs.d/esy.org b/.emacs.d/esy.org index 43078d4..f0d9437 100644 --- a/.emacs.d/esy.org +++ b/.emacs.d/esy.org @@ -141,7 +141,8 @@ For further information about Elisp headers, see [[info:elisp#Library ;; (load-theme 'modus-vivendi) (setq ef-themes-mixed-fonts t - ef-themes-variable-pitch-ui t) + ef-themes-variable-pitch-ui t + ef-themes-to-toggle '(ef-bio ef-frost)) (mapc #'disable-theme custom-enabled-themes) (load-theme 'ef-bio :no-confirm) #+end_src @@ -451,20 +452,33 @@ refiling directly into deeper headings as well. (interactive "d\nMCUSTOM_ID: ") (org-entry-put point "CUSTOM_ID" value)) + (defun esy/org-fill-description (point value) + "Set DESCRIPTION to VALUE interactively for the entry at POINT." + (interactive "d\nMDESCRIPTION: ") + (org-entry-put point "DESCRIPTION" value)) + (defun esy/org-maybe-prompt-custom-id () "Prompt for CUSTOM_ID if not set for the entry at POINT." - (unless (org-entry-get (point) "CUSTOM_ID") - (pulse-momentary-highlight-one-line) - (org-cycle) - (call-interactively #'esy/org-fill-custom-id) - (org-global-cycle 1))) + (let ((res 0)) + (unless (and (org-entry-get (point) "DESCRIPTION") + (org-entry-get (point) "CUSTOM_ID")) + (pulse-momentary-highlight-one-line) + (org-cycle) + (unless (org-entry-get (point) "CUSTOM_ID") + (call-interactively #'esy/org-fill-custom-id) + (setq res (1+ res))) + (unless (org-entry-get (point) "DESCRIPTION") + (call-interactively #'esy/org-fill-description) + (setq res (1+ res))) + (org-global-cycle 1)) + res)) (defun esy/org-fill-custom-ids-in-buffer () "Visit headers in the current buffer and set CUSTOM_ID for each." (interactive) (org-global-cycle 1) - (message "Filled %d CUSTOM_ID properties." - (length (remove nil + (message "Filled %d properties." + (apply #'+ (remove nil (org-map-entries #'esy/org-maybe-prompt-custom-id))))) #+end_src