Subject: Re: bug#3717: M-x man completion

From: Juri Linkov <[email-masked]>
Date: Wed, 16 Dec 2009 02:42:17 +0200

>> I get
>> completion--some: Searching for program: no such file or directory, LC_CTYPE=C man
>> when I do M-x man ca<TAB>
>> Because I do (setq manual-program "LC_CTYPE=C man")
>
> That's an abuse of manual-program: it is supposed to be the name of a
> program, not a command string.

I wonder why such abuse works for the normal use of `M-x man',
but doesn't work for man completions that run "man -k".

I see that `Man-getpage-in-background' calls `start-process' (with
a shell command name prepended) to run "man", but `Man-completion-table'
calls `call-process' (without a shell command prepended) to run "man -k".
That's the difference.

Shouldn't `Man-completion-table' prepend a shell command name to not fail
when `manual-program' is "LC_CTYPE=C man"?  Isn't it easier just to do this
than to declare it as an abuse?

If we declare such use of `manual-program' as an abuse, what we can suggest
to use instead?

-- 
Juri Linkov
http://www.jurta.org/emacs/