From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Activate/deactivate export of inlinetasks with #+OPTIONS Date: Tue, 14 Aug 2012 13:19:47 +0100 Message-ID: <87has5psws.fsf@pank.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1G6S-0001Xw-Gn for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 08:20:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1G6K-0001Ff-N5 for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 08:20:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:55819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1G6K-0001FZ-G0 for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 08:20:00 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T1G6I-0005c4-Lg for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 14:19:58 +0200 Received: from 93-96-208-164.zone4.bethere.co.uk ([93.96.208.164]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Aug 2012 14:19:58 +0200 Received: from rasmus by 93-96-208-164.zone4.bethere.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Aug 2012 14:19:58 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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