all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Dmitry Gutov <dgutov@yandex.ru>, Eli Zaretskii <eliz@gnu.org>
Cc: 24663@debbugs.gnu.org
Subject: bug#24663: 24.5; doc string of `completion-at-point-functions'
Date: Thu, 13 Oct 2016 14:18:53 -0700 (PDT)	[thread overview]
Message-ID: <1efe9646-66d2-4d9b-b557-9911e148cb63@default> (raw)
In-Reply-To: <94371f44-4d03-64f2-ed88-edff3546a399@yandex.ru>

> >>> 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	other threads:[~2016-10-13 21:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<<2178d9e1-fd5c-4045-9a10-d0c45b0de591@default>
     [not found] ` <<<83fuo088wa.fsf@gnu.org>
     [not found]   ` <<225e9a9e-eaa2-4c6a-96f8-7106a9817491@default>
     [not found]     ` <<83eg3k815a.fsf@gnu.org>
2016-10-13 20:33       ` bug#24663: 24.5; doc string of `completion-at-point-functions' Drew Adams
2016-10-13 20:35         ` Dmitry Gutov
2016-10-13 21:18           ` Drew Adams [this message]
2016-10-13 21:26             ` Dmitry Gutov
2016-10-13 21:29               ` Drew Adams
     [not found] <<2178d9e1-fd5c-4045-9a10-d0c45b0de591@default>
     [not found] ` <<83fuo088wa.fsf@gnu.org>
2016-10-13 19:46   ` Drew Adams
2016-10-13 20:06     ` Eli Zaretskii
2016-10-10 21:14 Drew Adams
2016-10-13 17:18 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1efe9646-66d2-4d9b-b557-9911e148cb63@default \
    --to=drew.adams@oracle.com \
    --cc=24663@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.