GNU bug report logs - #50675
pcomplete capf fails inside strings

Previous Next

Package: emacs;

Reported by: meedstrom <at> teknik.io

Date: Sun, 19 Sep 2021 14:19:02 UTC

Severity: normal

Tags: confirmed

Found in versions 27.1, 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 50675 in the body.
You can then email your comments to 50675 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50675; Package emacs. (Sun, 19 Sep 2021 14:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to meedstrom <at> teknik.io:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 19 Sep 2021 14:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: meedstrom <at> teknik.io
To: bug-gnu-emacs <at> gnu.org
Subject: pcomplete capf fails inside strings
Date: Sun, 19 Sep 2021 14:18:11 +0000
Steps to reproduce:

1. Launch emacs -Q
2. Type M-x eshell RET
3. Type a quotation mark "
4. Type TAB

Results in "Warning: pcomplete-completions-at-point failed to return valid completion data!" and a tab character is inserted.

Might be considered two separate bugs because when a CAPF fails, it should not insert a tab character?  A consequence of inserting one is that when a package like corfu in auto mode (https://github.com/minad/corfu) tries to call a CAPF on nearly every keystroke, I get lots of tab characters.

Martin Edström


In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
Windowing system distributor 'Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
 SHELL=/gnu/store/pwcp239kjf7lnj5i4lkdzcfcxwcfyk72-bash-minimal-5.0.16/bin/bash
 --prefix=/gnu/store/j1bci192j9n8bdr7m78asn71izfspmvw-emacs-pgtk-native-comp-28.0.50-206.7b62cfc
 --enable-fast-install --with-native-compilation --with-pgtk
 --with-xwidgets --with-modules --with-cairo --disable-build-details'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LIBOTF LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XIM
XWIDGETS GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH: /home/kept/guix-profiles/emacs/emacs/share/emacs/site-lisp:/gnu/store/j1bci192j9n8bdr7m78asn71izfspmvw-emacs-pgtk-native-comp-28.0.50-206.7b62cfc/share/emacs/28.0.50/lisp:/gnu/store/j1bci192j9n8bdr7m78asn71izfspmvw-emacs-pgtk-native-comp-28.0.50-206.7b62cfc/share/emacs/28.0.50/lisp
  value of $LANG: en_DK.utf8
  locale-coding-system: utf-8-unix

Major mode: Eshell

Minor modes in effect:
  shell-dirtrack-mode: t
  eshell-prompt-mode: t
  eshell-hist-mode: t
  eshell-pred-mode: t
  eshell-cmpl-mode: t
  eshell-proc-mode: t
  eshell-arg-mode: t
  tooltip-mode: t
  global-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
  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 auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils em-unix em-term term disp-table shell ehelp
em-script em-prompt em-ls cl-loaddefs cl-lib em-hist em-pred em-glob
em-cmpl em-dirs esh-var pcomplete comint ansi-color ring em-basic
em-banner em-alias esh-mode eshell esh-cmd esh-ext esh-opt esh-proc
esh-io esh-arg esh-module esh-groups esh-util seq byte-opt gv bytecomp
byte-compile cconv iso-transl tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/pgtk-win pgtk-win 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 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 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 xwidget-internal dbusbind inotify dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
pgtk multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 94111 7609)
 (symbols 48 8410 0)
 (strings 32 25538 2114)
 (string-bytes 1 947094)
 (vectors 16 18049)
 (vector-slots 8 364818 9944)
 (floats 8 26 27)
 (intervals 56 233 0)
 (buffers 992 11))





bug Marked as found in versions 27.1. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Wed, 29 Sep 2021 11:34:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 28.0.50. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Wed, 29 Sep 2021 11:34:03 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Wed, 29 Sep 2021 11:34:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50675; Package emacs. (Sun, 08 May 2022 08:27:02 GMT) Full text and rfc822 format available.

Message #14 received at 50675 <at> debbugs.gnu.org (full text, mbox):

From: meedstrom <at> teknik.io
To: 50675 <at> debbugs.gnu.org
Subject: more info
Date: Sun, 08 May 2022 08:26:30 +0000
[Message part 1 (text/plain, inline)]
Okay, so the warning message "pcomplete-completions-at-point fails to return valid completion data" originates from completion-at-point in minibuffer.el.

There's a comment in there that says if the CAPF returned t, it assumes completion already happened. It does seem that the CAPF returns t, at least in eshell in a string. So that may be the root of the problem.

I'm not 100% sure I'm interpreting the debugger right. To do what I did,

1. emacs -Q

2. M-x debug-on-entry RET pcomplete-completions-at-point RET
3. type a quote mark in eshell and press TAB
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50675; Package emacs. (Sat, 04 Jun 2022 22:32:01 GMT) Full text and rfc822 format available.

Message #17 received at 50675 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: meedstrom <at> teknik.io, 50675 <at> debbugs.gnu.org
Subject: Re: bug#50675: more info
Date: Sun, 5 Jun 2022 01:31:50 +0300
Hi!

On 08.05.2022 11:26, meedstrom--- via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> Okay, so the warning message "pcomplete-completions-at-point fails to 
> return valid completion data" originates from completion-at-point in 
> minibuffer.el.
> 
> There's a comment in there that says if the CAPF returned t, it assumes 
> completion already happened. It does seem that the CAPF returns t, at 
> least in eshell in a string. So that may be the root of the problem.
> 
> I'm not 100% sure I'm interpreting the debugger right. To do what I did,
> 
> 1. emacs -Q
> 2. M-x debug-on-entry RET pcomplete-completions-at-point RET
> 3. type a quote mark in eshell and press TAB

Sorry for the late reply.

This bug seems like a duplicate of bug#50470, which we almost got fixed, 
but... then bug#55204 came around, patch merged, and the behavior 
doesn't seem to reproduce anymore.

Check the latest master sometime, see if you can still trigger the problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50675; Package emacs. (Fri, 26 Aug 2022 12:18:02 GMT) Full text and rfc822 format available.

Message #20 received at 50675 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 50675 <at> debbugs.gnu.org, meedstrom <at> teknik.io
Subject: Re: bug#50675: pcomplete capf fails inside strings
Date: Fri, 26 Aug 2022 14:17:10 +0200
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> This bug seems like a duplicate of bug#50470, which we almost got
> fixed, but... then bug#55204 came around, patch merged, and the
> behavior doesn't seem to reproduce anymore.
>
> Check the latest master sometime, see if you can still trigger the problem.

I can't reproduce the problem with the given recipe on the current
trunk, so it looks like this has been fixed, and I'm therefore closing
this bug report.

If the problem still exists, please respond to the debbugs address and
we'll reopen.




bug closed, send any further explanations to 50675 <at> debbugs.gnu.org and meedstrom <at> teknik.io Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 26 Aug 2022 12:18:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 24 Sep 2022 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 215 days ago.

Previous Next


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