From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.devel Subject: Re: eieio, pretty printing, and edebug Date: Wed, 29 Oct 2014 19:50:54 -0700 Message-ID: <871tpqfey9.fsf@ericabrahamsen.net> References: <87d29dz81x.fsf@ericabrahamsen.net> <5450531F.1060601@siege-engine.com> <871tpqv406.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414637212 16002 80.91.229.3 (30 Oct 2014 02:46:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Oct 2014 02:46:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 30 03:46:45 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xjfku-0004gf-9y for ged-emacs-devel@m.gmane.org; Thu, 30 Oct 2014 03:46:32 +0100 Original-Received: from localhost ([::1]:50388 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjfkt-000894-VJ for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2014 22:46:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjfka-00088s-Cm for emacs-devel@gnu.org; Wed, 29 Oct 2014 22:46:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjfkU-0007OS-Ey for emacs-devel@gnu.org; Wed, 29 Oct 2014 22:46:12 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:41214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjfkU-0007OL-8h for emacs-devel@gnu.org; Wed, 29 Oct 2014 22:46:06 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XjfkJ-0004FA-VU for emacs-devel@gnu.org; Thu, 30 Oct 2014 03:45:55 +0100 Original-Received: from c-76-28-195-250.hsd1.wa.comcast.net ([76.28.195.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Oct 2014 03:45:55 +0100 Original-Received: from eric by c-76-28-195-250.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Oct 2014 03:45:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-76-28-195-250.hsd1.wa.comcast.net User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:ufnRfrOs8ei0iAS6aJ5PYnVmi/k= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176047 Archived-At: Stefan Monnier writes: >> objects to be a part of the "safety" routine -- would it be unreasonable >> to make edebug aware of eieio, and move most of the logic of >> `eieio-edebug-prin1-to-string' into `edebug-safe-prin1-to-string', >> guarded by a `featurep'? > > I don't think it'd be better than using advice-add, actually. > > If you want it to be cleaner, the first step is to replace > the edebug-prin1-to-string function with a variable > edebug-prin1-to-string-function (so it's clear that it's meant to be > changed), and hence to modify it with add-function rather than > advice-add. > > The even better way, as mentioned earlier, is to change prin1's > underlying infrastructure so eieio can hook into it. I just put up a patch that does considerably less than all that. I can probably manage solution number one above, but if you'd like to hold out for solution number two, I'll bow out and leave the bug report for others.