GNU bug report logs - #27397
[PATCH] New commands for bulk tracing of elisp functions

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Fri, 16 Jun 2017 13:34:02 UTC

Severity: wishlist

Tags: moreinfo, patch

Merged with 1343, 6464

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Phil Sainty <psainty <at> orcon.net.nz>
Cc: 27397 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: bug#27397: [PATCH] New commands for bulk tracing of elisp functions
Date: Mon, 19 Jun 2017 11:56:23 +0200
Phil Sainty <psainty <at> orcon.net.nz> writes:

Hi Phil,

>> There's no package "tramp-". Better would be
>>
>>         (trace-regexp "^tramp-")
>
> To be clear, the two are functionally equivalent; but if you'd prefer
> it written that way then I'm happy to make that change.

Ahh, my error. I thought that `trace-package' takes a package name (or
symbol), and traces only all functions which have been loaded by this
package. (trace-package 'tramp) would then trace the function
`tramp-file-name-handler (defined in tramp.el) , but not the function
`tramp-sh-file-name-handler'. The latter one is defined in tramp-sh.el.

> With respect to the manual entry being discussed here, we could
> trivially show code to `require' all of the tramp-* libraries prior
> to calling trace-package or trace-regexp. e.g.:
>
> (mapc 'require '(tramp tramp-adb tramp-cache tramp-cmds
>                        tramp-compat tramp-ftp tramp-gvfs tramp-sh
>                        tramp-smb tramp-uu trampver))
>
> (or else something which automatically locates library names starting
> with "tramp-" and loads them all).

That's not what I want. Often, I hunt bugs related to the order of
autoloaded functions, and this order shall be kept also when tracing.

> Perhaps you're actually be suggesting some kind of `eval-after-load'
> tracing behaviour, though?

Yes, that's the idea. If `trace-package' uses as argument a package name
as proposed above, the instrumentation shall happen in an
`eval-after-load' form for that package.

`trace-regexp', on the other hand, shall instrument the functions in a
form added to `after-load-functions', additonally to the functions
already loaded.

> -Phil

Best regards, Michael.




This bug report was last modified 2 years and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.