GNU bug report logs - #63861
[PATCH] pp.el: New "pretty printing" code

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Fri, 2 Jun 2023 22:52:02 UTC

Severity: normal

Tags: patch

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #107 received at 63861 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 63861 <at> debbugs.gnu.org
Subject: Re: bug#63861: [PATCH] pp.el: New "pretty printing" code
Date: Tue, 13 Jun 2023 13:55:14 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 63861 <at> debbugs.gnu.org
> Date: Mon, 12 Jun 2023 16:21:50 -0400
> 
> > We document "pp" in "Output Functions".  Maybe there?
> 
> Haven't looked at that yet: I'm still trying to figure out how the
> functionality should be exposed.

Well, just don't forget that when you eventually install ;-)

> +(defcustom pp-default-function #'pp-fill
> +  ;; FIXME: The best pretty printer to use depends on the use-case
> +  ;; so maybe we should allow callers to specify what they want (maybe with
> +  ;; options like `fast', `compact', `code', `data', ...) and these
> +  ;; can then be mapped to actual pretty-printing algorithms.
> +  ;; Then again, callers can just directly call the corresponding function.
> +  "Function that `pp' should dispatch to for pretty printing.
> +That function can be called in one of two ways:
> +- with a single argument, which it should insert and pretty-print at point.
> +- with two arguments which delimit a region containing Lisp sexps
> +  which should be pretty-printed.
> +In both cases, the function can presume that the buffer is setup for
> +Lisp syntax."

Perhaps say in the doc string something about when each algorithm is
slower/faster?

Otherwise LGTM, thanks.




This bug report was last modified 2 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.