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.devel Subject: Re: info-lookup-alist mangled, breaks C-h S Date: Tue, 04 Jan 2022 16:54:44 +0200 Message-ID: <83ee5nblfv.fsf@gnu.org> References: <87ee5o7eun.fsf@gnu.org> 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="16210"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, mardani29@yahoo.es, raman@google.com To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 04 15:55:26 2022 Return-path: Envelope-to: ged-emacs-devel@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 1n4lDg-0003xW-OW for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Jan 2022 15:55:24 +0100 Original-Received: from localhost ([::1]:60492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n4lDf-0004uO-H3 for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Jan 2022 09:55:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4lCw-0004Cx-PU for emacs-devel@gnu.org; Tue, 04 Jan 2022 09:54:38 -0500 Original-Received: from [2001:470:142:3::e] (port=46812 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4lCw-0003eD-3Q; Tue, 04 Jan 2022 09:54:38 -0500 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=9rVM6gpeTGhpfcrUaIJr+pXp7mN/aEzcRw0DKUSYjao=; b=k/nOoAhdK0CDglJUf1WB VnY5nmRipxUlqudg179ufR2jCYQeeGKThxVxLeHvZGw+UUtxLlpUyUBINl8SIF6IHm07AtMNNwNGO PhQiGdwlVFHrtRh7Q+K8dFR4Bqy/4p+t0n5TAo8MWbkakBLvk/ZdaGHi4uIvMr079+MPUpikvmryd n7J226AYYhYhwouFYWCfOGkYVeGR9T2KuC4qxbSETs8DQcwDVgYC8ZjqE+0BL1+2ldSUFD6q1YQ89 Eamj/lhAB/BUiaUrRGA43m82I3LYASdDKKYY193XlQyVJK9kZGfk+IdakCvRD5ruue5h4ukaVw7Cu kQk505hV4F9vNw==; Original-Received: from [87.69.77.57] (port=2866 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n4lCv-0002CI-W4; Tue, 04 Jan 2022 09:54:38 -0500 In-Reply-To: <87ee5o7eun.fsf@gnu.org> (message from Tassilo Horn on Mon, 03 Jan 2022 21:02:05 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284154 Archived-At: > From: Tassilo Horn > Date: Mon, 03 Jan 2022 21:02:05 +0100 > Cc: emacs-devel@gnu.org, Daniel Martín > > "T.V Raman" writes: > > > tried that already -- leads down various twisty ratholes since too many > > things in emacs core itself touch that variable, and some of that code > > was beyond my abilities, eg see the code in tramp-integration.el > > > > -- that one appears to be an earlier offendor with respect to adding an > > invalid entry. > > FWIW, the problematic entry doesn't seem to come from some external > package, at least I can reproduce the error using > > 1. emacs -Q > 2. M-x fundamental-mode RET in *stratch* > 3. C-h S > > with GNU Emacs 29.0.50 of 2022-01-03. The step 2 above is needed > because `C-h S' in an emacs-lisp-mode or lisp-interaction-mode buffer > works just fine whereas I get the error in fundamental-mode or > Info-mode. I can't reproduce with emacs 27 or 28. Does the patch below give good results? diff --git a/lisp/info-look.el b/lisp/info-look.el index e6f267d..9224aa3 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -347,7 +347,10 @@ info-lookup-select-mode (defun info-lookup-change-mode (topic) (let* ((completions (mapcar (lambda (arg) - (cons (symbol-name (car arg)) (car arg))) + (let ((mode-spec (car arg))) + (and (consp mode-spec) + (setq mode-spec (car mode-spec))) + (cons (symbol-name mode-spec) mode-spec))) (info-lookup->topic-value topic))) (mode (completing-read (format "Use %s help mode: " topic)