GNU logs - #65411, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#65411: 29.1; setopt of xref-after-jump-hook gives warning
Resent-From: Howard Melman <hmelman@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 20 Aug 2023 15:05:02 +0000
Resent-Message-ID: <handler.65411.B.16925438484267 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 65411
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 65411 <at> debbugs.gnu.org
X-Debbugs-Original-To: GNU Emacs <bug-gnu-emacs@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.16925438484267
          (code B ref -1); Sun, 20 Aug 2023 15:05:02 +0000
Received: (at submit) by debbugs.gnu.org; 20 Aug 2023 15:04:08 +0000
Received: from localhost ([127.0.0.1]:54596 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qXjyJ-00016j-IJ
	for submit <at> debbugs.gnu.org; Sun, 20 Aug 2023 11:04:08 -0400
Received: from lists.gnu.org ([2001:470:142::17]:33540)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hmelman@HIDDEN>) id 1qXjyH-00016F-GS
 for submit <at> debbugs.gnu.org; Sun, 20 Aug 2023 11:04:06 -0400
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 <hmelman@HIDDEN>) id 1qXjyA-0000iW-1v
 for bug-gnu-emacs@HIDDEN; Sun, 20 Aug 2023 11:03:58 -0400
Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <hmelman@HIDDEN>) id 1qXjy7-0005OS-Dj
 for bug-gnu-emacs@HIDDEN; Sun, 20 Aug 2023 11:03:57 -0400
Received: by mail-qt1-x832.google.com with SMTP id
 d75a77b69052e-4108da3a9efso7841741cf.0
 for <bug-gnu-emacs@HIDDEN>; Sun, 20 Aug 2023 08:03:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1692543833; x=1693148633;
 h=to:date:message-id:subject:mime-version:content-transfer-encoding
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=sk5aWRlxfoRssBPiaK+qqO6SJZU3aFm5dz7pYIixgQg=;
 b=NyYMszkI7vKv8oH+/Gcyc3kuMwexlIzAjsEwTd977znhRIzc7JIQKR1pA1zIS4DqoS
 CUQZPvoPf6FhxVRvMiVJquHMT68NrvGYT2CgAep8k9uJ5fK0Kji7HzsK6pLAuqDOc11m
 TJTh6Cfcaue2eD9+2Nw0uWHOD5y+/Fe9MaOqlzFO3dLiyk5SHDShOAisxPaSpzctWUIR
 FyhGg8WJP3759ZdtnZ8lVXnTthecxnG+2fGZ//xxdMuTjp6dKKwdeJz8zrVgYFB2sSJq
 likYrw7Hr5sAzi7C0B0XvWcC4FUXpbv6QZ1w7dweSdv3jYSNDaGczAx96Aw7Yzym6OOt
 9Dgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1692543833; x=1693148633;
 h=to:date:message-id:subject:mime-version:content-transfer-encoding
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=sk5aWRlxfoRssBPiaK+qqO6SJZU3aFm5dz7pYIixgQg=;
 b=bdZkupSYzgIzho/xjdfDoMUY8ZlJtWfjnYOVr2jxHfXFT82bh82uHeQcoxUlQk6RBr
 bBSkNHpnrxdV48Z8snXYPY07PLFsMS1trxMwtv1WbSaDwvn/YAMKHlOsJZVrMXZEFty9
 cpZSJjMT3wf8G45OK9s4pDueTLTFAh5JgaB5tNDfVnNUDqHYSU70F9cfZFWgp7Xid77J
 c/7hp+KGnq7k7SY9lIGARDRGGA6AIk+Zziu626RZRMh5U68dEiOigEBw/MJXrjgqpSDJ
 wpOYJCqBQ8dN0+ncMNW5TEffmPzMJC34P0h7zE/APDY0di0MpQJPLR/KYozCZNiMeysM
 G7IQ==
X-Gm-Message-State: AOJu0Yyf921g+UmndH7sOWfSrTFHeEQdr5MKs3ESbWIv49Hz+coJxHZ0
 SGO3PXN7IAVBc9Vo3lnPaAUQ6CmSiYI=
