emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* add #+ATTR_SOMETHING to headline?
@ 2021-07-06  3:11 Matt Price
  2021-07-06 12:11 ` John Kitchin
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Price @ 2021-07-06  3:11 UTC (permalink / raw)
  To: Org Mode

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

Does anyone know if attributes get attached to headline elements during the
export process? I am writing a derived backend in which I would like to
have a line like

(let (add-toggle (org-export-read-attribute :attr_canvas_html headline
:toggle))
....)

But as var as i can tell, the call to org-rexport-read-attribute always
evaluates to nil in a file like this:

#+ATTR_CANVAS_HTML: :toggle t
* My TOggle Headline

Am I missing something obvious, or is htis not possible? I notice that none
of the org-xxx-headline functions in ox-xxx.el seem to check for
attributes, so maybe this is by design?

THanks,

Matt

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

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

* Re: add #+ATTR_SOMETHING to headline?
  2021-07-06  3:11 add #+ATTR_SOMETHING to headline? Matt Price
@ 2021-07-06 12:11 ` John Kitchin
  0 siblings, 0 replies; 2+ messages in thread
From: John Kitchin @ 2021-07-06 12:11 UTC (permalink / raw)
  To: Matt Price; +Cc: Org Mode

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

Why don’t you just use a property for this?

On Mon, Jul 5, 2021 at 11:12 PM Matt Price <moptop99@gmail.com> wrote:

> Does anyone know if attributes get attached to headline elements during
> the export process? I am writing a derived backend in which I would like to
> have a line like
>
> (let (add-toggle (org-export-read-attribute :attr_canvas_html headline
> :toggle))
> ....)
>
> But as var as i can tell, the call to org-rexport-read-attribute always
> evaluates to nil in a file like this:
>
> #+ATTR_CANVAS_HTML: :toggle t
> * My TOggle Headline
>
> Am I missing something obvious, or is htis not possible? I notice that
> none of the org-xxx-headline functions in ox-xxx.el seem to check for
> attributes, so maybe this is by design?
>
> THanks,
>
> Matt
>
-- 
John

-----------------------------------
Professor John Kitchin (he/him/his)
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

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

end of thread, other threads:[~2021-07-06 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-06  3:11 add #+ATTR_SOMETHING to headline? Matt Price
2021-07-06 12:11 ` John Kitchin

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).