bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3717: M-x man completion


From: Kevin Ryde
Subject: bug#3717: M-x man completion
Date: Fri, 27 Nov 2009 09:01:08 +1100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Juri Linkov <juri@jurta.org> writes:
>
> What man error?

    M-x man
    lib (
    Ret
    => error in process sentinel: *Man lib (*: process exited abnormally with 
code 2

I think "(" goes onto the command line and the shell doesn't like it.
(Only balanced parens for the section getting transformed to "man 1 lib"
etc within M-x man.)

> I think it's bad to hide the fact that a manual name is ambiguous and
> that the user have to select the necessary section instead of using an
> arbitrary default section.

Perhaps that could be an option, but if so I think I'd try to bring up a
display-completion-list thingie, to emphasise you're being asked to
choose, since the incomplete "lib (" is no good.

> For manual names that belong only to one section, removing the section
> name would be ok.

Yep, that's what I've got, to declutter.

> when the first character
> of the completion is a digit, then completions are performed on the
> format "3erl lib".  Otherwise, completions are performed on the
> format "lib (3erl)".

Yes.  There's an occasional program name starting with a digit, but you
can type "3 " or whatever with the space to get past that -- in fact if
you want a specific section I think that's a pretty natural thing to
type.

> In your first message to bug#3717, you named them "feeping creatures" :-)

You're not going to hold me to anything I said so long ago are you! :-)

The perl searching for the default page name at point creeps a bit, but
I've found it very helpful, and haven't had a better idea for where to
tie it in.


Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
> "lib" is a valid name to pass to man, so completion should provide it.

That was my rationale.

> After all, M-x man
> can show *all* the pages found, so the choice of section can be
> made later.

I didn't think of that, but yes.

> Yes, a better way to do it would be to consider "3erl " "as
> a directory", i.e. the completion table should recognize it and set
> a "boundary" right there.  It doesn't need to provide completion for the
> section names.

I haven't understood the boundaries thing.  Is it as simple as making a
space or "(" a boundary point?

> You could also do it via M-x man RET 3erl C-a TAB since a * is
> implicitly added at point.

You've got to be smarter than me to think of that :).  My main idea is
that you can type M-x man "2 chmod", and likewise on the man command
line, so completion should help you with that typing.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]