Skip to content

Commit 02a83b5

Browse files
committed
ghub-graphql-message-progress: New variable
Re magit/forge#633. Re magit/forge#744.
1 parent efb06dc commit 02a83b5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lisp/ghub-graphql.el

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@
3333

3434
(define-error 'ghub-graphql-error "GraphQL Error" 'ghub-error)
3535

36+
(defvar ghub-graphql-message-progress nil
37+
"Whether to show \"Fetching page N...\" in echo area during requests.
38+
By default this information is only shown in the mode-line of the buffer
39+
from which the request was initiated, and if you kill that buffer, then
40+
nowhere. That may make it desirable to display the same message in the
41+
echo area as well.")
42+
3643
(defvar ghub-graphql-items-per-request 50
3744
"Number of GraphQL items to query for entities that return a collection.
3845
@@ -384,6 +391,9 @@ See Info node `(ghub)GraphQL Support'."
384391

385392
(cl-defun ghub--graphql-retrieve (req &optional lineage cursor)
386393
(let ((p (cl-incf (ghub--graphql-req-pages req))))
394+
(when ghub-graphql-message-progress
395+
(let ((message-log-max nil))
396+
(message "Fetching page %s..." p)))
387397
(when (> p 1)
388398
(ghub--graphql-set-mode-line req "Fetching page %s" p)))
389399
(setf (ghub--graphql-req-query-str req)

0 commit comments

Comments
 (0)