[Top][All Lists]

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

Set heading text from elisp?

From: Tim Visher
Subject: Set heading text from elisp?
Date: Mon, 11 Nov 2019 09:19:11 -0500

I'm wondering if there's builtin support for editing components of the heading? I'm trying to set the text component (i.e. `(nth 4 (org-heading-components))`) without altering anything else and while I can obviously achieve this with generic elisp I wanted to be sure I had to.

The cleanest elisp I came up with was:

  (org-back-to-heading t)
  (let (case-fold-search)
    (looking-at org-complex-heading-regexp)
    (replace-match text t t nil 4)



In Christ,

Timmy V.


reply via email to

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