From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: local variables to initialize org buffer? Date: Mon, 01 Apr 2019 07:37:15 +0100 Message-ID: <87h8bi9qp0.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:39912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAqZM-00030B-GA for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 02:37:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAqZL-0003s2-It for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 02:37:20 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:42740) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAqZL-0003rQ-AK for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 02:37:19 -0400 Received: by mail-wr1-x430.google.com with SMTP id g3so10303664wrx.9 for ; Sun, 31 Mar 2019 23:37:19 -0700 (PDT) In-Reply-To: (Lawrence Bottorff's message of "Sun, 31 Mar 2019 21:05:00 -0500") 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" To: Lawrence Bottorff Cc: emacs-orgmode Mailinglist 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