Subject: Re: bug#50187: 28.0.50; tramp is called from calendar

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 23 Aug 2022 21:29:42 +0200

Michael Heerdegen <[email-masked]> writes:

> And we see in the backtrace that `calendar-basic-setup' is not done.
> And why else should a call of `calendar-cursor-to-visible-date' directly
> invoke tramp?  If an Elisp function would be involved, it would appear
> in the backtrace.

I don't quite understand what you mean.

If you

(debug-on-entry 'tramp-file-name-handler)
(push "/ssh:host:/tmp/" load-path)

and then do something that will trigger an autoload, you get a backtrace
like that (depending on what it's autoloading):

  tramp-file-name-handler(expand-file-name "tramp" "/ssh:host:/tmp/")
  tramp-file-name-handler(expand-file-name "tramp" "/ssh:host:/tmp/")
  tramp-file-name-handler(expand-file-name "mule-util" "/ssh:host:/tmp/")
  truncate-string-to-width(#("<     Calendar     ? info / o other /
  calendar-string-spread((#("<" 0 1 (help-echo "mouse-1: previous m
  calendar-update-mode-line()
  calendar-mode()
  calendar-basic-setup(nil)
  calendar()
  eval((calendar) nil)

Here's it's calling truncate-string-to-width (which is autoloaded from
mule-utils).