From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#27397: [PATCH] New commands for bulk tracing of elisp functions Date: Sat, 17 Jun 2017 21:20:00 +1200 Message-ID: <94d27dbb-46d3-1d6f-4849-251a0929d413@orcon.net.nz> References: <1348823a-7623-8146-8cc0-8c0eff13e458@orcon.net.nz> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1497691281 27162 195.159.176.226 (17 Jun 2017 09:21:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Jun 2017 09:21:21 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 To: 27397@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 17 11:21:15 2017 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 1dM9us-0006ft-2E for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jun 2017 11:21:14 +0200 Original-Received: from localhost ([::1]:33918 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dM9ux-0004VV-6v for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jun 2017 05:21:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dM9ul-0004VO-NU for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:21:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dM9ug-0003Hq-OX for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:21:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49431) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dM9ug-0003Ha-Jt for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dM9ug-0003U1-Ei for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Jun 2017 09:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27397 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.149769123213345 (code B ref -1); Sat, 17 Jun 2017 09:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Jun 2017 09:20:32 +0000 Original-Received: from localhost ([127.0.0.1]:52108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM9uC-0003TB-AD for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:20:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dM9uA-0003Sw-Al for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:20:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dM9u4-0002gw-3K for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:20:25 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53703) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dM9u4-0002gr-0E for submit@debbugs.gnu.org; Sat, 17 Jun 2017 05:20:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dM9u2-0004Ta-Jo for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:20:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dM9tx-0002cs-Lb for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:20:22 -0400 Original-Received: from smtp-3.orcon.net.nz ([60.234.4.44]:40173) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dM9tx-0002bq-B1 for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 05:20:17 -0400 Original-Received: from [150.107.172.84] (port=54249 helo=[192.168.20.102]) by smtp-3.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1dM9tg-0005Tu-NR for bug-gnu-emacs@gnu.org; Sat, 17 Jun 2017 21:20:12 +1200 In-Reply-To: <1348823a-7623-8146-8cc0-8c0eff13e458@orcon.net.nz> Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -1.0 X-Spam_score_int: -9 X-Spam_bar: - X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:133690 Archived-At: Thanks to the merge with https://debbugs.gnu.org/cgi/bugreport.cgi?bug=1343 and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6464 I see that there was a previous submission of a `trace-package' command which (a) used foreground tracing, and (b) provided `trace-package-background' as a separate command. I should note that I elected not to support foreground tracing for my proposed commands, simply because it seemed to me that foreground tracing could be problematic in too many cases, when the traces are being applied en masse on the basis of function name pattern matching. The current `trace-function-foreground' docstring says: > This function creates BUFFER if it does not exist. This buffer will > popup whenever FUNCTION is called. Do not use this function to trace > functions that switch buffers, or do any other display-oriented > stuff - use ‘trace-function-background’ instead. My compromise was to indicate the `trace-buffer' value in the echo area when the commands are invoked, so that the user would know where the trace output was happening. Actually popping up that buffer when the `trace-package' or `trace-regexp' command is used would be another (perhaps nicer) option? I'm open to recommendations for the most useful approach. Do others think that foreground versions of these commands would be a good idea? A prefix argument could mean "use foreground tracing", but that's inconsistent with `trace--read-args' which uses a prefix arg to prompt the user for the trace buffer and a context expression -- which I now realise is behaviour that my commands should incorporate as well. -Phil