1

Imagine I have an input file,an output file and a file containing some elisp code, which should transform the input file into the output file. Is there a way I could do all this from an external process? Maybe some kind of script mode for emacs? I would like to embed this in a web application.

Geo
  • 93,257
  • 117
  • 344
  • 520

2 Answers2

3

See emacs --batch in the Initial Options section of the manual. Use it with -l, 'f' or--eval. Thebatchoption forcesprin1,princ, andprintto print to stdout andmessageanderror` to print to stderr - so you can actually read and write to pipes.

Trey Jackson
  • 73,529
  • 11
  • 197
  • 229
0

Yes, it is possible. See emacs -l or emacs --eval.

choroba
  • 231,213
  • 25
  • 204
  • 289