[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: insert automatically a reference to a section header and a link
From: |
Uwe Brauer |
Subject: |
Re: insert automatically a reference to a section header and a link |
Date: |
Wed, 17 Nov 2021 15:15:02 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>>> "JK" == John Kitchin <jkitchin@andrew.cmu.edu> writes:
> there is nothing like that that I know of. You can write your own, in org
> (following Eric's use of radio targets) it might look like this.
> (defun my-heading ()
> (interactive)
> (let* ((title (string-trim (read-string "title: ")))
> (tokens (split-string title " " t))
> (label (format "<<sec:%s>>"
> (string-join
> (seq-take tokens (min 3 (length tokens)))
> "-"))))
> (insert (format "%s %s" label title))))
> you could also insert the leading * if you prefer.
Aha! Brilliant thanks!
I will use
(format "%s %s" title label)
and think about inserting *.
I wonder why this was not implemented or asked for.
I googled but did not find anything.
smime.p7s
Description: S/MIME cryptographic signature
- insert automatically a reference to a section header and a link, Uwe Brauer, 2021/11/17
- Re: insert automatically a reference to a section header and a link, Uwe Brauer, 2021/11/17
- Re: insert automatically a reference to a section header and a link, Eric S Fraga, 2021/11/17
- Re: insert automatically a reference to a section header and a link, Stefan Nobis, 2021/11/17
- Re: insert automatically a reference to a section header and a link, Uwe Brauer, 2021/11/17
- Re: insert automatically a reference to a section header and a link, Stefan Nobis, 2021/11/17
- Re: insert automatically a reference to a section header and a link, Bruce D'Arcus, 2021/11/23