From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/printing-in-edebug.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 devdocs/elisp/printing-in-edebug.html (limited to 'devdocs/elisp/printing-in-edebug.html') diff --git a/devdocs/elisp/printing-in-edebug.html b/devdocs/elisp/printing-in-edebug.html new file mode 100644 index 00000000..0e2a14c9 --- /dev/null +++ b/devdocs/elisp/printing-in-edebug.html @@ -0,0 +1,15 @@ +

Printing in Edebug

If an expression in your program produces a value containing circular list structure, you may get an error when Edebug attempts to print it.

One way to cope with circular structure is to set print-length or print-level to truncate the printing. Edebug does this for you; it binds print-length and print-level to the values of the variables edebug-print-length and edebug-print-level (so long as they have non-nil values). See Output Variables.

User Option: edebug-print-length +

If non-nil, Edebug binds print-length to this value while printing results. The default value is 50.

+
User Option: edebug-print-level +

If non-nil, Edebug binds print-level to this value while printing results. The default value is 50.

+

You can also print circular structures and structures that share elements more informatively by binding print-circle to a non-nil value.

Here is an example of code that creates a circular structure:

(setq a (list 'x 'y))
+(setcar a a)
+
+

If print-circle is non-nil, printing functions (e.g., prin1) will print a as ‘#1=(#1# y)’. The ‘#1=’ notation labels the structure that follows it with the label ‘1’, and the ‘#1#’ notation references the previously labeled structure. This notation is used for any shared elements of lists or vectors.

User Option: edebug-print-circle +

If non-nil, Edebug binds print-circle to this value while printing results. The default value is t.

+

For further details about how printing can be customized, see see Output Functions.

+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Printing-in-Edebug.html +

+
-- cgit v1.2.3