unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50034: 28.0.50; elisp capf error "Wrong type argument: listp, elisp--witness--lisp"
@ 2021-08-13  1:25 Daniel Mendler
  2021-08-13 12:13 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Mendler @ 2021-08-13  1:25 UTC (permalink / raw)
  To: 50034

Steps to reproduce:

1. Start "emacs -Q"
2. Enter "(defmacro foo bar" in the scratch buffer
3. Press M-<tab> to invoke 'completion-at-point'

The capf will throw the error "Wrong type argument: listp,
elisp--witness--lisp". This error will be shown on Emacs 27 and Emacs 28.

The input is nonsensical. I hit this while experimenting with my Corfu
completion UI package. A capf should never error in case no completion
is possible, such that another completion function of lower priority
registered in 'completion-at-point-functions' can take over.

Stack trace:

Debugger entered--Lisp error: (wrong-type-argument listp
elisp--witness--lisp)
  remq(&rest elisp--witness--lisp)
  elisp--local-variables-1(nil (lambda elisp--witness--lisp nil))
  #f(compiled-function (vars sexp) #<bytecode -0x8b1fe1acbf9337e>)(nil
(#'(lambda elisp--witness--lisp nil)))
  elisp--local-variables-1(nil #'(lambda elisp--witness--lisp nil))
  #f(compiled-function (vars sexp) #<bytecode -0x8b1fe1acbf9337e>)(nil
((cons 'macro #'(lambda elisp--witness--lisp nil))))
  elisp--local-variables-1(nil (cons 'macro #'(lambda
elisp--witness--lisp nil)))
  #f(compiled-function (vars sexp) #<bytecode -0x8b1fe1acbf9337e>)(nil
((defalias 'foo (cons 'macro #'(lambda elisp--witness--lisp nil)))))
  elisp--local-variables-1(nil (defalias 'foo (cons 'macro #'(lambda
elisp--witness--lisp nil))))
  elisp--local-variables()
  #f(compiled-function (string) #<bytecode 0x11ce5f9950685161>)(#("bar"
0 3 (fontified t)))
  #f(compiled-function (string pred action) #<bytecode
0x1441a5b45360593c>)(#("bar" 0 3 (fontified t)) nil nil)
  try-completion(#("bar" 0 3 (fontified t)) #f(compiled-function (string
pred action) #<bytecode 0x1441a5b45360593c>) nil)
  #f(compiled-function (table) #<bytecode
0x16347446532ce382>)(#f(compiled-function (string pred action)
#<bytecode 0x1441a5b45360593c>))
  mapcar(#f(compiled-function (table) #<bytecode 0x16347446532ce382>)
(#f(compiled-function (string pred action) #<bytecode
0x1441a5b45360593c>) #f(compiled-function (&rest args2) #<bytecode
-0xb6f918caeb61f7c>)))
  #f(compiled-function (string pred action) #<bytecode
0x129f647999b6137>)(#("bar" 0 3 (fontified t)) nil nil)
  try-completion(#("bar" 0 3 (fontified t)) #f(compiled-function (string
pred action) #<bytecode 0x129f647999b6137>) nil)
  completion-basic-try-completion(#("bar" 0 3 (fontified t))
#f(compiled-function (string pred action) #<bytecode 0x129f647999b6137>)
nil 3)
  #f(compiled-function (style) #<bytecode -0x1fb7ebf98eadbd47>)(basic)
  completion--some(#f(compiled-function (style) #<bytecode
-0x1fb7ebf98eadbd47>) (basic partial-completion emacs22))
  completion--nth-completion(1 #("bar" 0 3 (fontified t))
#f(compiled-function (string pred action) #<bytecode 0x129f647999b6137>)
nil 3 (metadata))
  completion-try-completion(#("bar" 0 3 (fontified t))
#f(compiled-function (string pred action) #<bytecode 0x129f647999b6137>)
nil 3 (metadata))
  completion--do-completion(#<marker at 160 in *scratch*> 163)
  completion--in-region-1(#<marker at 160 in *scratch*> 163)
  #f(compiled-function (start end collection predicate) #<bytecode
-0xf6d24f3ba2b80f7>)(#<marker at 160 in *scratch*> 163
#f(compiled-function (string pred action) #<bytecode 0x129f647999b6137>)
nil)
  apply(#f(compiled-function (start end collection predicate) #<bytecode
-0xf6d24f3ba2b80f7>) (#<marker at 160 in *scratch*> 163
#f(compiled-function (string pred action) #<bytecode 0x129f647999b6137>)
nil))
  #f(compiled-function (funs global args) #<bytecode
-0xbd1d687a6b6022>)(nil nil (#<marker at 160 in *scratch*> 163
#f(compiled-function (string pred action) #<bytecode 0x129f647999b6137>)
nil))
  completion--in-region(#<marker at 160 in *scratch*> 163
#f(compiled-function (string pred action) #<bytecode 0x129f647999b6137>)
nil)
  completion-in-region(#<marker at 160 in *scratch*> 163
#f(compiled-function (string pred action) #<bytecode 0x129f647999b6137>)
nil)
  completion-at-point()

In GNU Emacs 28.0.50 (build 54, x86_64-pc-linux-gnu, GTK+ Version
3.24.5, cairo version 1.16.0)
 of 2021-08-12 built on projects
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-23 14:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13  1:25 bug#50034: 28.0.50; elisp capf error "Wrong type argument: listp, elisp--witness--lisp" Daniel Mendler
2021-08-13 12:13 ` Lars Ingebrigtsen
2022-08-22 13:15   ` Lars Ingebrigtsen
2022-08-23  2:05   ` Michael Heerdegen
2022-08-23 14:17   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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).