From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: local variables to initialize org buffer? Date: Sun, 31 Mar 2019 21:05:00 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007289ee05856e73cc" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:58795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAmKA-0001lZ-NM for emacs-orgmode@gnu.org; Sun, 31 Mar 2019 22:05:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAmK9-00022A-H6 for emacs-orgmode@gnu.org; Sun, 31 Mar 2019 22:05:22 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]:42034) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAmK6-0001z0-TF for emacs-orgmode@gnu.org; Sun, 31 Mar 2019 22:05:21 -0400 Received: by mail-lj1-x233.google.com with SMTP id v22so1924883lje.9 for ; Sun, 31 Mar 2019 19:05:15 -0700 (PDT) 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: emacs-orgmode Mailinglist --0000000000007289ee05856e73cc Content-Type: text/plain; charset="UTF-8" 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. So I looked at in buffer settings , but I don't see anything specific to actually running elisp functions -- unless I'm missing something. Advice? LB --0000000000007289ee05856e73cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'm trying to figure out how to start= up slime and do org-babel-execute-buffer when I open a certain org-mode fi= le full of Lisp source code blocks. I guess

Local V= ariables:
=C2=A0eval: (elisp-function)
=C2=A0End:
=


--0000000000007289ee05856e73cc-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: local variables to initialize org buffer? Date: Mon, 1 Apr 2019 02:33:24 +0000 Message-ID: <6BD1B30A-FACF-4B1F-A45F-5FCE388EE0DD@ucsd.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:33599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAmlO-0001eu-QX for emacs-orgmode@gnu.org; Sun, 31 Mar 2019 22:33:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAmlN-0001XK-V8 for emacs-orgmode@gnu.org; Sun, 31 Mar 2019 22:33:30 -0400 Received: from iport-bcv2-out.ucsd.edu ([132.239.0.73]:43362) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAmlN-0001Tk-70 for emacs-orgmode@gnu.org; Sun, 31 Mar 2019 22:33:29 -0400 In-Reply-To: Content-Language: en-US Content-ID: 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 Will `org-babel-load-file' suffice? HTH, Chuck > On Mar 31, 2019, at 7:05 PM, Lawrence Bottorff wrote: >=20 > I'm trying to figure out how to start up slime and do org-babel-execute-b= uffer when I open a certain org-mode file full of Lisp source code blocks. = I guess >=20 > Local Variables: > eval: (elisp-function) > End: >=20 > is discouraged. So I looked at in buffer settings, but I don't see anythi= ng specific to actually running elisp functions -- unless I'm missing somet= hing. Advice? >=20 > LB From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Re: local variables to initialize org buffer? Date: Sun, 31 Mar 2019 22:59:48 -0500 Message-ID: References: <6BD1B30A-FACF-4B1F-A45F-5FCE388EE0DD@ucsd.edu> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ee76090585700d76" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:44608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAo79-0004e0-BB for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 00:00:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAo78-0005P8-Eq for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 00:00:03 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:41546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAo78-0005Nh-2i for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 00:00:02 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 10so5192015lfr.8 for ; Sun, 31 Mar 2019 21:00:01 -0700 (PDT) In-Reply-To: <6BD1B30A-FACF-4B1F-A45F-5FCE388EE0DD@ucsd.edu> 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: "Berry, Charles" Cc: emacs-orgmode Mailinglist --000000000000ee76090585700d76 Content-Type: text/plain; charset="UTF-8" Sure, but how should it be implemented? On Sun, Mar 31, 2019 at 9:33 PM Berry, Charles wrote: > Will `org-babel-load-file' suffice? > > HTH, > > Chuck > > > On Mar 31, 2019, at 7:05 PM, 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. So I looked at in buffer settings, but I don't see > anything specific to actually running elisp functions -- unless I'm missing > something. Advice? > > > > LB > > > --000000000000ee76090585700d76 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sure, but how should it be implemented?

