From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: simon254@mailbox.org, 45764@debbugs.gnu.org
Subject: bug#45764: icomplete in buffer completion does not work for completion-at-point
Date: Wed, 08 Jun 2022 13:50:38 +0200 [thread overview]
Message-ID: <87fskfbchd.fsf@gnus.org> (raw)
In-Reply-To: <jwv7d5sk0d6.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 07 Jun 2022 10:43:08 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> `C-j' is bound to `icomplete-force-complete-and-exit', and it calls
>> `minibuffer-force-complete-and-exit' unconditionally, which deletes the
>> buffer contents.
>
> There are 2 problems, both of which stem from the fact that the code has
> not been adjusted to the case where it's working in a normal buffer
> rather than in the minibuffer:
> - it calls `minibuffer-exit` which is wrong for in-buffer completion
> (it should probably exit `completion-in-region-mode` instead).
> - it assumes the area of completion is the whole buffer (it should
> probably use `icomplete--field-end/beg`).
Poking at this a bit more, the test case also bugs out in
(icomplete--field-string), because there are no fields in the buffer.
(I think. I'm apparently getting different results when edebugging and
not...)
>> I can't get icomplete-in-buffer to work in either *shell* or in other
>> modes -- has this feature gotten much testing/use?
>
> `icomplete-in-buffer` needs more love, indeed.
> [ BTW, I see its docstring says that it doesn't affect
> `dabbrev-completion` but that's not true any more. ]
Ah; I've now adjusted the doc string.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2022-06-08 11:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-10 12:35 bug#45764: icomplete in buffer completion does not work for completion-at-point simon254--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-07 13:25 ` Lars Ingebrigtsen
2022-06-07 14:43 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-08 11:50 ` Lars Ingebrigtsen [this message]
2023-02-27 18:33 ` Juri Linkov
2023-02-27 18:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=87fskfbchd.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=45764@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=simon254@mailbox.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).