[-- Attachment #1: Type: text/plain, Size: 569 bytes --] Dear list, I have a quick question about parsing a string containing attributes. My string has the following form (setq my-string ":caption the caption :label fig-1 :width 10cm :something this is an extra option") I'm looking for a function which produces an alist or plist with the option value pair. (:caption "the caption" :label "fig-1" :width "10cm :something "this is an extra option") As org handels these string a lot when exporting, it seems to me that there must exist a build in function to solve this task. Kind regards, Bob [-- Attachment #2: Type: text/html, Size: 1113 bytes --]
emacs--- via "General discussions about Org-mode."
<emacs-orgmode@gnu.org> writes:
> I have a quick question about parsing a string containing attributes.
> My string has the following form
> (setq my-string ":caption the caption :label fig-1 :width 10cm :something this is an extra option")
> I'm looking for a function which produces an alist or plist with the option value pair.
> (:caption "the caption"
> :label "fig-1"
> :width "10cm
> :something "this is an extra option")
org-babel-parse-header-arguments
[-- Attachment #1: Type: text/plain, Size: 705 bytes --] Thank Ihor, this did the trick! -- Sent with Tutanota, enjoy secure & ad-free emails. Jul 14, 2022, 12:53 by yantar92@gmail.com: > emacs--- via "General discussions about Org-mode." > <emacs-orgmode@gnu.org> writes: > >> I have a quick question about parsing a string containing attributes. >> My string has the following form >> (setq my-string ":caption the caption :label fig-1 :width 10cm :something this is an extra option") >> I'm looking for a function which produces an alist or plist with the option value pair. >> (:caption "the caption" >> :label "fig-1" >> :width "10cm >> :something "this is an extra option") >> > > org-babel-parse-header-arguments > [-- Attachment #2: Type: text/html, Size: 1253 bytes --]