From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#25295: Acknowledgement (26.0.50; Represent eieio objects using object-print in backtraces and edebug) Date: Sat, 31 Dec 2016 12:52:12 -0800 Message-ID: <87pok7akjn.fsf@ericabrahamsen.net> References: <87pokampa4.fsf@ericabrahamsen.net> <8760m2mmlq.fsf@ericabrahamsen.net> <87bmvu84lj.fsf@users.sourceforge.net> <01696DFE-7C0E-4FAC-8893-B6826DF7BCA8@ericabrahamsen.net> <87y3yw7inw.fsf@users.sourceforge.net> <87d1g8apw3.fsf@ericabrahamsen.net> <87vatz7vix.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1483217600 8333 195.159.176.226 (31 Dec 2016 20:53:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 31 Dec 2016 20:53:20 +0000 (UTC) User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/26.0.50 (gnu/linux) Cc: 25295@debbugs.gnu.org To: npostavs@users.sourceforge.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 31 21:53:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1cNQeI-0000Xl-9s for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2016 21:53:06 +0100 Original-Received: from localhost ([::1]:45340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNQeN-0006mK-5C for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2016 15:53:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNQeH-0006mF-PW for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 15:53:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cNQeE-0004Q6-PY for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 15:53:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46349) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cNQeE-0004Q1-LW for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 15:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cNQeE-0005OF-Bc for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 15:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Dec 2016 20:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25295 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25295-submit@debbugs.gnu.org id=B25295.148321753720665 (code B ref 25295); Sat, 31 Dec 2016 20:53:02 +0000 Original-Received: (at 25295) by debbugs.gnu.org; 31 Dec 2016 20:52:17 +0000 Original-Received: from localhost ([127.0.0.1]:33515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNQdU-0005ND-1P for submit@debbugs.gnu.org; Sat, 31 Dec 2016 15:52:17 -0500 Original-Received: from mail.ericabrahamsen.net ([50.56.99.223]:39035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNQdS-0005N6-KQ for 25295@debbugs.gnu.org; Sat, 31 Dec 2016 15:52:14 -0500 Original-Received: from localhost (71-212-13-2.tukw.qwest.net [71.212.13.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id B70C9BC903; Sat, 31 Dec 2016 20:52:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1483217533; bh=PkBLSMXTAaeuUK4j6ZSwgGQLl5nDRFDe1prBzGwZeFI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=q7AY0DrNwVc38OX/8XPIVvZLwAFpcfGF9gTD+z2+f57UIm4KbZT9LLJxKlln7MvrN NIts7fQujKRx/klkO+PWxrOAk5Myg23F1jTf+J/9J6/IJhQo+5UXmO1V+JckW/+h3c Ts/b2a7tRyC5rA/PEi77J/LiRWtB1ODJ041Lzy+M= In-Reply-To: <87vatz7vix.fsf@users.sourceforge.net> (npostavs's message of "Sat, 31 Dec 2016 14:23:18 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:127647 Archived-At: On 12/31/16 14:23 PM, npostavs@users.sourceforge.net wrote: > Eric Abrahamsen writes: > >> On 12/31/16 00:48 AM, npostavs@users.sourceforge.net wrote: >>> Eric Abrahamsen writes: >>> >>> I think the only way to integrate `object-print' with the existing >>> `print' functions, would be to make it follow the same protocol. That >>> is, currently `object-print' is really `object-to-string', it should be >>> changed (or perhaps a new function (e.g., `print-object') would be a >>> better idea, so as not to break existing code too much) to accept a >>> PRINTCHARFUN argument, and print to it. >> >> The problem is that pretty much all of the printing happens at the C >> level. Whole lisp structures are sent directly to C, and it's the C code >> that recurses through them and decides how to print everything it finds >> inside. Lisp code never gets a chance (except in a few very specific >> situations). >> >> For example: when an error is raised, `backtrace--print-frame' gets all >> the contents of the error as a single argument. It simply punts that to >> `prin1', and then it's done. There's no chance to pick apart that single >> argument and see if there is an object inside. `eval-expression' >> essentially does the same thing. >> > > You would need to add a branch in print_object to detect eieio objects, > same as for the other alternative. Well sure, that's what this whole thread started out with.