From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Howard Melman Newsgroups: gmane.emacs.bugs Subject: bug#65411: 29.1; setopt of xref-after-jump-hook gives warning Date: Sun, 20 Aug 2023 20:21:39 -0400 Message-ID: <665BB487-07C8-4B9D-8CAA-CE8ECFA6C8E4@gmail.com> References: <83h6otwwsp.fsf@gnu.org> <5B343C6B-DE9E-4BC2-8963-AFE9353E062D@gmail.com> <83edjxwpkj.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9653"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65411@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 21 02:22:24 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 1qXsga-0002Hi-CJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Aug 2023 02:22:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXsgF-0000CC-24; Sun, 20 Aug 2023 20:22:03 -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 1qXsgC-0000C4-T1 for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 20:22:00 -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 1qXsgC-0006qM-9l for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 20:22:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXsgD-0006aE-Ud for bug-gnu-emacs@gnu.org; Sun, 20 Aug 2023 20:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Howard Melman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Aug 2023 00:22:01 +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.169257731825297 (code B ref 65411); Mon, 21 Aug 2023 00:22:01 +0000 Original-Received: (at 65411) by debbugs.gnu.org; 21 Aug 2023 00:21:58 +0000 Original-Received: from localhost ([127.0.0.1]:55061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXsg6-0006Zs-FD for submit@debbugs.gnu.org; Sun, 20 Aug 2023 20:21:58 -0400 Original-Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:60535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXsg1-0006Zc-CN for 65411@debbugs.gnu.org; Sun, 20 Aug 2023 20:21:53 -0400 Original-Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-4039f7e1d3aso20037661cf.0 for <65411@debbugs.gnu.org>; Sun, 20 Aug 2023 17:21:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692577302; x=1693182102; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=KB7vUrPwd9oKgRCGCYqTJla1VM9gpkTXD8cFroDMXJk=; b=YW5LwQZUHiHoAMc5tyv0tMuQDu58HvKP2vV/IH2O/0A/nugfn+nSqHz65c9dNuAyr7 NIuQAZSjs3Yih0v3y+wUzHYsPVIWJg3XcWfYXtR5KieOPH/0e5uL1c8VX0VpDNNw/Rp9 TCsPQpZXKnPdgVBJSWjR1IRI1ur+vcOpUxzqpHIQPt8wJPE/AYWy21KK/N7pbczW4S+A K5A0qEyEC614mSeHxEgPlU93Z5aPhTdkqBuN/s2cFCXLCn4QKH8QPBf9JRT7mcqf6vmE 5Wxq+4b7OLYyYUXDC9MQRewU2jy51ZGaQpanu+jB/UogiKdl+eaVEHro6l/GyWTWmzfG eUWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692577302; x=1693182102; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KB7vUrPwd9oKgRCGCYqTJla1VM9gpkTXD8cFroDMXJk=; b=lqy+HouD2iDHqEdDCO9CY62lHkYnNTabdrHvvcFb8ohZcVphsBBBw/ksCg7+GiV21a 4Aq0gU4TBCsZWksiwxLEuIIZPQzOVR4YAh/meALlKe09QHRiFVQZANQE7luFCHFf/IvD aERGnrYopQDW8crEOImdSKCwqezwbMkf+CPnsXbo7E++2dN5q3xp4PRqj5SXztSWhIWA RhO2GyQ/bypBw/P9YX0Gt/zRJtdzZAd5s3pWXnLAxlA/3bXc0SA+lk8hMmb2SivxHD8p rO7UvH6j0NeEYI0FlSNq+0rUkPtxLMdHCNMJBxxUNIkEqd3OjnGOu9EOi6D94ABckmax eKTA== X-Gm-Message-State: AOJu0Yy+LlzJbVsTtE6dFDtl9m+lYq+s98+ImTQZ73o2bbTWPwuJfPGX P8HU1o5E0vkMrU/5b9rwzcY= X-Google-Smtp-Source: AGHT+IEvpsIqKiA93XMObJGNiq06YqjQAls2xDxxtyjn0HOiEU0PAeZhjmTtt1z7LCsfUwP2Gpy6YA== X-Received: by 2002:ac8:7f4c:0:b0:410:9af1:f9b2 with SMTP id g12-20020ac87f4c000000b004109af1f9b2mr1637847qtk.3.1692577301742; Sun, 20 Aug 2023 17:21:41 -0700 (PDT) Original-Received: from smtpclient.apple (pool-108-26-231-137.bstnma.fios.verizon.net. [108.26.231.137]) by smtp.gmail.com with ESMTPSA id hf22-20020a05622a609600b004108a71abd3sm1263369qtb.10.2023.08.20.17.21.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Aug 2023 17:21:40 -0700 (PDT) In-Reply-To: <83edjxwpkj.fsf@gnu.org> X-Mailer: Apple Mail (2.3696.120.41.1.4) 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:268044 Archived-At: > On Aug 20, 2023, at 2:12 PM, Eli Zaretskii wrote: >=20 >> From: Howard Melman >> Date: Sun, 20 Aug 2023 12:12:13 -0400 >> Cc: 65411@debbugs.gnu.org >>=20 >> Thanks very much. Indeed, doing this works fine for me: >>=20 >> (with-eval-after-load 'xref >> (setopt xref-after-jump-hook '(reposition-window = xref-pulse-momentarily))) >>=20 >> Also I found doing (just) this works fine: >>=20 >> (setq xref-after-jump-hook '(reposition-window = xref-pulse-momentarily)) >>=20 >> So why does it fail using setopt? >=20 > 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". Well, that must be correct because doing this also worked fine: (declare-function xref-pulse-momentarily "xref" ()) (setopt xref-after-jump-hook '(reposition-window = xref-pulse-momentarily)) So I guess setopt defers the type check? I get the error when the hook is run (at which time xref is loaded so I'm still confused about that). I'm familiar with reading the lisp code but the innards of custom and the c code are a bit beyond me. Is it the custom-check-value property in setopt--set? If I'm supposed to resolve this warning on my own, then a comment in setopt--set or something in setopt's docstring (or the manual) mentioning the asynchrony would help. Howard=