What are the printing functions in Emacs Lisp?

What are the printing functions in Emacs Lisp?

This section describes the Lisp functions for printing Lisp objects—converting objects into their printed representation. Some of the Emacs printing functions add quoting characters to the output when necessary so that it can be read properly.

Is it better to print without quoting in Lisp?

Likewise, if the purpose is to describe a Lisp object clearly for a Lisp programmer. However, if the purpose of the output is to look nice for humans, then it is usually better to print without quoting. Lisp objects can refer to themselves.

When to use quoting characters in Emacs printing function?

Some of the Emacs printing functions add quoting characters to the output when necessary so that it can be read properly. The quoting characters used are ‘ ” ’ and ‘ \\ ’; they distinguish strings from symbols, and prevent punctuation characters in strings and symbols from being taken as delimiters when reading.

What are the print and output functions in Elisp?

Here’s a summary of most basic elisp printing functions: message → print to the message buffer. insert → print to current buffer, at cursor position. print → print lisp objects. Output can be read back by function read. prin1 → like print, but does not add newline at end.

What does stream mean in Emacs output function?

Emacs detects such recursion and prints ‘ #level ’ instead of recursively printing an object already being printed. For example, here ‘ #0 ’ indicates a recursive reference to the object at level 0 of the current print operation: In the functions below, stream stands for an output stream.

Can a Lisp object refer to its self?

Lisp objects can refer to themselves. Printing a self-referential object in the normal way would require an infinite amount of text, and the attempt could cause infinite recursion. Emacs detects such recursion and prints ‘#level’ instead of recursively printing an object already being printed.