From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: bug#24514: 24.5; Lispy backtraces Date: Mon, 05 Dec 2016 05:30:41 +0200 Message-ID: <838trvkq72.fsf@gnu.org> References: <20160922231447.GA3833@odonien.localdomain> <98fbb582-3da4-bd83-a2e9-e341dd7f6140@gmail.com> <20160923075116.GA612@odonien.localdomain> <82e39377-f31b-698c-5a9a-343868686799@gmail.com> <20161202005226.GA4215@odonien.localdomain> <0a69afa7-e9e6-e75f-8e90-6438683db98d@gmail.com> <53ba4534-1ec3-4e4f-d929-1a72f79c1abe@gmail.com> <83mvgblniy.fsf@gnu.org> <143c480c-a9db-7053-4b70-175633197981@gmail.com> <83a8cbl94w.fsf@gnu.org> <233f14a0-7542-5d0c-d8da-209e7e5e54f7@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1480908709 18639 195.159.176.226 (5 Dec 2016 03:31:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Dec 2016 03:31:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?windows-1252?Q?Cl=E9ment?= Pit--Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 05 04:31:39 2016 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 1cDk0A-00034t-TP for ged-emacs-devel@m.gmane.org; Mon, 05 Dec 2016 04:31:39 +0100 Original-Received: from localhost ([::1]:36671 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDk0E-0002Q9-Qd for ged-emacs-devel@m.gmane.org; Sun, 04 Dec 2016 22:31:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDjz2-0002OJ-Sh for emacs-devel@gnu.org; Sun, 04 Dec 2016 22:30:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDjyy-0002aL-Uf for emacs-devel@gnu.org; Sun, 04 Dec 2016 22:30:28 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDjyy-0002aF-R7; Sun, 04 Dec 2016 22:30:24 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2497 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cDjyx-0004S5-TO; Sun, 04 Dec 2016 22:30:24 -0500 In-reply-to: <233f14a0-7542-5d0c-d8da-209e7e5e54f7@gmail.com> (message from =?windows-1252?Q?Cl=E9ment?= Pit--Claudel on Sun, 4 Dec 2016 17:14:38 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:210048 Archived-At: > Cc: emacs-devel@gnu.org > From: Clément Pit--Claudel > Date: Sun, 4 Dec 2016 17:14:38 -0500 > > > So would it perhaps make sense to rename 'backtrace' into something > > like 'backtrace--internal', and make it accept one more argument, the > > function to apply to each frame, which is now hard-coded as 'prin1'? > > Would that allow you to implement 'backtrace' in Lisp and also > > implement whatever application you had in mind, by calling > > 'backtrace--internal' passing it your own function instead of 'prin1'? > > Quite possibly! Are you worried about the cost of allocating a list containing all frames? No, I'm not worried about that. > a variant of backtrace taking a callback would definitely make backtrace-frames easy to implement on the lisp side :) Yup. > There's no big hurry on this, anyway: it's just that we recently added a neat option to backtrace, and there were mentions of making the backtrace buffer more useful in various ways, too. Will you be working on this idea at some point?