Fix misc errors

This commit is contained in:
tim.mccarthy committed 2026-09-09 12:09:05 -07:00
1 parent a9255c2fea
commit 1e497a9bca
1 file changed
+14 -8
+14 -8
View File
@@ -741,7 +741,6 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')."
(org-special-ctrl-a/e 'reversed) (org-special-ctrl-a/e 'reversed)
(org-hide-emphasis-markers t) (org-hide-emphasis-markers t)
(org-use-speed-commands t) (org-use-speed-commands t)
(add-to-list 'org-speed-commands '("h" . org-fold-hide-sublevels))
(org-use-fast-todo-selection 'expert) (org-use-fast-todo-selection 'expert)
(org-todo-keywords '((sequence "TODO(t)" "BLOCKED(b)" "|" "DONE(d)"))) (org-todo-keywords '((sequence "TODO(t)" "BLOCKED(b)" "|" "DONE(d)")))
(org-use-property-inheritance '("STYLE")) (org-use-property-inheritance '("STYLE"))
@@ -751,12 +750,20 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')."
((agenda "" ((org-agenda-span 1))) ((agenda "" ((org-agenda-span 1)))
(todo "TODO" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled 'deadline)))))))) (todo "TODO" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'scheduled 'deadline))))))))
:config :config
(add-to-list 'org-speed-commands '("h" . org-fold-hide-sublevels))
(defun my/org-agenda-today () (defun my/org-agenda-today ()
"Show org agenda for today only." "Show org agenda for today only."
(interactive) (interactive)
(org-agenda nil "d")) (org-agenda nil "d"))
(add-hook 'org-after-todo-state-change-hook #'org-save-all-org-buffers)) (defun my/org-save-current-buffer ()
"Save the current Org file, including when editing an indirect buffer."
(with-current-buffer (or (buffer-base-buffer) (current-buffer))
(when (and buffer-file-name (buffer-modified-p))
(save-buffer))))
(add-hook 'org-after-todo-state-change-hook #'my/org-save-current-buffer))
(use-package org-agenda (use-package org-agenda
:bind (:map org-agenda-mode-map :bind (:map org-agenda-mode-map
@@ -767,8 +774,7 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')."
:config :config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
;; Preload org-mode (and warm up text-mode hooks like jinx) after ;; Preload Org and its mode hooks after packages are available.
;; packages are available on the load-path
(add-hook 'emacs-startup-hook (add-hook 'emacs-startup-hook
(lambda () (lambda ()
(with-temp-buffer (with-temp-buffer
@@ -777,9 +783,9 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')."
(defun my/org-clear-all () (defun my/org-clear-all ()
(interactive) (interactive)
(let ((ast (org-element-parse-buffer)) (let ((ast (org-element-parse-buffer))
;; Temporarily disable org-save-all-org-buffers ;; Save only once after all TODO states have been cleared.
(org-after-todo-state-change-hook (org-after-todo-state-change-hook
(remove #'org-save-all-org-buffers (remove #'my/org-save-current-buffer
org-after-todo-state-change-hook))) org-after-todo-state-change-hook)))
;; Iterate over all headlines in the parsed AST ;; Iterate over all headlines in the parsed AST
(org-element-map ast 'headline (org-element-map ast 'headline
@@ -789,7 +795,7 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')."
(goto-char (org-element-property :begin hl)) (goto-char (org-element-property :begin hl))
(org-todo "")))) (org-todo ""))))
;; Save once at the end ;; Save once at the end
(org-save-all-org-buffers))) (my/org-save-current-buffer)))
;;;; Screenshots for games ;;;; Screenshots for games
;; Steps to set up: ;; Steps to set up:
@@ -1145,7 +1151,7 @@ any directory proffered by `consult-dir'."
eshell-prompt-regexp eshell-p10k-prompt-string)) eshell-prompt-regexp eshell-p10k-prompt-string))
(use-package eshell-syntax-highlighting (use-package eshell-syntax-highlighting
:after eshell-mode :after esh-mode
:ensure t :ensure t
:config :config
(eshell-syntax-highlighting-global-mode +1)) (eshell-syntax-highlighting-global-mode +1))