From: plugd Date: Thu, 5 May 2022 11:57:22 +0000 (+0200) Subject: Fixed incorrect references to gemini. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=commitdiff_plain;h=3a54597f9c4a900db0c94349fd9301a54e68d090 Fixed incorrect references to gemini. --- diff --git a/elpher.el b/elpher.el index 9540cee..e0b28f9 100644 --- a/elpher.el +++ b/elpher.el @@ -1697,6 +1697,7 @@ can be used to toggle the display of the preformatted text." headers)) (reverse headers)))) + ;; Spartan page retrieval (defvar elpher-spartan-redirect-chain) @@ -1711,7 +1712,7 @@ can be used to toggle the display of the preformatted text." (insert content) (elpher-restore-pos)) (elpher-with-clean-buffer - (insert "LOADING GEMINI... (use 'u' to cancel)\n")) + (insert "LOADING SPARTAN... (use 'u' to cancel)\n")) (setq elpher-spartan-redirect-chain nil) (elpher-get-spartan-response address renderer)) (error @@ -1742,8 +1743,8 @@ that the response was malformed." (error "Malformed response: No CRLF-delimited header found in response %s" response)))) (defun elpher-process-spartan-response (response-string renderer) - "Process the gemini response RESPONSE-STRING and pass the result to RENDERER." - (let ((response-components (elpher-parse-gemini-response response-string))) + "Process the spartan response RESPONSE-STRING and pass the result to RENDERER." + (let ((response-components (elpher-parse-spartan-response response-string))) (let ((response-code (elt response-components 0)) (response-meta (elt response-components 1)) (response-body (elt response-components 2))) @@ -1754,7 +1755,7 @@ that the response was malformed." (message "Following redirect to %s" response-meta) (if (>= (length elpher-spartan-redirect-chain) 5) (error "More than 5 consecutive redirects followed")) - (let* ((current-address (elpher-page-address current-page)) + (let* ((current-address (elpher-page-address elpher-current-page)) (redirect-address (elpher-address-from-url (concat "spartan://" (elpher-address-host current-address) @@ -1767,10 +1768,10 @@ that the response was malformed." (elpher-page-set-address elpher-current-page redirect-address) (add-to-list 'elpher-gemini-redirect-chain redirect-address) (elpher-get-spartan-response redirect-address renderer))) - (?4 ; Temporary failure + (?4 ; Client error (error "Spartan server reports CLIENT ERROR for this request: %s %s" response-code response-meta)) - (?5 ; Permanent failure + (?5 ; Server error (error "Spartan server reports SERVER ERROR for this request: %s %s" response-code response-meta)) (_other