GNU bug report logs -
#27397
[PATCH] New commands for bulk tracing of elisp functions
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
trace.el currently only has commands for adding a trace to a single
function, and for untracing either a single function or ALL traced
functions.
This patch adds commands for tracing and untracing functions in bulk,
either by function name prefix (`trace-package' and `untrace-package')
or by regexp (`trace-regexp' and `untrace-regexp').
The use of the term "package" for the prefix-based commands was chosen
for consistency with `elp-instrument-package', from which this code is
partly derived, and from which I have also maintained a warning and
basic protection against attempts to trace too many functions at once
(which can indeed render Emacs unusable). It it still possible to do
this, but I feel the checks which are currently in place are probably
sufficient to protect against accidents.
`trace-is-traceable-p' is using Stefan's suggestion in his comment on
my initial implementation at https://stackoverflow.com/a/44241058 and
I have changed the completing-read filter predicate in
`trace--read-args' to also use this (instead of `fboundp'), on the
assumption that this makes more sense.
(I note that the `trace-is-traced' function does not follow the usual
naming convention for predicates. Should this be renamed to
`trace-is-traced-p' ?)
This patch also removes some outdated docstring comments for
`untrace-function' which were clearly remnants of the earlier
implementation using advice.el (whereas the current library is based
on nadvice.el).
-Phil
[0001-New-commands-for-bulk-tracing-of-elisp-functions.patch (text/x-patch, attachment)]
This bug report was last modified 2 years and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.