emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Set heading text from elisp?
@ 2019-11-11 14:19 Tim Visher
  2019-11-13 11:25 ` Mikhail Skorzhinskii
  0 siblings, 1 reply; 3+ messages in thread
From: Tim Visher @ 2019-11-11 14:19 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

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.


[-- Attachment #2: Type: text/html, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-13 13:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 14:19 Set heading text from elisp? Tim Visher
2019-11-13 11:25 ` Mikhail Skorzhinskii
2019-11-13 13:25   ` Tim Visher

Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).