X-Google-Smtp-Source: AGHT+IErscGKBA46NhNUMWLeFV7G/ABTQxw+4/udDQwSNiWVc/QNOdQdIDXXQajfWpnsIucxUiJ5aw==
X-Received: by 2002:a05:622a:10e:b0:410:b5e:6583 with SMTP id
 u14-20020a05622a010e00b004100b5e6583mr7043636qtw.17.1692543833042; 
 Sun, 20 Aug 2023 08:03:53 -0700 (PDT)
Received: from smtpclient.apple (pool-108-26-231-137.bstnma.fios.verizon.net.
 [108.26.231.137]) by smtp.gmail.com with ESMTPSA id
 l14-20020ac84a8e000000b004035843ec96sm1773275qtq.89.2023.08.20.08.03.51
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 20 Aug 2023 08:03:51 -0700 (PDT)
From: Howard Melman <hmelman@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\))
Message-Id: <F807EC7B-7B78-4535-9020-81205751B3A6@HIDDEN>
Date: Sun, 20 Aug 2023 11:03:50 -0400
X-Mailer: Apple Mail (2.3696.120.41.1.4)
Received-SPF: pass client-ip=2607:f8b0:4864:20::832;
 envelope-from=hmelman@HIDDEN; helo=mail-qt1-x832.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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_FROM=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-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


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:

    =E2=9B=94 Warning (emacs): Value `((reposition-window =
xref-pulse-momentarily))' for `xref-after-jump-hook' does not match type =
hook

(FYI, I'm doing this in the macport and haven't tried it yet
in GNU Emacs)

I thought I could because I copied the format from xref.el:

	(defcustom xref-after-jump-hook '(recenter
	                                  xref-pulse-momentarily)

