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

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

bug#24663: 24.5; doc string of `completion-at-point-functions'


From: Drew Adams
Subject: bug#24663: 24.5; doc string of `completion-at-point-functions'
Date: Thu, 13 Oct 2016 14:18:53 -0700 (PDT)

> >>> 1. It cannot be "THE" thing (or THE entity) at point.  Which one?
> >>
> >> The one at point.
> >
> > The symbol? word? file name? URL? ... (yes, ... - there are any
> > number of kinds of things, most of which - nay, all of which -
> > could be completed.
> 
> The code in the hooks decides that. In practice, it's a part of a major
> or a minor mode.

Exactly.  That's what should be said.

Some text before point can get completed.  The completing code
decides (1) WHICH text before point (what kind of thing, if you
want to think of it that way) and (2) what the possible
COMPLETIONS of it are.

> >> My understanding is that it's up to the hooks.
> >
> > Then them most that the doc can & should say is that SOMETHING
> 
> What does that mean?
> 
> > (some text) BEFORE point, is susceptible to completion.
> 
> AROUND point.

Really?  In that case, that's what needs to be said in the doc.

Of course, if it is AROUND point then presumably any text in the
buffer can be used to determine what's to be completed (and in
turn what the possible completions are).  It could use only the
first two or last six characters of the buffer, ignoring the
text immediately surrounding point.

It sounds like the real point (sic) is this: The completion
functions (1) are passed point, and (2) they can do anything
they want, to complete any bits of text existing anywhere in
the buffer (or even perhaps ignoring all text in the buffer).
And presumably, after the user chooses one of the completion
candidates, that candidate is inserted at point.

If this (or similar0 is the behavior then it is what should
be said in the doc.  There should be nothing additional and
gratuitous, that implies that the text immediately preceding
or following (or both) point is what gets completed.  And
it certainly should not speak in terms of any "thing" or
"entity" at (or before or after or around) point.





reply via email to

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