emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestion to add hook to be run when org-indent completes a buffer's in


From: dark . key8799
Subject: Suggestion to add hook to be run when org-indent completes a buffer's initialization
Date: Sat, 30 Dec 2023 13:24:28 +0800
User-agent: Cyrus-JMAP/3.9.0-alpha0-1364-ga51d5fd3b7-fm-20231219.001-ga51d5fd3

The org-modern-indent package relies on org-indent having finished preparing a 
buffer to add its own customizations. Currently it relies on a timer mechanism 
to watch org-indent-agentized-buffers and execute once a buffer has been 
prepped by org-indent.

That leads to some downstream issues in particular use-cases 
(https://github.com/jdtsmith/org-modern-indent/issues/11)

Although there are some workarounds for the particular issue above, a cleaner 
solution would be org-indent calling some hook at the end of the preparation. 
As per link above, jdtsmith proposes to add such call in 
org-indent-initialize-buffer:

         ;; Job is complete: un-agentize buffer.
         (unless interruptp
           (setq org-indent-agentized-buffers
                 (delq buffer org-indent-agentized-buffers))
           (run-hook-with-args 'org-indent-buffer-init-finished buffer)) ;; <-- 
added

-- 
Alexandre Avanian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]