From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Elisp printer Date: Thu, 02 Mar 2017 01:38:20 -0500 Message-ID: References: <87pokampa4.fsf@ericabrahamsen.net> <8760m2mmlq.fsf@ericabrahamsen.net> <87lguq5r87.fsf@ericabrahamsen.net> <878tp0i74g.fsf@users.sourceforge.net> <87efyg6y0i.fsf_-_@drachen> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488436723 9464 195.159.176.226 (2 Mar 2017 06:38:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 2 Mar 2017 06:38:43 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 02 07:38:38 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjKNl-0001gY-Nk for ged-emacs-devel@m.gmane.org; Thu, 02 Mar 2017 07:38:33 +0100 Original-Received: from localhost ([::1]:50695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjKNr-0003Id-MM for ged-emacs-devel@m.gmane.org; Thu, 02 Mar 2017 01:38:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjKNl-0003IM-DA for emacs-devel@gnu.org; Thu, 02 Mar 2017 01:38:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjKNh-00033L-H1 for emacs-devel@gnu.org; Thu, 02 Mar 2017 01:38:33 -0500 Original-Received: from [195.159.176.226] (port=41279 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cjKNh-000339-BE for emacs-devel@gnu.org; Thu, 02 Mar 2017 01:38:29 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cjKNZ-0000XH-0G for emacs-devel@gnu.org; Thu, 02 Mar 2017 07:38:21 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:XjLcek+30l+DOHXA7kltF3r8Ako= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212694 Archived-At: > Does "cl" stand for "command line" or for "Common Lisp"? It's for "Common Lisp", since it uses the Common Lisp names and calling conventions (as well as reliance on CLOS). > I find the name hard to remember in both cases, because that's not > what comes to my mind when I think of this library (when > I internet-search for "cl-print", I find mostly shops that print > business cards and such stuff...) It would probably make sense to get rid of the "cl-" prefix at some point, but that will cause `cl-prin1` and `prin1` to collide, so it would require to merge the two somehow. We might want to do it down the road, but I figured it as better to move forward with a separate name space so we don't have to solve that problem before we can use the new functionality. > Anyway, we really really need to define a printer for thunk.el thunks, > and maybe an extra printer for streams (that's why I CC Nicolas), and > probably some similar other stuff! If you look in the cl-print.el I installed into the master branch, you'll see it already has support for printing advice objects, so it should be fairly easy to use the same approach to add support for thunks, streams, iterators, ... (and contrary to what I did for advice, that support can be placed in thunk.el, stream.el, ...). Basically, the question is to figure out how to *recognize* those functions. Stefan PS: I wish we could have funcallable defstructs, so we could efficiently dispatch on the "type" of functions when those functions are used as objects.