emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: emacs-orgmode@gnu.org
Subject: Re: local variables and export processing in hooks
Date: Tue, 9 Feb 2021 12:30:52 +0100	[thread overview]
Message-ID: <20210209113052.GF21978@tuxteam.de> (raw)
In-Reply-To: <87sg65tuqa.fsf@ucl.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

On Tue, Feb 09, 2021 at 10:13:01AM +0000, Eric S Fraga wrote:
> Dear org mode users,
> 
> I have a small elisp function that I use to process my org file before
> export to LaTeX or HTML, adding this function to
> org-export-before-parsing-hook.  Briefly, the function exports the TBLFM
> lines so that the org table calculations can be inspected.  This is for
> pedagogical use.
> 
> This works just fine.  However, I don't want to do this generally so I
> have a variable that controls whether the processing happens or not.  Is
> there some way to make this variable local to an org file for use in the
> export?  I have tried combinations of setq-local and #+BIND: but have
> not yet managed to get this work successfully.

Perhaps a file local variable?

Either in the first line:

  -*- mode: MODENAME; VAR: VALUE; ... -*-

or at the end of the file:

  # Local Variables:
  # mode: org
  # my-var: value
  # End:

(Indentation is for clarity, remove)

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2021-02-09 11:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 10:13 local variables and export processing in hooks Eric S Fraga
2021-02-09 11:30 ` tomas [this message]
2021-02-09 12:06   ` Eric S Fraga
2021-02-09 13:21     ` Sébastien Miquel
2021-02-10  8:48       ` Eric S Fraga
2021-02-10 20:56       ` M. ‘quintus’ Gülker
2021-02-11 20:12         ` Sébastien Miquel
2021-02-12  7:28           ` M. ‘quintus’ Gülker
2021-02-10 15:43     ` Maxim Nikulin
2021-02-11  8:50       ` Eric S Fraga

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=20210209113052.GF21978@tuxteam.de \
    --to=tomas@tuxteam.de \
    --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).