From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Ludlam Newsgroups: gmane.emacs.devel Subject: Re: Improving representation of EIEIO objects in backtraces/error messages Date: Sat, 7 Jan 2017 20:51:00 -0500 Message-ID: <56e042cf-ee2d-03b0-ceba-f1483fa2b01c@siege-engine.com> References: <87ful6o8x4.fsf@ericabrahamsen.net> <7b792dd9-491a-b442-f837-e85326a6c924@siege-engine.com> <87wpefakpe.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1483840311 13421 195.159.176.226 (8 Jan 2017 01:51:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Jan 2017 01:51:51 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: Eric Abrahamsen , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 08 02:51:45 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 1cQ2e4-0002Ee-0l for ged-emacs-devel@m.gmane.org; Sun, 08 Jan 2017 02:51:40 +0100 Original-Received: from localhost ([::1]:59919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQ2e8-0002X6-4j for ged-emacs-devel@m.gmane.org; Sat, 07 Jan 2017 20:51:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQ2dY-0002Wq-Do for emacs-devel@gnu.org; Sat, 07 Jan 2017 20:51:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQ2dV-0001Ne-CL for emacs-devel@gnu.org; Sat, 07 Jan 2017 20:51:08 -0500 Original-Received: from mail-qk0-f173.google.com ([209.85.220.173]:34447) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cQ2dV-0001Mc-7Y for emacs-devel@gnu.org; Sat, 07 Jan 2017 20:51:05 -0500 Original-Received: by mail-qk0-f173.google.com with SMTP id a20so111399919qkc.1 for ; Sat, 07 Jan 2017 17:51:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=ntOWhBRrKLLPTVcp9uUIZrsZs0IOS1Ic1bm6lkjyz+4=; b=eLwjrLl5H7vFQSxwhRlAYpb9lMt1KuPX7VSEFhL1Zx6TtacRzTWyyXzjLbxXD8WTJs YLkUEPO8PDhluPvlpmkmfSfiJoxNqhxmDXluczOjxOLoqIDMlyyO2EYGvj7WmwYelrDX Y9vhVIj+mHIkJkBvRvYLNBdvYuvB8uf0W7Dd1qB8simqLG1BjbMLKs+RxzPhmoOR5CDk 2R1v1nQUaISw0CNikojjjP6PZ+mkfWcYTC0XpnIqwA+jLcAgq/ldAn109oCvEKFP9Hsd rVzrG2WCyUH1isAmD6BOoaQ17VZZBVDxqQIPCW0abBx7Clh/K3TzHl4CaXhCPfIAFfJx P+/Q== X-Gm-Message-State: AIkVDXLqPWQWd8/Js80TfxlQLo5Bush0QMBhkXXT65OLXUQ1kM6A5GeOnviu+FMtdVCYLQ== X-Received: by 10.55.48.9 with SMTP id w9mr77987199qkw.49.1483840262923; Sat, 07 Jan 2017 17:51:02 -0800 (PST) Original-Received: from [192.168.1.202] (pool-100-0-32-98.bstnma.fios.verizon.net. [100.0.32.98]) by smtp.googlemail.com with ESMTPSA id t7sm54071832qtd.13.2017.01.07.17.51.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2017 17:51:01 -0800 (PST) In-Reply-To: <87wpefakpe.fsf@ericabrahamsen.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.173 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:211159 Archived-At: On 12/31/2016 03:48 PM, Eric Abrahamsen wrote: > Eric Ludlam writes: > >> On 12/29/2016 02:02 PM, Eric Abrahamsen wrote: ... >> CEDET includes a 'data-debug' package. If you enable that it provides a >> way to navigate giant data structures as you might get with EIEIO. It >> is also a part of Emacs now, though I'm not that familiar with how it >> all was merged. >> >> I have this in my .emacs file to take advantage of it: >> >> (require 'data-debug) >> (global-set-key "\M-:" 'data-debug-eval-expression) > > That's interesting, thanks! I'll play with it a bit, it might be nice to > add the slot names in with the values. The slot names should be included in the display. At least they are for me in my older Emacs. It may be that the eieio-support doesn't work quite right after the EIEIO change in Emacs? In CEDET, eieio-datadebug is separate, but with EIEIO as a piece of core emacs with Data Debug, maybe the current tenuous load should be replaced by merging eieio-datadebug into data-debug. ... >> In the CEDET repository, you can get cedet-edebug.el. It includes >> these two snippets that bind "A" to data debug. >> >> ;;;###autoload >> (add-hook 'edebug-setup-hook [...] > These are all good for me as a developer, but I would also like to > protect users from backtraces that might, ahem, arise from my code. Do > you have any opinion on the discussion in > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25295 ? Anything would be > welcome. I'm not familiar with Emacs C level expression printing. That's why I just stopped using built ins and added my own top level commands to get things done. The ideas represented in the thread where some special vector-form could fork off to a special printer sounds like a pretty nice idea though. That way more than just EIEIO objects could be simplified. In the above thread, someone mentioned giving up an object's ability to customize it's print output. This is a super handy feature where you can take some key differentiator of your object that is short to put into the short form print output. Taking advantage of that feature makes using the short print output even better. Of course, the developer needs to implement the method to make it work. I usually go add a new print-object method when I'm debugging so I can figure out what's going on. Eric