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

2015-01-11 Thread John Kitchin
John Kitchin 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 could also look at find-fil

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 Karl Voit
Hello Eduardo! 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 independent fro

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

2015-01-07 Thread Eduardo Mercovich
Hello everybody. I'm new to the list, so please forgive me if this is offtopic, but I've searched with the obviously wrong keywords, since I found no answer for this yet. In short: I'd like to know how could Org execute (internal) functions upon opening and closing. ___ Longer form ___ I'd like