[Top][All Lists]

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

Re: [O] shell scripts in yasnippet?

From: John Kitchin
Subject: Re: [O] shell scripts in yasnippet?
Date: Fri, 04 Sep 2015 09:20:20 -0400

This is kind of close:

#+BEGIN_SRC emacs-lisp
  (insert "# name : my-fortune
# key: myf
# expand-env: ((yas-indent-line nil)
# --

${1:`(shell-command-to-string \"fortune\")`}

  (yas-load-snippet-buffer-and-close 'org-mode))

For some reason it is inserting some extra spaces before # for me, and I
cannot figure out why.

Tobias Frischholz writes:

> 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 
> Would that be possible?
> Best regards,
> Tobias Frischholz
> PGP PUBLIC KEY: http://pgp.mit.edu/pks/lookup?search=0xCD463AC1&op=index

Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213

reply via email to

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