unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 39600@debbugs.gnu.org, Amai Kinono <amaikinono@gmail.com>
Subject: bug#39600: [PATCH] Fix handling of non-exclusive non-prefix completion functions
Date: Sat, 08 Aug 2020 17:58:39 -0400	[thread overview]
Message-ID: <jwv8seoby8b.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <874kpdz12d.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 08 Aug 2020 16:04:10 +0200")

>> Currently, with non-exclusive completion functions, Emacs will do
>> `try-completion` on the current text, and decide whether to try next
>> completion function based on that. This makes completion functions that
>> can do non-prefix completions fails when the current text only occurs in
>> the middle of the candidates. This is a problem I found in a FIXME in
>> the code.
>>
>> # How does this work?
>>
>> I use `completion-all-completions` instead. As far as I know, this
>> respects the `completion-styles`.
> [...]
> Stefan, how does this patch look to you?

I think it replaces one set of problems with another.

Within the completion-at-point-function we shouldn't call anything like
`try-completion`: we should only decide which completion table to use
but we shouldn't look inside those completion tables.

So a better solution is to build a new completion table which combines
(e.g. with `completion-table-in-turn`) the current one with that of "the
rest".  [ The tricky (but still doable) case being when when the current
completion table and that of the rest don't use the same BEG and END.  ]


        Stefan






      reply	other threads:[~2020-08-08 21:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14  7:34 bug#39600: [PATCH] Fix handling of non-exclusive non-prefix completion functions Amai Kinono
2020-08-08 14:04 ` Lars Ingebrigtsen
2020-08-08 21:58   ` Stefan Monnier [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwv8seoby8b.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=39600@debbugs.gnu.org \
    --cc=amaikinono@gmail.com \
    --cc=larsi@gnus.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).