Writing “Hello World” in Emacs?

后端 未结 2 638
谎友^
谎友^ 2021-02-01 05:27

I would like to write a few Unix scripts in Emacs Lisp. However, there doesn\'t seem to be a clean way to write to STDOUT so I can redirect the results to a file or pipe the ou

2条回答
  •  滥情空心
    2021-02-01 06:28

    Seems like you want princ instead of print. So, basically:

    (princ "Hello world! I'm writing to STDOUT but I'm not in quotes!")

    However, one caveat is that princ does not automatically terminate the output with \n.

提交回复
热议问题