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: New pp Date: Sun, 12 Mar 2017 10:06:25 -0400 Message-ID: References: <87pokampa4.fsf@ericabrahamsen.net> <87innrc03h.fsf@users.sourceforge.net> <87k27w8j2l.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489327600 14294 195.159.176.226 (12 Mar 2017 14:06:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Mar 2017 14:06:40 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Emacs developers To: Noam Postavsky Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 12 15:06:36 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 1cn48l-0002p2-Bh for ged-emacs-devel@m.gmane.org; Sun, 12 Mar 2017 15:06:31 +0100 Original-Received: from localhost ([::1]:47176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn48r-0006gS-BI for ged-emacs-devel@m.gmane.org; Sun, 12 Mar 2017 10:06:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cn48k-0006gL-Li for emacs-devel@gnu.org; Sun, 12 Mar 2017 10:06:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cn48g-0003Hu-Me for emacs-devel@gnu.org; Sun, 12 Mar 2017 10:06:30 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:19554) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cn48g-0003Hh-H7 for emacs-devel@gnu.org; Sun, 12 Mar 2017 10:06:26 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AZDACZVcVY/9TkSC1cHAEBBAEBCgEBg1FBhDyFV4V4kFwpAZcfhhwEAgKCQEQUAQIBAQEBAQEBayiFFgEEAVYjEAsOJhIUGA0kigsIs3yKXQEBCAImiz2KOQEEnEGKHpJehmKTQzYhgQQjFggshzQkiiMBAQE X-IPAS-Result: A0AZDACZVcVY/9TkSC1cHAEBBAEBCgEBg1FBhDyFV4V4kFwpAZcfhhwEAgKCQEQUAQIBAQEBAQEBayiFFgEEAVYjEAsOJhIUGA0kigsIs3yKXQEBCAImiz2KOQEEnEGKHpJehmKTQzYhgQQjFggshzQkiiMBAQE X-IronPort-AV: E=Sophos;i="5.36,152,1486443600"; d="scan'208";a="295082883" Original-Received: from 45-72-228-212.cpe.teksavvy.com (HELO pastel.home) ([45.72.228.212]) by smtp.teksavvy.com with ESMTP; 12 Mar 2017 10:06:25 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 0ACFE6187C; Sun, 12 Mar 2017 10:06:25 -0400 (EDT) In-Reply-To: (Noam Postavsky's message of "Sun, 12 Mar 2017 09:31:53 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:212942 Archived-At: >> We could change the cl-defgeneric to specify that the second arg comes >> before the first when ordering methods with (:argument-precedence-order >> stream object). > Works. >> But it still feels brittle. > Any other ideas? Add cl-princ? Use a function for `stream`? Extend the print.c code to accept other kinds of streams? Don't try to do it all within cl-print-object but use a separate function on top of it? The second option should work right now, except you can't easily dispatch on them. The problem with it is that it might prove slow (one function call per character), but maybe we can fix this by changing the print.c code so those function-valued streams can be called with a string rather than with a single char. Stefan