From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net 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 14:23:18 -0500 Message-ID: <87vatz7vix.fsf@users.sourceforge.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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1483212205 11580 195.159.176.226 (31 Dec 2016 19:23:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 31 Dec 2016 19:23:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 25295@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 31 20:23:17 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 1cNPFH-00017u-Rb for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2016 20:23:12 +0100 Original-Received: from localhost ([::1]:45182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNPFK-000696-QR for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2016 14:23:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNPFD-00068q-Mc for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 14:23:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cNPF8-0003Cm-Jb for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 14:23:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46327) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cNPF8-0003Ci-GS for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 14:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cNPF8-0003J8-80 for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 14:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Dec 2016 19:23: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.148321214512655 (code B ref 25295); Sat, 31 Dec 2016 19:23:02 +0000 Original-Received: (at 25295) by debbugs.gnu.org; 31 Dec 2016 19:22:25 +0000 Original-Received: from localhost ([127.0.0.1]:33493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNPEX-0003I1-01 for submit@debbugs.gnu.org; Sat, 31 Dec 2016 14:22:25 -0500 Original-Received: from mail-it0-f41.google.com ([209.85.214.41]:36667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNPEV-0003Hn-I8 for 25295@debbugs.gnu.org; Sat, 31 Dec 2016 14:22:23 -0500 Original-Received: by mail-it0-f41.google.com with SMTP id 75so230427471ite.1 for <25295@debbugs.gnu.org>; Sat, 31 Dec 2016 11:22:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=vWg3o02LiDMG37o41mac6gMI4aPkwWUwnf7XBMtVkvs=; b=i1hqAQGZZZRr9mvIQcdK1e+eJZz8I5P5apLL8b0nqKTXoquOIlvyu67hXyZMY//D21 fN269bzQfrkDvrwiYaZ/DLsfPolJOtlzM+yekDDsJ8EnaX6yrw0dMKzimE2yar573QRS TQRFysq3byMzlYb/fMt7nGO22wYYn+jKPE2dqb3A9qp4wu91vXg1ze6Yn7f12euUdwGt 1wA81BdJ9HF2fIbmHYZFefGFYae2CAT0/GW8NylW6dPrYadYl4jiLJa5YFlbXI3RtF6u Z/JD7dKO6Ch/hE1NCuo0njBZyXWRsu+7S6Y5J22uhVSKq/pKqmE4SLQLT+RlHGmOvYvu pY9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=vWg3o02LiDMG37o41mac6gMI4aPkwWUwnf7XBMtVkvs=; b=rI/ZPiI43Qni2M+dLqCJdf7RCFLZvdVX74HlUCBpyhVzz3eom5FjbLB33VAOO0HaLi WCaM3dmK42QV+DY/6y1Iopa1y3304O/AY96KF5cZKULhO6MkQqhG9hOFTF3lMar/lDEa PEBm/nDaAlyQy0o9OFwoACPF8lkT/K6GwqTdgTZm7hYTcNLgfdNC9cH9EJfJKfPYYTnp kxctlT2uwGPZ+fyJRWiY35FGznUtpLlUTlN8hAT6PyA3aqWEPr9mJ01mwf57wyFpgt8r 97HO9YXWn2kJtv4aQ41UnLrz58pse0GcMW/SvQiE4P90VaY6GdwGVAzxfYmT/HdV3yat VrbQ== X-Gm-Message-State: AIkVDXIgTBePzndKDvtuK8Co7/bmC43445NnPKUuDkkisa8L62XlAOfhXgecKve0DaxE2w== X-Received: by 10.36.57.75 with SMTP id l72mr45278507ita.11.1483212137594; Sat, 31 Dec 2016 11:22:17 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id n102sm29153457ioi.38.2016.12.31.11.22.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 31 Dec 2016 11:22:17 -0800 (PST) In-Reply-To: <87d1g8apw3.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 31 Dec 2016 10:56:44 -0800") 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:127644 Archived-At: 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. >>> Personally, I'd be willing to lose the ability to customize object >>> representations with `object-print', if it meant that print_object could >>> produce a #>> C test like INSTANCEP or what have you. >>> >> >> That's easier, of course, but a non-customized representation would be >> pretty uninformative. > > Having looked at the code, I'm not too optimistic about achieving the > ideal solution. Getting eval-expression and backtraces to stop exploding > seems like enough for now.