From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Activate/deactivate export of inlinetasks with #+OPTIONS Date: Tue, 14 Aug 2012 13:49:09 +0100 Message-ID: <87d32tprju.fsf@pank.lan> References: <87has5psws.fsf@pank.lan> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1GYq-0001j3-Gn for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 08:49:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1GYo-0002qG-5O for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 08:49:28 -0400 Received: from plane.gmane.org ([80.91.229.3]:50724) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1GYn-0002qA-Un for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 08:49:26 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T1GYk-0006ML-Vy for emacs-orgmode@gnu.org; Tue, 14 Aug 2012 14:49:22 +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:49:22 +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:49:22 +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 Rasmus writes: > 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!!!). This solution is better as it's backend-agnostic: #+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) (defun org-e-inlinetask-p (inlinetask back-end info) "Return an inlinetask string if :with-inlinetasks is t" (if (plist-get info :with-inlinetasks) inlinetask "")) (add-to-list 'org-export-filter-inlinetask-functions 'org-e-inlinetask-p) ;; (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 -- I almost cut my hair, it was happened just the other day