-
this error when run Debugger entered--Lisp error: (wrong-type-argument stringp #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/iT-Boyer/hugo/issues/43" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t))
string-match("^https://github.com/\\(.+\\)/commit/\\(\\w+\\)$" #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/iT-Boyer/hugo/issues/43" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t))
(and t (string-match regexp url))
(let* ((matched-groups (and t (string-match regexp url)))) (if matched-groups (progn (setq url (funcall redirect-fn url)) (message "Redirect URL to %s" url) (throw 'ret url))))
(let* ((regexp (car redirect-rule)) (redirect-fn (cdr redirect-rule)) (inhibit-message t)) (let* ((matched-groups (and t (string-match regexp url)))) (if matched-groups (progn (setq url (funcall redirect-fn url)) (message "Redirect URL to %s" url) (throw 'ret url)))))
(let ((redirect-rule (car --dolist-tail--))) (let* ((regexp (car redirect-rule)) (redirect-fn (cdr redirect-rule)) (inhibit-message t)) (let* ((matched-groups (and t (string-match regexp url)))) (if matched-groups (progn (setq url (funcall redirect-fn url)) (message "Redirect URL to %s" url) (throw 'ret url))))) (setq --dolist-tail-- (cdr --dolist-tail--)))
(while --dolist-tail-- (let ((redirect-rule (car --dolist-tail--))) (let* ((regexp (car redirect-rule)) (redirect-fn (cdr redirect-rule)) (inhibit-message t)) (let* ((matched-groups (and t (string-match regexp url)))) (if matched-groups (progn (setq url (funcall redirect-fn url)) (message "Redirect URL to %s" url) (throw 'ret url))))) (setq --dolist-tail-- (cdr --dolist-tail--))))
(let ((--dolist-tail-- my/url-redirect-list)) (while --dolist-tail-- (let ((redirect-rule (car --dolist-tail--))) (let* ((regexp (car redirect-rule)) (redirect-fn (cdr redirect-rule)) (inhibit-message t)) (let* ((matched-groups (and t ...))) (if matched-groups (progn (setq url ...) (message "Redirect URL to %s" url) (throw ... url))))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
(catch 'ret (let ((--dolist-tail-- my/url-redirect-list)) (while --dolist-tail-- (let ((redirect-rule (car --dolist-tail--))) (let* ((regexp (car redirect-rule)) (redirect-fn (cdr redirect-rule)) (inhibit-message t)) (let* ((matched-groups ...)) (if matched-groups (progn ... ... ...)))) (setq --dolist-tail-- (cdr --dolist-tail--))))))
my/url-redirect(#f(compiled-function (url callback &optional cbargs silent inhibit-cookies) "Retrieve URL asynchronously and call CALLBACK with CBARGS when finished.\nURL is either a string or a parsed URL. If it is a string\ncontaining characters that are not valid in a URI, those\ncharacters are percent-encoded; see `url-encode-url'.\n\nCALLBACK is called when the object has been completely retrieved, with\nthe current buffer containing the object, and any MIME headers associated\nwith it. It is called as (apply CALLBACK STATUS CBARGS).\nSTATUS is a plist representing what happened during the request,\nwith most recent events first, or an empty list if no events have\noccurred. Each pair is one of:\n\n(:redirect REDIRECTED-TO) - the request was redirected to this URL.\n\n(:error (error type . DATA)) - an error occurred. TYPE is a\nsymbol that says something about where the error occurred, and\nDATA is a list (possibly nil) that describes the error further.\n\nReturn the buffer URL will load into, or nil if the process has\nalready completed (i.e. URL was a mailto URL or similar; in this case\nthe callback is not called).\n\nThe variables `url-request-data', `url-request-method' and\n`url-request-extra-headers' can be dynamically bound around the\nrequest; dynamic binding of other variables doesn't necessarily\ntake effect.\n\nIf SILENT, then don't message progress reports and the like.\nIf INHIBIT-COOKIES, cookies will neither be stored nor sent to\nthe server.\nIf URL is a multibyte string, it will be encoded as utf-8 and\nURL-encoded before it's used." #<bytecode 0x1bb9dddf3209b7cc>) #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/iT-Boyer/hugo/issues/43" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) ghub--handle-response (#s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/iT-Boyer/hugo/issues/43" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "PATCH" :headers #f(compiled-function () #<bytecode -0xd520ca853c0afdb>) :handler ghub--handle-response :unpaginate nil :noerror t :reader nil :callback #f(compiled-function (value headers status req) #<bytecode -0x1dbf66743de18e96>) :errorback #f(compiled-function (error &rest _) #<bytecode -0x1792279f28fb2868>) :value nil :extra nil)) nil)
apply(my/url-redirect #f(compiled-function (url callback &optional cbargs silent inhibit-cookies) "Retrieve URL asynchronously and call CALLBACK with CBARGS when finished.\nURL is either a string or a parsed URL. If it is a string\ncontaining characters that are not valid in a URI, those\ncharacters are percent-encoded; see `url-encode-url'.\n\nCALLBACK is called when the object has been completely retrieved, with\nthe current buffer containing the object, and any MIME headers associated\nwith it. It is called as (apply CALLBACK STATUS CBARGS).\nSTATUS is a plist representing what happened during the request,\nwith most recent events first, or an empty list if no events have\noccurred. Each pair is one of:\n\n(:redirect REDIRECTED-TO) - the request was redirected to this URL.\n\n(:error (error type . DATA)) - an error occurred. TYPE is a\nsymbol that says something about where the error occurred, and\nDATA is a list (possibly nil) that describes the error further.\n\nReturn the buffer URL will load into, or nil if the process has\nalready completed (i.e. URL was a mailto URL or similar; in this case\nthe callback is not called).\n\nThe variables `url-request-data', `url-request-method' and\n`url-request-extra-headers' can be dynamically bound around the\nrequest; dynamic binding of other variables doesn't necessarily\ntake effect.\n\nIf SILENT, then don't message progress reports and the like.\nIf INHIBIT-COOKIES, cookies will neither be stored nor sent to\nthe server.\nIf URL is a multibyte string, it will be encoded as utf-8 and\nURL-encoded before it's used." #<bytecode 0x1bb9dddf3209b7cc>) (#s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/iT-Boyer/hugo/issues/43" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) ghub--handle-response (#s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/iT-Boyer/hugo/issues/43" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "PATCH" :headers #f(compiled-function () #<bytecode -0xd520ca853c0afdb>) :handler ghub--handle-response :unpaginate nil :noerror t :reader nil :callback #f(compiled-function (value headers status req) #<bytecode -0x1dbf66743de18e96>) :errorback #f(compiled-function (error &rest _) #<bytecode -0x1792279f28fb2868>) :value nil :extra nil)) nil))
url-retrieve(#s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/iT-Boyer/hugo/issues/43" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) ghub--handle-response (#s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/iT-Boyer/hugo/issues/43" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "PATCH" :headers #f(compiled-function () #<bytecode -0xd520ca853c0afdb>) :handler ghub--handle-response :unpaginate nil :noerror t :reader nil :callback #f(compiled-function (value headers status req) #<bytecode -0x1dbf66743de18e96>) :errorback #f(compiled-function (error &rest _) #<bytecode -0x1792279f28fb2868>) :value nil :extra nil)) nil)
ghub--retrieve("{\"title\":\"test132\",\"body\":\"test\\n123\\n2 yu\"}" #s(ghub--req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/repos/iT-Boyer/hugo/issues/43" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "PATCH" :headers #f(compiled-function () #<bytecode -0xd520ca853c0afdb>) :handler ghub--handle-response :unpaginate nil :noerror t :reader nil :callback #f(compiled-function (value headers status req) #<bytecode -0x1dbf66743de18e96>) :errorback #f(compiled-function (error &rest _) #<bytecode -0x1792279f28fb2868>) :value nil :extra nil))
ghub-request("PATCH" "/repos/iT-Boyer/hugo/issues/43" ((title . "test132") (body . "test\n123\n2 yu")) :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :username nil :auth forge :host "api.github.com" :callback #f(compiled-function (value headers status req) #<bytecode -0x1dbf66743de18e96>) :errorback #f(compiled-function (error &rest _) #<bytecode -0x1792279f28fb2868>) :extra nil)
ghub-patch("/repos/iT-Boyer/hugo/issues/43" ((title . "test132") (body . "test\n123\n2 yu")) :host "api.github.com" :auth forge :query nil :payload nil :headers nil :silent nil :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (value headers status req) #<bytecode -0x1dbf66743de18e96>) :errorback #f(compiled-function (error &rest _) #<bytecode -0x1792279f28fb2868>))
forge--ghub-patch(#<forge-issue forge-issue-4d1ff144> "/repos/:owner/:repo/issues/:number" ((title . "test132") (body . "test\n123\n2 yu")) :callback #f(compiled-function (value headers status req) #<bytecode -0x1dbf66743de18e96>) :errorback #f(compiled-function (error &rest _) #<bytecode -0x1792279f28fb2868>))
#f(compiled-function (_ post) #<bytecode -0x1a72204bf5f57c1e>)(#<forge-github-repository forge-github-repository-49006cfa> #<forge-issue forge-issue-4d1ff144>)
apply(#f(compiled-function (_ post) #<bytecode -0x1a72204bf5f57c1e>) #<forge-github-repository forge-github-repository-49006cfa> #<forge-issue forge-issue-4d1ff144>)
forge--submit-edit-post(#<forge-github-repository forge-github-repository-49006cfa> #<forge-issue forge-issue-4d1ff144>)
forge-post-submit()
funcall-interactively(forge-post-submit)
call-interactively(forge-post-submit nil nil)
command-execute(forge-post-submit) |
Beta Was this translation helpful? Give feedback.
Answered by
tarsius
Sep 14, 2022
Replies: 1 comment 1 reply
-
There seems to be a bug in your |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
iT-Boyer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seems to be a bug in your
my/url-redirect
.url-retrieve
's URL argument can be either a string (as you are prepared to handle) or an url object (as is used here).