From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pierre Rouleau Newsgroups: gmane.emacs.help Subject: Has something changed in the autoload mechanism in Emacs 29? Date: Wed, 24 Jul 2024 22:05:02 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22661"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 04:06:17 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sWns1-0005hx-2x for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 04:06:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWnrQ-00009H-T5; Wed, 24 Jul 2024 22:05:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWnr9-00005m-So for help-gnu-emacs@gnu.org; Wed, 24 Jul 2024 22:05:25 -0400 Original-Received: from mail-ua1-x92d.google.com ([2607:f8b0:4864:20::92d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWnr7-0006u2-3n for help-gnu-emacs@gnu.org; Wed, 24 Jul 2024 22:05:23 -0400 Original-Received: by mail-ua1-x92d.google.com with SMTP id a1e0cc1a2514c-8205ceff95cso141015241.1 for ; Wed, 24 Jul 2024 19:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721873114; x=1722477914; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=v1RWx7ko43DFQ8LJ5MSeTDIseByBECXEXWe2ESa57Ms=; b=P6mpgcQc70gD98PW55kSh481YzdNtO3d9nIXUnAs3TIYSJM6Xk2n5LQExK5OqbyyOg 23EEhFLZwWDCENb2JAm3Q8rMMbMgluLBP4ls3cnwTnzC4Y2zEHkJf4SVXT1l0JRGg57b kv6V3GXMOzhJo2zwImsaSXELLDos2Ko98OhpedwhoeNY/E4sI9oC6lP1JnuCBx/e6XFD ONqcTgqcQ5g72+yUrICPoHp4vmbymdKjEhjCNrG91QPWEt3k7DSZHD8PgotK26rKBpdh ZF+vVknfgV79oKyuavf752D0gVWuof8Bp9AcZ1gQp6Y37LBwT1eY+TeOr08Uo+QN6k4v i6Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721873114; x=1722477914; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=v1RWx7ko43DFQ8LJ5MSeTDIseByBECXEXWe2ESa57Ms=; b=kGtDV8IynYtlO62gSnMEHv/9t5qfz/X+3qG1b8HUn1kfIpUkgD4pM/0PT9x4jo0MFZ DceLIy9LItDYQOp1amPgT40OQscWAcnJ+m56YUdan7v79kDf34ifKo2LLget6kzzNyy9 df5YD0O8YWGNjLWi24/zMrMZvNYlF+gHRZWwqbj+zi2D1j/8sfjDB1xC5hWdUZsr6200 qhclorxQUkhGReqthNOjIDcatvFa25zjHngVBRtm7QQJybkMrJI1wNRwSZ/3/XOC5vEv W6rK8fFlumr+EY13gZIs2qnl2xnIa5tpchQ0UEjNZPjzmb5VZzItEAK6Tc2II0KgMZTF VlYQ== X-Gm-Message-State: AOJu0YzODq5QmzoEhijYXsNlOF+uIFppAXij3VNgqD7IJrfgUHLZCRN/ inn5SFEsJ8tSo40P0T5xy/XWlZ7MjpfMKIJUCXG50IZAQYn7tILbsWNvKGtSxUzLG+WP9YkGqHo k+JAdPwGOk62eo+SpOlWSobM6/GM8yTOq X-Google-Smtp-Source: AGHT+IGf9wHjUr2QF65JOvvdhkbX9qGdOVYnfQLpPTvZ6mxuAwXq5oXIOY9KGNe94pP+mJG6Yyrw+1Vv3Vep++lpppQ= X-Received: by 2002:a05:6102:334a:b0:48f:3df9:ff9 with SMTP id ada2fe7eead31-493d640fefdmr1758166137.8.1721873113553; Wed, 24 Jul 2024 19:05:13 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::92d; envelope-from=prouleau001@gmail.com; helo=mail-ua1-x92d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147356 Archived-At: Hi all, I stumbled upon a behaviour that is surprising to me when using something I wrote in my PEL system ( https://github.com/pierre-rouleau/pel) : the autoloading of the PEL functions fails for at least one function (a non-interactive one) and when I use `describe-symbol` on the name of that function, the help buffer shows information identifying that function as being implemented in the wrong file. This is the first time I noticed this. I assume something must be wrong in my code, but I've used it on emacs 26, 27, 28 on various computers without any problem. My system probably differs from others in the way it starts: - My ~/.emacs.d/init.el only hold some basic logic that must be located there but does not activate the packages I used, for the most part; that job is done by my pel-init function which then checks user options and activates the features requested by it. The pel-init() function has the following code: (unless (fboundp 'pel-build) ;; autoload all PEL functions (require 'pel-autoload) (if (fboundp 'pel--autoload-init) (pel--autoload-init))) The 'pel-build symbol is normally not bound, that's only used for testing. The pel--autoload-init function, located inside the pel-autuload.el file, has the following: (defmacro pel-autoload-function (fname for: &rest functions) "Schedule the autoloading of FNAME for specified FUNCTIONS. Argument FOR: just a required separator keyword to make code look better." (declare (indent 2)) (ignore for:) (if (> (length functions) 1) `(dolist (fct (quote (,@functions))) (autoload fct ,fname)) `(autoload (quote ,@functions) ,fname))) (defmacro pel-autoload (fname for: &rest functions) "Schedule the autoloading of FNAME for specified interactive FUNCTIONS. Argument FOR: just a required separator keyword to make code look better." (declare (indent 2)) (ignore for:) (if (> (length functions) 1) `(dolist (fct (quote (,@functions))) (autoload fct ,fname nil :interactive)) `(autoload (quote ,@functions) ,fname nil :interactive))) And then the definition of pel--autoload-init which schedules the autoloading of the PEL functions explicitly with the above macros: It start with this: (defun pel--autoload-init () "Intialize the PEL system -- prepare automatic loading of all function." (require 'pel--options) And then has several blocks like the following: (pel-autoload "pel-abbrev" for: pel-ispell-word-then-abbrev pel-abbrev-info) (pel-autoload "pel-align" for: pel-newline-and-indent-below pel-align-info pel-toggle-newline-indent-align pel-multi-align-regexp) (when (eq system-type 'darwin) (pel-autoload "pel-applescript" for: pel-pel-say-word pel-say-sentence pel-say-paragraph pel-say-region pel-say pel-say-words) (pel-autoload-function "pel-applescript" for: pel-run-applescript)) These all work, but one does not seem to work: (pel-autoload-function "pel-ffind" for: pel-ffind pel-generic-find-file) The pel--find is found in the right file, but not pel-generic-find-file. It registers as if it was defined in the pel_keys.el file where pel-init() is defined: the *help* message displays : pel-generic-find-file is an autoloaded byte-compiled Lisp function in =E2=80=98pel_keys.el=E2=80=99. And this is wrong. The rest of the help is correct. It shows the function signature and the correct docstring. Note I byte-compile *all* my code. I have a make file that does that. Does anyone have ideas as to where I should be looking? Thanks (and sorry for the long description). --=20 /Pierre