emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Activate/deactivate export of inlinetasks with #+OPTIONS


From: Rasmus
Subject: Re: [O] Activate/deactivate export of inlinetasks with #+OPTIONS
Date: Tue, 14 Aug 2012 13:49:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Rasmus <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]