Subject: Re: bug#27397: [PATCH] New commands for bulk tracing of elisp functions

From: Phil Sainty <[email-masked]>
Date: Mon, 19 Jun 2017 21:35:11 +1200

On 19/06/17 19:45, Michael Albinus wrote:
>>      (trace-package "tramp-")
>
> 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.

> One problem I'm always faced with Tramp are autoloaded functions.
> The code as given in the Tramp manual instruments only functions
> which are either already loaded, or which are marked as to be
> autoloaded. Functions from a Tramp package, which are loaded later
> on, are not handled.
>
> Could you add this functionality?

I'm not certain what you're asking here.

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).

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

-Phil