and if instead I do this:

	(add-hook 'xref-after-jump-hook 'reposition-window)
	(add-hook 'xref-after-jump-hook 'xref-pulse-momentarily 'after)

and check the value of xref-after-jump-hook it is:

    (reposition-window xref-pulse-momentarily)

which is what I want but confuses me why recenter from the
default value isn't there.  I don't see xref-after-jump-hook used
anywhere else in my init or installed packages.

Howard




In GNU Emacs 29.1 (build 1, x86_64-apple-darwin21.6.0,
Carbon Version 165 AppKit 2113.6) of 2023-08-08 built on
Mac-1691500888998.local
Repository revision: e173249a143cee72d59ae78c4e11038512f5a00f
Repository branch: 29.1-mac-10.0
Windowing system distributor 'Apple Inc.', version 12.6.8
System Description:  macOS 12.6.8

Configured using:
'configure --with-mac
=
--enable-locallisppath=3D/usr/local/share/emacs/site-lisp:/opt/homebrew/sh=
are/emacs/site-lisp
=
--enable-mac-app=3D/Users/runner/work/homebrew-emacsmacport/homebrew-emacs=
macport/build-scripts/build_out/tmproot
=
--prefix=3D/Users/runner/work/homebrew-emacsmacport/homebrew-emacsmacport/=
build-scripts/build_out/tmproot
--enable-mac-self-contained --with-modules --with-xwidgets
--with-tree-sitter --without-lcms2 --without-webp'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE PDUMPER
SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER XWIDGETS
ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: GFM

Minor modes in effect:
  flyspell-mode: t
  writegood-mode: t
  recentf-mode: t
  outline-minor-mode: t
  wrap-region-mode: t
  diff-hl-flydiff-mode: t
  server-mode: t
  marginalia-mode: t
  corfu-indexed-mode: t
  corfu-history-mode: t
  global-corfu-mode: t
  corfu-mode: t
  vertico-multiform-mode: t
  savehist-mode: t
  vertico-mode: t
  which-key-mode: t
  global-hl-todo-mode: t
  hl-todo-mode: t
  beacon-mode: t
  global-page-break-lines-mode: t
  gcmh-mode: t
  repeat-mode: t
  global-hl-line-mode: t
  which-function-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mac-mouse-wheel-mode: t
  tool-bar-mode: t
  prettify-symbols-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  context-menu-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  visual-line-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  abbrev-mode: t

Load-path shadows:
/Users/hmelman/.emacs.d/elpa/transient-20230812.2142/transient hides =
/Applications/Emacs.app/Contents/Resources/lisp/transient
/Users/hmelman/.emacs.d/elpa/eglot-20221020.1010/eglot hides =
/Applications/Emacs.app/Contents/Resources/lisp/progmodes/eglot

Features:
(shadow sort mail-extr hippie-exp emacsbug message
yank-media puny rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
autorevert filenotify notes3 embark-consult embark ffap
info-colors helpful cc-langs cc-vars cc-defs trace edebug
debug backtrace info-look f f-shortdoc elisp-refs s rect
dabbrev dired dired-loaddefs mwim mule-util orderless
flyspell ispell writegood-mode face-remap markdown-mode
edit-indirect easy-kill pulse color reposition help-fns
radix-tree find-func consult-xref consult bookmark thingatpt
xref warnings project char-fold misearch multi-isearch
vc-git recentf tree-widget rg files-x rg-info-hack rg-menu
rg-ibuffer rg-result wgrep-rg wgrep rg-history rg-header
ibuf-ext ibuffer ibuffer-loaddefs grep compile
text-property-search comint ansi-osc ansi-color time-date
vertico-directory exec-path-from-shell add-log jka-compr
disp-table bug-reference lisp-mnt noutline outline
wrap-region dash diff-hl-flydiff diff diff-hl log-view
pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode easy-mmode
server marginalia corfu-indexed corfu-history corfu
vertico-multiform savehist vertico package-commits ace-link
avy ring which-key hl-todo dim beacon page-break-lines gcmh
cus-edit pp cus-load icons wid-edit repeat hl-line
which-func imenu hrm-tabs saveplace cape-autoloads
corfu-autoloads diff-hl-autoloads consult-autoloads
embark-autoloads exec-path-from-shell-autoloads
flycheck-autoloads gptel-autoloads helpful-autoloads
json-mode-autoloads rx literate-calc-mode-autoloads
magit-todos-autoloads magit-autoloads pcase
magit-section-autoloads hl-todo-autoloads
marginalia-autoloads mastodon-autoloads org-modern-autoloads
package-lint-autoloads page-break-lines-autoloads transient
cl-extra help-mode format-spec edmacro kmacro compat
compat-29 reformatter-autoloads rust-mode-autoloads
markdown-mode-autoloads transient-autoloads advice info
package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs password-cache
json subr-x map byte-opt gv bytecomp byte-compile url-vars
cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/mac-win mac-win term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list
replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer
select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple
cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite
emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded
button loaddefs theme-loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap
hashtable-print-readable backquote threads xwidget-internal
kqueue mac multi-tty make-network-process emacs)

Memory information:
((conses 16 277984 207394)
(symbols 48 23953 7)
(strings 32 108960 65911)
(string-bytes 1 3474112)
(vectors 16 50528)
(vector-slots 8 1308035 602096)
(floats 8 533 1057)
(intervals 56 1493 1393)
(buffers 984 18))

--=20

Howard




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Howard Melman <hmelman@HIDDEN>
Subject: bug#65411: Acknowledgement (29.1; setopt of xref-after-jump-hook
 gives warning)
