GNU bug report logs - #51575
28.0.60; Many issues with icomplete-in-buffer

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Carlos Pita <carlosjosepita@HIDDEN>; dated Tue, 2 Nov 2021 22:42:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 51575 <at> debbugs.gnu.org:


Received: (at 51575) by debbugs.gnu.org; 7 Nov 2021 23:10:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 07 18:10:41 2021
Received: from localhost ([127.0.0.1]:55213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mjrJB-0006mZ-Dw
	for submit <at> debbugs.gnu.org; Sun, 07 Nov 2021 18:10:41 -0500
Received: from mail-wm1-f45.google.com ([209.85.128.45]:43914)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1mjrJ8-0006mL-RK
 for 51575 <at> debbugs.gnu.org; Sun, 07 Nov 2021 18:10:40 -0500
Received: by mail-wm1-f45.google.com with SMTP id
 67-20020a1c1946000000b0030d4c90fa87so10424616wmz.2
 for <51575 <at> debbugs.gnu.org>; Sun, 07 Nov 2021 15:10:38 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=Iv5yoM0LwNMWLiZIuK+JRdzvdibIfuHoLxYvnTqLH3Q=;
 b=ZBb+5GfzOIYKadgqvsTCfe9pLLC2xQwCIAVes84kb8cMrA0oItIwBEoS+tC5NIPL9J
 aEDCaJp2uo8fW8ejwwtACwvwhmFAGONjZAn5/zdcpl7jS2Bmwyoh/B1+5yW1D3yf8sCH
 XC4/XxZiUyp4KtQsI7TxTe3Lhdhm1hNSLt/h8syXQ86PnCyT5IZ16RxDVBP7+TL78n48
 FpKPvPmRCdzWykVrQ7BEPmOz1fWr7wW4s28E5M2a+xBIIE+AAEeroqGSCFIVJw1pI5dr
 gWv9vRQTnmi9PzLN6goYdlU9hGBY216tHDzHpQE9bdeX19xvpr7c8vKnPr4ol6+xMdpO
 ubdA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=Iv5yoM0LwNMWLiZIuK+JRdzvdibIfuHoLxYvnTqLH3Q=;
 b=tUDdz9iXGhv0tEdfEaz5UGj+V3j6qlwqPmdVKvCa8WCQLR08DFIGeobBxAgwp4F62W
 kJiEeWj8cDJc4STtHG1O9zlYVpEjELjcCLmdXXxH5Fo6Z6GGWSwHOvIcu1C6eBWDoWSl
 gp18bRcR5+1FbZNvpv1uHz1U4gUVgC+S/g/zQBMlkHXs0EvtN8hBqN/EugH1T3py7MK8
 mUYO+k6luU+lPmIkj0bco+HOvaK9JG1KAPeNJnau+1PdogO8yuhs6RoDanYfso+lFUQC
 VBOvfABmOY4h8AyPOdn7FTPsgI477v8i4CHje3vL74MXIAE6EuWICRoFQKFOc+HeXH5V
 bLaw==
X-Gm-Message-State: AOAM532xGsAnVvRDesWquksioKi6S8pqB5wDEWHWNRrDQJiFuyfQfjpQ
 yfOuDO4ZWrkAxu1Bqf4OMMoimSOKcAwf1bgAWJW6Tq+LsJrFwQ==
X-Google-Smtp-Source: ABdhPJzljXWGDszMJJvtDuFvGM65woJ3lwGNb6R3nsgL4RMxQACyEn/axyayRLEgeEtviyZHSzjUzLIISKDfMtPMys4=
X-Received: by 2002:a1c:7c12:: with SMTP id x18mr49486149wmc.95.1636326632553; 
 Sun, 07 Nov 2021 15:10:32 -0800 (PST)
MIME-Version: 1.0
References: <CAELgYhfpmjr0YHdx_TV3zHh+rg4fYiaBVLoegqcHGXNKHSaAiA@HIDDEN>
In-Reply-To: <CAELgYhfpmjr0YHdx_TV3zHh+rg4fYiaBVLoegqcHGXNKHSaAiA@HIDDEN>
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Sun, 7 Nov 2021 20:10:20 -0300
Message-ID: <CAELgYhcXGqHm-0efMOADmL_rvJzHnYMg-BEY=orRiCej1TzZug@HIDDEN>
Subject: Re: 28.0.60; Many issues with icomplete-in-buffer
To: 51575 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 51575
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Maybe this is a legacy option that should be made obsolete, but it's a
> pity that vanilla emacs provides so many alternatives for
> completing-read but none for completion-at-point.
> [...] simply showing the standard minibuffer icomplete
> interface at the bottom would be a lot (like for example selectrum
> does).

I've learned some new facts that may be relevant to this:

- The consult package [1] provides this functionality for any
completing-read solution, including icomplete/fido (and also vertico
[2] and selectrum [3], although selectrum also provides a builtin
alternative).

- IDE-like packages that use LSP-servers to get completions are
popular these days and their completions are based on the contents of
the buffer (I guess the server works at the file level), so any
solution that moves the edition to the minibuffer will fail to update
the buffer and therefore won't play well with the LSP-server.

So in-minibuffer is simple to implement and there are external
implementations that are compatible with icomplete, but it's not
LSP-friendly.

OTOH, emacs includes what AFAICS is a broken attempt to implement
something like in-buffer icomplete, which perhaps will be harder to
get right. External packages that do similar stuff are:

- corfu [4]: minimalistic, restricted to core protocols as everything
in the new "completion stack" (vertico, consult, etc), uses child
frames and fallbacks to the default completion on TUI.

- company [5]: extends core protocols with its own ones, although
there is a trend to move most backends under the capf (completion at
point) one, uses overlays that are mostly ok but have some rough edges
like inserting gaps into the line number area.

- company-box [6] and company-posframe [7]: different frontends for
company that use child frames instead of overlays.

I'm still not able to assess how far the current implementation is
from being functional, but I believe it's reasonable to keep any
builtin solution simple, even if that means to leave the LSP in-buffer
case to third parties. Next in complexity is a corfu-like
implementation, which is still small and minimalistic. The decision
between child frames (that don't support TUI) and overlays (that are
somewhat of a hack) is a tough call though.

Best regards,
Carlos

---

[1] https://github.com/minad/consult
[2] https://github.com/minad/vertico
[3] https://github.com/raxod502/selectrum
[4] https://github.com/minad/corfu
[5] http://company-mode.github.io/
[6] https://github.com/sebastiencs/company-box
[7] https://github.com/tumashu/company-posframe




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#51575; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 Nov 2021 22:41:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 02 18:41:28 2021
Received: from localhost ([127.0.0.1]:38284 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mi2T9-0005ng-Rk
	for submit <at> debbugs.gnu.org; Tue, 02 Nov 2021 18:41:28 -0400
Received: from lists.gnu.org ([209.51.188.17]:35480)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <carlosjosepita@HIDDEN>) id 1mi2T7-0005nU-Kw
 for submit <at> debbugs.gnu.org; Tue, 02 Nov 2021 18:41:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41982)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <carlosjosepita@HIDDEN>)
 id 1mi2T7-0007v9-Ec
 for bug-gnu-emacs@HIDDEN; Tue, 02 Nov 2021 18:41:25 -0400
Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:45719)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <carlosjosepita@HIDDEN>)
 id 1mi2T5-00041i-Cr
 for bug-gnu-emacs@HIDDEN; Tue, 02 Nov 2021 18:41:25 -0400
Received: by mail-wm1-x32d.google.com with SMTP id
 g191-20020a1c9dc8000000b0032fbf912885so468062wme.4
 for <bug-gnu-emacs@HIDDEN>; Tue, 02 Nov 2021 15:41:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:from:date:message-id:subject:to;
 bh=ZY0I2wWmCslrXPWeh15KJg0pg2OchoGK5nxIhcL+AfY=;
 b=HerQRmTprXPtNCbeOFK/ujuQbTeK36BDD86f1Q9Fdz3Brj4uiNQ/j82VHZFePsBaOT
 O/1LIjTHqqxHNzmEjCxLGQwtSbIHa4TRL52U5v0yPEf7fyX7GfEfecCqe35sxdg0zmh3
 AjyszNRpH6xzXSvJOqERqNBXvIdXrP9AQgR02UpOhu02EhqVtzxEwYk9eXk/SKe2wWAO
 COfE9NkCfm1Vsuagdg9EVB62X/XKZY1Vf9FuCChZs6/X4z3GBD+Q0CKyPZrMDxX4UoGI
 b5p2O+8vgyv+1XXu9igk5Ap8dnVu41JKXo54Ew27V07iqJ9ctuhSA1VlkfWb3IaKmux3
 SAnA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=ZY0I2wWmCslrXPWeh15KJg0pg2OchoGK5nxIhcL+AfY=;
 b=5enfITYbmm3l9rrNwhwKaEJXSCC1Kx0rqs/FhM19+fj18hH7ZjnqRcbcJFzrqqFnd9
 oZ8EOEMF6/68ILRywt2VsRFDySHTVqg6dlqmuqpgglSWTEu6IK99EDOOh0hSLGPuJGud
 h4HbFgI7V6q6OUzQoUq9rXD4eM4Pf14zNsEmOIz+/VTzWbgCaADWOZUCmpSiQZbLGctl
 gum4MwPaXMVSl4TxVmUuQLk4ACHoc4x8s8zLM/TbuYROPZPYVlH3y20OIRBUB2Y5hL93
 vQZrYUWfTmPxcSYB7kUlyoozhFEnwhHf7zvi9ZuU/K0EhJphTVOlzu+3EOqy8TgP86QK
 j8Mg==
X-Gm-Message-State: AOAM531umLduR6tlfoTWR14+gpinkCWNROt+oZ5cKJxdzRfl7WKNEI9P
 Zjp/Yb9SQBHHH2bYVRCBgGsnru6V5ZDjLcTYez7bw9AITyU=
X-Google-Smtp-Source: ABdhPJy+8CnEx3yhvk7L2RS1N+Z95KcJs+3KIHMOAX/of0yIRFkX/zGZ0O82nVtpIRn8ZWQm3snYWGDkwopOzl6PS5Y=
X-Received: by 2002:a1c:9a4f:: with SMTP id c76mr10301372wme.162.1635892880680; 
 Tue, 02 Nov 2021 15:41:20 -0700 (PDT)
MIME-Version: 1.0
From: Carlos Pita <carlosjosepita@HIDDEN>
Date: Tue, 2 Nov 2021 19:41:06 -0300
Message-ID: <CAELgYhfpmjr0YHdx_TV3zHh+rg4fYiaBVLoegqcHGXNKHSaAiA@HIDDEN>
Subject: 28.0.60; Many issues with icomplete-in-buffer
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=2a00:1450:4864:20::32d;
 envelope-from=carlosjosepita@HIDDEN; helo=mail-wm1-x32d.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi all,

I would like to use fido-mode in completion in-region / at-point
contexts. I realized there is a icomplete-in-buffer flag that is
intended to do that, at least for icomplete. So I started emacs with:

    (setq icomplete-in-buffer t)
    (icomplete-mode 1)


But the behavior is erratic to say the best. Say I'm in *scratch* and
want to autocomplete some symbol:

1. Doing M-<tab> once shows the icomplete menu, doing it again replaces
the *entire* buffer contents with just the selection.

2. Sometimes only the icomplete menu is shown, sometimes the traditional
*Completions* buffer is shown at the same time.

3. Pressing Enter doesn't select the candidate but inserts Enter.

4. If I enable fido-mode it disables and re-enables icomplete-mode but
leaves the icomplete completion-in-region-mode-hook uninstalled,
disregarding icomplete-in-buffer.

Maybe this is a legacy option that should be made obsolete, but it's a
pity that vanilla emacs provides so many alternatives for
completing-read but none for completion-at-point. The current
implementation wants to show the menu at point, this probably makes it
more complex, but simply showing the standard minibuffer icomplete
interface at the bottom would be a lot (like for example selectrum
does).

Best regards
--
Carlos







In GNU Emacs 28.0.60 (build 1, x86_64-apple-darwin20.6.0, NS
appkit-2022.60 Version 11.6 (Build 20G165))
 of 2021-11-02 built on Carloss-MacBook-Pro.local
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.6

Configured using:
 'configure --disable-dependency-tracking --disable-silent-rules
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs-plus@28/28.0.50/share/info/emacs
 --prefix=/usr/local/Cellar/emacs-plus@28/28.0.50 --with-xml2
 --with-gnutls --without-dbus --with-imagemagick --with-modules
 --with-rsvg --with-ns --disable-ns-self-contained'

Configured features:
ACL GIF GLIB GMP GNUTLS IMAGEMAGICK JPEG JSON LCMS2 LIBXML2 MODULES
NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TIFF TOOLKIT_SCROLL_BARS XIM
ZLIB

Important settings:
  value of $LC_ALL: en_AR.UTF-8
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  icomplete-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-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
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs text-property-search time-date mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils vc-git
diff-mode vc-dispatcher icomplete info easy-mmode package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode 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 lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax 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 emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads kqueue cocoa ns lcms2
multi-tty make-network-process emacs)

Memory information:
((conses 16 68619 7911)
 (symbols 48 8282 1)
 (strings 32 25724 1866)
 (string-bytes 1 825669)
 (vectors 16 16218)
 (vector-slots 8 218902 10078)
 (floats 8 30 29)
 (intervals 56 347 450)
 (buffers 992 13))




Acknowledgement sent to Carlos Pita <carlosjosepita@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#51575; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 7 Nov 2021 23:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.