Damien Cassou
Damien Cassou

Reputation: 2589

Use the same export attribute for all src-blocks

I have a bunch of org files with many src-blocks. I use the same exporter (that I wrote) on every org file. Most src-blocks set the same ATTR_LINUXMAG-FR exporter attribute value:

#+ATTR_LINUXMAG-FR: :type console
#+begin_src text
foo
#+end_src

I'm tired of repeating this first line for 90% of my src-blocks. Is there a way to specify this export attribute once in a .dir-locals.el file and only override it where necessary? The above would then become simply:

#+begin_src text
foo
#+end_src

My .dir-locals.el file already specifies a value for org-babel-default-header-args:text and org-babel-default-header-args:sh. It doesn't look like this is the right place to put exporter attributes.

Upvotes: 0

Views: 43

Answers (0)

Related Questions