From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65411: 29.1; setopt of xref-after-jump-hook gives warning Date: Sun, 20 Aug 2023 21:12:28 +0300 Message-ID: <83edjxwpkj.fsf@gnu.org> References: <83h6otwwsp.fsf@gnu.org> <5B343C6B-DE9E-4BC2-8963-AFE9353E062D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14929"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65411@debbugs.gnu.org To: Howard Melman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Aug 20 20:13:32 2023 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 1qXmvZ-0003iT-RH for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Aug 2023 20:13:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXmv8-0005SP-6A; Sun, 20 Aug 2023 14:13:02 -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 1qXmv7-0005S8-4e for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 14:13:01 -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 1qXmv6-0003hc-Q9 for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 14:13:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXmv8-0002vf-6f for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 14:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Aug 2023 18:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65411 X-GNU-PR-Package: emacs Original-Received: via spool by 65411-submit@debbugs.gnu.org id=B65411.169255514311215 (code B ref 65411); Sun, 20 Aug 2023 18:13:02 +0000 Original-Received: (at 65411) by debbugs.gnu.org; 20 Aug 2023 18:12:23 +0000 Original-Received: from localhost ([127.0.0.1]:54834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXmuV-0002uo-6V for submit@debbugs.gnu.org; Sun, 20 Aug 2023 14:12:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXmuS-0002ua-KT for 65411@debbugs.gnu.org; Sun, 20 Aug 2023 14:12:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qXmuL-0003eC-BX; Sun, 20 Aug 2023 14:12:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=87OkcyZqXyi3BGyrwcU/lz7R+1gGitSNlcE6DlwNrfA=; b=SmtLp4SWh5vlThi1+Dcl GznJoj1vq2pM8uF1gTwqBqWdUKjtZGro599WeOBRSPcghgy86VJj12hY0p/uTYpHGmWGEcmnCKilN XcSfOLtxHQ+HTtlisbZVspib8vbVBZvFtMs2j9I7ZIiEzZD+tB8X2Bgdk7TRyVJhDWOWNN7v04SXY A5i7SG4aQ21K8S5NCiPjPr9NI1kaaMs2FCj6ifLydb62nu5edf4F2fNFRAwnwKr4ft3FtUxZ+5P1S gmY4qUCWmVatTCLOAKtBpCrOyJTyNQ9iXydgU5jKhCpFaPgdGL1OO78h9NS8LtOsR833miZzTPDsl j4cL0YAROwqs8Q==; In-Reply-To: <5B343C6B-DE9E-4BC2-8963-AFE9353E062D@gmail.com> (message from Howard Melman on Sun, 20 Aug 2023 12:12:13 -0400) 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:268021 Archived-At: > From: Howard Melman > Date: Sun, 20 Aug 2023 12:12:13 -0400 > Cc: 65411@debbugs.gnu.org > > On Aug 20, 2023, at 11:36 AM, Eli Zaretskii wrote: > > > >> From: Howard Melman > >> Date: Sun, 20 Aug 2023 11:03:50 -0400 > >> > >> > >> In Emacs 29.1 should I be able to do this: > >> > >> (setopt xref-after-jump-hook '(reposition-window xref-pulse-momentarily)) > >> > >> When I do in my init and then use xref-find-definition I get this warning: > >> > >> ⛔ Warning (emacs): Value `((reposition-window xref-pulse-momentarily))' for `xref-after-jump-hook' does not match type hook > > > > xref-pulse-momentarily is not an autoloaded function, and xref.el is > > not preloaded. You need to load xref.el, and then the above will > > work; it does for me. > > Thanks very much. Indeed, doing this works fine for me: > > (with-eval-after-load 'xref > (setopt xref-after-jump-hook '(reposition-window xref-pulse-momentarily))) > > Also I found doing (just) this works fine: > > (setq xref-after-jump-hook '(reposition-window xref-pulse-momentarily)) > > So why does it fail using setopt? Because until xref is loaded, Emacs doesn't know that 'xref-pulse-momentarily' is a symbol of function, whereas the defcustom's type is 'hook', which stands for "a list of functions".