`consult-gh-show-preview` not respected
sethidden opened this issue · comments
Describe the bug
consult-gh-show-preview
is defined as a custom variable but is not actually used in code. The documentation seems to be for v0.12 https://github.com/armindarvish/consult-gh#consult-gh-show-preview
To Reproduce
Steps to reproduce the behavior:
(setq consult-gh-show-preview nil)
(this is the default)- M-x consult-gh-issue-list
- Type in "armindarvish/consult-gh"
- Moving around with C-n C-p will make the thread wait for gh cli output preview and freeze for a bit each time
Expected behavior
Preview should not be shown/downloaded if (eq consult-gh-show-preview nil), thus making things a bit faster
Screenshots
I am essentially pressing C-n as fast as I can here and as you can see the waiting for preview output takes a while. I'd like to disable the previews so that I can operate only on issue titles, without having to preview
https://github.com/armindarvish/consult-gh/assets/5359825/9918df63-0349-4858-b6d6-c31e75f04954
Important Information:
- OS: macOS Ventura
- Version of Emacs: 29.1
- Version of
gh
: 2.38.0 - Version of
consult
: 0.35 - The installation method and the configuration you are using with your consult-gh.
(use-package consult-gh
:after embark
:straight (consult-gh :type git :host github :repo "armindarvish/consult-gh" :after consult)
:config
(add-to-list 'consult-gh-default-orgs-list "vuestorefront")
(add-to-list 'consult-gh-default-orgs-list "sethidden")
(setq consult-gh-default-clone-directory "~/dev/"
consult-gh-prioritize-local-folder t) ; 't' doesn't work for now
(require 'consult-gh-transient)
(require 'consult-gh-embark)
(require 'consult-gh-forge))
- If there is an error message, turn debug-on-error on (by
M-x toggle-debug-on-error
) and include the backtrace content in your report. (Not applicable) - If the error only exists when you have some other packages installed, list those packages (e.g. problem happens when evil is installed) (Not applicable)
Additional context
Not applicable
@sethidden Another good catch. I now merged #88 which fixes this. The main branch should be good now. Give it a try and let me know if it is fixed.
@sethidden By the way, I would recommend setting consult-gh-preview-key
to some preferred key binding rather than turning previews off globally, because what if you want to see a preview?
Turning previews off globally was originally designed mostly for temporary troubleshooting purposes, otherwise it does not make that much sense.
Yep works great now! Thanks :) I'll make sure to set the preview key as well