[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: enable-local-variables and emacs --batch
From: |
Eli Zaretskii |
Subject: |
Re: enable-local-variables and emacs --batch |
Date: |
Sat, 03 Nov 2018 12:46:42 +0200 |
> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Sat, 3 Nov 2018 06:05:42 -0400
> Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
>
> I made sure that --eval happened before the file load. I even have a specific
> note for that:
>
> # Note: The Org file from $(ORG_FILE) is loaded *after* the --eval
> # section gets evaluated i.e. --eval '(progn ..)' $(ORG_FILE) If the
> # order is reversed i.e. i.e.$(ORG_FILE) --eval '(progn ..)', the act
> # of loading the $(ORG_FILE) file first will load the older Org
> # version that ships with Emacs and then run the stuff in --eval that
> # loads the new Org version.. and thus we'll end up with mixed Org in
> # the load-path.
> emacs-batch:
> @echo ""
> @echo "$(ORG_FILE) ::"
> @$(EMACS) --batch --eval "(progn\
> (setenv \"OX_HUGO_ELPA\" \"$(OX_HUGO_ELPA)\")\
> (setenv \"TEST_ENABLED\" \"$(TEST_ENABLED)\")\
> (load-file (expand-file-name \"setup-ox-hugo.el\" \"$(OX_HUGO_TEST_DIR)\"))\
> )" $(ORG_FILE) \
> -f $(FUNC) \
> --kill
>
> The setup-ox-hugo.el contains the code to load the ox-hugo package and in
> there I even manually load-file the
> package autoloads file that contains the elisp forms that `put'
> `safe-local-variable' on the defcustoms.
>
> The $(ORG_FILE) comes after the --eval in that emacs --batch command.
>
> The $(FUNC) is just an Org export command.
>
> I'll work on getting a minimal reproducible example when I get to a computer.
If you are going to have a small reproducer (and don't find the
problem while working on that), then why not step through the relevant
code in Edebug and see why it doesn't work?