;; (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
(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