Re: [O] shell scripts in yasnippet?

2015-09-06 Thread John Kitchin
This will not work. That is not what yasnippets are for. What you want is more like this: http://kitchingroup.cheme.cmu.edu/blog/2013/10/14/Lisp-links-in-org-mode-to-dynamically-generated-content/ Or this: * test fortune #+BEGIN_SRC emacs-lisp :exports results :results org (format

Re: [O] shell scripts in yasnippet?

2015-09-04 Thread John Kitchin
This is kind of close: #+BEGIN_SRC emacs-lisp (yas-global-mode) (with-temp-buffer (insert "# name : my-fortune # key: myf # expand-env: ((yas-indent-line nil) # -- #+BEGIN_QUOTE: ${1:`(shell-command-to-string \"fortune\")`} #END_QUOTE $0 ") (yas-load-snippet-buffer-and-close 'org-mode))

[O] shell scripts in yasnippet?

2015-09-03 Thread Tobias Frischholz
Hi there, right now I’m tinkering around with yasnippet. I was wondering if there’s a possibility to run a shell script and write its results in the text file. Specifically, I’m want to run “fortune” and put the results in a #+BEGIN_QUOTE…#+END_QUOTE block. Would that be possible? Best