From: Van Ly via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 73656@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#73656: 30.0.91; icomplete-vertical has no matches for M-x man RET chdir
Date: Tue, 15 Oct 2024 05:20:42 +0000 [thread overview]
Message-ID: <dcsa5f6aqmt.fsf@sdf.org> (raw)
In-Reply-To: <86msj8tdaz.fsf@gnu.org> (message from Eli Zaretskii on Sun, 13 Oct 2024 15:09:08 +0300)
[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>
> If you edit this part of Man-completion-table:
>
> (let ((process-environment (copy-sequence process-environment)))
> (setenv "COLUMNS" "999") ;; don't truncate long names
> ;; manual-program might not even exist. And since it's
> ;; run differently in Man-getpage-in-background, an error
> ;; here may not necessarily mean that we'll also get an
> ;; error later.
> (when (eq 0
> (ignore-errors
> (process-file
> manual-program nil '(t nil) nil
> >>>>>>>>>>>>>>>> "-k" (concat (when (or Man-man-k-use-anchor
> (string-equal prefix ""))
> "^")
> (if (string-equal prefix "")
> prefix
> ;; FIXME: shell-quote-argument
> ;; is not entirely
> ;; appropriate: we actually
> ;; need to quote ERE here.
> ;; But we don't have that, and
> ;; shell-quote-argument does
> ;; the job...
> (shell-quote-argument prefix))))))
> (setq table (Man-parse-man-k)))))
>
> to use "-k" "-l" instead of "-k" in the line I emphasized, does that
> solve the problem?
>
Yes. See diff patch on man.el .
[-- Attachment #2: diff patch on man.el --]
[-- Type: application/octet-stream, Size: 1239 bytes --]
diff -u /u/van/src/emacs/30.0.91/lisp/man_orig_el /u/van/src/emacs/30.0.91/lisp/man.el
--- /u/van/src/emacs/30.0.91/lisp/man_orig_el 2024-09-12 07:10:33.000000000 +1000
+++ /u/van/src/emacs/30.0.91/lisp/man.el 2024-10-15 16:10:59.851430686 +1100
@@ -977,7 +977,7 @@
(cond
;; This ends up returning t for pretty much any string, and hence leads to
;; spurious "complete but not unique" messages. And since `man' doesn't
- ;; require-match anyway, there's not point being clever.
+ ;; require-match anyway, there's no point being clever.
;;((eq action 'lambda) (not (string-match "([^)]*\\'" string)))
((equal string "-k")
;; Let SPC (minibuffer-complete-word) insert the space.
@@ -1009,7 +1009,7 @@
(ignore-errors
(process-file
manual-program nil '(t nil) nil
- "-k" (concat (when (or Man-man-k-use-anchor
+ "-k" "-l" (concat (when (or Man-man-k-use-anchor
(string-equal prefix ""))
"^")
(if (string-equal prefix "")
Diff finished. Tue Oct 15 16:14:16 2024
[-- Attachment #3: Type: text/plain, Size: 10 bytes --]
--
vl
prev parent reply other threads:[~2024-10-15 5:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-06 12:38 bug#73656: 30.0.91; icomplete-vertical has no matches for M-x man RET chdir Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-06 13:33 ` Eli Zaretskii
2024-10-06 14:33 ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-06 14:48 ` Eli Zaretskii
2024-10-06 13:35 ` Eli Zaretskii
2024-10-06 14:54 ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-06 16:10 ` Eli Zaretskii
2024-10-09 12:43 ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-13 12:09 ` Eli Zaretskii
2024-10-15 5:20 ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dcsa5f6aqmt.fsf@sdf.org \
--to=bug-gnu-emacs@gnu.org \
--cc=73656@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=van.ly@sdf.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).