Sure! Bear in mind I'm not an elisp expert, and I got it working after a lot of trial and error. I'm using this script as part of a quickblogging engine I'm writing for org (still testing, will share once it works as expected) so that I can blog from directly from my journal org file to a jekyll blog.
I also created a new function based off org-export-generic called org-export-generic-markdown which can be called in a non-interactive way, so that it could work from the script. The script basically exports a specific org file to markdown (in the same dir the org file is located). Now I want to make it accept command-line arguments. I will check it out tonight. Here it goes: http://pastie.org/4611632 This is pretty powerful, as you can also return data from the script by using princ. I can imagine millions of ways this could be used to integrate org with other apps/languages. - Marcelo. On Wed, Aug 29, 2012 at 11:42 AM, Nick Daly <nick.m.d...@gmail.com> wrote: > On Wed, Aug 29, 2012 at 10:47 AM, Marcelo de Moraes Serpa > <celose...@gmail.com> wrote: > > Hey guys, > > > > Regarding this: http://orgmode.org/manual/Batch-execution.html > > > > I also had success using --script, as in: > > > > #!/Applications/Emacs.app/Contents/MacOS/Emacs --script > > > > In the top of a .el file. You can then chmod it to be executable and run > it. > > Would you mind sharing a simple .el file you'd use that way? The > site's example is a bash script, and I wonder how much cleaner a .el > file would be. > > Nick >