Message-ID: <handler.65411.B.16925438484267.ack <at> debbugs.gnu.org>
References: <F807EC7B-7B78-4535-9020-81205751B3A6@HIDDEN>
X-Gnu-PR-Message: ack 65411
X-Gnu-PR-Package: emacs
Reply-To: 65411 <at> debbugs.gnu.org
Date: Sun, 20 Aug 2023 15:05:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 65411 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
65411: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D65411
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#65411: 29.1; setopt of xref-after-jump-hook gives warning
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 20 Aug 2023 15:37:02 +0000
Resent-Message-ID: <handler.65411.B65411.16925457757553 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 65411
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Howard Melman <hmelman@HIDDEN>
Cc: 65411 <at> debbugs.gnu.org
Received: via spool by 65411-submit <at> debbugs.gnu.org id=B65411.16925457757553
          (code B ref 65411); Sun, 20 Aug 2023 15:37:02 +0000
Received: (at 65411) by debbugs.gnu.org; 20 Aug 2023 15:36:15 +0000
Received: from localhost ([127.0.0.1]:54627 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qXkTP-0001xl-76
	for submit <at> debbugs.gnu.org; Sun, 20 Aug 2023 11:36:15 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36980)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qXkTN-0001xW-A1
 for 65411 <at> debbugs.gnu.org; Sun, 20 Aug 2023 11:36:13 -0400
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 <eliz@HIDDEN>)
 id 1qXkTG-0003An-BH; Sun, 20 Aug 2023 11:36:06 -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=C95mPAoDq+7QRn8PuDWLRIJfXRjXEkDRFRw4oi8R45s=; b=kBttcK2bWU2KNJJDqn2L
 WQozLYaqubaKaof0GxjMXQpKeb07rAz4Wf660esulpXGr54vvz+5ZXM2hEzpv0PYB7kBd62J4P2y+
 uei6j5fmgqweDPa32dm+PcmuK/dyF0Wr85j+teWJY6TcBRqBWdbRr1aoEbt43GFLbrNJIngDvflOt
 kdFGtCV88RXQOl7HbCrXlXlAN5HJyl/swzbGQXpcrXvgTRERKSc32kbw25fS6pZynFOLn9KAFj2bU
 hyg5LEVv6Q/jU+S2vASiCIzIBto4wyXpYIse9Y8fwxASO/hkq251vgvGXdQ94QG9T9XRjPqZVN+iw
 kQV7s/kpIWdQzQ==;
Date: Sun, 20 Aug 2023 18:36:22 +0300
Message-Id: <83h6otwwsp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <F807EC7B-7B78-4535-9020-81205751B3A6@HIDDEN> (message from
 Howard Melman on Sun, 20 Aug 2023 11:03:50 -0400)
References: <F807EC7B-7B78-4535-9020-81205751B3A6@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Howard Melman <hmelman@HIDDEN>
> 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.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#65411: 29.1; setopt of xref-after-jump-hook gives warning
Resent-From: Howard Melman <hmelman@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 20 Aug 2023 16:13:01 +0000
Resent-Message-ID: <handler.65411.B65411.169254794511521 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 65411
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 65411 <at> debbugs.gnu.org
Received: via spool by 65411-submit <at> debbugs.gnu.org id=B65411.169254794511521
          (code B ref 65411); Sun, 20 Aug 2023 16:13:01 +0000
Received: (at 65411) by debbugs.gnu.org; 20 Aug 2023 16:12:25 +0000
Received: from localhost ([127.0.0.1]:54667 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qXl2O-0002zk-PG
	for submit <at> debbugs.gnu.org; Sun, 20 Aug 2023 12:12:25 -0400
Received: from mail-qk1-x72e.google.com ([2607:f8b0:4864:20::72e]:59822)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <hmelman@HIDDEN>) id 1qXl2M-0002zW-Rc
 for 65411 <at> debbugs.gnu.org; Sun, 20 Aug 2023 12:12:23 -0400
