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#72511: 30.0.50; prefix-completions is always nil in help--symbol-completion-table Date: Sat, 17 Aug 2024 12:35:05 +0300 Message-ID: <86wmkf331y.fsf@gnu.org> References: <20240807135305.189c2c3e@cdr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30069"; mail-complaints-to="usenet@ciao.gmane.io" Cc: frayedultrasonicaligator@disroot.org, 72511@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 17 11:35:36 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 1sfFqS-0007fv-Ar for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Aug 2024 11:35:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sfFqG-00080r-GK; Sat, 17 Aug 2024 05:35:24 -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 1sfFqF-00080X-Ab for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 05:35:23 -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 1sfFqF-0005DF-1S for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 05:35:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=MVkwaZI33gaChtfq3H75ljs6Ta8rAt85n39GQVIZc+Q=; b=MawnK5EyT3krnkSmKAAdysanqn5++BILEy1u0bQSsrclWysuKAls7bFmDgDW7vew1wJWzw0oAmmCF1dlKGk5nNSm2Q/yy5RyJGplUZANLdfKHjRzei3buTpINVIuRPyeXOKEXyXvYOB0NChGhSsRhkOAhfuVGne+WlRN2mnyKp3xuzd2lBzr5c2PvhvPxzXDjy5+mmoDxxEDMFxSWlGUKpxrDYsuvgYN2TvhqFEdYm8tFhaPMEmNSPGsM2ZMGEaazLWX/dcI++gh3s7DbtwKvpGVHBGbr2/lSE8fKH0FsZqoljtb+su3EOFKEZA5FwVKjlHuExuoJj5rIJc++Qv3qw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sfFqr-0002mH-MM for bug-gnu-emacs@gnu.org; Sat, 17 Aug 2024 05:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Aug 2024 09:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72511 X-GNU-PR-Package: emacs Original-Received: via spool by 72511-submit@debbugs.gnu.org id=B72511.172388735510662 (code B ref 72511); Sat, 17 Aug 2024 09:36:01 +0000 Original-Received: (at 72511) by debbugs.gnu.org; 17 Aug 2024 09:35:55 +0000 Original-Received: from localhost ([127.0.0.1]:53524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfFqk-0002lt-Nq for submit@debbugs.gnu.org; Sat, 17 Aug 2024 05:35:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sfFqj-0002li-7X for 72511@debbugs.gnu.org; Sat, 17 Aug 2024 05:35:53 -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 1sfFq0-0005CP-5G; Sat, 17 Aug 2024 05:35:08 -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=MVkwaZI33gaChtfq3H75ljs6Ta8rAt85n39GQVIZc+Q=; b=hsIRMk9vZyD+ BQw6sK9ifIoyjaBy4UY7UzPW4r57Ktb8FFQssCWFMWFPF1AYKh4xEFDIwSY9+rRKmVfBiAcSb+WWR 4xTaE3LtoQBQne9j4rnByAylDRjjN7578HohU/wCKZ+YuZMr+KLgIBoPtcE1Baw5VDOCfdSRF4AF0 aZNBeBaVCu+GVoknsVg6x6GEgKNP6EgGajIeT8sbydVCvTOb+BJ5vWrZ63sVmDiYneTFR8kcV764N vbzD/1QI/pqrXymNsSMlld5tLZIXP52PQgSwWSUVHUfIuLX2XQsfPmO4c3rkgrJ9PiloKxGN1vNg/ U+0WDtVUQJULim/W2JS3NQ==; In-Reply-To: (bug-gnu-emacs@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:290248 Archived-At: > Cc: 72511@debbugs.gnu.org > Date: Wed, 14 Aug 2024 11:50:47 -0400 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > (when help-enable-completion-autoload > > (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string))) > > (help--load-prefixes prefixes))) > > (let ((prefix-completions > > (and help-enable-completion-autoload > > (mapcar #'intern (all-completions string definition-prefixes))))) > > > > By default, `help-enable-completion-autoload' is t, so this code should > > normally run. The perceived problem here is that the definition of > > `help-definition-prefixes' function is as follows: > > > > (defun help-definition-prefixes () > > "Return the up-to-date radix-tree form of `definition-prefixes'." > > (when (> (hash-table-count definition-prefixes) 0) > > (maphash (lambda (prefix files) > > (let ((old (radix-tree-lookup help-definition-prefixes prefix))) > > (setq help-definition-prefixes > > (radix-tree-insert help-definition-prefixes > > prefix (append old files))))) > > definition-prefixes) > > (clrhash definition-prefixes)) > > help-definition-prefixes) > > > > Because of the `clrhash', `definition-prefixes' will always be empty > > after the function call to `help-definition-prefixes'. > > Duh, indeed. > IIRC it's a leftover from some older version of the code. > I think the patch below is in order. Thanks, please install on the emacs-30 branch.