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 00:48:51 -0500 Message-ID: <87y3yw7inw.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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1483163306 26100 195.159.176.226 (31 Dec 2016 05:48:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 31 Dec 2016 05:48:26 +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 06:48:20 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 1cNCWa-00058F-SL for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2016 06:48:13 +0100 Original-Received: from localhost ([::1]:42679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNCWf-0002rL-GY for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Dec 2016 00:48:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cNCWV-0002qu-Cc for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 00:48:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cNCWQ-0004SU-PL for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 00:48:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45381) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cNCWQ-0004SK-M8 for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 00:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cNCWQ-0007fd-3g for bug-gnu-emacs@gnu.org; Sat, 31 Dec 2016 00:48: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 05:48: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.148316328029477 (code B ref 25295); Sat, 31 Dec 2016 05:48:02 +0000 Original-Received: (at 25295) by debbugs.gnu.org; 31 Dec 2016 05:48:00 +0000 Original-Received: from localhost ([127.0.0.1]:60780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNCWO-0007fN-Hg for submit@debbugs.gnu.org; Sat, 31 Dec 2016 00:48:00 -0500 Original-Received: from mail-it0-f50.google.com ([209.85.214.50]:34688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNCWN-0007fB-9i for 25295@debbugs.gnu.org; Sat, 31 Dec 2016 00:47:59 -0500 Original-Received: by mail-it0-f50.google.com with SMTP id 75so64379010ite.1 for <25295@debbugs.gnu.org>; Fri, 30 Dec 2016 21:47:59 -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=XX1QcHPo8NyRLggo2G6mhgGgCmmOBDTyCob3TMgzWVI=; b=ZkUR0pK5OwupCj+lOjFF04vIGslj4/SNsnzkV2BOs3ZULmKj5RUDn0rmUn3eAT3rDu W5KKQkH7GzeQ50mKQFzHoLGl5J76xS+BDMSzmzAcCqlyIKiHz6MnX/WYdVM5YZW0lKk6 +fJ1aFbb8dxqDRHNwFSMuKbQfgWi1aCKbHdNUp2iQHpCFtRxzT0lWpnq0DFX0wDESZtw pAmZ2w29Jm482Pu7Z7kRtbxNktnDInOVv+rZnCf+qkfHi9n+Gqd14DLxF+xrDiakIJQO dBQHRMNl3NVwV1Vha22LBi5XvjUrrWTHDqNYBnccjgkckupLC1V7b6yV/wy/Gph1kEQ6 W5SA== 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=XX1QcHPo8NyRLggo2G6mhgGgCmmOBDTyCob3TMgzWVI=; b=HvNExiAfNpzvDqCJHB1GTpwIg3Y0zYAS0Wrfzv0STsBYarXFO9tYtCGGzke9veYaE2 JCtcivY6hWZToGEmCKw9y8bXArFevKGuKqrzZh3xFI93C1SWbnLa5T+qETfwY3t+CZMw GSZwUzahyqXI25rL7lH3bARBxzSjv26bRDuwG3ud2NTAijzQn6VKV3wSx/QSDP07zAzL +tF2M9YW58DT6A6poIlwez4aPgUmlVjQ4Aazzj7aIpt+GvbooEgprpeDMJ6GQVMwPrWi UU8jTRoy/WK5wAXKL7IrMY4Vu3nrc6JyvePROgrxV6w8cPAYo2eAuD68iZajIQggm+z1 FeLQ== X-Gm-Message-State: AIkVDXLEH4LQrh7Bf1B7ci6E5/nGspVWGqlF0RaoCUPry6WYLHhK3khYRLQ7sqO2tp4ZFQ== X-Received: by 10.36.101.129 with SMTP id u123mr39817300itb.30.1483163273717; Fri, 30 Dec 2016 21:47:53 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id v74sm28259073ioi.2.2016.12.30.21.47.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Dec 2016 21:47:52 -0800 (PST) In-Reply-To: <01696DFE-7C0E-4FAC-8893-B6826DF7BCA8@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 30 Dec 2016 11:14:49 -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:127612 Archived-At: Eric Abrahamsen writes: > On 12/30/16 09:51 AM, Eli Zaretskii wrote: >>> From: Eric Abrahamsen >>> Date: Thu, 29 Dec 2016 13:50:09 -0800 >>> >>> I guess this would require going into print.c and adding another branch >>> under the Lisp_Vectorlike case statement of object_print. >>> >>> Is this sort of C code allowed to call back up to the lisp object-print >>> function? >> >> If that Lisp function will then call print.c again, that's not a good >> idea, since print.c internally uses a buffer by a certain fixed name. > > `object-print' ends up using `format', which looks like it calls print.c > functions, so I guess that's out. > > I don't know the right level at which to intervene. All other lisp > objects get a hard-coded # print.c, only eieio objects "fake it" with a user-overrideable lisp > function. I suspect eieio objects won't be considered "fundamental" on > the same level as markers, buffers, etc., so maybe they don't belong in > print_object (plus the above problem of calling lisp-c-lisp-c). > > I don't see how we could hijack at the lisp level, though. Functions > like `eval-expression' and `backtrace--print-frame' simply toss whole > lisp structures to prin1, there's no way to know that there's an eieio > object somewhere in that structure. > 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. > 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.