GNU bug report logs -
#16722
[(old?) cygwin] `M-x man' completion doesn't handle broken `man -k' gracefully
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Tue, 11 Feb 2014 14:47:02 UTC
Severity: minor
Tags: fixed
Found in version 24.3.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #43 received at control <at> debbugs.gnu.org (full text, mbox):
retitle 16722 [(old?) cygwin] `M-x man' completion doesn't handle broken `man -k' gracefully
quit
I found this post from 2014 explaining that the man package is replaced
by man-db, so the correct incantation is now `mandb' or `mandb -c' for
the first time.
https://cygwin.com/ml/cygwin/2014-07/msg00015.html
https://cygwin.com/faq/faq.html#faq.using.man
I can't reproduce the problem here, as my cygwin's man -k prints only to
stderr in this case. Does checking exit status help?
--- i/lisp/man.el
+++ w/lisp/man.el
@@ -890,15 +890,18 @@ Man-completion-table
;; run differently in Man-getpage-in-background, an error
;; here may not necessarily mean that we'll also get an
;; error later.
- (ignore-errors
- (call-process manual-program nil '(t nil) nil
- "-k" (concat (when (or Man-man-k-use-anchor
- (string-equal prefix ""))
- "^")
- prefix))))
- (setq table (Man-parse-man-k)))
+ (when (eq 0
+ (ignore-errors
+ (call-process
+ manual-program nil '(t nil) nil
+ "-k" (concat (when (or Man-man-k-use-anchor
+ (string-equal prefix ""))
+ "^")
+ prefix))))
+ (setq table (Man-parse-man-k)))))
;; Cache the table for later reuse.
- (setq Man-completion-cache (cons prefix table)))
+ (when table
+ (setq Man-completion-cache (cons prefix table))))
;; The table may contain false positives since the match is made
;; by "man -k" not just on the manpage's name.
(if section
This bug report was last modified 4 years and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.