Giter Site home page Giter Site logo

armindarvish / consult-gh Goto Github PK

View Code? Open in Web Editor NEW
83.0 4.0 10.0 247.33 MB

An Interactive interface for "GitHub CLI" client inside GNU Emacs using Consult

License: GNU General Public License v3.0

Emacs Lisp 100.00%
github completion emacs github-api github-client githubcli minibuffer version-control

consult-gh's People

Contributors

armindarvish avatar lemonbreezes avatar m-delfino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

consult-gh's Issues

How to use gh-list and pr-list commands?

Since the async flow feature change I can't seem to be able to use consult-gh-pr-list anymore. I just can't figure out the simple use case where I need to find a PR by its number or description.

I would run the command normally, it usually picks up the repo, if I'm running it while in the directory. It still prompts saying "Enter repo name", even though it clearly is expecting the PR parameters. But typing anything just throws "Could not resolve the repository... bla-bla". The only way to make it work is to explicitly type the search parameters after --, so it requires whole a lot more typing: myorg/myrepo --search "is:closed 1842" - if you don't explicitly state that you're looking within closed PRs it won't find it (turns out this can be improved using vars, mentioned further).

It's pretty similar for the issues list.

What's the recommendation for searching for PRs and Issues? Because out of the box, the commands don't feel very intuitive.

Support Multiple Profiles

We can possibly support multiple proviles using the environment variable for gh config dir. I need to come up with ideas on how to set it up!

use consults async facility to search as the user types an entry

Based on feedback on Reddit here: https://www.reddit.com/r/emacsporn/comments/14p42xq/consultgh_now_supports_directly_opening_issues_in/

Is your feature request related to a problem? Please describe.
When searching issues why do I have to enter a search term and then get results separately? Why not use consults async facility to search as the user types. The annoyance with needing to enter search terms and explicitly hit return to search is if you made a typo or messed you can't go back. You need to rerun the M-x command or binding and then search again which is pointless churn IMO.

Describe the solution you'd like
Enter some text and then construct a command line from it that you then run through a subprocess and pass the output back to consult as some series of lines/candidates. It's more a matter of one of the good parts of consult is it let's you have these sorts of dynamically updating completion tables.

Improve Customize Types

Is your feature request related to a problem? Please describe.

The type specifications in defcustom seem inadequate or incorrect for some customize variables.

