From: Eric S Fraga <esflists@gmail.com>
To: Lawrence Bottorff <borgauf@gmail.com>
Cc: emacs-orgmode Mailinglist <emacs-orgmode@gnu.org>
Subject: Re: local variables to initialize org buffer?
Date: Mon, 01 Apr 2019 07:37:15 +0100 [thread overview]
Message-ID: <87h8bi9qp0.fsf@gmail.com> (raw)
In-Reply-To: <CAFAhFSUjm33_VKw8iUp_T00AThbqoaMkQoHVvtjDV3wNFBKigA@mail.gmail.com> (Lawrence Bottorff's message of "Sun, 31 Mar 2019 21:05:00 -0500")
On Sunday, 31 Mar 2019 at 21:05, Lawrence Bottorff wrote:
> I'm trying to figure out how to start up slime and do
> org-babel-execute-buffer when I open a certain org-mode file full of Lisp
> source code blocks. I guess
>
> Local Variables:
> eval: (elisp-function)
> End:
>
> is discouraged.
It is discouraged but not disallowed. I use this:
# eval: (esf/execute-startup-block)
where
#+begin_src emacs-lisp
(defun esf/execute-startup-block ()
(interactive)
(org-babel-goto-named-src-block "startup")
(org-babel-execute-src-block))
#+end_src
which will execute any org src block named startup whenever I visit the
file (but with confirmation required). It is incumbent on me knowing
that the src block is safe to execute and I only say yes for files that
are mine.
--
Eric S Fraga via Emacs 27.0.50, Org release_9.2.2-324-gd58827
next prev parent reply other threads:[~2019-04-01 6:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 2:05 local variables to initialize org buffer? Lawrence Bottorff
2019-04-01 2:33 ` Berry, Charles
2019-04-01 3:59 ` Lawrence Bottorff
2019-04-01 16:13 ` Berry, Charles
2019-04-01 6:37 ` Eric S Fraga [this message]
2019-04-01 16:33 ` Lawrence Bottorff
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h8bi9qp0.fsf@gmail.com \
--to=esflists@gmail.com \
--cc=borgauf@gmail.com \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.