From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerard Vermeulen Newsgroups: gmane.emacs.bugs Subject: bug#71537: 30.0.50; [PATCH] missing autoload cookies Date: Thu, 13 Jun 2024 20:57:50 +0000 Message-ID: <76a8fbc0c826314a440c04d54fc1f71f@posteo.net> References: <6b02899a34d61995765d18f245dd33c5@posteo.net> <868qz8zwku.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19982"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71537@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 13 22:58:32 2024 Return-path: Envelope-to: geb-bug-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 1sHrWh-0004zA-El for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Jun 2024 22:58:31 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHrWG-0003ZH-M5; Thu, 13 Jun 2024 16:58:04 -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 1sHrWF-0003W4-2n for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2024 16:58:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHrWE-0000li-Qu for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2024 16:58:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sHrWE-000815-8P for bug-gnu-emacs@gnu.org; Thu, 13 Jun 2024 16:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerard Vermeulen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Jun 2024 20:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71537 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71537-submit@debbugs.gnu.org id=B71537.171831228130808 (code B ref 71537); Thu, 13 Jun 2024 20:58:02 +0000 Original-Received: (at 71537) by debbugs.gnu.org; 13 Jun 2024 20:58:01 +0000 Original-Received: from localhost ([127.0.0.1]:39343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHrWC-00080p-Rg for submit@debbugs.gnu.org; Thu, 13 Jun 2024 16:58:01 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:50887) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sHrW9-00080Y-GV for 71537@debbugs.gnu.org; Thu, 13 Jun 2024 16:57:59 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BF272240103 for <71537@debbugs.gnu.org>; Thu, 13 Jun 2024 22:57:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1718312271; bh=R7tPVH0+MelfrLPuqt7SYTKQHYEyFbr7o0MQIedLsMI=; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Date:From:To: Cc:Subject:Message-ID:From; b=VBpNEWDi5+SinQh4uxFJrCTbRZWuAF6zT9gRe5syX1onXv2YgfWFyw8ccRcwbZAJB 1KFOPPKfW+SQO1RItJs+RUcsEA5U7JnyrR93kOD4D6DnZhnf/Fjx3QvLuZQJV/3Lek KtF1YFIRxJxj4TdTl/hSWLMDgiHJEexR4swV+vTrG2y5hUYGduBYHHoEZCDEaiwzAa uWwEkaz0V/hQomzvDcbQCrDAP0zx9w4PF+JkJZqke86tyxyghYlqUTKo9T5SH1r4WJ P2C5mWwLS/gsBtSrYApyGvz8E1I3he7dNbI2a7s56Uw+gbVR0Fndiflu+c+2pylcuz g1ZnniLGiaeqg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W0ZVl17Mqz6tsB; Thu, 13 Jun 2024 22:57:51 +0200 (CEST) In-Reply-To: <868qz8zwku.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287208 Archived-At: On 13.06.2024 17:33, Eli Zaretskii wrote: >> Date: Thu, 13 Jun 2024 14:59:06 +0000 >> From: Gerard Vermeulen >>=20 >> I propose the attached patch adding three missing autoload cookies >> to eliminate two require forms from two sections in my init.el. >>=20 >> To eliminate (require 'shortdoc) from the first section: >> (with-eval-after-load 'help-fns >> ;; ChatGPT recommends to require `shortdoc' contrary to the >> ;; `shortdoc-help-fns-examples-function' documentation string. >> (require 'shortdoc) >> (add-hook 'help-fns-describe-function-functions >> #'shortdoc-help-fns-examples-function) >> (setopt help-enable-symbol-autoload t)) >>=20 >> And to eliminate (require 'pulse) from the second section: >> (require 'pulse) ; since `pulse' does not autoload `pulse-delay' and >> ; `pulse-iterations'. >>=20 >> (defun flash-line-around-point (&rest _) >> "Flash the line around point." >> (let ((pulse-iterations 16) >> (pulse-delay 0.1)) >> (pulse-momentary-highlight-one-line (point)))) >>=20 >> (dolist (command '(scroll-up-command >> scroll-down-command >> recenter-top-bottom >> other-window)) >> (advice-add command :after #'flash-line-around-point)) >=20 > Thanks, but I don't understand why what we have now constitutes a > problem. help-fns loads shortdoc when it needs it, and > pulse-momentary-highlight-one-line is autoloaded already (you don't > need to auto-load variables to assign values to them). >=20 > Can you describe the problems you have if you delete those 'require's > from your init file, and explain why manually requiring them is a > problem? I try: after deleting those require's: 1. and after doing "M-x describe-function shortdoc" before shortdoc has=20 been (auto)loaded by something else, I get in my message window: help-fns--run-describe-functions: Symbol=E2=80=99s function definition= is=20 void: shortdoc-help-fns-examples-function and the help window does not show (is not created). Addition of an autoload cookie to=20 shortdoc-help-fns-examples-function fixes this. 2. and after calling "other-window" flash-line-around-point gets called, but I get in my message window: byte-code: Defining as dynamic an already lexical var:=20 pulse-iterations and the expected visual effect (a slow - about 2 seconds - flashing=20 of the line containing point) does not show itself. Addition of the=20 two autoload cookies to the two defcustoms pulse-iterations and=20 pulse-delay fixes this. Manually requiring the two requires is not a real problem, but just=20 somewhat inconvenient and surprising in my point of view (FWIW).