From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Van Ly via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73656: 30.0.91; icomplete-vertical has no matches for M-x man RET chdir Date: Wed, 09 Oct 2024 23:43:12 +1100 Message-ID: References: Reply-To: Van Ly Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26958"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73656@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 09 14:45:25 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 1syW4D-0006sB-Jd for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 09 Oct 2024 14:45:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syW3u-0002Cp-Ie; Wed, 09 Oct 2024 08:45:07 -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 1syW3h-0001jx-ON for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 08:44:56 -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 1syW3g-0005uA-Ly for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 08:44:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:In-Reply-To:From:To:References:Subject; bh=/YW7wmFU/ildcLefueDHxCuT7OWcOni1CfsxCdO6yHY=; b=i4qYgVl1GTMYFaqmOMF/xVT3+uBTbrxgJYQckUz36HuJYIRPkTvgcyfEa9OazkTmDfuN2m9VK2fjcnLyoGs6KudVRTyMG00q5bO94s2EyDFcJCP2IsK0iGDrrePnkEa/5exDURSkGAodgl56JJBG8gXHSdkOdHcQCkHc4k28yJCh0STrxLCA86ncM9IxaXX/EnZC+cP0daqwyPrWGUJSkmE6eFx08uNWqu0E+qVbwkbSNUOZoFBmm+ztwWQUWVXBGoX0OLa+H2o5iXIhCsdtineq0d+0jdbqe9J5G/O6ZONeidfE6UBU0wfitWJFKA1CC53UR40ODoUJ9/9qbReh/g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1syW3q-000596-1x for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 08:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Van Ly Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2024 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73656 X-GNU-PR-Package: emacs Original-Received: via spool by 73656-submit@debbugs.gnu.org id=B73656.172847785919680 (code B ref 73656); Wed, 09 Oct 2024 12:45:02 +0000 Original-Received: (at 73656) by debbugs.gnu.org; 9 Oct 2024 12:44:19 +0000 Original-Received: from localhost ([127.0.0.1]:55934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syW38-00057M-L6 for submit@debbugs.gnu.org; Wed, 09 Oct 2024 08:44:18 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:63977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syW37-00057C-6p for 73656@debbugs.gnu.org; Wed, 09 Oct 2024 08:44:17 -0400 Original-Received: from sdf.org (IDENT:van.ly@iceland.freeshell.org [205.166.94.5]) by mx.sdf.org (8.18.1/8.14.3) with ESMTPS id 499ChDfG007493 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 9 Oct 2024 12:44:05 GMT Original-Received: (from van.ly@localhost) by sdf.org (8.18.1/8.12.8/Submit) id 499ChDnc029046; Wed, 9 Oct 2024 23:43:13 +1100 (AEDT) In-Reply-To: <8634l9us8q.fsf@gnu.org> (message from Eli Zaretskii on Sun, 06 Oct 2024 19:10:45 +0300) 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:293201 Archived-At: Eli Zaretskii writes: > > I think this points out the problem: man.el expects a different > format, as documented in the doc string of Man-parse-man-k. But maybe > I'm missing something, so I'll let others chime in. > > My suggestion is to step with Edebug through Man-parse-man-k and see > what's wrong there. > The netbsd-users say legacy behavior for "man -k output" is obtained by $ man -k -l chdir $ apropos -l chdir $ env APROPOS="-l" emacs -Q The Edebug session would cycle to line 16 below (line 953 in man.el) foreach of the characters from chdir during icomplete-vertical autocomplete to find no matches. 1 (defun Man-parse-man-k () 2 "Parse \"man -k\" output and return the list of page names. 3 4 The current buffer should contain the output of a command of the 5 form \"man -k keyword\", which is traditionally also available with 6 apropos(1). 7 8 While POSIX man(1p) is a bit vague about what to expect here, 9 this function tries to parse some commonly used formats, which 10 can be described in the following informal way, with square brackets 11 indicating optional parts and whitespace being interpreted 12 somewhat loosely. 13 14 foo[, bar [, ...]] [other stuff] (sec) - description 15 foo(sec)[, bar(sec) [, ...]] [other stuff] - description" 16 (goto-char (point-min)) 17 ;; See man-tests for data about which systems use which format (hopefully we 18 ;; will be able to simplify the code if/when some of those formats aren't 19 ;; used any more). 20 (let (table) 21 (while (search-forward-regexp "^\\([^ \t,\n]+\\)\\(.*?\\)\ 22 \\(?:[ \t]\\(([^ \t,\n]+?)\\)\\)?\\(?:[ \t]+- ?\\(.*\\)\\)?$" nil t) 23 (let ((section (match-string 3)) 24 (description (match-string 4)) 25 (bound (match-end 2))) 26 (goto-char (match-end 1)) 27 (while 28 (progn 29 ;; The first regexp grouping may already match the section 30 ;; tacked on to the name, which is ok since for the formats we 31 ;; claim to support the third (non-shy) grouping does not 32 ;; match in this case, i.e., section is nil. 33 (push (propertize (concat (match-string 1) section) 34 'help-echo description) 35 table) 36 (search-forward-regexp "\\=, *\\([^ \t,]+\\)" bound t))))) 37 (nreverse table))) -- vl