Re: [O] Org-mode execute functions upon opening and closing

2015-01-11 Thread Karl Voit
Hello Eduardo! shameless plug This is not an answer to your original question regarding hooks where http://www.emacswiki.org/emacs/LocalVariables together with a bit of Elisp might be a possible solution. However, we seem to share the same mind-set or motivation to use Org-mode in order to get

Re: [O] Org-mode execute functions upon opening and closing

2015-01-11 Thread John Kitchin
* Load lisp code on opening an org-file Put this at the end of your org-file: #+BEGIN_EXAMPLE ### Local Variables: ### mode: org ### eval: (load-file my-lib.el) ### End: #+END_EXAMPLE Create my-lib.el, e.g. #+BEGIN_SRC emacs-lisp :tangle my-lisp.el (message-box Loaded!) #+END_SRC The next

Re: [O] Org-mode execute functions upon opening and closing

2015-01-11 Thread John Kitchin
John Kitchin johnrkitc...@gmail.com writes: I guess this technically only runs when you open it. To run something on closing, you might add something to kill-buffer-hook. That function would need to check if it should run, e.g. if you are closing an org-buffer that meets some criteria. You