Received: by mail-qk1-x72e.google.com with SMTP id
 af79cd13be357-76ce59842c1so144962285a.3
 for <65411 <at> debbugs.gnu.org>; Sun, 20 Aug 2023 09:12:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1692547935; x=1693152735;
 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=2hqH1OtXCTHPB/Z9k7rjsVs4qXs3SsHbrgzlORlFv94=;
 b=jXJk/xgItCzL3XkQXlZ9aHFmeHU3u5BqSUxfRx6wNiEsNR3Wh5BFbIl11CROf99WGD
 8YSVTYXYXxKB/9BJ7ejyqDNcdgX2geuNsdq1g2Gr306itjl2UgQH3lPDcwvDuC+kCgOG
 TmBP4ryxyB40Fl8lnapjleM2DgwVUFr53lwOLj+i/1PfTKOyN73blh/FJetPNxRyxZSU
 ziKdjNf1+6rtdXuM8YFarx5il6tsWXbM+/KrkiMS5HyYQSOhCPFLj8i/eOx7T3iYi9e4
 O+87KqdeNeXehgBb+yM2e1QOZ1rCkvfjFGenF5hz7QuyoBLnPn1PnlT8aMfCdFKb5mXc
 lepA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1692547935; x=1693152735;
 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=2hqH1OtXCTHPB/Z9k7rjsVs4qXs3SsHbrgzlORlFv94=;
 b=UEAyZt4n4tOueKim7inMABXqGeHGr1iwxB4Yr5bVBmsCD3Ow3mbWoIOo8OkAx1iM1Q
 AWizB2C4JWyjy8T5jIUWtQSA7aREEFpYRB6+bbYmBZAv5EVTgJGXo0Yi0yKDEQo2nAk2
 TRrLzSJM7Ehl2UZZ+lxvPz7/PhIl/2XI0UhK/IGnuU+O8zEdPKStrL6pIp+n3EWwbi3H
 DdxP/HOGuTeH2kSx3qScz+6d8jG2BXpUAFxZU9LgenlN9vkxvnmNqQoLyAA9wNbRYXh0
 ktrxrLB777p1u6pVUesRzWJUnOmE9Ibik/KupTlyxAEvyR0Rsxvs3WFYfOvnsLIz9NlP
 mmTw==
X-Gm-Message-State: AOJu0YwvKjTsYIaDuQVMjLh4D8Ep8CfGJTcH32CZq1v9vpTBiQOjYvd0
 rO2bW20F3eU1MA9shMsBjTM=
X-Google-Smtp-Source: AGHT+IFNhy7AL81AxT6HQKIPYGw83pyHevcrtGaueRs0aPubfp1Ci+PGGlDuG82EWfOi6d3ufKvYWg==
X-Received: by 2002:a05:620a:d59:b0:76c:8611:8cb1 with SMTP id
 o25-20020a05620a0d5900b0076c86118cb1mr3856333qkl.76.1692547935338; 
 Sun, 20 Aug 2023 09:12:15 -0700 (PDT)
Received: from smtpclient.apple (pool-108-26-231-137.bstnma.fios.verizon.net.
 [108.26.231.137]) by smtp.gmail.com with ESMTPSA id
 b18-20020a05620a119200b0076ca9269de7sm1887039qkk.124.2023.08.20.09.12.14
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 20 Aug 2023 09:12:14 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\))
From: Howard Melman <hmelman@HIDDEN>
In-Reply-To: <83h6otwwsp.fsf@HIDDEN>
Date: Sun, 20 Aug 2023 12:12:13 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <5B343C6B-DE9E-4BC2-8963-AFE9353E062D@HIDDEN>
References: <F807EC7B-7B78-4535-9020-81205751B3A6@HIDDEN>
 <83h6otwwsp.fsf@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.4)
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Aug 20, 2023, at 11:36 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
>> From: Howard Melman <hmelman@HIDDEN>
>> Date: Sun, 20 Aug 2023 11:03:50 -0400
>>=20
>>=20
>> In Emacs 29.1 should I be able to do this:
>>=20
>>    (setopt xref-after-jump-hook '(reposition-window =
xref-pulse-momentarily))
>>=20
>> When I do in my init and then use xref-find-definition I get this =
warning:
>>=20
>>    =E2=9B=94 Warning (emacs): Value `((reposition-window =
xref-pulse-momentarily))' for `xref-after-jump-hook' does not match type =
hook
>=20
> 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?  AFAIU the xref-pulse-momentarily in =
the value
is just a symbol and I don't see the warning until I call =
xref-find-definition which
loads xref. And it works using setq without loading xref.

