GNU bug report logs - #16687
24.3.50; completion doc errors

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Sat, 8 Feb 2014 02:32:02 UTC

Severity: minor

Found in version 24.3.50

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16687 in the body.
You can then email your comments to 16687 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16687; Package emacs. (Sat, 08 Feb 2014 02:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Liu <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 08 Feb 2014 02:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; completion doc errors
Date: Sat, 08 Feb 2014 10:31:17 +0800
The doc disagrees with the function's doc-string:

,----[ (info "(elisp)Completion Variables") ]
|      The TRY-COMPLETION and ALL-COMPLETIONS functions should each
|      accept four arguments: STRING, COLLECTION, PREDICATE, and POINT.
|      The STRING, COLLECTION, and PREDICATE arguments have the same
|      meanings as in `try-completion' (*note Basic Completion::), and
|      the POINT argument is the position of point within STRING.  Each
|      function should return a non-`nil' value if it performed its job,
|      and `nil' if it did not (e.g., if there is no way to complete
|      STRING according to the completion style).
`----

It seems this should be `five' instead of `four':

,----[ (info "(elisp)Programmed Completion") ]
|    * A flag specifying the type of completion operation to perform.
|      This is one of the following four values:
`----

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16687; Package emacs. (Wed, 23 Mar 2016 16:03:01 GMT) Full text and rfc822 format available.

Message #8 received at 16687 <at> debbugs.gnu.org (full text, mbox):

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 16687 <at> debbugs.gnu.org
Subject: Re: bug#16687: 24.3.50; completion doc errors
Date: Wed, 23 Mar 2016 13:01:34 -0300
Hi Leo,

At 09:31 +0800 on Saturday 2014-02-08, Leo Liu wrote:
>
> The doc disagrees with the function's doc-string:
>
> ,----[ (info "(elisp)Completion Variables") ]
> |      The TRY-COMPLETION and ALL-COMPLETIONS functions should each
> |      accept four arguments: STRING, COLLECTION, PREDICATE, and
> |      POINT. The STRING, COLLECTION, and PREDICATE arguments have
> |      the same meanings as in `try-completion' (*note Basic
> |      Completion::), and the POINT argument is the position of
> |      point within STRING. Each function should return a non-`nil'
> |      value if it performed its job, and `nil' if it did not (e.g.,
> |      if there is no way to complete STRING according to the
> |      completion style).
> `----

To which function are you referring? This is the doc of the _variable_
`completion-styles-alist'.

If you mean the function `try-completion', the doc doesn't say that
the TRY-COMPLETION and ALL-COMPLETIONS functions should have the same
"signature" as `try-completion', only that their arguments named
STRING, COLLECTION, and PREDICATE have the same meaning as the
arguments, with the same names, to `try-completion'.

The docstring of `try-completion' indeed documents the meaning of
these three arguments and I don't see any obvious inconsistency there.

Can you be more specific about the inconsistency you see?

> It seems this should be `five' instead of `four':
>
> ,----[ (info "(elisp)Programmed Completion") ]
> |    * A flag specifying the type of completion operation to
> |    perform. This is one of the following four values:
> `----

This bit of documention now reads:

   • A flag specifying the type of completion operation to perform.
     This flag may be one of the following values.

So this part of the bug is now fixed. :)

N.





bug closed, send any further explanations to 16687 <at> debbugs.gnu.org and Leo Liu <sdl.web <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 17 Apr 2019 23:22:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 16 May 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 318 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.