GNU bug report logs -
#45764
icomplete in buffer completion does not work for completion-at-point
Previous Next
Reported by: simon254 <at> mailbox.org
Date: Sun, 10 Jan 2021 12:38:04 UTC
Severity: normal
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
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 45764 in the body.
You can then email your comments to 45764 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#45764
; Package
emacs
.
(Sun, 10 Jan 2021 12:38:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
simon254 <at> mailbox.org
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 10 Jan 2021 12:38:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
emacs -Q
in *scratch* eval
(setq icomplete-in-buffer t)
(icomplete-mode t)
type:
"(icompl" followed by C-M-i (completion-at-point) select icomplete-mode via C-j
-> *scratch* buffer is now empty apart from icomplete-mode ; all other text is deleted
it works however in shell mode for directory completion (tab invokes icomplete-mode)
In GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
of 2020-08-12 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1894
System Description: Mac OS X 10.15.7
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'
Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER
Important settings:
value of $LANG: en_GB.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
threads kqueue cocoa ns multi-tty make-network-process emacs)
Memory information:
((conses 16 44811 6704)
(symbols 48 5927 1)
(strings 32 15254 1703)
(string-bytes 1 504784)
(vectors 16 10174)
(vector-slots 8 126879 9518)
(floats 8 19 39)
(intervals 56 189 0)
(buffers 1000 11))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#45764
; Package
emacs
.
(Tue, 07 Jun 2022 13:26:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 45764 <at> debbugs.gnu.org (full text, mbox):
simon254 <at> mailbox.org writes:
> emacs -Q
> in *scratch* eval
> (setq icomplete-in-buffer t)
> (icomplete-mode t)
> type:
> "(icompl" followed by C-M-i (completion-at-point) select icomplete-mode via C-j
> -> *scratch* buffer is now empty apart from icomplete-mode ; all other text is deleted
>
> it works however in shell mode for directory completion (tab invokes icomplete-mode)
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
`C-j' is bound to `icomplete-force-complete-and-exit', and it calls
`minibuffer-force-complete-and-exit' unconditionally, which deletes the
buffer contents. I can't get icomplete-in-buffer to work in either
*shell* or in other modes -- has this feature gotten much testing/use?
Are there cases where it works?
Adding Stefan to the CCs, since he hadded this in 2013.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 07 Jun 2022 13:26:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#45764
; Package
emacs
.
(Tue, 07 Jun 2022 14:44:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 45764 <at> debbugs.gnu.org (full text, mbox):
> `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`).
> 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. ]
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#45764
; Package
emacs
.
(Wed, 08 Jun 2022 11:51:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 45764 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> 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
Removed tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 11 Jul 2022 13:07:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#45764
; Package
emacs
.
(Mon, 27 Feb 2023 18:36:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 45764 <at> debbugs.gnu.org (full text, mbox):
close 45764 30.0.50
thanks
>> `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`).
This is fixed now in master, and with these fixes works quite nicely.
bug marked as fixed in version 30.0.50, send any further explanations to
45764 <at> debbugs.gnu.org and simon254 <at> mailbox.org
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Mon, 27 Feb 2023 18:36:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#45764
; Package
emacs
.
(Mon, 27 Feb 2023 18:58:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 45764 <at> debbugs.gnu.org (full text, mbox):
> This is fixed now in master, and with these fixes works quite nicely.
Thanks, Juri!
Stefan
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 28 Mar 2023 11:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 48 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.