From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: Controlling example block export? Date: Tue, 1 Apr 2014 16:33:45 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59120) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WV1dX-0004Va-2u for emacs-orgmode@gnu.org; Tue, 01 Apr 2014 12:34:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WV1dQ-0002mC-TW for emacs-orgmode@gnu.org; Tue, 01 Apr 2014 12:34:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:52995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WV1dQ-0002m0-M3 for emacs-orgmode@gnu.org; Tue, 01 Apr 2014 12:34:00 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WV1dM-0005ib-Oo for emacs-orgmode@gnu.org; Tue, 01 Apr 2014 18:33:56 +0200 Received: from 137.110.32.33 ([137.110.32.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Apr 2014 18:33:56 +0200 Received: from ccberry by 137.110.32.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Apr 2014 18:33:56 +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 Heikki Lehvaslaiho gmail.com> writes: > > > > I am using example blocks as inline notes where I paste snippets of > (pre-formatted) text. I'd like to  be able to control the exporting of > those block individually (per document would also be useful). I do not > seem to be able to find documentation about anything along those lines.  > > > Here is a mock-up: > > > #+BEGIN_EXAMPLE :exports none > private notes... > #+END_EXAMPLE > > Advise or redefine the org--example-block function to use :switches to decide whether to skip an example block. Something like this: #+BEGIN_SRC emacs-lisp (defvar org-example-block-skip ":skip" "example block :switch to skip.") (defun org-latex-example-block (example-block contents info) "Transcode an EXAMPLE-BLOCK element from Org to LaTeX. CONTENTS is nil. INFO is a plist holding contextual information." (when (and (org-string-nw-p (org-element-property :value example-block)) (not (string= org-example-block-skip (org-element-property :switches example-block)))) (org-latex--wrap-label example-block (format "\\begin{verbatim}\n%s\\end{verbatim}" (org-export-format-code-default example-block info))))) #+END_SRC > A bigger question is that while code blocks are well defined and well > documented, all other blocks are not. Is there somewhere a design > document the would give a logic of having different blocks and how they > are controlled? Maybe there is an other type of a block that does what I > want? > > > The inline documentation in ox*.el files is too low level to be helpful. > See also org-element.el and http://orgmode.org/worg/dev/org-export-reference.html Looking at what (org-element-at-point) returns often helps. Special blocks are another possibility, but will require some customization. HTH, Chuck