consult-gh
consult-gh copied to clipboard
Opening an issue with `forge` fails
Describe the bug
When consult-gh-issue-action
is set to consult-gh-forge--issue-view-action
, consult-gh
fails to open the selected issue.
To Reproduce Steps to reproduce the behavior:
-
M-x consult-gh-search-issues
- Enter a search string, e.g. "consult-gh"
- Select a search result, e.g. issue #101
- See error
Expected behavior
The issue is opened in a forge
buffer.
Important Information:
- macOS Sonoma 14.2.1
- GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.5.0, NS appkit-2299.60 Version 13.4.1 (c) (Build 22F770820d)) of 2023-08-27
- gh version 2.40.1 (2023-12-13) https://github.com/cli/cli/releases/tag/v2.40.1
- consult version 1.1
config:
(use-package consult-gh
:elpaca (consult-gh
:host github
:repo "armindarvish/consult-gh")
:after consult forge
:demand t
:config
(require 'consult-gh-embark)
(require 'consult-gh-forge)
(setq consult-gh-default-clone-directory "~/source/")
(setq consult-gh-repo-maxnum 30)
(setq consult-gh-issues-maxnum 100)
(setq consult-gh-show-preview nil)
(setq consult-gh-preview-key 'any)
(setq consult-gh-preview-buffer-mode 'org-mode)
(setq consult-gh-repo-action #'consult-gh--repo-browse-files-action)
(setq consult-gh-issue-action #'consult-gh-forge--issue-view-action)
(setq consult-gh-pr-action #'consult-gh-forge--pr-view-action)
(setq consult-gh-code-action #'consult-gh--code-view-action)
(setq consult-gh-file-action #'consult-gh--files-view-action)
(setq consult-gh-issues-state-to-show "all")
(dolist (var '(consult-gh--known-orgs-list
consult-gh--known-repos-list))
(push var savehist-additional-variables)))
backtrace:
Debugger entered--Lisp error: (void-variable sparse-p)
consult-gh-forge--add-repository("https://github.com/armindarvish/consult-gh")
consult-gh-forge--add-topic("https://github.com/armindarvish/consult-gh" 97)
consult-gh-forge--issue-view("armindarvish/consult-gh" "97")
consult-gh-forge--issue-view-action(("97:Warning (comp): consult-gh-embark.el: Error: Symbol's value as variable is void consult-preview-key" :repo "armindarvish/consult-gh" :user "armindarvish" :issue "97" :state "CLOSED" :title "Warning (comp): consult-gh-embark.el: Error: Symbol's value as variable is void consult-preview-key" :tags "" :date "2023-11-16" :query "consult-gh--issue-view-action"))
consult-gh-search-issues()
funcall-interactively(consult-gh-search-issues)
command-execute(consult-gh-search-issues record)
execute-extended-command(nil "consult-gh-search-issues" nil)
funcall-interactively(execute-extended-command nil "consult-gh-search-issues" nil)
command-execute(execute-extended-command)