Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transient menu annoyingly introduces extra window when Helm mode enabled #656

Closed
1 task done
daedsidog opened this issue Feb 20, 2025 · 8 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@daedsidog
Copy link
Contributor

daedsidog commented Feb 20, 2025

  • I have updated gptel to the latest commit and tested that the issue still exists (I have this bug with the latest commit, but I recreate the bug with the latest release)

Bug Description

Exiting out of the gptel-menu transient menu after invoking something that relies on completing read that was rerouted to Helm mode creates a buffer that stays after the transient menu has been closed.

Backend

None

Steps to Reproduce

  1. Install helm-mode and gptel
  2. Enable Helm globally with (helm-mode 1)
  3. M-x gptel-menu -i C-g C-g to introduce the aforementioned buffer (sometimes, just a single C-g is enough to exit out of gptel-menu, but other times you need two: one to exit the -i menu and another to exit gptel-menu

Image

M-x gptel-menu:

Image

-i:

Image

C-g (or C-g C-g):

Image

Additional Context

Emacs version: GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2)
OS: WSL2 Arch Linux

Helm versions:

helm-20250219.1650
helm-ag-20241028.144
helm-core-20250217.1544 
helm-project-20230608.1212

Transient version:

transient-20250216.1730

Bug can be recreated using both the latest gptel master and v0.9.7.

@daedsidog daedsidog added the bug Something isn't working label Feb 20, 2025
@daedsidog
Copy link
Contributor Author

daedsidog commented Feb 20, 2025

Also occurs with model selection. I truly don't remember this happening before.

This could be a Transient-specific bug, but Magit works without issue for me.

@daedsidog daedsidog changed the title Transient menu bug with Helm mode enabled Transient menu annoyingly introduces extra window when Helm mode enabled Feb 20, 2025
@karthink
Copy link
Owner

karthink commented Feb 20, 2025 via email

@daedsidog
Copy link
Contributor Author

What is your value of transient-display-buffer-action?

(display-buffer-in-side-window (side . bottom) (dedicated . t) (inhibit-same-window . t))

@karthink
Copy link
Owner

karthink commented Feb 20, 2025 via email

@daedsidog
Copy link
Contributor Author

The best way to test if this is a gptel issue would be to use a magit command that invokes (Helm's) completing-read and see if the problem occurs.

I've tried lots of Magit commands and couldn't recreate it (e.g. C-x g b b, branch checkout, which I assume uses completing-read).

@karthink
Copy link
Owner

Can you try (and suggest) a command that isn't a suffix, i.e. it doesn't end the transient session?

@karthink
Copy link
Owner

Also please try this transient:

(transient-define-prefix test-pre ()
  "TODO"
  ["Test"
   ("r" "read" "r"
    :class transient-option
    :prompt "Pick: "
    :reader (lambda (p i h)
	      (completing-read p '("one" "two" "three")
			       nil nil i h)))])

Use the r option to pick a value, then quit the transient. Does the bug occur?

This is almost definitely a Helm + Transient issue, not gptel. You can track the status of this report at magit/transient#358

@daedsidog
Copy link
Contributor Author

Use the r option to pick a value, then quit the transient. Does the bug occur?

Yes

This is almost definitely a Helm + Transient issue, not gptel. You can track the status of this report at magit/transient#358

I suspected as much. Closing as it is not gptel-related.

karthink added a commit that referenced this issue Feb 23, 2025
* README.org (FAQ): Restructure and add headers.  Add FAQ item on
transient menu spawning extra windows (#583, #656).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants