[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Activate/deactivate export of inlinetasks with #+OPTIONS
From: |
Rasmus |
Subject: |
[O] Activate/deactivate export of inlinetasks with #+OPTIONS |
Date: |
Tue, 14 Aug 2012 13:19:47 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Hi list,
When writing documents, I think in terms of LaTeX. There, a common
option in `draft'. In orgmode inlinetasks is a draft-thingy to me. I
want to easily remove inlinetasks before exporting a final (that merely
means `pretty') version.
To reach an Org-ish solution I wrote the following trivial advice+extra,
which allows #+OPTIONS: inline:t or #+OPTIONS: inline:nil. It works
only with the new exporter (which is amazing!!!).
I'm hoping someone else could make use of it (although it is truly
trivial, but not being a programmer I appreciate finding `easy'
solutions on the internets).
#+BEGIN_SRC emacs-lisp
(add-to-list 'org-export-options-alist
'(:with-inlinetasks nil "inline" org-export-with-inlinetasks))
(defcustom org-export-with-inlinetasks t
"Non-nil means include INLINETASKS keywords in export.
When nil, remove all these keywords from the export."
:group 'org-export-general
:type 'boolean)
(defadvice org-e-latex-inlinetask (after org-e-export-inlinetask-p)
"Return an inlinetask string if :with-inlinetasks is t otherwise
return nothing"
(if (not (plist-get info :with-inlinetasks))
(setq ad-return-value "")))
(ad-activate 'org-e-latex-inlinetask)
#+END_SRC
If this is of high enough standards it could perhaps be added to the
worg. . .
–Rasmus
--
In theory, practice and theory are the same. In practice they are not
- [O] Activate/deactivate export of inlinetasks with #+OPTIONS,
Rasmus <=