Will `org-babel-load-file' suffice?

HTH,

Chuck

> On Mar 31, 2019, at 7:05 PM, Lawrence Bottorff <borgauf@gmail.com> wrote:
>
> I'm trying to figure out how to start up slime and do org-babel-ex= ecute-buffer when I open a certain org-mode file full of Lisp source code b= locks. I guess
>
> Local Variables:
>=C2=A0 eval: (elisp-function)
>=C2=A0 End:
>
> is discouraged. So I looked at in buffer settings, but I don't see= anything specific to actually running elisp functions -- unless I'm mi= ssing something. Advice?
>
> LB


--000000000000ee76090585700d76-- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: local variables to initialize org buffer? Date: Mon, 1 Apr 2019 16:13:56 +0000 Message-ID: <45D4C4B4-4CAE-4F12-A677-EDBB77D3D8F5@ucsd.edu> References: <6BD1B30A-FACF-4B1F-A45F-5FCE388EE0DD@ucsd.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:47788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAzon-00076L-3Q for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 12:29:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAzom-00017O-8A for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 12:29:53 -0400 Received: from iport-acv5-out.ucsd.edu ([132.239.0.10]:30365) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAzol-000170-IW for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 12:29:52 -0400 In-Reply-To: Content-Language: en-US Content-ID: 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 Mar 31, 2019, at 8:59 PM, Lawrence Bottorff wrote: >=20 > Sure, but how should it be implemented? # Local Variables: # eval: (org-babel-load-file (buffer-file-name)) # End: or if you want to follow Eric's suggestion, something like: #+name: startup #+begin_src emacs-lisp :tangle no (org-babel-load-file (buffer-file-name)) #+end_src HTH, Chuck From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Re: local variables to initialize org buffer? Date: Mon, 1 Apr 2019 11:33:50 -0500 Message-ID: References: <87h8bi9qp0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000008ee94005857a9605" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:48391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAzsr-0000Vn-Q1 for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 12:34:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hAzsq-0003YU-HZ for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 12:34:05 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:36319) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hAzsq-0003Xy-0K for emacs-orgmode@gnu.org; Mon, 01 Apr 2019 12:34:04 -0400 Received: by mail-lf1-x12f.google.com with SMTP id d18so6781264lfn.3 for ; Mon, 01 Apr 2019 09:34:03 -0700 (PDT) In-Reply-To: <87h8bi9qp0.fsf@gmail.com> 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 , emacs-orgmode Mailinglist --0000000000008ee94005857a9605 Content-Type: text/plain; charset="UTF-8" I've got this in my config.org , which is called by my init.el: #+begin_src emacs-lisp (defun borgauf/execute-startup-block () (interactive) (progn (org-babel-goto-named-src-block "startup") (org-babel-execute-src-block))) #+end_src then in my org-mode file I have this at the bottom: * Comments #+name: startup #+BEGIN_SRC emacs-lisp :results silent ;(progn (slime) (org-babel-execute-buffer)) (slime) (org-babel-execute-buffer) #+END_SRC # Local Variables: # eval: (borgauf/execute-startup-block) # End: This is starting the slime repl just fine, but not doing the (org-babel-execute-buffer). I can then manually run C-c C-v b and it indeed runs all the code blocks. So, I'm guessing that after the (slime) is performed, it doesn't return focus to my calling org-mode buffer and the (org-babel-execute-buffer) is running to no avail in the slime repl buffer? On Mon, Apr 1, 2019 at 1:37 AM Eric S Fraga wrote: > 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 > --0000000000008ee94005857a9605 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable




On Sunday, 31 Mar 2019 at 21:0= 5, 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 L= isp
> source code blocks. I guess
>
> Local Variables:
>=C2=A0 eval: (elisp-function)
>=C2=A0 End:
>
> is discouraged.

It is discouraged but not disallowed.=C2=A0 I use this:

# eval: (esf/execute-startup-block)

where

#+begin_src emacs-lisp
=C2=A0 (defun esf/execute-startup-block ()
=C2=A0 =C2=A0 (interactive)
=C2=A0 =C2=A0 (org-babel-goto-named-src-block "startup")
=C2=A0 =C2=A0 (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).=C2=A0 It is incumbent on me knowing<= br> 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
--0000000000008ee94005857a9605--