The warning shows double parentheses which I also don't understand how=20=

that happened (I see it does some widget conversion).  If there's some =
extra
restriction on using setopt to set hooks (which are user options), could =
it be=20
explained in the manual or docstring?

Howard




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#65411: 29.1; setopt of xref-after-jump-hook gives warning
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Sun, 20 Aug 2023 18:13:02 +0000
Resent-Message-ID: <handler.65411.B65411.169255514311215 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 65411
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Howard Melman <hmelman@HIDDEN>
Cc: 65411 <at> debbugs.gnu.org
Received: via spool by 65411-submit <at> debbugs.gnu.org id=B65411.169255514311215
          (code B ref 65411); Sun, 20 Aug 2023 18:13:02 +0000
Received: (at 65411) by debbugs.gnu.org; 20 Aug 2023 18:12:23 +0000
Received: from localhost ([127.0.0.1]:54834 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qXmuV-0002uo-6V
	for submit <at> debbugs.gnu.org; Sun, 20 Aug 2023 14:12:23 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42464)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qXmuS-0002ua-KT
 for 65411 <at> debbugs.gnu.org; Sun, 20 Aug 2023 14:12:21 -0400
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 <eliz@HIDDEN>)
 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==;
Date: Sun, 20 Aug 2023 21:12:28 +0300
Message-Id: <83edjxwpkj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <5B343C6B-DE9E-4BC2-8963-AFE9353E062D@HIDDEN> (message from
 Howard Melman on Sun, 20 Aug 2023 12:12:13 -0400)
References: <F807EC7B-7B78-4535-9020-81205751B3A6@HIDDEN>
 <83h6otwwsp.fsf@HIDDEN> <5B343C6B-DE9E-4BC2-8963-AFE9353E062D@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Howard Melman <hmelman@HIDDEN>
> Date: Sun, 20 Aug 2023 12:12:13 -0400
> Cc: 65411 <at> debbugs.gnu.org
> 
> On Aug 20, 2023, at 11:36 AM, Eli Zaretskii <eliz@HIDDEN> wrote:
> > 
> >> From: Howard Melman <hmelman@HIDDEN>
> >> 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".




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#65411: 29.1; setopt of xref-after-jump-hook gives warning
Resent-From: Howard Melman <hmelman@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 21 Aug 2023 00:22:01 +0000
Resent-Message-ID: <handler.65411.B65411.169257731825297 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 65411
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 65411 <at> debbugs.gnu.org
Received: via spool by 65411-submit <at> debbugs.gnu.org id=B65411.169257731825297
          (code B ref 65411); Mon, 21 Aug 2023 00:22:01 +0000
Received: (at 65411) by debbugs.gnu.org; 21 Aug 2023 00:21:58 +0000
Received: from localhost ([127.0.0.1]:55061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qXsg6-0006Zs-FD
	for submit <at> debbugs.gnu.org; Sun, 20 Aug 2023 20:21:58 -0400
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 <hmelman@HIDDEN>) id 1qXsg1-0006Zc-CN
 for 65411 <at> debbugs.gnu.org; Sun, 20 Aug 2023 20:21:53 -0400
