all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: dark.key8799@151e.ai
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <5f4cdb77-8f43-4f2d-91a7-bc4ce57df8ad@app.fastmail.com> (raw)

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	other threads:[~2023-12-30  5:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-30  5:24 dark.key8799 [this message]
2023-12-31 14:42 ` Suggestion to add hook to be run when org-indent completes a buffer's initialization Ihor Radchenko
2024-01-02 10:56   ` [PATCH] " dark.key8799
2024-01-02 11:15     ` Ihor Radchenko
2024-01-02 15:53       ` dark.key8799
2024-01-03 15:38         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5f4cdb77-8f43-4f2d-91a7-bc4ce57df8ad@app.fastmail.com \
    --to=dark.key8799@151e.ai \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.