Off the top of my head, consult-gh-default-orgs-list has a less-than-helpful type of list (using '(repeat string) or better '(repeat :tag "Organizations" (string :tag "Org")).

Describe the solution you'd like
Update customization types to improve customize interface (will also improve type checking for those of us using setopt.

Describe alternatives you've considered
N/A

Additional context
N/A

Cannot interact with package: `(void-function closure)` on all consult-derived commands.

Describe the bug
Attempts to interact with package are not possible, all produce error (void-function closure) as shown below.

To Reproduce
Steps to reproduce the behavior:

  1. Set toggle-debug-on-error to t.
  2. Execute M-x consult-gh-repo-clone RET
  3. See error below
Debugger entered--Lisp error: (void-function closure)
  (closure ((delay . 0.2) (refresh) (timer) (async closure ((buffer) (last) (candidates)) (action) (cond ((eq action 'setup) (let nil (setq buffer (current-buffer)) nil)) ((stringp action) 'nil) ((eq action 'destroy) 'nil) ((eq action 'flush) (let nil (progn (setq candidates nil) (setq last nil)))) ((eq action 'refresh) (let nil (let* (...) (if win ... nil)) nil)) ((null action) (let nil candidates)) ((consp action) (let nil (setq last (last ...)) candidates)) (t (let ((x1991 action)) (error "No clause matching `%S'" x1991)))))) (action) (prog1 (funcall async action) (let* ((pcase-0 #'(lambda nil (setq refresh t) (if timer nil ...)))) (cond ((consp action) (funcall pcase-0)) ((eq action 'flush) (funcall pcase-0)) ((eq action 'destroy) (let nil (if timer (progn ...))))))))
  (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ((buffer) (last) (candidates)) (action) (cond ((eq action 'setup) (let nil (setq buffer ...) nil)) ((stringp action) 'nil) ((eq action 'destroy) 'nil) ((eq action 'flush) (let nil (progn ... ...))) ((eq action 'refresh) (let nil (let* ... ...) nil)) ((null action) (let nil candidates)) ((consp action) (let nil (setq last ...) candidates)) (t (let (...) (error "No clause matching `%S'" x1991)))))) (action) (prog1 (funcall async action) (let* ((pcase-0 #'(lambda nil ... ...))) (cond ((consp action) (funcall pcase-0)) ((eq action 'flush) (funcall pcase-0)) ((eq action 'destroy) (let nil (if timer ...))))))) action)
  (mapcar (lambda (string) (consult-gh--repo-format string input t)) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ((buffer) (last) (candidates)) (action) (cond ((eq action ...) (let nil ... nil)) ((stringp action) 'nil) ((eq action ...) 'nil) ((eq action ...) (let nil ...)) ((eq action ...) (let nil ... nil)) ((null action) (let nil candidates)) ((consp action) (let nil ... candidates)) (t (let ... ...))))) (action) (prog1 (funcall async action) (let* ((pcase-0 #'...)) (cond ((consp action) (funcall pcase-0)) ((eq action ...) (funcall pcase-0)) ((eq action ...) (let nil ...)))))) action))
  (cond ((stringp action) (setq input action) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ((buffer) (last) (candidates)) (action) (cond (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (t ...)))) (action) (prog1 (funcall async action) (let* ((pcase-0 ...)) (cond (... ...) (... ...) (... ...))))) action)) (t (mapcar (lambda (string) (consult-gh--repo-format string input t)) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure (... ... ...) (action) (cond ... ... ... ... ... ... ... ...))) (action) (prog1 (funcall async action) (let* (...) (cond ... ... ...)))) action))))
  (lambda (action) (cond ((stringp action) (setq input action) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ... ... ...)) (action) (prog1 (funcall async action) (let* ... ...))) action)) (t (mapcar (lambda (string) (consult-gh--repo-format string input t)) (funcall (closure (... ... ... ...) (action) (prog1 ... ...)) action)))))(setup)
  funcall((lambda (action) (cond ((stringp action) (setq input action) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ... ... ...)) (action) (prog1 (funcall async action) (let* ... ...))) action)) (t (mapcar (lambda (string) (consult-gh--repo-format string input t)) (funcall (closure (... ... ... ...) (action) (prog1 ... ...)) action))))) setup)
  (let nil (setq ov (make-overlay (- (minibuffer-prompt-end) 2) (- (minibuffer-prompt-end) 1))) (funcall async 'setup))
  (cond ((eq action 'indicator) (let nil (overlay-put ov 'display (cond ((eq state 'running) (let nil #("*" 0 1 ...))) ((eq state 'finished) (let nil #(":" 0 1 ...))) ((eq state 'killed) (let nil #(";" 0 1 ...))) ((eq state 'failed) (let nil #("!" 0 1 ...))) (t (let (...) (error "No clause matching `%S'" x1998))))))) ((eq action 'setup) (let nil (setq ov (make-overlay (- (minibuffer-prompt-end) 2) (- (minibuffer-prompt-end) 1))) (funcall async 'setup))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async 'destroy))) (t (let nil (funcall async action))))
  (closure ((ov . #<overlay from 14 to 15 in  *Minibuf-1*>) (async lambda (action) (cond ((stringp action) (setq input action) (funcall (closure ... ... ...) action)) (t (mapcar (lambda ... ...) (funcall ... action)))))) (action &optional state) (cond ((eq action 'indicator) (let nil (overlay-put ov 'display (cond (... ...) (... ...) (... ...) (... ...) (t ...))))) ((eq action 'setup) (let nil (setq ov (make-overlay (- ... 2) (- ... 1))) (funcall async 'setup))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async 'destroy))) (t (let nil (funcall async action)))))(setup)
  funcall((closure ((ov . #<overlay from 14 to 15 in  *Minibuf-1*>) (async lambda (action) (cond ((stringp action) (setq input action) (funcall (closure ... ... ...) action)) (t (mapcar (lambda ... ...) (funcall ... action)))))) (action &optional state) (cond ((eq action 'indicator) (let nil (overlay-put ov 'display (cond (... ...) (... ...) (... ...) (... ...) (t ...))))) ((eq action 'setup) (let nil (setq ov (make-overlay (- ... 2) (- ... 1))) (funcall async 'setup))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async 'destroy))) (t (let nil (funcall async action))))) setup)
  (let nil (funcall async action))
  (cond ((equal action '"") (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn (setq proc nil) (setq proc-buf nil)))) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ((args (funcall builder action))) (if (stringp (car args)) nil (setq args (car args))) (if (equal args last-args) nil (setq last-args args) (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (if args (progn (let* ... ... ... ...))))) nil)) ((eq action 'destroy) (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn (setq proc nil) (setq proc-buf nil)))) (funcall async 'destroy))) (t (let nil (funcall async action))))
  (closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--search-repos-builder) (async closure ((ov . #<overlay from 14 to 15 in  *Minibuf-1*>) (async lambda (action) (cond (... ... ...) (t ...)))) (action &optional state) (cond ((eq action 'indicator) (let nil (overlay-put ov ... ...))) ((eq action 'setup) (let nil (setq ov ...) (funcall async ...))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((equal action '"") (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ((args ...)) (if (stringp ...) nil (setq args ...)) (if (equal args last-args) nil (setq last-args args) (if proc ...) (if args ...))) nil)) ((eq action 'destroy) (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (funcall async 'destroy))) (t (let nil (funcall async action)))))(setup)
  funcall((closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--search-repos-builder) (async closure ((ov . #<overlay from 14 to 15 in  *Minibuf-1*>) (async lambda (action) (cond (... ... ...) (t ...)))) (action &optional state) (cond ((eq action 'indicator) (let nil (overlay-put ov ... ...))) ((eq action 'setup) (let nil (setq ov ...) (funcall async ...))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((equal action '"") (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ((args ...)) (if (stringp ...) nil (setq args ...)) (if (equal args last-args) nil (setq last-args args) (if proc ...) (if args ...))) nil)) ((eq action 'destroy) (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (funcall async 'destroy))) (t (let nil (funcall async action))))) setup)
  (let nil (funcall async action))
  (cond ((stringp action) (let nil (if (equal action input) nil (if timer (progn (cancel-timer timer) (setq timer nil))) (funcall async "") (setq input action) (if (equal action "") nil (setq timer (run-at-time (+ debounce ...) nil #'...)))) nil)) ((eq action 'destroy) (let nil (if timer (progn (cancel-timer timer))) (funcall async 'destroy))) (t (let nil (funcall async action))))
  (closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--search-repos-builder) (async closure ((ov . #<overlay from 14 to 15 in  *Minibuf-1*>) (async lambda ... ...)) (action &optional state) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((equal action '"") (let nil (if proc ...) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ... ... ...) nil)) ((eq action 'destroy) (let nil (if proc ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((stringp action) (let nil (if (equal action input) nil (if timer (progn ... ...)) (funcall async "") (setq input action) (if (equal action "") nil (setq timer ...))) nil)) ((eq action 'destroy) (let nil (if timer (progn (cancel-timer timer))) (funcall async 'destroy))) (t (let nil (funcall async action)))))(setup)
  funcall((closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--search-repos-builder) (async closure ((ov . #<overlay from 14 to 15 in  *Minibuf-1*>) (async lambda ... ...)) (action &optional state) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((equal action '"") (let nil (if proc ...) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ... ... ...) nil)) ((eq action 'destroy) (let nil (if proc ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((stringp action) (let nil (if (equal action input) nil (if timer (progn ... ...)) (funcall async "") (setq input action) (if (equal action "") nil (setq timer ...))) nil)) ((eq action 'destroy) (let nil (if timer (progn (cancel-timer timer))) (funcall async 'destroy))) (t (let nil (funcall async action))))) setup)
  (let nil (consult--split-setup split) (funcall async 'setup))
  (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val (funcall split action))) (progn (ignore (consp val)) (let* ((x1992 ...) (x1993 ...)) (progn (ignore ...) (let* ... ...))))))) (t (let nil (funcall async action))))
  (closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--search-repos-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action)))))(setup)
  funcall((closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--search-repos-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action))))) setup)
  (progn (progn (setq orig-chunk read-process-output-max) (setq read-process-output-max new-chunk)) (funcall async 'setup) (let* ((mb (current-buffer)) (fun #'(lambda nil (let* (...) (if win ... nil)))) (hook (make-symbol "consult--async-after-change-hook"))) (fset hook #'(lambda (&rest _) (run-at-time 0 nil fun))) (add-hook 'after-change-functions hook nil 'local) (funcall hook)))
  (if (consult--async-p async) (progn (progn (setq orig-chunk read-process-output-max) (setq read-process-output-max new-chunk)) (funcall async 'setup) (let* ((mb (current-buffer)) (fun #'(lambda nil (let* ... ...))) (hook (make-symbol "consult--async-after-change-hook"))) (fset hook #'(lambda (&rest _) (run-at-time 0 nil fun))) (add-hook 'after-change-functions hook nil 'local) (funcall hook))))
  consult--minibuffer-setup-hook()
  #<subr completing-read-default>("Search Repos:  " (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action)))))) (str pred action) (let ((result (complete-with-action action (funcall async nil) str pred))) (if (eq action 'metadata) (if (and (eq (car result) 'metadata) (cdr result)) (cons 'metadata (append (cdr metadata) (cdr result))) metadata) result))) nil t "#" consult-gh--search-repos-history nil nil)
  apply((#<subr completing-read-default> "Search Repos:  " (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure (... ...) (str) (funcall fn str style)) (async closure (... ... ... ... ... ...) (action) (cond ... ... ...))) (action) (cond ((eq action ...) (let nil ... ...)) ((stringp action) (let nil ...)) (t (let nil ...))))) (str pred action) (let ((result (complete-with-action action (funcall async nil) str pred))) (if (eq action 'metadata) (if (and (eq ... ...) (cdr result)) (cons 'metadata (append ... ...)) metadata) result))) nil t "#" consult-gh--search-repos-history nil nil))
  (progn (add-hook 'minibuffer-setup-hook setup-hook) (apply app))
  (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (apply app)) (remove-hook 'minibuffer-setup-hook setup-hook))
  (let ((fun #'vertico--setup) (setup-hook (make-symbol "minibuffer-setup"))) (fset setup-hook #'(lambda nil (remove-hook 'minibuffer-setup-hook setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (apply app)) (remove-hook 'minibuffer-setup-hook setup-hook)))
  (progn (let ((fun #'vertico--setup) (setup-hook (make-symbol "minibuffer-setup"))) (fset setup-hook #'(lambda nil (remove-hook 'minibuffer-setup-hook setup-hook) (funcall fun))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook setup-hook) (apply app)) (remove-hook 'minibuffer-setup-hook setup-hook))))
  vertico--advice(#<subr completing-read-default> "Search Repos:  " (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action)))))) (str pred action) (let ((result (complete-with-action action (funcall async nil) str pred))) (if (eq action 'metadata) (if (and (eq (car result) 'metadata) (cdr result)) (cons 'metadata (append (cdr metadata) (cdr result))) metadata) result))) nil t "#" consult-gh--search-repos-history nil nil)
  apply(vertico--advice #<subr completing-read-default> ("Search Repos:  " (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure (... ...) (str) (funcall fn str style)) (async closure (... ... ... ... ... ...) (action) (cond ... ... ...))) (action) (cond ((eq action ...) (let nil ... ...)) ((stringp action) (let nil ...)) (t (let nil ...))))) (str pred action) (let ((result (complete-with-action action (funcall async nil) str pred))) (if (eq action 'metadata) (if (and (eq ... ...) (cdr result)) (cons 'metadata (append ... ...)) metadata) result))) nil t "#" consult-gh--search-repos-history nil nil))
  completing-read-default("Search Repos:  " (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action)))))) (str pred action) (let ((result (complete-with-action action (funcall async nil) str pred))) (if (eq action 'metadata) (if (and (eq (car result) 'metadata) (cdr result)) (cons 'metadata (append (cdr metadata) (cdr result))) metadata) result))) nil t "#" consult-gh--search-repos-history nil nil)
  completing-read("Search Repos:  " (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action)))))) (str pred action) (let ((result (complete-with-action action (funcall async nil) str pred))) (if (eq action 'metadata) (if (and (eq (car result) 'metadata) (cdr result)) (cons 'metadata (append (cdr metadata) (cdr result))) metadata) result))) nil t "#" consult-gh--search-repos-history nil nil)
  (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure (... ... ... ... ... ... ...) (action) (cond ... ... ... ...))) (action) (cond ((stringp action) (let nil ... nil)) ((eq action ...) (let nil ... ...)) (t (let nil ...))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* (...) (progn ... ...)))) (t (let nil (funcall async action))))) (inherit-input-method) (initial . "#") (default) (history :input consult-gh--search-repos-history) (require-match . t) (predicate) (prompt . "Search Repos:  ")) nil (completing-read prompt #'(lambda (str pred action) (let ((result (complete-with-action action ... str pred))) (if (eq action 'metadata) (if (and ... ...) (cons ... ...) metadata) result))) predicate require-match initial (if (symbolp history) history (car (cdr history))) default inherit-input-method))()
  funcall((closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action))))) (inherit-input-method) (initial . "#") (default) (history :input consult-gh--search-repos-history) (require-match . t) (predicate) (prompt . "Search Repos:  ")) nil (completing-read prompt #'(lambda (str pred action) (let ((result ...)) (if (eq action ...) (if ... ... metadata) result))) predicate require-match initial (if (symbolp history) history (car (cdr history))) default inherit-input-method)))
  (and t (funcall fun))
  (let* ((result (and t (funcall fun)))) (if result (funcall transform mb-narrow mb-input result) nil))
  (setq selected (let* ((result (and t (funcall fun)))) (if result (funcall transform mb-narrow mb-input result) nil)))
  (cons (setq selected (let* ((result (and t (funcall fun)))) (if result (funcall transform mb-narrow mb-input result) nil))) mb-input)
  (unwind-protect (cons (setq selected (let* ((result (and t (funcall fun)))) (if result (funcall transform mb-narrow mb-input result) nil))) mb-input) (if state (progn (funcall state 'return selected))))
  (progn (add-hook 'minibuffer-setup-hook hook1988) (unwind-protect (cons (setq selected (let* ((result (and t ...))) (if result (funcall transform mb-narrow mb-input result) nil))) mb-input) (if state (progn (funcall state 'return selected)))))
  (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook1988) (unwind-protect (cons (setq selected (let* ((result ...)) (if result (funcall transform mb-narrow mb-input result) nil))) mb-input) (if state (progn (funcall state 'return selected))))) (remove-hook 'minibuffer-setup-hook hook1988))
  (let ((hook1988 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook1988 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook1988) (funcall (if (and state preview-key) #'(lambda nil ... ... ... ...) #'(lambda nil ...))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook1988) (unwind-protect (cons (setq selected (let* (...) (if result ... nil))) mb-input) (if state (progn (funcall state 'return selected))))) (remove-hook 'minibuffer-setup-hook hook1988)))
  (let ((mb-input "") mb-narrow selected timer previewed) (let ((hook1988 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook1988 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook1988) (funcall (if (and state preview-key) #'... #'...)))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook1988) (unwind-protect (cons (setq selected (let* ... ...)) mb-input) (if state (progn (funcall state ... selected))))) (remove-hook 'minibuffer-setup-hook hook1988))))
  consult--with-preview-1(any (closure (t) (action cand) (let* ((preview (consult--buffer-preview))) (cond ((eq action 'preview) (let nil (if cand (let* ... ...)))) ((eq action 'return) (let nil cand))))) (closure ((async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action))))) (lookup closure (t) (sel cands &rest args) (let* ((info (cdr ...)) (repo (plist-get info :repo))) (cons (format "%s" repo) info))) (narrow)) (narrow input cand) (funcall lookup cand (funcall async nil) input narrow)) #f(compiled-function (&rest args2) #<bytecode -0x14a740b2b74fa63f>) (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action))))) (inherit-input-method) (initial . "#") (default) (history :input consult-gh--search-repos-history) (require-match . t) (predicate) (prompt . "Search Repos:  ")) nil (completing-read prompt #'(lambda (str pred action) (let ((result ...)) (if (eq action ...) (if ... ... metadata) result))) predicate require-match initial (if (symbolp history) history (car (cdr history))) default inherit-input-method)))
  (let* ((metadata (cons 'metadata (append (if category (progn (list ...))) (if group (progn (list ...))) (if annotate (progn (list ... ...))) (if sort nil '(... ...))))) (consult--annotate-align-width 0) (result (consult--with-preview-1 preview-key state #'(lambda (narrow input cand) (funcall lookup cand (funcall async nil) input narrow)) (apply-partially #'run-hook-with-args-until-success 'consult--completion-candidate-hook) #'(lambda nil (completing-read prompt #'... predicate require-match initial (if ... history ...) default inherit-input-method))))) (cond ((consp history) (let* ((x2012 (car-safe history))) (if (eq x2012 :input) (let* ((x2013 ...)) (if (consp x2013) (let* ... ...) (let ... ...))) (let ((x2011 history)) (error "No clause matching `%S'" x2011))))) ((symbolp history) 'nil) (t (let ((x2011 history)) (error "No clause matching `%S'" x2011)))) (car result))
  (unwind-protect (let* ((metadata (cons 'metadata (append (if category (progn ...)) (if group (progn ...)) (if annotate (progn ...)) (if sort nil '...)))) (consult--annotate-align-width 0) (result (consult--with-preview-1 preview-key state #'(lambda (narrow input cand) (funcall lookup cand ... input narrow)) (apply-partially #'run-hook-with-args-until-success 'consult--completion-candidate-hook) #'(lambda nil (completing-read prompt ... predicate require-match initial ... default inherit-input-method))))) (cond ((consp history) (let* ((x2012 (car-safe history))) (if (eq x2012 :input) (let* (...) (if ... ... ...)) (let (...) (error "No clause matching `%S'" x2011))))) ((symbolp history) 'nil) (t (let ((x2011 history)) (error "No clause matching `%S'" x2011)))) (car result)) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk))))
  (let ((async (if (consult--async-p async) async #'(lambda (_) async)))) (unwind-protect (let* ((metadata (cons 'metadata (append (if category ...) (if group ...) (if annotate ...) (if sort nil ...)))) (consult--annotate-align-width 0) (result (consult--with-preview-1 preview-key state #'(lambda ... ...) (apply-partially #'run-hook-with-args-until-success 'consult--completion-candidate-hook) #'(lambda nil ...)))) (cond ((consp history) (let* ((x2012 ...)) (if (eq x2012 :input) (let* ... ...) (let ... ...)))) ((symbolp history) 'nil) (t (let ((x2011 history)) (error "No clause matching `%S'" x2011)))) (car result)) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk)))))
  (progn (add-hook 'minibuffer-setup-hook hook2010 t) (let ((async (if (consult--async-p async) async #'(lambda (_) async)))) (unwind-protect (let* ((metadata (cons 'metadata (append ... ... ... ...))) (consult--annotate-align-width 0) (result (consult--with-preview-1 preview-key state #'... (apply-partially ... ...) #'...))) (cond ((consp history) (let* (...) (if ... ... ...))) ((symbolp history) 'nil) (t (let (...) (error "No clause matching `%S'" x2011)))) (car result)) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk))))))
  (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook2010 t) (let ((async (if (consult--async-p async) async #'(lambda ... async)))) (unwind-protect (let* ((metadata (cons ... ...)) (consult--annotate-align-width 0) (result (consult--with-preview-1 preview-key state ... ... ...))) (cond ((consp history) (let* ... ...)) ((symbolp history) 'nil) (t (let ... ...))) (car result)) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk)))))) (remove-hook 'minibuffer-setup-hook hook2010))
  (let ((hook2010 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook2010 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook2010) (if (consult--async-p async) (progn (progn (setq orig-chunk read-process-output-max) (setq read-process-output-max new-chunk)) (funcall async 'setup) (let* (... ... ...) (fset hook ...) (add-hook ... hook nil ...) (funcall hook)))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook2010 t) (let ((async (if (consult--async-p async) async #'...))) (unwind-protect (let* ((metadata ...) (consult--annotate-align-width 0) (result ...)) (cond (... ...) (... ...) (t ...)) (car result)) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk)))))) (remove-hook 'minibuffer-setup-hook hook2010)))
  (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook2010 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook2010 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook2010) (if (consult--async-p async) (progn (progn ... ...) (funcall async ...) (let* ... ... ... ...))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook2010 t) (let ((async (if ... async ...))) (unwind-protect (let* (... ... ...) (cond ... ... ...) (car result)) (funcall async 'destroy) (if (and orig-chunk ...) (progn ...))))) (remove-hook 'minibuffer-setup-hook hook2010))))
  (progn (add-hook 'minibuffer-setup-hook hook2009 t) (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook2010 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook2010 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook2010) (if (consult--async-p async) (progn ... ... ...)))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook2010 t) (let ((async ...)) (unwind-protect (let* ... ... ...) (funcall async ...) (if ... ...)))) (remove-hook 'minibuffer-setup-hook hook2010)))))
  (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook2009 t) (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook2010 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook2010 #'(lambda nil (remove-hook ... hook2010) (if ... ...))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook2010 t) (let (...) (unwind-protect ... ... ...))) (remove-hook 'minibuffer-setup-hook hook2010))))) (remove-hook 'minibuffer-setup-hook hook2009))
  (let ((hook2009 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook2009 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook2009) (progn (add-hook 'after-change-functions #'consult--tofu-hide-in-minibuffer nil 'local) (consult--setup-keymap keymap (consult--async-p table) narrow preview-key) (set (make-local-variable 'minibuffer-default-add-function) (apply-partially #'consult--add-history (consult--async-p table) add-history))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook2009 t) (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook2010 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook2010 #'(lambda nil ... ...)) (unwind-protect (progn (add-hook ... hook2010 t) (let ... ...)) (remove-hook 'minibuffer-setup-hook hook2010))))) (remove-hook 'minibuffer-setup-hook hook2009)))
  (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:prompt :predicate :require-match :history :default :keymap :category :initial :narrow :add-history :annotate :state :preview-key :sort :lookup :group :inherit-input-method :allow-other-keys)) (if (cdr --cl-keys--) nil (error "Missing argument for %s" (car --cl-keys--))) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:prompt :predicate..." (car --cl-keys--)))))) (let ((hook2009 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook2009 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook2009) (progn (add-hook 'after-change-functions #'consult--tofu-hide-in-minibuffer nil 'local) (consult--setup-keymap keymap (consult--async-p table) narrow preview-key) (set (make-local-variable ...) (apply-partially ... ... add-history))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook2009 t) (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook2010 ...)) (fset hook2010 #'...) (unwind-protect (progn ... ...) (remove-hook ... hook2010))))) (remove-hook 'minibuffer-setup-hook hook2009))))
  (let* ((prompt (car (cdr (plist-member --cl-rest-- ':prompt)))) (predicate (car (cdr (plist-member --cl-rest-- ':predicate)))) (require-match (car (cdr (plist-member --cl-rest-- ':require-match)))) (history (car (cdr (plist-member --cl-rest-- ':history)))) (default (car (cdr (plist-member --cl-rest-- ':default)))) (keymap (car (cdr (plist-member --cl-rest-- ':keymap)))) (category (car (cdr (plist-member --cl-rest-- ':category)))) (initial (car (cdr (plist-member --cl-rest-- ':initial)))) (narrow (car (cdr (plist-member --cl-rest-- ':narrow)))) (add-history (car (cdr (plist-member --cl-rest-- ':add-history)))) (annotate (car (cdr (plist-member --cl-rest-- ':annotate)))) (state (car (cdr (plist-member --cl-rest-- ':state)))) (preview-key (car (cdr (plist-member --cl-rest-- ':preview-key)))) (sort (car (cdr (plist-member --cl-rest-- ':sort)))) (lookup (car (cdr (plist-member --cl-rest-- ':lookup)))) (group (car (cdr (plist-member --cl-rest-- ':group)))) (inherit-input-method (car (cdr (plist-member --cl-rest-- ':inherit-input-method))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '...) (if (cdr --cl-keys--) nil (error "Missing argument for %s" ...)) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:prompt :predicate..." (car --cl-keys--)))))) (let ((hook2009 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook2009 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook2009) (progn (add-hook ... ... nil ...) (consult--setup-keymap keymap ... narrow preview-key) (set ... ...)))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook2009 t) (let ((async table) (new-chunk ...) orig-chunk) (let (...) (fset hook2010 ...) (unwind-protect ... ...)))) (remove-hook 'minibuffer-setup-hook hook2009)))))
  consult--read-1((closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--search-repos-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action))))) :prompt "Search Repos:  " :lookup (closure (t) (sel cands &rest args) (let* ((info (cdr (assoc sel cands))) (repo (plist-get info :repo))) (cons (format "%s" repo) info))) :state (closure (t) (action cand) (let* ((preview (consult--buffer-preview))) (cond ((eq action 'preview) (let nil (if cand (let* ... ...)))) ((eq action 'return) (let nil cand))))) :initial "#" :group consult-gh--repo-group :add-history ("#" nil) :history (:input consult-gh--search-repos-history) :require-match t :category consult-gh-repos :preview-key any :sort nil :prompt "Select: " :preview-key any :sort t :lookup (closure (t) (selected &rest _) selected))
  apply(consult--read-1 (closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--search-repos-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action))))) (:prompt "Search Repos:  " :lookup (closure (t) (sel cands &rest args) (let* ((info (cdr (assoc sel cands))) (repo (plist-get info :repo))) (cons (format "%s" repo) info))) :state (closure (t) (action cand) (let* ((preview (consult--buffer-preview))) (cond ((eq action 'preview) (let nil (if cand ...))) ((eq action 'return) (let nil cand))))) :initial "#" :group consult-gh--repo-group :add-history ("#" nil) :history (:input consult-gh--search-repos-history) :require-match t :category consult-gh-repos :preview-key any :sort nil :prompt "Select: " :preview-key any :sort t :lookup (closure (t) (selected &rest _) selected)))
  (progn (progn (or (or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp (car table)) (and (consp (car table)) (stringp (car (car table)))) (and (consp (car table)) (symbolp (car (car table))))) (cl--assertion-failed '(or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp (car table)) (and (consp ...) (stringp ...)) (and (consp ...) (symbolp ...))))) nil) (ignore prompt predicate require-match history default keymap category initial narrow add-history annotate state preview-key sort lookup group inherit-input-method) (apply #'consult--read-1 table (append (consult--customize-get) options (list :prompt "Select: " :preview-key consult-preview-key :sort t :lookup #'(lambda (selected &rest _) selected)))))
  (progn (let ((--cl-keys-- options)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:prompt :predicate :require-match :history :default :keymap :category :initial :narrow :add-history :annotate :state :preview-key :sort :lookup :group :inherit-input-method :allow-other-keys)) (if (cdr --cl-keys--) nil (error "Missing argument for %s" (car --cl-keys--))) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... options))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:prompt :predicate..." (car --cl-keys--)))))) (progn (progn (or (or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp (car table)) (and (consp (car table)) (stringp (car ...))) (and (consp (car table)) (symbolp (car ...)))) (cl--assertion-failed '(or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp ...) (and ... ...) (and ... ...)))) nil) (ignore prompt predicate require-match history default keymap category initial narrow add-history annotate state preview-key sort lookup group inherit-input-method) (apply #'consult--read-1 table (append (consult--customize-get) options (list :prompt "Select: " :preview-key consult-preview-key :sort t :lookup #'(lambda (selected &rest _) selected))))))
  (let* ((prompt (car (cdr (plist-member options ':prompt)))) (predicate (car (cdr (plist-member options ':predicate)))) (require-match (car (cdr (plist-member options ':require-match)))) (history (car (cdr (plist-member options ':history)))) (default (car (cdr (plist-member options ':default)))) (keymap (car (cdr (plist-member options ':keymap)))) (category (car (cdr (plist-member options ':category)))) (initial (car (cdr (plist-member options ':initial)))) (narrow (car (cdr (plist-member options ':narrow)))) (add-history (car (cdr (plist-member options ':add-history)))) (annotate (car (cdr (plist-member options ':annotate)))) (state (car (cdr (plist-member options ':state)))) (preview-key (car (cdr (plist-member options ':preview-key)))) (sort (car (cdr (plist-member options ':sort)))) (lookup (car (cdr (plist-member options ':lookup)))) (group (car (cdr (plist-member options ':group)))) (inherit-input-method (car (cdr (plist-member options ':inherit-input-method))))) (progn (let ((--cl-keys-- options)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '...) (if (cdr --cl-keys--) nil (error "Missing argument for %s" ...)) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:prompt :predicate..." (car --cl-keys--)))))) (progn (progn (or (or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp (car table)) (and (consp ...) (stringp ...)) (and (consp ...) (symbolp ...))) (cl--assertion-failed '(or ... ... ... ... ... ... ...))) nil) (ignore prompt predicate require-match history default keymap category initial narrow add-history annotate state preview-key sort lookup group inherit-input-method) (apply #'consult--read-1 table (append (consult--customize-get) options (list :prompt "Select: " :preview-key consult-preview-key :sort t :lookup #'(lambda ... selected)))))))
  consult--read((closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--search-repos-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action))))) :prompt "Search Repos:  " :lookup (closure (t) (sel cands &rest args) (let* ((info (cdr (assoc sel cands))) (repo (plist-get info :repo))) (cons (format "%s" repo) info))) :state (closure (t) (action cand) (let* ((preview (consult--buffer-preview))) (cond ((eq action 'preview) (let nil (if cand (let* ... ...)))) ((eq action 'return) (let nil cand))))) :initial "#" :group consult-gh--repo-group :add-history ("#" nil) :history (:input consult-gh--search-repos-history) :require-match t :category consult-gh-repos :preview-key any :sort nil)
  consult-gh--async-search-repos("Search Repos:  " consult-gh--search-repos-builder nil)
  (let ((sel (consult-gh--async-search-repos "Search Repos:  " #'consult-gh--search-repos-builder initial))) (let* ((reponame (and t (plist-get (cdr sel) :repo)))) (if reponame (add-to-history 'consult-gh--known-repos-list (consult--async-split-initial reponame)) nil)) (let* ((username (and t (plist-get (cdr sel) :user)))) (if username (add-to-history 'consult-gh--known-orgs-list (consult--async-split-initial username)) nil)) (if noaction sel (progn (funcall consult-gh-repo-action sel) sel)))
  consult-gh-search-repos(nil t)
  (car (consult-gh-search-repos nil t))
  (substring-no-properties (car (consult-gh-search-repos nil t)))
  (or repos (substring-no-properties (car (consult-gh-search-repos nil t))))
  (let* ((consult-gh-prioritize-local-folder (if (eq consult-gh-prioritize-local-folder 'suggest) consult-gh-prioritize-local-folder nil)) (repos (or repos (substring-no-properties (car (consult-gh-search-repos nil t))))) (targetdir (or targetdir consult-gh-default-clone-directory)) (clonedir (if consult-gh-confirm-before-clone (read-directory-name "Select Target Directory: " targetdir default-directory) targetdir))) (if (stringp repos) (setq repos (list repos))) (mapcar #'(lambda (repo) (let* ((package (consult-gh--get-package repo)) (name (if consult-gh-confirm-before-clone ... package))) (consult-gh--repo-clone repo name clonedir))) repos))
  consult-gh-repo-clone()
  funcall-interactively(consult-gh-repo-clone)

Expected behavior
I should be able to interact with gh commands.

Important Information:

 - Version of `consult` 0.35
 - The installation method and the configuration you are using with your consult-gh. *Installed from git, f3f2755f*
 - 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.
 - If the error only exists when you have some other packages installed, list those packages (e.g. problem happens when evil is installed)

**Additional context**
Add any other context about the problem here.

Warning (comp): consult-gh-embark.el: Error: Symbol's value as variable is void consult-preview-key

Describe the bug

Using the config in the readme and emacs -q I get this error.

To Reproduce

(use-package magit)
(use-package forge)
(use-package consult-gh
  :custom
  (consult-gh-default-clone-directory "~/projects")
  (consult-gh-show-preview t)
  (consult-gh-preview-key "M-o")
  (consult-gh-repo-action #'consult-gh--repo-browse-files-action)
  (consult-gh-issue-action #'consult-gh--issue-view-action)
  (consult-gh-pr-action #'consult-gh--pr-view-action)
  (consult-gh-code-action #'consult-gh--code-view-action)
  (consult-gh-file-action #'consult-gh--files-view-action)
  (consult-gh-large-file-warning-threshold 2500000)
  (consult-gh-prioritize-local-folder 'suggest)
  :config
  ;;add your main GitHub account (replace "armindarvish" with your user or org)
  (add-to-list 'consult-gh-default-orgs-list "armindarvish")
  (require 'consult-gh-embark)
  (require 'consult-gh-forge))

Run with emacs -q --load "/tmp/config-with-consult-gh.el" and you'll see:

 ■  Warning (comp): /nix/store/v1qlivay055fvfnrsrkhm623vy0vqd25-emacs-packages-deps/share/emacs/site-lisp/consult-gh-forge.el: Error: Symbol's value as variable is void consult-preview-key
 ■  Warning (comp): /nix/store/v1qlivay055fvfnrsrkhm623vy0vqd25-emacs-packages-deps/share/emacs/site-lisp/consult-gh-embark.el: Error: Symbol's value as variable is void consult-preview-key

Expected behavior
No error loading since consult-preview-key is already defined. When I do C-h v consult-preview-key I see it's help page.

Important Information:

  • OS: NixOS
  • Version of Emacs 30
  • Version of gh (run gh --version in a shell)
  • Version of consult: consult-20231110.926
  • The installation method and the configuration you are using with your consult-gh: Nix

Additional context

I also tried using use-package but I think since these are comp errors it doesn't help?

(use-package consult-gh
  :after (consult magit forge)
:custom
  (consult-gh-default-clone-directory "~/projects")
  (consult-gh-show-preview t)
  (consult-gh-preview-key "M-o")
  (consult-gh-repo-action #'consult-gh--repo-browse-files-action)
  (consult-gh-issue-action #'consult-gh--issue-view-action)
  (consult-gh-pr-action #'consult-gh--pr-view-action)
  (consult-gh-code-action #'consult-gh--code-view-action)
  (consult-gh-file-action #'consult-gh--files-view-action)
  (consult-gh-large-file-warning-threshold 2500000)
  (consult-gh-prioritize-local-folder 'suggest)
  :config
  ;;add your main GitHub account (replace "armindarvish" with your user or org)
  (add-to-list 'consult-gh-default-orgs-list "armindarvish"))

  (use-package consult-gh-embark
    :after (consult consult-gh embark forge magit))

  (use-package consult-gh-forge
    :after (consult consult-gh embark forge magit))

When a file is previewed and then selected, a new copy is downloaded instead of opening the same preview buffer

Describe the bug*
Previewing a file (or code search result) and then opening it creates two copy of the files and two buffers).

To Reproduce
Steps to reproduce the behavior:

  1. M-x consult-gh-find-file
  2. search for a repo, and file
  3. once you have a list of files, get a preview
  4. select the same file

Expected behavior
If a file is already previewed, selecting it should just reload that same buffer (i.e. the same temporary file) at least within the same consult-gh-find-file call, there is no need to create two different copies of the same file.

Screenshots
Screen Recording 2023-11-14 at 8 12 55 AM

Additional context
This is happening because of the way temporary file names are created. Essentially both preview and view actions are making a unique filepath and therefore end up creating two unique files. The filepath should be shared between the two.

Marginalia info

consult-gh-orgs and consult-gh-search-repos show some useful info, would be nice to add the list of languages used in the repo (e.g., so we could filter all elisp repos). Also, make sure that the annotations are nicely lined up, currently they are not aligned.

It looks like in order to retrieve that (and some additional) info, gh will have to work in json mode, e.g., gh search repos SOME-REPO --json fullName,language

Embarkify

The package currently allows you to set one specific action for consult-gh-file-action, consult-gh-issue-action, consult-gh-repo-action, and that's great.

However, I just realized that even though I often prefer to open things locally instead of browsing, I do sometimes need to open them in the browser. I think it would be great that when you run consult-gh-find-file, you could embark-act on the selected row and open it locally, browse it, etc.

This opens up possibilities, for example, of opening the GitHub blame page for a given file or navigating to a dialog for comparing files between branches. In the future, when PR features are added, other cool actions can be incorporated.

Allow navigation in embark from consult-gh searches similar to consult-grep

Is your feature request related to a problem? Please describe.

Yes, being able to sift quickly through github code search results.

The embark functionality introduced in #69 and #70 works great and improves this a lot.

Describe the solution you'd like

Navigating search results with n/p in embark buffer generated from consult-gh-code-search using complilation mode like consult-grep.

When I made my original request, I had assumed the functionality that happens with consult-grep of being able to hit n to go to the next result and having it open in a buffer beside is really smooth.

here is a gif to demonstrate:

output-2023-10-20-16:17:18

Describe alternatives you've considered

Just using the buffer as is, but more manually calling =n= and =RET= myself more.

Additional context
Add any other context or screenshots about the feature request here.

default action in embark menus

Is your feature request related to a problem? Please describe.
The default actions in embark (bound to "RET") for minibuffer candidates is whatever command opened the minibuffer in the first place (see: https://github.com/oantolin/embark#the-default-action-on-a-target). This is not ideal for consult-gh candidates because running the same interactive commands on the minibuffer candidate produces errors. We should replace the default actions by using embark-default-action-overrides

Describe the solution you'd like
Change the default actions in embark menus (by appending embark-default-action-overrides) to run the default action of consult-gh according to each category. For example, when embark is called on a repo candidate, it should trigger consult-gh-repo-action.

Describe alternatives you've considered
N/A

Additional context
This will also help address #69

repo is not cloned in the selected path

Describe the bug
consult-gh-repo-clone does not clone repos in the selected path.

To Reproduce
Steps to reproduce the behavior:

  1. M-x consult-gh-repo-clone modus-themes
  2. RET in the first candidate (protesilaos/modus-themes)
  3. Select a target directory, e.g. ~/source/, and confirm.
  4. The directory in instead cloned in the current directory, e.g. ~/Downloads/.

Expected behavior
The repo is cloned in the selected path.

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

Visit github issue with forge without cloning entire repo

This is supported as per magit/forge#102, but it's not quite straight-forward or provided in a single function. It doesn't seem too difficult to add though given consult-gh will have the info to correctly call both forge-add-repostiory and if it supports it, providing the topic id from the consult-gh search.

Extrapolate current repo

I just installed the package and I have to say, this will definitely be one of the main tools I use every day. It's very nicely done. Thank you!

I noticed that consult-gh-issue-list doesn't recognize the repository it's looking at when executed from within a certain project, unless that repository has already been added to the list of repos (in which case, you still have to choose it from the list). I think it would be nice if the tool could extrapolate the repo for the current project.

In general, it seems that there are a few places where there is an opportunity to improve the "intelligence" of the package. For example, if I have the consult-gh-preview buffer open for a repository (after using consult-gh-org), then the next command, consult-gh-repo-clone prompt should automatically reuse the name of the repository.

Command consult-gh-search-issues fails on any search input

Describe the bug
Command consult-gh-search-isssues invokes "gh search issues ..." which is not supported by latest gh version on Ubuntu (apt).
Issue search should instead use the subcommand "gh issue list --search ..."

To Reproduce
Invoke M-x consult-gh-search-issues from any repo.
Type any search string
Following error message appears in the echo area:
unknown command "search" for "gh"

Expected behavior
No error message and successful search.

Screenshots
If applicable, add screenshots to help explain your problem.

Important Information:

  • OS: any
  • Version of Emacs
    Emacs 29.0.91
  • Version of gh (run gh --version in a shell)
    gh version 2.4.0+dfsg1 (2022-03-23 Ubuntu 2.4.0+dfsg1-2)
  • Version of consult (see pkg-info)
    consult v1.0
  • The installation method and the configuration you are using with your consult-gh.
    Installed with use-package + straight
  • 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.
    N/A
  • If the error only exists when you have some other packages installed, list those packages (e.g. problem happens when evil is installed)
    N/A

Additional context
Add any other context about the problem here.

void variable consult-preview-key

Describe the bug
Debugger entered--Lisp error: (void-variable consult-preview-key)
#f(compiled-function () #<bytecode 0x1980f3d5d6b54>)()
funcall(#f(compiled-function () #<bytecode 0x1980f3d5d6b54>))
eval((funcall #'#f(compiled-function () #<bytecode 0x1980f3d5d6b54>)))
custom-initialize-reset(consult-gh-preview-key (funcall #'#f(compiled-function () #<bytecode 0x1980f3d5d6b54>)))
custom-declare-variable(consult-gh-preview-key (funcall #'#f(compiled-function () #<bytecode 0x1980f3d5d6b54>)) "Preview key for consult-gh. This is similar consu..." :type (choice (const :tag "Any key" any) (list :tag "Debounced" (const :debounce) (float :tag "Seconds" 0.1) (const any)) (const :tag "No preview" nil) (key :tag "Key") (repeat :tag "List of keys" key))) byte-code("\300\301!\210\302\303\304\305\306\307\306\310\306\311\306\312\313\314&\15\210\315\316\317\320\321DD\322\306\303\323\324&\7\210\315\325\317\320\326DD\327\306\303\323\324&\7..." [require crm custom-declare-group consult-gh nil "Consulting GitHub CLI" :group convenience minibuffer consult magit :prefix "consult-gh-" custom-declare-variable consult-gh-tempdir funcall function #f(compiled-function () #<bytecode -0x1f9bca5f63ec874>) "Temporary file directory for the consult-gh' pack..." :type string consult-gh-crm-separator #f(compiled-function () #<bytecode 0x19800936d2b94>) "Separator for multiple selections with completing-..." consult-gh-repo-maxnum #f(compiled-function () #<bytecode 0x19800016f2454>) "Maximum number of output for showing repos with gh..." integer consult-gh-issue-maxnum #f(compiled-function () #<bytecode 0x19800016f2454>) "Maximum number of output for gh issue list and sea..." consult-gh-issues-state-to-show #f(compiled-function () #<bytecode 0x198000fca9b54>) "The state of issues that will be listed by consul..." (choice "open" "closed" "all") consult-gh-preview-buffer-mode #f(compiled-function () #<bytecode 0x1980fbd16bcd4>) "Major mode to show README of repositories in previ..." symbol consult-gh-default-orgs-list #f(compiled-function () #<bytecode 0x19800016fe914>) "List of default github orgs. A good choice would b..." list consult-gh-preview-buffer-name #f(compiled-function () #<bytecode 0xf33ecfbcd77d5d3>) "Default name to use for preview buffers showing re..." consult-gh-show-preview #f(compiled-function () #<bytecode 0x19800016fe914>) "This variable determines whether consult-gh' show..." boolean ...] 14)
#(consult-gh)
apply(# consult-gh)
require(consult-gh)
eval-expression((require 'consult-gh) nil nil 127)
funcall-interactively(eval-expression (require 'consult-gh) nil nil 127)
command-execute(eval-expression)

To Reproduce
(require 'consult-gh) for the first time. Doing it again works

Expected behavior
No error

Screenshots
If applicable, add screenshots to help explain your problem.

Important Information:
Emacs : GNU Emacs 29.0.91 (build 1, aarch64-apple-darwin22.4.0, NS appkit-2299.50 Version 13.3.1 (a) (Build 22E772610a))
of 2023-05-21
Package: 13.2.0

current state:

Additional context
Add any other context about the problem here.

Cannot interact with package: (symbol's function definition is void: closure) on all consult-derived commands.

Describe the bug
Attempts to interact with the package are not possible, almost all commands produce the same error (symbol's function definition is void: closure) as shown below.

Previous version v0.12 worked fine.

Already followed the issue 83:

  • (consult-gh--call-process "search" "repos" "consult-gh") 👍
  • (consult--read (split-string (cadr (consult-gh--call-process "search" "repos" "consult-gh" "--limit" "3")) "\n" t) :prompt "Select:") 👍
  • (completing-read "Select: " (split-string (cadr (consult-gh--call-process "search" "repos" "consult-gh" "--limit" "3")) "\n" t)) 👍
  • gh search repos 👍

To Reproduce
Steps to reproduce the behavior:

  1. Set toggle-debug-on-error to t.
  2. Execute M-x consult-gh-repo-list RET
  3. See error below
Debugger entered--Lisp error: (void-function closure)
  (closure ((delay . 0.2) (refresh) (timer) (async closure ((buffer) (last) (candidates)) (action) (cond ((eq action 'setup) (let nil (setq buffer (current-buffer)) nil)) ((stringp action) 'nil) ((eq action 'destroy) 'nil) ((eq action 'flush) (let nil (progn (setq candidates nil) (setq last nil)))) ((eq action 'refresh) (let nil (let* (...) (if win ... nil)) nil)) ((null action) (let nil candidates)) ((consp action) (let nil (setq last (last ...)) candidates)) (t (let ((x72 action)) (error "No clause matching `%S'" x72)))))) (action) (prog1 (funcall async action) (let* ((pcase-0 #'(lambda nil (setq refresh t) (if timer nil ...)))) (cond ((consp action) (funcall pcase-0)) ((eq action 'flush) (funcall pcase-0)) ((eq action 'destroy) (let nil (if timer (progn ...))))))))
  (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ((buffer) (last) (candidates)) (action) (cond ((eq action 'setup) (let nil (setq buffer ...) nil)) ((stringp action) 'nil) ((eq action 'destroy) 'nil) ((eq action 'flush) (let nil (progn ... ...))) ((eq action 'refresh) (let nil (let* ... ...) nil)) ((null action) (let nil candidates)) ((consp action) (let nil (setq last ...) candidates)) (t (let (...) (error "No clause matching `%S'" x72)))))) (action) (prog1 (funcall async action) (let* ((pcase-0 #'(lambda nil ... ...))) (cond ((consp action) (funcall pcase-0)) ((eq action 'flush) (funcall pcase-0)) ((eq action 'destroy) (let nil (if timer ...))))))) action)
  (mapcar (lambda (string) (consult-gh--repo-format string input nil)) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ((buffer) (last) (candidates)) (action) (cond ((eq action ...) (let nil ... nil)) ((stringp action) 'nil) ((eq action ...) 'nil) ((eq action ...) (let nil ...)) ((eq action ...) (let nil ... nil)) ((null action) (let nil candidates)) ((consp action) (let nil ... candidates)) (t (let ... ...))))) (action) (prog1 (funcall async action) (let* ((pcase-0 #'...)) (cond ((consp action) (funcall pcase-0)) ((eq action ...) (funcall pcase-0)) ((eq action ...) (let nil ...)))))) action))
  (cond ((stringp action) (setq input action) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ((buffer) (last) (candidates)) (action) (cond (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (t ...)))) (action) (prog1 (funcall async action) (let* ((pcase-0 ...)) (cond (... ...) (... ...) (... ...))))) action)) (t (mapcar (lambda (string) (consult-gh--repo-format string input nil)) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure (... ... ...) (action) (cond ... ... ... ... ... ... ... ...))) (action) (prog1 (funcall async action) (let* (...) (cond ... ... ...)))) action))))
  (lambda (action) (cond ((stringp action) (setq input action) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ... ... ...)) (action) (prog1 (funcall async action) (let* ... ...))) action)) (t (mapcar (lambda (string) (consult-gh--repo-format string input nil)) (funcall (closure (... ... ... ...) (action) (prog1 ... ...)) action)))))(setup)
  funcall((lambda (action) (cond ((stringp action) (setq input action) (funcall (closure ((delay . 0.2) (refresh) (timer) (async closure ... ... ...)) (action) (prog1 (funcall async action) (let* ... ...))) action)) (t (mapcar (lambda (string) (consult-gh--repo-format string input nil)) (funcall (closure (... ... ... ...) (action) (prog1 ... ...)) action))))) setup)
  (let nil (setq ov (make-overlay (- (minibuffer-prompt-end) 2) (- (minibuffer-prompt-end) 1))) (funcall async 'setup))
  (cond ((eq action 'indicator) (let nil (overlay-put ov 'display (cond ((eq state 'running) (let nil #("*" 0 1 ...))) ((eq state 'finished) (let nil #(":" 0 1 ...))) ((eq state 'killed) (let nil #(";" 0 1 ...))) ((eq state 'failed) (let nil #("!" 0 1 ...))) (t (let (...) (error "No clause matching `%S'" x79))))))) ((eq action 'setup) (let nil (setq ov (make-overlay (- (minibuffer-prompt-end) 2) (- (minibuffer-prompt-end) 1))) (funcall async 'setup))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async 'destroy))) (t (let nil (funcall async action))))
  (closure ((ov . #<overlay from 16 to 17 in  *Minibuf-1*>) (async lambda (action) (cond ((stringp action) (setq input action) (funcall (closure ... ... ...) action)) (t (mapcar (lambda ... ...) (funcall ... action)))))) (action &optional state) (cond ((eq action 'indicator) (let nil (overlay-put ov 'display (cond (... ...) (... ...) (... ...) (... ...) (t ...))))) ((eq action 'setup) (let nil (setq ov (make-overlay (- ... 2) (- ... 1))) (funcall async 'setup))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async 'destroy))) (t (let nil (funcall async action)))))(setup)
  funcall((closure ((ov . #<overlay from 16 to 17 in  *Minibuf-1*>) (async lambda (action) (cond ((stringp action) (setq input action) (funcall (closure ... ... ...) action)) (t (mapcar (lambda ... ...) (funcall ... action)))))) (action &optional state) (cond ((eq action 'indicator) (let nil (overlay-put ov 'display (cond (... ...) (... ...) (... ...) (... ...) (t ...))))) ((eq action 'setup) (let nil (setq ov (make-overlay (- ... 2) (- ... 1))) (funcall async 'setup))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async 'destroy))) (t (let nil (funcall async action))))) setup)
  (let nil (funcall async action))
  (cond ((equal action '"") (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn (setq proc nil) (setq proc-buf nil)))) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ((args (funcall builder action))) (if (stringp (car args)) nil (setq args (car args))) (if (equal args last-args) nil (setq last-args args) (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (if args (progn (let* ... ... ... ...))))) nil)) ((eq action 'destroy) (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn (setq proc nil) (setq proc-buf nil)))) (funcall async 'destroy))) (t (let nil (funcall async action))))
  (closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--repo-list-builder) (async closure ((ov . #<overlay from 16 to 17 in  *Minibuf-1*>) (async lambda (action) (cond (... ... ...) (t ...)))) (action &optional state) (cond ((eq action 'indicator) (let nil (overlay-put ov ... ...))) ((eq action 'setup) (let nil (setq ov ...) (funcall async ...))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((equal action '"") (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ((args ...)) (if (stringp ...) nil (setq args ...)) (if (equal args last-args) nil (setq last-args args) (if proc ...) (if args ...))) nil)) ((eq action 'destroy) (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (funcall async 'destroy))) (t (let nil (funcall async action)))))(setup)
  funcall((closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--repo-list-builder) (async closure ((ov . #<overlay from 16 to 17 in  *Minibuf-1*>) (async lambda (action) (cond (... ... ...) (t ...)))) (action &optional state) (cond ((eq action 'indicator) (let nil (overlay-put ov ... ...))) ((eq action 'setup) (let nil (setq ov ...) (funcall async ...))) ((eq action 'destroy) (let nil (delete-overlay ov) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((equal action '"") (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ((args ...)) (if (stringp ...) nil (setq args ...)) (if (equal args last-args) nil (setq last-args args) (if proc ...) (if args ...))) nil)) ((eq action 'destroy) (let nil (if proc (progn (delete-process proc) (kill-buffer proc-buf) (progn ... ...))) (funcall async 'destroy))) (t (let nil (funcall async action))))) setup)
  (let nil (funcall async action))
  (cond ((stringp action) (let nil (if (equal action input) nil (if timer (progn (cancel-timer timer) (setq timer nil))) (funcall async "") (setq input action) (if (equal action "") nil (setq timer (run-at-time (+ debounce ...) nil #'...)))) nil)) ((eq action 'destroy) (let nil (if timer (progn (cancel-timer timer))) (funcall async 'destroy))) (t (let nil (funcall async action))))
  (closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--repo-list-builder) (async closure ((ov . #<overlay from 16 to 17 in  *Minibuf-1*>) (async lambda ... ...)) (action &optional state) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((equal action '"") (let nil (if proc ...) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ... ... ...) nil)) ((eq action 'destroy) (let nil (if proc ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((stringp action) (let nil (if (equal action input) nil (if timer (progn ... ...)) (funcall async "") (setq input action) (if (equal action "") nil (setq timer ...))) nil)) ((eq action 'destroy) (let nil (if timer (progn (cancel-timer timer))) (funcall async 'destroy))) (t (let nil (funcall async action)))))(setup)
  funcall((closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--repo-list-builder) (async closure ((ov . #<overlay from 16 to 17 in  *Minibuf-1*>) (async lambda ... ...)) (action &optional state) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((equal action '"") (let nil (if proc ...) (setq last-args nil))) ((stringp action) (let nil (funcall async action) (let* ... ... ...) nil)) ((eq action 'destroy) (let nil (if proc ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((stringp action) (let nil (if (equal action input) nil (if timer (progn ... ...)) (funcall async "") (setq input action) (if (equal action "") nil (setq timer ...))) nil)) ((eq action 'destroy) (let nil (if timer (progn (cancel-timer timer))) (funcall async 'destroy))) (t (let nil (funcall async action))))) setup)
  (let nil (consult--split-setup split) (funcall async 'setup))
  (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val (funcall split action))) (progn (ignore (consp val)) (let* ((x73 ...) (x74 ...)) (progn (ignore ...) (let* ... ...))))))) (t (let nil (funcall async action))))
  (closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--repo-list-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action)))))(setup)
  funcall((closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--repo-list-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action))))) setup)
  (progn (progn (setq orig-chunk read-process-output-max) (setq read-process-output-max new-chunk)) (funcall async 'setup) (let* ((mb (current-buffer)) (fun #'(lambda nil (let* (...) (if win ... nil)))) (hook (make-symbol "consult--async-after-change-hook"))) (fset hook #'(lambda (&rest _) (run-at-time 0 nil fun))) (add-hook 'after-change-functions hook nil 'local) (funcall hook)))
  (if (consult--async-p async) (progn (progn (setq orig-chunk read-process-output-max) (setq read-process-output-max new-chunk)) (funcall async 'setup) (let* ((mb (current-buffer)) (fun #'(lambda nil (let* ... ...))) (hook (make-symbol "consult--async-after-change-hook"))) (fset hook #'(lambda (&rest _) (run-at-time 0 nil fun))) (add-hook 'after-change-functions hook nil 'local) (funcall hook))))
  consult--minibuffer-setup-hook()
  completing-read-default("Enter Org Name:  " (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action)))))) (str pred action) (let ((result (complete-with-action action (funcall async nil) str pred))) (if (eq action 'metadata) (if (and (eq (car result) 'metadata) (cdr result)) (cons 'metadata (append (cdr metadata) (cdr result))) metadata) result))) nil t "#" consult-gh--orgs-history nil nil)
  completing-read("Enter Org Name:  " (closure ((metadata metadata (category . consult-gh-repos) (group-function . consult-gh--repo-group) (cycle-sort-function . identity) (display-sort-function . identity)) (async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action)))))) (str pred action) (let ((result (complete-with-action action (funcall async nil) str pred))) (if (eq action 'metadata) (if (and (eq (car result) 'metadata) (cdr result)) (cons 'metadata (append (cdr metadata) (cdr result))) metadata) result))) nil t "#" consult-gh--orgs-history nil nil)
  (let* ((metadata (cons 'metadata (append (if category (progn (list ...))) (if group (progn (list ...))) (if annotate (progn (list ... ...))) (if sort nil '(... ...))))) (consult--annotate-align-width 0) (selected (completing-read prompt #'(lambda (str pred action) (let (...) (if ... ... result))) predicate require-match initial (if (symbolp history) history (car (cdr history))) default inherit-input-method))) (if (and (eq require-match t) (not default) (equal selected "")) (progn (user-error "No selection"))) selected)
  (closure ((async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure (... ... ... ... ... ... ...) (action) (cond ... ... ... ...))) (action) (cond ((stringp action) (let nil ... nil)) ((eq action ...) (let nil ... ...)) (t (let nil ...))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* (...) (progn ... ...)))) (t (let nil (funcall async action))))) (inherit-input-method) (group . consult-gh--repo-group) (sort) (annotate) (initial . "#") (category . consult-gh-repos) (default) (history :input consult-gh--orgs-history) (require-match . t) (predicate) (prompt . "Enter Org Name:  ")) nil (let* ((metadata (cons 'metadata (append (if category (progn ...)) (if group (progn ...)) (if annotate (progn ...)) (if sort nil '...)))) (consult--annotate-align-width 0) (selected (completing-read prompt #'(lambda (str pred action) (let ... ...)) predicate require-match initial (if (symbolp history) history (car (cdr history))) default inherit-input-method))) (if (and (eq require-match t) (not default) (equal selected "")) (progn (user-error "No selection"))) selected))()
  funcall((closure ((async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action))))) (inherit-input-method) (group . consult-gh--repo-group) (sort) (annotate) (initial . "#") (category . consult-gh-repos) (default) (history :input consult-gh--orgs-history) (require-match . t) (predicate) (prompt . "Enter Org Name:  ")) nil (let* ((metadata (cons 'metadata (append (if category ...) (if group ...) (if annotate ...) (if sort nil ...)))) (consult--annotate-align-width 0) (selected (completing-read prompt #'(lambda ... ...) predicate require-match initial (if (symbolp history) history (car ...)) default inherit-input-method))) (if (and (eq require-match t) (not default) (equal selected "")) (progn (user-error "No selection"))) selected)))
  (and t (funcall fun))
  (let* ((result (and t (funcall fun)))) (if result (progn (let* ((s (and t save-input)) (list (and s (symbol-value save-input))) (s (and list (equal ... result)))) (if s (set save-input (cdr list)) nil)) (funcall transform mb-narrow mb-input result)) nil))
  (setq selected (let* ((result (and t (funcall fun)))) (if result (progn (let* ((s (and t save-input)) (list (and s ...)) (s (and list ...))) (if s (set save-input (cdr list)) nil)) (funcall transform mb-narrow mb-input result)) nil)))
  (unwind-protect (setq selected (let* ((result (and t (funcall fun)))) (if result (progn (let* ((s ...) (list ...) (s ...)) (if s (set save-input ...) nil)) (funcall transform mb-narrow mb-input result)) nil))) (if save-input (progn (add-to-history save-input mb-input))) (if state (progn (funcall state 'return selected))))
  (progn (add-hook 'minibuffer-setup-hook hook69) (unwind-protect (setq selected (let* ((result (and t (funcall fun)))) (if result (progn (let* (... ... ...) (if s ... nil)) (funcall transform mb-narrow mb-input result)) nil))) (if save-input (progn (add-to-history save-input mb-input))) (if state (progn (funcall state 'return selected)))))
  (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook69) (unwind-protect (setq selected (let* ((result (and t ...))) (if result (progn (let* ... ...) (funcall transform mb-narrow mb-input result)) nil))) (if save-input (progn (add-to-history save-input mb-input))) (if state (progn (funcall state 'return selected))))) (remove-hook 'minibuffer-setup-hook hook69))
  (let ((hook69 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook69 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook69) (funcall (if (and state preview-key) #'(lambda nil ... ... ... ...) #'(lambda nil ...))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook69) (unwind-protect (setq selected (let* ((result ...)) (if result (progn ... ...) nil))) (if save-input (progn (add-to-history save-input mb-input))) (if state (progn (funcall state 'return selected))))) (remove-hook 'minibuffer-setup-hook hook69)))
  (let ((mb-input "") mb-narrow selected timer previewed) (let ((hook69 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook69 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook69) (funcall (if (and state preview-key) #'... #'...)))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook69) (unwind-protect (setq selected (let* (...) (if result ... nil))) (if save-input (progn (add-to-history save-input mb-input))) (if state (progn (funcall state ... selected))))) (remove-hook 'minibuffer-setup-hook hook69))))
  consult--with-preview-1(any (closure (t) (action cand) (let* ((preview (consult--buffer-preview))) (cond ((eq action 'preview) (let nil (if (and consult-gh-show-preview cand) (let* ... ...)))) ((eq action 'return) (let nil cand))))) (closure ((async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action))))) (lookup closure (t) (sel cands &rest args) (let* ((info (cdr ...)) (repo (plist-get info :repo))) (cons (format "%s" repo) info))) (narrow)) (narrow input cand) (funcall lookup cand (funcall async nil) input narrow)) #f(compiled-function (&rest args2) #<bytecode -0xae4e26f5df74a3f>) consult-gh--orgs-history (closure ((async closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (t ...)))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async ...))) ((stringp action) (let nil (let* ... ...))) (t (let nil (funcall async action))))) (inherit-input-method) (group . consult-gh--repo-group) (sort) (annotate) (initial . "#") (category . consult-gh-repos) (default) (history :input consult-gh--orgs-history) (require-match . t) (predicate) (prompt . "Enter Org Name:  ")) nil (let* ((metadata (cons 'metadata (append (if category ...) (if group ...) (if annotate ...) (if sort nil ...)))) (consult--annotate-align-width 0) (selected (completing-read prompt #'(lambda ... ...) predicate require-match initial (if (symbolp history) history (car ...)) default inherit-input-method))) (if (and (eq require-match t) (not default) (equal selected "")) (progn (user-error "No selection"))) selected)))
  (unwind-protect (consult--with-preview-1 preview-key state #'(lambda (narrow input cand) (funcall lookup cand (funcall async nil) input narrow)) (apply-partially #'run-hook-with-args-until-success 'consult--completion-candidate-hook) (cond ((consp history) (let* ((x93 (car-safe history))) (if (eq x93 :input) (let* (...) (if ... ... ...)) (let (...) (error "No clause matching `%S'" x92))))) ((symbolp history) 'nil) (t (let ((x92 history)) (error "No clause matching `%S'" x92)))) #'(lambda nil (let* ((metadata (cons ... ...)) (consult--annotate-align-width 0) (selected (completing-read prompt ... predicate require-match initial ... default inherit-input-method))) (if (and (eq require-match t) (not default) (equal selected "")) (progn (user-error "No selection"))) selected))) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk))))
  (let ((async (if (consult--async-p async) async #'(lambda (_) async)))) (unwind-protect (consult--with-preview-1 preview-key state #'(lambda (narrow input cand) (funcall lookup cand (funcall async nil) input narrow)) (apply-partially #'run-hook-with-args-until-success 'consult--completion-candidate-hook) (cond ((consp history) (let* ((x93 ...)) (if (eq x93 :input) (let* ... ...) (let ... ...)))) ((symbolp history) 'nil) (t (let ((x92 history)) (error "No clause matching `%S'" x92)))) #'(lambda nil (let* ((metadata ...) (consult--annotate-align-width 0) (selected ...)) (if (and ... ... ...) (progn ...)) selected))) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk)))))
  (progn (add-hook 'minibuffer-setup-hook hook91 t) (let ((async (if (consult--async-p async) async #'(lambda (_) async)))) (unwind-protect (consult--with-preview-1 preview-key state #'(lambda (narrow input cand) (funcall lookup cand (funcall async nil) input narrow)) (apply-partially #'run-hook-with-args-until-success 'consult--completion-candidate-hook) (cond ((consp history) (let* (...) (if ... ... ...))) ((symbolp history) 'nil) (t (let (...) (error "No clause matching `%S'" x92)))) #'(lambda nil (let* (... ... ...) (if ... ...) selected))) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk))))))
  (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook91 t) (let ((async (if (consult--async-p async) async #'(lambda ... async)))) (unwind-protect (consult--with-preview-1 preview-key state #'(lambda (narrow input cand) (funcall lookup cand ... input narrow)) (apply-partially #'run-hook-with-args-until-success 'consult--completion-candidate-hook) (cond ((consp history) (let* ... ...)) ((symbolp history) 'nil) (t (let ... ...))) #'(lambda nil (let* ... ... selected))) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk)))))) (remove-hook 'minibuffer-setup-hook hook91))
  (let ((hook91 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook91 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook91) (if (consult--async-p async) (progn (progn (setq orig-chunk read-process-output-max) (setq read-process-output-max new-chunk)) (funcall async 'setup) (let* (... ... ...) (fset hook ...) (add-hook ... hook nil ...) (funcall hook)))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook91 t) (let ((async (if (consult--async-p async) async #'...))) (unwind-protect (consult--with-preview-1 preview-key state #'(lambda ... ...) (apply-partially #'run-hook-with-args-until-success 'consult--completion-candidate-hook) (cond (... ...) (... ...) (t ...)) #'(lambda nil ...)) (funcall async 'destroy) (if (and orig-chunk (eq read-process-output-max new-chunk)) (progn (setq read-process-output-max orig-chunk)))))) (remove-hook 'minibuffer-setup-hook hook91)))
  (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook91 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook91 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook91) (if (consult--async-p async) (progn (progn ... ...) (funcall async ...) (let* ... ... ... ...))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook91 t) (let ((async (if ... async ...))) (unwind-protect (consult--with-preview-1 preview-key state #'... (apply-partially ... ...) (cond ... ... ...) #'...) (funcall async 'destroy) (if (and orig-chunk ...) (progn ...))))) (remove-hook 'minibuffer-setup-hook hook91))))
  (progn (add-hook 'minibuffer-setup-hook hook90 t) (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook91 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook91 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook91) (if (consult--async-p async) (progn ... ... ...)))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook91 t) (let ((async ...)) (unwind-protect (consult--with-preview-1 preview-key state ... ... ... ...) (funcall async ...) (if ... ...)))) (remove-hook 'minibuffer-setup-hook hook91)))))
  (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook90 t) (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook91 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook91 #'(lambda nil (remove-hook ... hook91) (if ... ...))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook91 t) (let (...) (unwind-protect ... ... ...))) (remove-hook 'minibuffer-setup-hook hook91))))) (remove-hook 'minibuffer-setup-hook hook90))
  (let ((hook90 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook90 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook90) (progn (add-hook 'after-change-functions #'consult--tofu-hide-in-minibuffer nil 'local) (consult--setup-keymap keymap (consult--async-p table) narrow preview-key) (set (make-local-variable 'minibuffer-default-add-function) (apply-partially #'consult--add-history (consult--async-p table) add-history))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook90 t) (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook91 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook91 #'(lambda nil ... ...)) (unwind-protect (progn (add-hook ... hook91 t) (let ... ...)) (remove-hook 'minibuffer-setup-hook hook91))))) (remove-hook 'minibuffer-setup-hook hook90)))
  (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:prompt :predicate :require-match :history :default :keymap :category :initial :narrow :add-history :annotate :state :preview-key :sort :lookup :group :inherit-input-method :allow-other-keys)) (if (cdr --cl-keys--) nil (error "Missing argument for %s" (car --cl-keys--))) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:prompt :predicate..." (car --cl-keys--)))))) (let ((hook90 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook90 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook90) (progn (add-hook 'after-change-functions #'consult--tofu-hide-in-minibuffer nil 'local) (consult--setup-keymap keymap (consult--async-p table) narrow preview-key) (set (make-local-variable ...) (apply-partially ... ... add-history))))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook90 t) (let ((async table) (new-chunk (max read-process-output-max consult--process-chunk)) orig-chunk) (let ((hook91 ...)) (fset hook91 #'...) (unwind-protect (progn ... ...) (remove-hook ... hook91))))) (remove-hook 'minibuffer-setup-hook hook90))))
  (let* ((prompt (car (cdr (plist-member --cl-rest-- ':prompt)))) (predicate (car (cdr (plist-member --cl-rest-- ':predicate)))) (require-match (car (cdr (plist-member --cl-rest-- ':require-match)))) (history (car (cdr (plist-member --cl-rest-- ':history)))) (default (car (cdr (plist-member --cl-rest-- ':default)))) (keymap (car (cdr (plist-member --cl-rest-- ':keymap)))) (category (car (cdr (plist-member --cl-rest-- ':category)))) (initial (car (cdr (plist-member --cl-rest-- ':initial)))) (narrow (car (cdr (plist-member --cl-rest-- ':narrow)))) (add-history (car (cdr (plist-member --cl-rest-- ':add-history)))) (annotate (car (cdr (plist-member --cl-rest-- ':annotate)))) (state (car (cdr (plist-member --cl-rest-- ':state)))) (preview-key (car (cdr (plist-member --cl-rest-- ':preview-key)))) (sort (car (cdr (plist-member --cl-rest-- ':sort)))) (lookup (car (cdr (plist-member --cl-rest-- ':lookup)))) (group (car (cdr (plist-member --cl-rest-- ':group)))) (inherit-input-method (car (cdr (plist-member --cl-rest-- ':inherit-input-method))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '...) (if (cdr --cl-keys--) nil (error "Missing argument for %s" ...)) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:prompt :predicate..." (car --cl-keys--)))))) (let ((hook90 (make-symbol "consult--minibuffer-setup-hook"))) (fset hook90 #'(lambda nil (remove-hook 'minibuffer-setup-hook hook90) (progn (add-hook ... ... nil ...) (consult--setup-keymap keymap ... narrow preview-key) (set ... ...)))) (unwind-protect (progn (add-hook 'minibuffer-setup-hook hook90 t) (let ((async table) (new-chunk ...) orig-chunk) (let (...) (fset hook91 ...) (unwind-protect ... ...)))) (remove-hook 'minibuffer-setup-hook hook90)))))
  consult--read-1((closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--repo-list-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action))))) :prompt "Enter Org Name:  " :lookup (closure (t) (sel cands &rest args) (let* ((info (cdr (assoc sel cands))) (repo (plist-get info :repo))) (cons (format "%s" repo) info))) :state (closure (t) (action cand) (let* ((preview (consult--buffer-preview))) (cond ((eq action 'preview) (let nil (if (and consult-gh-show-preview cand) (let* ... ...)))) ((eq action 'return) (let nil cand))))) :initial "#" :group consult-gh--repo-group :add-history (nil nil) :history (:input consult-gh--orgs-history) :require-match t :category consult-gh-repos :preview-key any :sort nil :prompt "Select: " :preview-key any :sort t :lookup (closure (t) (selected &rest _) selected))
  apply(consult--read-1 (closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--repo-list-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action))))) (:prompt "Enter Org Name:  " :lookup (closure (t) (sel cands &rest args) (let* ((info (cdr (assoc sel cands))) (repo (plist-get info :repo))) (cons (format "%s" repo) info))) :state (closure (t) (action cand) (let* ((preview (consult--buffer-preview))) (cond ((eq action 'preview) (let nil (if ... ...))) ((eq action 'return) (let nil cand))))) :initial "#" :group consult-gh--repo-group :add-history (nil nil) :history (:input consult-gh--orgs-history) :require-match t :category consult-gh-repos :preview-key any :sort nil :prompt "Select: " :preview-key any :sort t :lookup (closure (t) (selected &rest _) selected)))
  (progn (progn (or (or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp (car table)) (and (consp (car table)) (stringp (car (car table)))) (and (consp (car table)) (symbolp (car (car table))))) (cl--assertion-failed '(or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp (car table)) (and (consp ...) (stringp ...)) (and (consp ...) (symbolp ...))))) nil) (ignore prompt predicate require-match history default keymap category initial narrow add-history annotate state preview-key sort lookup group inherit-input-method) (apply #'consult--read-1 table (append (consult--customize-get) options (list :prompt "Select: " :preview-key consult-preview-key :sort t :lookup #'(lambda (selected &rest _) selected)))))
  (progn (let ((--cl-keys-- options)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:prompt :predicate :require-match :history :default :keymap :category :initial :narrow :add-history :annotate :state :preview-key :sort :lookup :group :inherit-input-method :allow-other-keys)) (if (cdr --cl-keys--) nil (error "Missing argument for %s" (car --cl-keys--))) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... options))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:prompt :predicate..." (car --cl-keys--)))))) (progn (progn (or (or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp (car table)) (and (consp (car table)) (stringp (car ...))) (and (consp (car table)) (symbolp (car ...)))) (cl--assertion-failed '(or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp ...) (and ... ...) (and ... ...)))) nil) (ignore prompt predicate require-match history default keymap category initial narrow add-history annotate state preview-key sort lookup group inherit-input-method) (apply #'consult--read-1 table (append (consult--customize-get) options (list :prompt "Select: " :preview-key consult-preview-key :sort t :lookup #'(lambda (selected &rest _) selected))))))
  (let* ((prompt (car (cdr (plist-member options ':prompt)))) (predicate (car (cdr (plist-member options ':predicate)))) (require-match (car (cdr (plist-member options ':require-match)))) (history (car (cdr (plist-member options ':history)))) (default (car (cdr (plist-member options ':default)))) (keymap (car (cdr (plist-member options ':keymap)))) (category (car (cdr (plist-member options ':category)))) (initial (car (cdr (plist-member options ':initial)))) (narrow (car (cdr (plist-member options ':narrow)))) (add-history (car (cdr (plist-member options ':add-history)))) (annotate (car (cdr (plist-member options ':annotate)))) (state (car (cdr (plist-member options ':state)))) (preview-key (car (cdr (plist-member options ':preview-key)))) (sort (car (cdr (plist-member options ':sort)))) (lookup (car (cdr (plist-member options ':lookup)))) (group (car (cdr (plist-member options ':group)))) (inherit-input-method (car (cdr (plist-member options ':inherit-input-method))))) (progn (let ((--cl-keys-- options)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '...) (if (cdr --cl-keys--) nil (error "Missing argument for %s" ...)) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:prompt :predicate..." (car --cl-keys--)))))) (progn (progn (or (or (functionp table) (obarrayp table) (hash-table-p table) (not table) (stringp (car table)) (and (consp ...) (stringp ...)) (and (consp ...) (symbolp ...))) (cl--assertion-failed '(or ... ... ... ... ... ... ...))) nil) (ignore prompt predicate require-match history default keymap category initial narrow add-history annotate state preview-key sort lookup group inherit-input-method) (apply #'consult--read-1 table (append (consult--customize-get) options (list :prompt "Select: " :preview-key consult-preview-key :sort t :lookup #'(lambda ... selected)))))))
  consult--read((closure ((split closure ((fn . consult--split-perl) (style :initial "#" :function consult--split-perl)) (str) (funcall fn str style)) (async closure ((timer) (last) (input . "") (debounce . 0.2) (throttle . 0.4) (async closure ((count) (last-args) (proc-buf) (proc) (props) (builder . consult-gh--repo-list-builder) (async closure ... ... ...)) (action) (cond (... ...) (... ...) (... ...) (t ...)))) (action) (cond ((stringp action) (let nil (if ... nil ... ... ... ...) nil)) ((eq action 'destroy) (let nil (if timer ...) (funcall async ...))) (t (let nil (funcall async action)))))) (action) (cond ((eq action 'setup) (let nil (consult--split-setup split) (funcall async 'setup))) ((stringp action) (let nil (let* ((val ...)) (progn (ignore ...) (let* ... ...))))) (t (let nil (funcall async action))))) :prompt "Enter Org Name:  " :lookup (closure (t) (sel cands &rest args) (let* ((info (cdr (assoc sel cands))) (repo (plist-get info :repo))) (cons (format "%s" repo) info))) :state (closure (t) (action cand) (let* ((preview (consult--buffer-preview))) (cond ((eq action 'preview) (let nil (if (and consult-gh-show-preview cand) (let* ... ...)))) ((eq action 'return) (let nil cand))))) :initial "#" :group consult-gh--repo-group :add-history (nil nil) :history (:input consult-gh--orgs-history) :require-match t :category consult-gh-repos :preview-key any :sort nil)
  (let* ((candidates (consult--async-split (consult--async-throttle (consult--async-process (consult-gh--repo-list-transform (consult--async-refresh-timer ...) builder) builder)))) (current-repo (consult-gh--get-repo-from-directory)) (initial (or initial (if (equal consult-gh-prioritize-local-folder 't) (consult-gh--get-username current-repo))))) (consult--read candidates :prompt prompt :lookup (consult-gh--repo-lookup) :state (consult-gh--repo-state) :initial (consult--async-split-initial initial) :group #'consult-gh--repo-group :add-history (append (list (if current-repo (consult--async-split-initial (consult-gh--get-username current-repo))) (consult--async-split-thingatpt 'symbol)) consult-gh--known-orgs-list) :history '(:input consult-gh--orgs-history) :require-match t :category 'consult-gh-repos :preview-key consult-gh-preview-key :sort nil))
  consult-gh--async-repo-list("Enter Org Name:  " consult-gh--repo-list-builder nil)
  (if current-prefix-arg (let* ((initial (or initial (format "%s" (car (string-split ... "/")))))) (consult-gh--async-repo-list "Enter Org Name:  " #'consult-gh--repo-list-builder initial)) (consult-gh--async-repo-list "Enter Org Name:  " #'consult-gh--repo-list-builder initial))
  (let ((sel (if current-prefix-arg (let* ((initial (or initial ...))) (consult-gh--async-repo-list "Enter Org Name:  " #'consult-gh--repo-list-builder initial)) (consult-gh--async-repo-list "Enter Org Name:  " #'consult-gh--repo-list-builder initial)))) (let* ((reponame (and t (plist-get (cdr sel) :repo)))) (if reponame (add-to-history 'consult-gh--known-repos-list (consult--async-split-initial reponame)) nil)) (let* ((username (and t (plist-get (cdr sel) :user)))) (if username (add-to-history 'consult-gh--known-orgs-list (consult--async-split-initial username)) nil)) (if noaction sel (funcall consult-gh-repo-action sel)))
  consult-gh-repo-list()
  funcall-interactively(consult-gh-repo-list)
  command-execute(consult-gh-repo-list record)
  execute-extended-command(nil "consult-gh-repo-list" "consult-gh-repo-li")
  funcall-interactively(execute-extended-command nil "consult-gh-repo-list" "consult-gh-repo-li")
  command-execute(execute-extended-command)

Expected behavior
I'd like to be able to interact with gh commands.

Important Information:

  • OS: macOS Monterrey 12.7.1
  • Version of Emacs 29.2 (via homebrew emacs-plus@29):
GNU Emacs 29.2 (build 2, aarch64-apple-darwin21.6.0, NS appkit-2113.60 Version 12.7.1 (Build 21G920)) of 2024-02-25
  • Version of gh:
gh version 2.44.1 (2024-02-16)
https://github.com/cli/cli/releases/tag/v2.44.1
  • Version of consult: 1.3
  • The installation method and the configuration you are using with your consult-gh.
    • emacs --init-directory /tmp/emacs -Q
;; init.el
(defvar bootstrap-version)
(let ((bootstrap-file
       (expand-file-name
        "straight/repos/straight.el/bootstrap.el"
        (or (bound-and-true-p straight-base-dir)
            user-emacs-directory)))
      (bootstrap-version 7))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(setq straight-use-package-by-default (not (eq system-type 'gnu/linux)))
(straight-use-package 'use-package)

(use-package compat)
(use-package pkg-info)
(use-package vertico)
(use-package consult)
(use-package gh)
(use-package consult-gh
  :straight (consult-gh :type git :host github :repo "armindarvish/consult-gh")
  :after consult

  :config
  ;;add your main GitHub account (replace "armindarvish" with your user or org)
  (add-to-list 'consult-gh-default-orgs-list "jatap")

  ;; set the default folder for cseloning repositories, By default Consult-GH will confirm this before cloning
  (setq consult-gh-default-clone-directory "~/")
  )
  • With my default Emacs configuration, this is the error I get when executing all consult-gh packages: Wrong type argument: overlayp, nil
  • After troubleshooting this issue, I found that compat package does not contain a tag for Emacs 29.2.
  • Haven't tried to downgrade homebrew formula to install Emacs 29.1.

Additional context
Looking forward to getting this issue fixed, the value it could provide to my workflow could be massive.

non-unicode chracter added to the end of history elements

Moving the discussion from minad/consult#817 here for reference:

I have been having this issue while working on consult-gh, where a non-unicode character is added to strings when the selection is saved in a history variable. I was hacking my code to clean this up, but now I realize that this is happening with consult-buffer-history and a bunch of other consult-something-history variables as well and here is a screenshot
Screenshot 2023-07-06 at 8 16 09 AM
I copied the character elsewhere and found out it is this character: �
I am on MacOS and I tried this in a minimal config (just consult and vertico installed) and this is still happening.

@minad suggested that I can use consult--read instead of consult--multi. This would simplify everything but there are challenges with that I need to figure out. I am opening this issue to track the progress on this.

Sort issues by created date like github web ui

Is your feature request related to a problem? Please describe.

The issues listed are different than what they would be in the web ui. Maybe in the future I wouldn't consider this an issue, but it seems like I'll have less issues if issues are ordered the same way for me using an emacs client as coworkers using the github web ui.

Describe the solution you'd like

Sorting to be done by created date like the github web ui.

Additional context

I already use the following advice to achieve this:

(defun my/consult-gh--search-issues (search &optional repo)
"Search for repos with \"gh search repos\" and return a list of items each formatted with properties to pass to consult."
  (let* ((maxnum (format "%s" consult-gh-issue-maxnum))
         (state consult-gh-issues-state-to-show)
         (repo (or repo ""))
	     (sort "created")
         (issuelist  (if (equal state "all")
                         (or (string-join `(,(consult-gh--command-to-string "search" "issues" search "--repo" repo "--limit" maxnum "--sort" sort "--state" "open") ,(consult-gh--command-to-string "search" "issues" search "--repo" repo "--limit" maxnum "--sort" sort "--state" "closed")) "\n") "")
                       (or (consult-gh--command-to-string "search" "issues" search "--repo" repo "--limit" maxnum "--sort" sort "--state" state) "")))
         (issues (mapcar (lambda (s) (string-split s "\t")) (remove "" (split-string issuelist "\n")))))
    (remove ":" (remove "" (mapcar (lambda (src) (propertize (concat (cadr src) ":" (cadr (cdr (cdr  src)))) ':issue (string-trim (cadr src) "#") ':repo (car src) ':status (cadr (cdr src)) ':description (cadr (cdr (cdr  src))) ':tags (cadr (cdr (cdr (cdr src)))) ':date (cadr (cdr (cdr (cdr (cdr src))))))) issues))
   )
))

(defun my/consult-gh-search-issues (&optional repos search)
  "Runs the interactive command in the minibuffer that queries the user for name of repos in the format `OWNER/REPO` e.g. armindarvish/consult-gh as well as a string as search term and returns the list of searhc matches for the string in issues of thae repos for further actions such as viewing in emacs or the browser.
The user can provide multiple repos by using the `consult-gh-crm-separator' similar to how `crm-separator' works in `completing-read-multiple'. Under the hood this command is using `consult' and particularly `consult--multi', which in turn runs macros of `completing-read' and passes the results to the GitHub command-line tool `gh` (e.g. by runing `gh search issues string --repo name-of-the-repo`) to search the issues for particular repositories and shows them back to the user.
It uses `consult-gh--make-source-from-search-issues' to create the list of items for consult and saves the history in `consult-gh--issues-history'. It also keep tracks of previously selected repos by the user in `consult-gh--known-repos-list' and offers them as possible entries in future runs of `consult-gh-search-issues'."
  (interactive)
  (setq consult-gh--issues-history (mapcar (lambda (item) (consult-gh--output-cleanup (format "%s" item))) consult-gh--issues-history))
  (let* ((crm-separator consult-gh-crm-separator)
         (repos (or repos (consult-gh--read-repo-name)))
         (search (or search (read-string "Search Term: ")))
         (candidates (consult--slow-operation "Collecting Issues ..." (mapcar (lambda (repo) (consult-gh--make-source-from-search-issues search repo)) repos))))
    (if (not (seq-empty-p (remove nil (mapcar (lambda (cand) (plist-get cand :items)) candidates))))
        (progn
          (setq consult-gh--known-repos-list (append consult-gh--known-repos-list repos))
          (consult--multi candidates
                          :prompt "Select Issue(s): "
                          :require-match t
                          :sort nil
                          :group #'consult-gh--issue-group
                          :history 'consult-gh--issues-history
                          :category 'consult-gh-issues
                          :preview-key consult-gh-preview-key
                          )
          )
      (message (concat "consult-gh: " (propertize "no issues matched your search!" 'face 'warning))))
    ))

(advice-add 'consult-gh--search-issues :override 'my/consult-gh--search-issues)
(advice-add 'consult-gh-search-issues :override 'my/consult-gh-search-issues)

How does narrowing work?

When running consult-gh-default-repos, if you press consult-narrow-key (it's configured to < for me), you can narrow down the list for a selected org.

But I noticed, because I have consult-gh-default-orgs-list with orgs that start with the same letter "a", it doesn't let me narrow for both orgs.

e.g., if you set consult-gh-default-orgs-list to be something like ("alpha" "adventure" "aadvark"), running the above command won't let you narrow the repos to show what's only in "adventure" org, or in "aadvark" org.

And for consult-gh-search-repos, narrowing doesn't work at all

Ergonomic default values for consult-gh-repo-clone

I was a little surprised that consult-gh-repo-clone didn't seem to have a quick way to choose consult-gh-default-clone-directory as the location for the cloned repo. I was also surprised it made me type out the name. I'd suggest that for the target directory, consult-gh-default-clone-directory be placed on the future history, so a simple M-n would fill it in. And as for the name, it should default to the name of the repo.

Sample installation config crashed

GNU Emacs 29.1.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-08-10
consult-gh installed from straight.

(use-package consult-gh
  ;;:disabled
  :straight (consult-gh :type git :host github :repo "armindarvish/consult-gh")

  :config
  ;;add your main GitHub account (replace "armindarvish" with your user or org)
  (add-to-list 'consult-gh-default-orgs-list "rileyrg")

  ;;use "gh org list" to get a list of all your organizations and adds them to default list
  (setq consult-gh-default-orgs-list (append consult-gh-default-orgs-list (remove "" (split-string (consult-gh--command-to-string "org" "list") "\n"))))

  ;; set the default folder for cloning repositories, By default Consult-GH will confirm this before cloning
  (setq consult-gh-default-clone-directory "~/development/projects")
)
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("\n" nil 0)
  split-string(nil "\n")
  (remove "" (split-string (consult-gh--command-to-string "org" "list") "\n"))
  (append consult-gh-default-orgs-list (remove "" (split-string (consult-gh--command-to-string "org" "list") "\n")))
  (setq consult-gh-default-orgs-list (append consult-gh-default-orgs-list (remove "" (split-string (consult-gh--command-to-string "org" "list") "\n"))))
  eval((setq consult-gh-default-orgs-list (append consult-gh-default-orgs-list (remove "" (split-string (consult-gh--command-to-string "org" "list") "\n")))) nil)
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

Create new repo?

Is your feature request related to a problem? Please describe.

I often start playing around with some code, then decide I should create a repo for it. I've not found a way to do this with forge.

Describe the solution you'd like

A command that prompts for a repo name, then creates a new one in the default directory of the current buffer, then clones it locally into the default directory.

Describe alternatives you've considered

Now I create one on GH, then with magit, create a repo locally, add the former as a remote, sync, and switch branches.

Better UI for find-file and dynamic expansion

Currently consult-gh-find-file lists all the possible paths in the file directory, but ideally I would want it to behave similar to find file where folders are dynamically expanded as the user makes selection. I made some experimentation with this under feature/dir-expansion with some help from discussion with @minad but have not yet found the right solution. This is going to be some work package.

Importantly, when selecting multiple repos, the current approach of showing every possible path is perhaps more useful because then the user will likely search for the right files rather than browsing in steps. So the current scenario should probably be kept for multi repos scenario.

`consult-gh-show-preview` not respected

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:

  1. (setq consult-gh-show-preview nil) (this is the default)
  2. M-x consult-gh-issue-list
  3. Type in "armindarvish/consult-gh"
  4. 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

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:

  1. M-x consult-gh-search-issues
  2. Enter a search string, e.g. "consult-gh"
  3. Select a search result, e.g. issue #101
  4. 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)

Support embark export

Is your feature request related to a problem? Please describe.

I sometimes want to go through a list of search results and having them collected/saved in a buffer would be very useful.

Describe the solution you'd like
M-x consult-gh-search-code mysearch RET
C-. ;; embark-act
E ;; embark-export

Hitting RET on a buffer would then do the same thing as hitting enter within the normal prompt from consult-gh-search-code.
A clear and concise description of what you want to happen.

Describe alternatives you've considered
Not having it.

Additional context
Add any other context or screenshots about the feature request here.

Submit to MELPA

I really like this package, but I suspect that it won't find as many users as it could, as it's not available on MELPA. I've submitted a number of packages, so I know that getting things to pass their standards can take some work. Let me know if you'd like some help!

Error running timer: (void-variable repo)

Describe the bug
consult-gh-search-[issues,prs,code] raise a Error running timer: (void-variable repo) error when called with a prefix ARG.

To Reproduce
Steps to reproduce the behavior:

  1. C-u M-x consult-gh-search-[issues,prs,code]
  2. Search for a repository and select it
  3. Enter at least two characters in the [issues,prs,code] search
  4. See error

Expected behavior
Search for issues, prs or code inside the selected repository.

Important Information:

  • GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.16.0) of 2023-08-30, modified by Debian

Additional context
The possible cause is a wrong quoting of the arguments passed to append consult-gh-args, eg: https://github.com/armindarvish/consult-gh/blob/develop/consult-gh.org?plain=1#L2351

Pull request #81 should fix this bug.

void variable `consult-preview-key`

Hello. Basically, the issue is that this package accesses the value of consult-preview-key without loading consult. We need a (require 'consult) statement somewhere before this code:

(defcustom consult-gh-preview-key consult-preview-key
  "What key to use to show preview for consult-gh?

This key is bound in minibuffer, and is similar to `consult-preview-key' (the default) but explicitly for consult-gh. This is used for all categories (repos, issues, prs, codes, files, etc.)"
  :type '(choice (const :tag "Any key" any)
                 (list :tag "Debounced"
                       (const :debounce)
                       (float :tag "Seconds" 0.1)
                       (const any))
                 (const :tag "No preview" nil)
                 (key :tag "Key")
                 (repeat :tag "List of keys" key)))

Update customization types

Some of the existing customization types appear to be incorrect or don't make sense, as follows:

  • consult-gh-tempdir should be a directory, by doing this, it makes it possible for the customize interface to help complete a directory.
  • consult-gh-crm-separator should be a regex because crm-separator is a regular expression, not a string.
  • consult-gh-prioritize-local-folder could be a choice between the symbol suggest, t and nil, with documenting tags.
  • consult-gh-preview-buffer-mode should be a function, not a symbol (again, improves autocomplete). Additionally, the two most common options (markdown-mode and org-mode could be presented as choices.
  • consult-gh-default-orgs-list should be (repeat string), not list.
  • consult-gh-default-clone-directory, consult-gh-default-save-directory should also be directory
  • consult-gh-default-branch-to-load should be a choice between the different options, with the options documented using :tag
  • Similarly, consult-gh-repo-action, consult-gh-issue-action, consult-gh-pr-action, consult-gh-code-action and consult-gh-file-action should present choices for the most common with a function for custom actions.

consult-gh-repo-clone prints "[repo] was cloned to [path]" even though cloning failed

Describe the bug
consult-gh-repo-clone misleadingly prints that cloning succeeded even though the Messages buffer prints errors and the cloned repo doesn't appear in the target dir

Cloning into ’/Users/rt/myrepo...
ssh_askpass: exec(/usr/X11R6/bin/ssh-askpass): No such file or directory

[email protected]: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
failed to run git: exit status 128

repo sethidden/myrepo was cloned to /Users/rt/myrepo

To Reproduce
I'm having difficulties predicting what would be the problem here. My gh is set to prefer SSH, and my SSH key has a passphrase, so perhaps consult-gh-repo-clone uses a dumb non-interactive terminal where its not possible to input the password? I wonder what magit does differently.

Anyway, the point here is that it seems that consult-gh-repo-clone continues despite gh clone returning a non-zero exit code, and prints the success message. I assume that my specific error messsage about ssh_askpass is unimportant.

Expected behavior
The success message should not be printed. An error message should be printed instead.

Screenshots
N/A

Important Information:

  • OS: [e.g. macOS] macOS Ventura
  • Version of Emacs [e.g. 29] (or other Emacsen you use) 30
  • Version of gh (run gh --version in a shell):
    gh version 2.39.1 (2023-11-14)
    https://github.com/cli/cli/releases/tag/v2.39.1
    
  • Version of consult (see pkg-info) 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
      (setq consult-gh-default-clone-directory "~/dev/"
            consult-gh-default-orgs-list '("vuestorefront" "sethidden")
    consult-gh-prioritize-local-folder t))
    
  • 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.
    debug-on-error doesn't trigger. There's no backtrace.
  • If the error only exists when you have some other packages installed, list those packages (e.g. problem happens when evil is installed) N/A

Additional context
N/A

Symbol’s function definition is void: forge--topic-type-prefix

I thought the issue might be I was using too old of a forge version, 20231006.1934 from melpa.

So I tried a newer version:

                        src = pkgs.fetchFromGitHub rec {
                          owner = "magit";
                          repo = "forge";
                          version = "20231010.1234";
                          rev = "5b3c64d6a81f3ac759fc30ecfd30945ab780f36e";
                          sha256 = "sha256-1aW6ypQ1yz+Ry6tjj5mddDN5W4qpxHVaCJr/RFweeps=";
                        }

Looks like it was removed in magit/forge@c664a0a

For now I'll just use 85a15ae2468a32d95498388992426c1824f712d6 which is the commit before it.

Github Actions

For a very long time I've been contemplating the idea of writing a package that lets you observe Github Actions logs without leaving Emacs.

Using gh (cmd-line tool) it is almost trivial to figure out:

  • Current Github repo name
  • Current branch of the project you're currently in and associated Github workflow
  • You can check the status of the run (ongoing, finished, failed)
  • You can extract logs for the run and inspect them in a log-mode buffer.

I think it would make sense to built something like that on top of this package. We can even expand it later to show the workflow in a buffer with collapsible sections (like on GitHub UI), using magit-section.el.

wdyt, @armindarvish ?

Tokens for org authorized with SSO

This is most likely an upstream issue, but it seems I'm experiencing it only with this package.

Anytime I try consult-gh-pr-list or consult-gh-pr-list for repos in a private Org that's authorized via SSO-protected token, I see a message:

GraphQL: Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization. (repository)

The token is authorized and other packages like magit-forge and gh-notify having to problem retrieving data from these repos.

Can you please share some ideas of how I can debug this?

Clone repo after forking

Whenever I fork a repo, almost always, clonning follows right after. Would be nice to have a hook or something in consult-gh--repo-fork, so something like magit-clone can be chained to it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.