Received: by mail-qt1-x82f.google.com with SMTP id
 d75a77b69052e-4039f7e1d3aso20037661cf.0
 for <65411 <at> 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)
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)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\))
From: Howard Melman <hmelman@HIDDEN>
In-Reply-To: <83edjxwpkj.fsf@HIDDEN>
Date: Sun, 20 Aug 2023 20:21:39 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <665BB487-07C8-4B9D-8CAA-CE8ECFA6C8E4@HIDDEN>
References: <F807EC7B-7B78-4535-9020-81205751B3A6@HIDDEN>
 <83h6otwwsp.fsf@HIDDEN> <5B343C6B-DE9E-4BC2-8963-AFE9353E062D@HIDDEN>
 <83edjxwpkj.fsf@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.4)
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Aug 20, 2023, at 2:12 PM, Eli Zaretskii <eliz@HIDDEN> wrote:
>=20
>> From: Howard Melman <hmelman@HIDDEN>
>> Date: Sun, 20 Aug 2023 12:12:13 -0400
>> Cc: 65411 <at> 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=




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#65411: 29.1; setopt of xref-after-jump-hook gives warning
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 21 Aug 2023 12:01:02 +0000
Resent-Message-ID: <handler.65411.B65411.169261926031546 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 65411
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Howard Melman <hmelman@HIDDEN>
Cc: 65411 <at> debbugs.gnu.org
Received: via spool by 65411-submit <at> debbugs.gnu.org id=B65411.169261926031546
          (code B ref 65411); Mon, 21 Aug 2023 12:01:02 +0000
Received: (at 65411) by debbugs.gnu.org; 21 Aug 2023 12:01:00 +0000
Received: from localhost ([127.0.0.1]:55733 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qY3ad-0008Ck-K1
	for submit <at> debbugs.gnu.org; Mon, 21 Aug 2023 08:00:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36044)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qY3ab-0008CW-QF
 for 65411 <at> debbugs.gnu.org; Mon, 21 Aug 2023 08:00:58 -0400
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 <eliz@HIDDEN>)
 id 1qY3aU-00054R-Aq; Mon, 21 Aug 2023 08:00:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=/mzh7JeXhUJxdeSGJKsaxWCwxXGqCnY76CSp14EI3Uc=; b=V2XVLb8hThhb
 oD1Ow7BbBBm501XQhRwm0rpWDMy2kRiSZua4FAIlO7P8ubZ8VSP1IaOzWJ8ElKXLgrgB4UZtjptih
 4s3/ZCwU3qcdJVhTVyMYHdd3Bf/nmzbXyBT0lqgGxD1q2x/ZBwMGxaKtli7P7J36dP327wIo69Swl
 q3qD5KDeB4JQ/Yw7qCWK60qpneJZjiCGeNm5Bchb5BMNQDb4N4yPXK8vyMYj5zUXeL5x9zZfFohui
 iFm4sTc/yxaazfDv5orqpG6bPqZWdJy4nxCIv7AwA72mWruvn20PSgZ4Q/wb5BcEUzfSdUMOQ4gtJ
 wtUxoFhuVTnRfKg6uBvuxg==;
Date: Mon, 21 Aug 2023 15:01:07 +0300
Message-Id: <83jztovc3g.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <665BB487-07C8-4B9D-8CAA-CE8ECFA6C8E4@HIDDEN> (message from
 Howard Melman on Sun, 20 Aug 2023 20:21:39 -0400)
References: <F807EC7B-7B78-4535-9020-81205751B3A6@HIDDEN>
 <83h6otwwsp.fsf@HIDDEN> <5B343C6B-DE9E-4BC2-8963-AFE9353E062D@HIDDEN>
 <83edjxwpkj.fsf@HIDDEN> <665BB487-07C8-4B9D-8CAA-CE8ECFA6C8E4@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Howard Melman <hmelman@HIDDEN>
> Date: Sun, 20 Aug 2023 20:21:39 -0400
> Cc: 65411 <at> debbugs.gnu.org
> 
> >> 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".
> 
> 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?

No, it just verifies that the symbol's function slot is valid.

> I get the error when the hook is run (at which time xref is loaded
> so I'm still confused about that).

declare-function doesn't provider an actual function definition, it
just provides a declaration.  IOW, you lie to Emacs, and Emacs bites
you when it can ;-)

> 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?

Yes.

> 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.

setopt is a non-interactive version of defcustom.  Like defcustom will
not accept a value that contradicts the :type of the option, so will
setopt.  I don't think there's anything subtle to be documented here.





Last modified: Mon, 21 Aug 2023 12:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.