emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Fraga <e.fraga@ucl.ac.uk>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation)
Date: Sun, 20 May 2012 15:42:30 +0930	[thread overview]
Message-ID: <87d35z1iup.fsf@ucl.ac.uk> (raw)
In-Reply-To: <87k4093iog.fsf@gmail.com> (Nicolas Goaziou's message of "Fri, 18 May 2012 12:08:47 +0200")

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> This is probably more for Nicolas... and apologies for hijacking the
>> thread slightly!
>>
>> I was intrigued by the comment above regarding the ignoreheading
>> tag.  Sounded just like what I needed.  However, it doesn't do anything
>> with org /out-of-the-box/.  A little searching led to Suvayu's posting
>> in stackoverflow [1] and that does the job nicely, but only for the
>> standard (read: old) export engine.
>>
>> The question is: is there an equivalent hook for the new exporter?
>
> For heavy structure modifications (like headlines removal), there is
> `org-export-before-parsing-hook' and the dynamically bound variable
> `org-export-current-backend'.
>
> Another way to solve the problem could be to implement your own headline
> parser:
>
> #+BEGIN_SRC emacs-lisp
> (defun my-e-latex-headline (headline contents info)
>   (if (member "ignoreheading" (org-element-property :tags headline)) contents
>     (org-e-latex-headline headline contents info)))
> #+END_SRC
>
> Then you can either install it in the current `e-latex' back-end:
>
> #+BEGIN_SRC emacs-lisp
> (add-to-list 'org-e-latex-translate-table '(headline . my-e-latex-headline))
> #+END_SRC

Nicolas,

I tried this but I get:

,----
| Warning (initialization): An error occurred while loading `/home/ucecesf/.emacs':
| 
| Symbol's value as variable is void: org-e-latex-translate-table
| 
| To ensure normal operation, you should investigate and remove the
| cause of the error in your initialization file.  Start Emacs with
| the `--debug-init' option to view a complete error backtrace.
`----

I think it should be 

#+BEGIN_SRC emacs-lisp
 (add-to-list 'org-e-latex-translate-alist '(headline . my-e-latex-headline))
#+END_SRC

i.e. =alist= instead of =table=.

In any case, with this change, it works like a charm!  Many thanks.

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-527-gc2aac5

  reply	other threads:[~2012-05-20  6:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-12 18:23 Using Org for a dissertation Richard Lawrence
2012-05-12 16:49 ` Eric Schulte
2012-05-15  5:02   ` Richard Lawrence
2012-06-14 12:39   ` Rasmus
2012-06-14 16:13     ` Eric S Fraga
2012-05-12 19:27 ` Thomas S. Dye
2012-05-15  5:16   ` Richard Lawrence
2012-05-15 17:08     ` Nicolas Goaziou
2012-05-16  0:38       ` Richard Lawrence
2012-05-21  3:56       ` New exporter [was: Re: Using Org for a dissertation] François Pinard
2012-05-21 17:54         ` Nicolas Goaziou
2012-05-21 19:10           ` François Pinard
2012-05-23  0:35             ` François Pinard
2012-05-12 20:29 ` Using Org for a dissertation Peter Münster
2012-05-15 12:26 ` suvayu ali
2012-05-16  1:15   ` Richard Lawrence
2012-05-17  2:37     ` org-export-preprocess-hook and the new exporter (was Re: Using Org for a dissertation) Eric S Fraga
2012-05-18  6:49       ` Bastien
2012-05-18 10:08       ` Nicolas Goaziou
2012-05-20  6:12         ` Eric Fraga [this message]
2012-05-20  8:03           ` Nicolas Goaziou
2012-05-28 22:44         ` org-export-preprocess-hook and the new exporter Thomas S. Dye
2012-05-29  1:37           ` Eric S Fraga
2012-05-29  3:20             ` Thomas S. Dye
2012-05-21 13:21 ` Using Org for a dissertation Matt Lundin

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=87d35z1iup.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).