* [Question]: Parsing attribute string
@ 2022-07-14 10:04 emacs--- via General discussions about Org-mode.
2022-07-14 10:53 ` Ihor Radchenko
[not found] ` <87lesw2cej.fsf@localhost-N6wKplb----2>
0 siblings, 2 replies; 3+ messages in thread
From: emacs--- via General discussions about Org-mode. @ 2022-07-14 10:04 UTC (permalink / raw)
To: Emacs Orgmode
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Question]: Parsing attribute string
2022-07-14 10:04 [Question]: Parsing attribute string emacs--- via General discussions about Org-mode.
@ 2022-07-14 10:53 ` Ihor Radchenko
[not found] ` <87lesw2cej.fsf@localhost-N6wKplb----2>
1 sibling, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2022-07-14 10:53 UTC (permalink / raw)
To: emacs; +Cc: Emacs Orgmode
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Question]: Parsing attribute string
[not found] ` <87lesw2cej.fsf@localhost-N6wKplb----2>
@ 2022-07-14 11:13 ` emacs--- via General discussions about Org-mode.
0 siblings, 0 replies; 3+ messages in thread
From: emacs--- via General discussions about Org-mode. @ 2022-07-14 11:13 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Emacs Orgmode
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-14 11:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-14 10:04 [Question]: Parsing attribute string emacs--- via General discussions about Org-mode.
2022-07-14 10:53 ` Ihor Radchenko
[not found] ` <87lesw2cej.fsf@localhost-N6wKplb----2>
2022-07-14 11:13 ` emacs--- via General discussions about Org-mode.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).