X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=elpher.git;a=blobdiff_plain;f=elpher.el;h=be78a0aeb8caad731a48f5dcc5f5d50f271a89f6;hp=13ec53cbfc921809c547ada0ebea3f7e0d675944;hb=00aa89d8ad9f321e4eb288499a404897eb9188c4;hpb=ca1a3bd109cabb568885d682d5ba1e4ae57bd5da diff --git a/elpher.el b/elpher.el index 13ec53c..be78a0a 100644 --- a/elpher.el +++ b/elpher.el @@ -4,7 +4,7 @@ ;; Author: Tim Vaughan ;; Created: 11 April 2019 -;; Version: 2.6.0 +;; Version: 2.6.1 ;; Keywords: comm gopher ;; Homepage: http://thelambdalab.xyz/elpher ;; Package-Requires: ((emacs "26")) @@ -69,7 +69,7 @@ ;;; Global constants ;; -(defconst elpher-version "2.6.0" +(defconst elpher-version "2.6.1" "Current version of elpher.") (defconst elpher-margin-width 6 @@ -811,7 +811,7 @@ to ADDRESS." (let* ((kill-buffer-query-functions nil) (port (elpher-address-port address)) (host (elpher-address-host address)) - (response-string "") + (response-string-parts nil) (proc (open-network-stream "elpher-process" nil (if force-ipv4 (dns-query host) host) @@ -832,8 +832,8 @@ to ADDRESS." (when timer (cancel-timer timer) (setq timer nil)) - (setq response-string - (concat response-string string)))) + (setq response-string-parts + (cons string response-string-parts)))) (set-process-sentinel proc (lambda (proc event) (condition-case the-error @@ -845,7 +845,7 @@ to ADDRESS." (concat (elpher-address-to-url address) "\r\n")))) ((string-prefix-p "deleted" event)) ; do nothing - ((and (string-empty-p response-string) + ((and (not response-string-parts) (not force-ipv4)) ; Try again with IPv4 (message "Connection failed. Retrying with IPv4.") @@ -853,7 +853,7 @@ to ADDRESS." (elpher-get-gemini-response address renderer t)) (t (funcall #'elpher-process-gemini-response - response-string + (apply #'concat (reverse response-string-parts)) renderer) (elpher-restore-pos))) (error @@ -1433,9 +1433,7 @@ When run interactively HOST-OR-URL is read from the minibuffer." (let ((address-copy (elpher-address-from-url (elpher-address-to-url address)))) (setf (url-filename address-copy) "") - (elpher-visit-page - (elpher-make-page (elpher-address-to-url address-copy) - address-copy)))) + (elpher-go (elpher-address-to-url address-copy)))) (error "Command invalid for %s" (elpher-page-display-string elpher-current-page))))) (defun elpher-bookmarks-current-p ()