emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: Activate/deactivate export of inlinetasks with #+OPTIONS
Date: Tue, 14 Aug 2012 13:49:09 +0100	[thread overview]
Message-ID: <87d32tprju.fsf@pank.lan> (raw)
In-Reply-To: 87has5psws.fsf@pank.lan

Rasmus <rasmus@gmx.us> 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	other threads:[~2012-08-14 12:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 12:19 Activate/deactivate export of inlinetasks with #+OPTIONS Rasmus
2012-08-14 12:49 ` Rasmus [this message]
2012-08-14 19:17 ` Suvayu Ali
2012-08-14 21:48 ` Bastien
2012-08-16 10:51   ` Nicolas Goaziou
2012-08-16 11:05     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d32tprju.fsf@pank.lan \
    --to=rasmus@gmx.us \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).