Subject: bug#10168: "Complete, but not unique" wrong

From: Stefan Monnier <[email-masked]>
Date: Thu, 01 Dec 2011 14:37:29 -0500

> ESC x m a n RET d l o TAB
> gives
> Manual entry: dlo [Complete, but not unique]

> Possible completions are:
> dlocate(1)
> dlopen(3)

> So we see "[Complete, but not unique]" is wrong here, as it is not complete.

Indeed.  I've installed the patch below which should fix those problems.

        Stefan

--- lisp/man.el	2011-11-27 04:43:11 +0000
+++ lisp/man.el	2011-12-01 19:33:36 +0000
@@ -754,8 +754,10 @@
 
 (defun Man-completion-table (string pred action)
   (cond
-   ((eq action 'lambda)
-    (not (string-match "([^)]*\\'" string)))
+   ;; 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.
+   ;;((eq action 'lambda) (not (string-match "([^)]*\\'" string)))
    ((equal string "-k")
     ;; Let SPC (minibuffer-complete-word) insert the space.
     (complete-with-action action '("-k ") string pred))