emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

org-sbe to automate some source block executions


From: Jean Louis
Subject: org-sbe to automate some source block executions
Date: Wed, 25 Nov 2020 13:19:59 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Eric S Fraga <e.fraga@ucl.ac.uk> [2020-11-24 12:46]:
> On Tuesday, 24 Nov 2020 at 12:00, Jean Louis wrote:
> > Can I automated the execution of Babel code upon opening of the Org
> > file?
> 
> You can, by using file local variables.  For instance, for some files, I
> do this:
> 
> #+begin_src org
>   ,* local variables                         :noexport:
>   # Local Variables:
>   # eval: (org-sbe "startup")
>   # End:
> #+end_src
> 
> which will evaluate the named src block "startup" when file is
> opened.

I am trying to implement it, do you see here anything below that I am
doing wrong? Error is that it cannot find source block stages

** Stages
   
#+BEGIN_SRC sql :var results=stages :engine postgresql :exports results
SELECT -- salesflowstages_priority AS "Priority", 
       salesflowstages_publicstage AS "Development Stages" --,
--       salesflowstages_description AS "Description" 
FROM salesflowstages
WHERE salesflowstages_salesflows = 1 
ORDER BY salesflowstages_priority ASC
#+END_SRC

# Local Variables:
# eval: (org-sbe "stages")
# End:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]