Git Product home page Git Product logo

Comments (7)

tarsius avatar tarsius commented on July 17, 2024 1

I think this just means the the bug discussed in #81 in your case is triggered when "/rate_limit" is accessed. For other people the very first accessed is some other resource, for you it is this one.

from ghub.

krobelus avatar krobelus commented on July 17, 2024

Here a stacktrace from evaluating ghubp-ratelimit

Debugger entered--Lisp error: (error "BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: nil\n  status: nil\n  buffer: #<buffer  *http api.github.com:443*>\n  buffer-string:\n  \"\"\n  --- end of buffer-string ---")
  signal(error ("BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: nil\n  status: nil\n  buffer: #<buffer  *http api.github.com:443*>\n  buffer-string:\n  \"\"\n  --- end of buffer-string ---"))
  error("BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: %S\n  status: %S\n  buffer: %S\n  buffer-string:\n  %S\n  --- end of buffer-string ---" nil nil #<buffer  *http api.github.com:443*> "")
  ghub--handle-response-headers(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/authorizations" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x1e24e55>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub--handle-response(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/authorizations" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x1e24e55>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub--retrieve("{\"scopes\":[\"repo\"],\"note\":\"Emacs package ghub @ lesale\"}" #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/authorizations" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x1e24e55>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub-request("POST" "/authorizations" ((scopes repo) (note . "Emacs package ghub @ lesale")) :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :username "krobelus" :auth basic :host "api.github.com" :callback nil :errorback nil :extra nil)
  ghub-post("/authorizations" ((scopes repo) (note . "Emacs package ghub @ lesale")) :username "krobelus" :auth basic :host "api.github.com")
  ghub-create-token("api.github.com" "krobelus" ghub (repo))
  ghub--confirm-create-token("api.github.com" "krobelus" ghub)
  ghub--token("api.github.com" "krobelus" ghub nil nil)
  ghub--auth("api.github.com" nil "krobelus" nil)
  #f(compiled-function () #<bytecode 0x1b925ed>)()
  ghub--retrieve(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/rate_limit" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "GET" :headers #f(compiled-function () #<bytecode 0x1b925ed>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub-request("GET" "/rate_limit" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth nil :host nil)
  ghubp-request(get "/rate_limit" nil nil)
  ghubp-ratelimit()
  (progn (ghubp-ratelimit))
  eval((progn (ghubp-ratelimit)) t)
  elisp--eval-last-sexp(nil)
  #f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'.  With a prefix argument of zero,\nhowever, there is no such truncation.  Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x273ef3>)(nil)
  ad-Advice-eval-last-sexp(#f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'.  With a prefix argument of zero,\nhowever, there is no such truncation.  Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x273ef3>) nil)
  apply(ad-Advice-eval-last-sexp #f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'.  With a prefix argument of zero,\nhowever, there is no such truncation.  Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x273ef3>) nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

from ghub.

vermiculus avatar vermiculus commented on July 17, 2024

Can you reproduce just calling (ghub-request "GET" "/rate_limit") in that repository?

from ghub.

krobelus avatar krobelus commented on July 17, 2024

Yes, this gives the same error.

from ghub.

vermiculus avatar vermiculus commented on July 17, 2024

@tarsius Sounds like this is indeed internal to ghub.

@krobelus Can you post the backtrace of the manual ghub-request just to be sure?

from ghub.

krobelus avatar krobelus commented on July 17, 2024

@vermiculus sure

  signal(error ("BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: nil\n  status: nil\n  buffer: #<buffer  *http api.github.com:443*>\n  buffer-string:\n  \"\"\n  --- end of buffer-string ---"))
  error("BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: %S\n  status: %S\n  buffer: %S\n  buffer-string:\n  %S\n  --- end of buffer-string ---" nil nil #<buffer  *http api.github.com:443*> "")
  ghub--handle-response-headers(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/authorizations" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x2ee3d31>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub--handle-response(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/authorizations" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x2ee3d31>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub--retrieve("{\"scopes\":[\"repo\"],\"note\":\"Emacs package ghub @ lesale\"}" #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/authorizations" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous nil) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x2ee3d31>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub-request("POST" "/authorizations" ((scopes repo) (note . "Emacs package ghub @ lesale")) :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :username "krobelus" :auth basic :host "api.github.com" :callback nil :errorback nil :extra nil)
  ghub-post("/authorizations" ((scopes repo) (note . "Emacs package ghub @ lesale")) :username "krobelus" :auth basic :host "api.github.com")
  ghub-create-token("api.github.com" "krobelus" ghub (repo))
  ghub--confirm-create-token("api.github.com" "krobelus" ghub)
  ghub--token("api.github.com" "krobelus" ghub nil nil)
  ghub--auth("api.github.com" nil "krobelus" nil)
  #f(compiled-function () #<bytecode 0x1e41ae5>)()
  ghub--retrieve(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/rate_limit" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "GET" :headers #f(compiled-function () #<bytecode 0x1e41ae5>) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  ghub-request("GET" "/rate_limit")
  eval((ghub-request "GET" "/rate_limit") 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)

from ghub.

krobelus avatar krobelus commented on July 17, 2024

The issue is still present after applying 4aca0df (but it's fixed in emacs 27)

Debugger entered--Lisp error: (error "BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: nil\n  status: nil\n  buffer: #<buffer  *http api.github.com:443*-707699>\n  buffer-string:\n  \"\"\n  --- end of buffer-string ---")
  signal(error ("BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: nil\n  status: nil\n  buffer: #<buffer  *http api.github.com:443*-707699>\n  buffer-string:\n  \"\"\n  --- end of buffer-string ---"))
  error("BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: %S\n  status: %S\n  buffer: %S\n  buffer-string:\n  %S\n  --- end of buffer-string ---" nil nil #<buffer  *http api.github.com:443*-707699> "")
  (let ((print-escape-newlines nil)) (error "BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: %S\n  status: %S\n  buffer: %S\n  buffer-string:\n  %S\n  --- end of buffer-string ---" url-http-end-of-headers status (current-buffer) (buffer-substring-no-properties (point-min) (point-max))))
  (progn (setq url-debug t) (let ((print-escape-newlines nil)) (error "BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: %S\n  status: %S\n  buffer: %S\n  buffer-string:\n  %S\n  --- end of buffer-string ---" url-http-end-of-headers status (current-buffer) (buffer-substring-no-properties (point-min) (point-max)))))
  (if (memq url-http-end-of-headers '(nil 0)) (progn (setq url-debug t) (let ((print-escape-newlines nil)) (error "BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: %S\n  status: %S\n  buffer: %S\n  buffer-string:\n  %S\n  --- end of buffer-string ---" url-http-end-of-headers status (current-buffer) (buffer-substring-no-properties (point-min) (point-max))))))
  (let (headers) (if (memq url-http-end-of-headers '(nil 0)) (progn (setq url-debug t) (let ((print-escape-newlines nil)) (error "BUG: missing headers\n  See https://github.com/magit/ghub/issues/81.\n  headers: %S\n  status: %S\n  buffer: %S\n  buffer-string:\n  %S\n  --- end of buffer-string ---" url-http-end-of-headers status (current-buffer) (buffer-substring-no-properties (point-min) (point-max)))))) (while (re-search-forward "^\\([^:]*\\): \\(.+\\)" url-http-end-of-headers t) (setq headers (cons (cons (match-string 1) (match-string 2)) headers))) (setq headers (nreverse headers)) (goto-char (1+ url-http-end-of-headers)) (if (and req (or (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 10)) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 11)))) (set (make-local-variable 'ghub-response-headers) headers) (setq-default ghub-response-headers headers)) headers)
  ghub--handle-response-headers(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/rate_limit" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "GET" :headers (closure ((forge) (username . "krobelus") (auth) (host . "api.github.com") (headers ("Content-Type" . "application/json")) cl-struct-ghub--req-tags url-http-response-status url-http-extra-headers url-http-end-of-headers url-callback-arguments t) nil (if (eq auth 'basic) (cons (cons "Authorization" (ghub--basic-auth host username)) headers) (cons (ghub--auth host auth username forge) headers))) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  (let* ((unpaginate (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 7))) (headers (ghub--handle-response-headers status req)) (payload (ghub--handle-response-payload req)) (payload (ghub--handle-response-error status payload req)) (value (ghub--handle-response-value payload req)) (prev (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 1))) (next (cdr (assq 'next (ghub-response-link-relations req headers payload))))) (if (numberp unpaginate) (progn (setq unpaginate (1- unpaginate)))) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 1 (url-generic-parse-url next)))) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 7 unpaginate))) (or (and next unpaginate (or (eq unpaginate t) (> unpaginate 0)) (ghub-continue req)) (let ((callback (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 10))) (errorback (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 11))) (err (plist-get status :error))) (cond ((and err errorback) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 1 prev))) (funcall (if (eq errorback t) 'ghub--errorback errorback) err headers status req)) (callback (funcall callback value headers status req)) (t value)))))
  (progn (set-buffer-multibyte t) (let* ((unpaginate (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 7))) (headers (ghub--handle-response-headers status req)) (payload (ghub--handle-response-payload req)) (payload (ghub--handle-response-error status payload req)) (value (ghub--handle-response-value payload req)) (prev (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 1))) (next (cdr (assq 'next (ghub-response-link-relations req headers payload))))) (if (numberp unpaginate) (progn (setq unpaginate (1- unpaginate)))) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 1 (url-generic-parse-url next)))) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 7 unpaginate))) (or (and next unpaginate (or (eq unpaginate t) (> unpaginate 0)) (ghub-continue req)) (let ((callback (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 10))) (errorback (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 11))) (err (plist-get status :error))) (cond ((and err errorback) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 1 prev))) (funcall (if (eq errorback t) 'ghub--errorback errorback) err headers status req)) (callback (funcall callback value headers status req)) (t value))))))
  (unwind-protect (progn (set-buffer-multibyte t) (let* ((unpaginate (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 7))) (headers (ghub--handle-response-headers status req)) (payload (ghub--handle-response-payload req)) (payload (ghub--handle-response-error status payload req)) (value (ghub--handle-response-value payload req)) (prev (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 1))) (next (cdr (assq 'next (ghub-response-link-relations req headers payload))))) (if (numberp unpaginate) (progn (setq unpaginate (1- unpaginate)))) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 1 (url-generic-parse-url next)))) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 7 unpaginate))) (or (and next unpaginate (or (eq unpaginate t) (> unpaginate 0)) (ghub-continue req)) (let ((callback (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 10))) (errorback (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 11))) (err (plist-get status :error))) (cond ((and err errorback) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 1 prev))) (funcall (if (eq errorback t) 'ghub--errorback errorback) err headers status req)) (callback (funcall callback value headers status req)) (t value)))))) (if (buffer-live-p buffer) (progn (kill-buffer buffer))))
  (let ((buffer (current-buffer))) (unwind-protect (progn (set-buffer-multibyte t) (let* ((unpaginate (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 7))) (headers (ghub--handle-response-headers status req)) (payload (ghub--handle-response-payload req)) (payload (ghub--handle-response-error status payload req)) (value (ghub--handle-response-value payload req)) (prev (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 1))) (next (cdr (assq 'next (ghub-response-link-relations req headers payload))))) (if (numberp unpaginate) (progn (setq unpaginate (1- unpaginate)))) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 1 (url-generic-parse-url next)))) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 7 unpaginate))) (or (and next unpaginate (or (eq unpaginate t) (> unpaginate 0)) (ghub-continue req)) (let ((callback (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 10))) (errorback (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 11))) (err (plist-get status :error))) (cond ((and err errorback) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (let* ((v req)) (aset v 1 prev))) (funcall (if (eq errorback t) 'ghub--errorback errorback) err headers status req)) (callback (funcall callback value headers status req)) (t value)))))) (if (buffer-live-p buffer) (progn (kill-buffer buffer)))))
  ghub--handle-response(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/rate_limit" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "GET" :headers (closure ((forge) (username . "krobelus") (auth) (host . "api.github.com") (headers ("Content-Type" . "application/json")) cl-struct-ghub--req-tags url-http-response-status url-http-extra-headers url-http-end-of-headers url-callback-arguments t) nil (if (eq auth 'basic) (cons (cons "Authorization" (ghub--basic-auth host username)) headers) (cons (ghub--auth host auth username forge) headers))) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  funcall(ghub--handle-response nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/rate_limit" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "GET" :headers (closure ((forge) (username . "krobelus") (auth) (host . "api.github.com") (headers ("Content-Type" . "application/json")) cl-struct-ghub--req-tags url-http-response-status url-http-extra-headers url-http-end-of-headers url-callback-arguments t) nil (if (eq auth 'basic) (cons (cons "Authorization" (ghub--basic-auth host username)) headers) (cons (ghub--auth host auth username forge) headers))) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  (save-current-buffer (set-buffer buffer) (funcall handler (car url-callback-arguments) req))
  (let ((buffer nil)) (url-retrieve url (function (lambda (_status _req) (setq buffer (current-buffer)))) (list req) silent) (while (not buffer) (sit-for 2.5)) (save-current-buffer (set-buffer buffer) (funcall handler (car url-callback-arguments) req)))
  (progn (let ((buffer nil)) (url-retrieve url (function (lambda (_status _req) (setq buffer (current-buffer)))) (list req) silent) (while (not buffer) (sit-for 2.5)) (save-current-buffer (set-buffer buffer) (funcall handler (car url-callback-arguments) req))))
  (if (and (< emacs-major-version 27) (memq (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 2)) '(github nil))) (progn (let ((buffer nil)) (url-retrieve url (function (lambda (_status _req) (setq buffer (current-buffer)))) (list req) silent) (while (not buffer) (sit-for 2.5)) (save-current-buffer (set-buffer buffer) (funcall handler (car url-callback-arguments) req)))) (url-do-setup) (save-current-buffer (set-buffer (let ((url-registered-auth-schemes '(("basic" ghub--basic-auth-errorback . 10)))) (url-retrieve-synchronously url silent))) (funcall handler (car url-callback-arguments) req)))
  (if (or (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 10)) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 11))) (url-retrieve url handler (list req) silent) (if (and (< emacs-major-version 27) (memq (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 2)) '(github nil))) (progn (let ((buffer nil)) (url-retrieve url (function (lambda (_status _req) (setq buffer (current-buffer)))) (list req) silent) (while (not buffer) (sit-for 2.5)) (save-current-buffer (set-buffer buffer) (funcall handler (car url-callback-arguments) req)))) (url-do-setup) (save-current-buffer (set-buffer (let ((url-registered-auth-schemes '(("basic" ghub--basic-auth-errorback . 10)))) (url-retrieve-synchronously url silent))) (funcall handler (car url-callback-arguments) req))))
  (let ((url-request-extra-headers (let ((headers (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 5)))) (if (functionp headers) (funcall headers) headers))) (url-request-method (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 4))) (url-request-data payload) (url-show-status nil) (url (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 1))) (handler (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 6))) (silent (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 3)))) (if (or (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 10)) (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 11))) (url-retrieve url handler (list req) silent) (if (and (< emacs-major-version 27) (memq (progn (or (and (memq (type-of req) cl-struct-ghub--req-tags) t) (signal 'wrong-type-argument (list 'ghub--req req))) (aref req 2)) '(github nil))) (progn (let ((buffer nil)) (url-retrieve url (function (lambda (_status _req) (setq buffer (current-buffer)))) (list req) silent) (while (not buffer) (sit-for 2.5)) (save-current-buffer (set-buffer buffer) (funcall handler (car url-callback-arguments) req)))) (url-do-setup) (save-current-buffer (set-buffer (let ((url-registered-auth-schemes '(("basic" ghub--basic-auth-errorback . 10)))) (url-retrieve-synchronously url silent))) (funcall handler (car url-callback-arguments) req)))))
  ghub--retrieve(nil #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/rate_limit" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "GET" :headers (closure ((forge) (username . "krobelus") (auth) (host . "api.github.com") (headers ("Content-Type" . "application/json")) cl-struct-ghub--req-tags url-http-response-status url-http-extra-headers url-http-end-of-headers url-callback-arguments t) nil (if (eq auth 'basic) (cons (cons "Authorization" (ghub--basic-auth host username)) headers) (cons (ghub--auth host auth username forge) headers))) :handler ghub--handle-response :unpaginate nil :noerror nil :reader nil :callback nil :errorback nil :value nil :extra nil))
  (progn (progn (or (or (booleanp unpaginate) (natnump unpaginate)) (cl--assertion-failed '(or (booleanp unpaginate) (natnump unpaginate)))) nil) (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host forge))) (if (or username (stringp auth) (eq auth 'none)) nil (setq username (ghub--username host forge))) (cond ((not params)) ((member method '("GET" "HEAD")) (if query (progn (error "PARAMS and QUERY are mutually exclusive for METHOD %S" method))) (setq query params)) (t (if payload (progn (error "PARAMS and PAYLOAD are mutually exclusive for METHOD %S" method))) (setq payload params))) (if (or callback errorback) (progn (setq noerror t))) (ghub--retrieve (ghub--encode-payload payload) (ghub--make-req :url (url-generic-parse-url (concat "https://" host resource (and query (concat "?" (ghub--url-encode-params query))))) :forge forge :silent silent :method (encode-coding-string method 'utf-8) :headers (ghub--headers headers host auth username forge) :handler 'ghub--handle-response :unpaginate unpaginate :noerror noerror :reader reader :callback callback :errorback errorback :value value :extra extra)))
  (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:query :payload :headers :silent :unpaginate :noerror :reader :username :auth :host :forge :callback :errorback :value :extra :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ':allow-other-keys --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :silent :unpaginate :noerror :reader :username :auth :host :forge :callback :errorback :value :extra)" (car --cl-keys--)))))) (progn (progn (or (or (booleanp unpaginate) (natnump unpaginate)) (cl--assertion-failed '(or (booleanp unpaginate) (natnump unpaginate)))) nil) (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host forge))) (if (or username (stringp auth) (eq auth 'none)) nil (setq username (ghub--username host forge))) (cond ((not params)) ((member method '("GET" "HEAD")) (if query (progn (error "PARAMS and QUERY are mutually exclusive for METHOD %S" method))) (setq query params)) (t (if payload (progn (error "PARAMS and PAYLOAD are mutually exclusive for METHOD %S" method))) (setq payload params))) (if (or callback errorback) (progn (setq noerror t))) (ghub--retrieve (ghub--encode-payload payload) (ghub--make-req :url (url-generic-parse-url (concat "https://" host resource (and query (concat "?" (ghub--url-encode-params query))))) :forge forge :silent silent :method (encode-coding-string method 'utf-8) :headers (ghub--headers headers host auth username forge) :handler 'ghub--handle-response :unpaginate unpaginate :noerror noerror :reader reader :callback callback :errorback errorback :value value :extra extra))))
  (let* ((query (car (cdr (plist-member --cl-rest-- ':query)))) (payload (car (cdr (plist-member --cl-rest-- ':payload)))) (headers (car (cdr (plist-member --cl-rest-- ':headers)))) (silent (car (cdr (plist-member --cl-rest-- ':silent)))) (unpaginate (car (cdr (plist-member --cl-rest-- ':unpaginate)))) (noerror (car (cdr (plist-member --cl-rest-- ':noerror)))) (reader (car (cdr (plist-member --cl-rest-- ':reader)))) (username (car (cdr (plist-member --cl-rest-- ':username)))) (auth (car (cdr (plist-member --cl-rest-- ':auth)))) (host (car (cdr (plist-member --cl-rest-- ':host)))) (forge (car (cdr (plist-member --cl-rest-- ':forge)))) (callback (car (cdr (plist-member --cl-rest-- ':callback)))) (errorback (car (cdr (plist-member --cl-rest-- ':errorback)))) (value (car (cdr (plist-member --cl-rest-- ':value)))) (extra (car (cdr (plist-member --cl-rest-- ':extra))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:query :payload :headers :silent :unpaginate :noerror :reader :username :auth :host :forge :callback :errorback :value :extra :allow-other-keys)) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ':allow-other-keys --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:query :payload :headers :silent :unpaginate :noerror :reader :username :auth :host :forge :callback :errorback :value :extra)" (car --cl-keys--)))))) (progn (progn (or (or (booleanp unpaginate) (natnump unpaginate)) (cl--assertion-failed '(or (booleanp unpaginate) (natnump unpaginate)))) nil) (if (string-prefix-p "/" resource) nil (setq resource (concat "/" resource))) (if host nil (setq host (ghub--host forge))) (if (or username (stringp auth) (eq auth 'none)) nil (setq username (ghub--username host forge))) (cond ((not params)) ((member method '("GET" "HEAD")) (if query (progn (error "PARAMS and QUERY are mutually exclusive for METHOD %S" method))) (setq query params)) (t (if payload (progn (error "PARAMS and PAYLOAD are mutually exclusive for METHOD %S" method))) (setq payload params))) (if (or callback errorback) (progn (setq noerror t))) (ghub--retrieve (ghub--encode-payload payload) (ghub--make-req :url (url-generic-parse-url (concat "https://" host resource (and query (concat "?" (ghub--url-encode-params query))))) :forge forge :silent silent :method (encode-coding-string method 'utf-8) :headers (ghub--headers headers host auth username forge) :handler 'ghub--handle-response :unpaginate unpaginate :noerror noerror :reader reader :callback callback :errorback errorback :value value :extra extra)))))
  ghub-request("GET" "/rate_limit" nil :query nil :payload nil :unpaginate nil :headers nil :username nil :auth nil :host nil)
  ghubp-request(get "/rate_limit" nil nil)
  ghubp-ratelimit()
  eval((ghubp-ratelimit) nil)
  elisp--eval-last-sexp(nil)
  #f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'.  With a prefix argument of zero,\nhowever, there is no such truncation.  Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x273ef3>)(nil)
  ad-Advice-eval-last-sexp(#f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'.  With a prefix argument of zero,\nhowever, there is no such truncation.  Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x273ef3>) nil)
  apply(ad-Advice-eval-last-sexp #f(compiled-function (eval-last-sexp-arg-internal) "Evaluate sexp before point; print value in the echo area.\nInteractively, with a non `-' prefix argument, print output into\ncurrent buffer.\n\nNormally, this function truncates long output according to the\nvalue of the variables `eval-expression-print-length' and\n`eval-expression-print-level'.  With a prefix argument of zero,\nhowever, there is no such truncation.  Such a prefix argument\nalso causes integers to be printed in several additional formats\n(octal, hexadecimal, and character when the prefix argument is\n-1 or the integer is `eval-expression-print-maximum-character' or\nless).\n\nIf `eval-expression-debug-on-error' is non-nil, which is the default,\nthis command arranges for all errors to enter the debugger." (interactive "P") #<bytecode 0x273ef3>) nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

from ghub.

Related Issues (20)

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.