Open jgarte opened 2 years ago
Hi,
Yes, it works fine in Emacs 28.
But in nearly recent master Emacs version I'm experiencing issues with pdb-capf
itself:
Making completion list...
Error in post-command-hook (completion-in-region--postch): (wrong-type-argument integer-or-marker-p nil)
python-shell-completion-at-point: Wrong type argument: integer-or-marker-p, nil
But in nearly recent master Emacs version I'm experiencing issues with
pdb-capf
itself:Making completion list... Error in post-command-hook (completion-in-region--postch): (wrong-type-argument integer-or-marker-p nil) python-shell-completion-at-point: Wrong type argument: integer-or-marker-p, nil
Nevermind. Somehow pdb-capf
hook was not set up for inferior python buffer.
Can confirm, pdb-capf
and corfu
are working fine together :)
@muffinmad That's great to hear! Now I just have to debug my setup further to understand what is not working. I'll report back once I'm able to do that.
Question:
Do you have an idea for how we could hook running pytest test-foo.py -k "some_test" --pdb
from eshell into gud
?
Do you have an idea for how we could hook running
pytest test-foo.py -k "some_test" --pdb
from eshell intogud
?
Not sure about eshell, but you can try to use pytest test-foo.py -k "some_test" --pdb
as the command to run for M-x pdb
I can confirm that the above pytest command works for me. Thanks!
Trying to figure out now how to get eglot
to complete for me in a gud
buffer.
@muffinmad I still haven't been able to figure this out ;(
Here's my latest config:
https://git.sr.ht/~whereiseveryone/confetti/tree/gnome/item/emacs.el
Would you like to meet up over jitsi to debug this some time?
@jgarte Do you use realgud
of just M-x pdb
from gud
?
I've tried both and they both are not completing for me.
@muffinmad
Would you be able to share your emacs config to see if I have something (un)set in mine compared to yours?
To find out if the pdb-capf
is added to completion functions do the following: once in the buffer with pdb
prompt, look at the completion-at-point-functions
variable (C-h v completion-at-point-functions
)
For me the help shows the following:
completion-at-point-functions is a variable defined in ‘minibuffer.el’.
Its value is (pdb-capf comint-completion-at-point t)
Local in buffer *django-commands-server: eddie*; global value is
I get this:
Its value is (comint-completion-at-point t)
Local in buffer *pdb hello.py shell*; global value is
(cape-file tags-completion-at-point-function)
It looks like pdb-capf
is not being set when the hook gets run. Any idea why?
My elisp code looks correct like you had recommended:
https://git.sr.ht/~whereiseveryone/confetti/tree/gnome/item/emacs.el#L288
I'm also adding to completion-at-point-functions
here:
https://git.sr.ht/~whereiseveryone/confetti/tree/gnome/item/emacs.el#L227
What is the major mode of the *pdb hello.py shell*
buffer?
@muffinmad
Looks like comint-mode
.
Its value is ‘comint-mode’
In your config the pdb-capf
is added to the completion-at-point-functions
only in pdb-mode-hook
. And it is not added for comint-mode
.
Hi,
Have you tried using this package with corfu?
https://github.com/minad/corfu/issues/207