Work around Doom emacs tls problems.
[elpher.git] / elpher.el
index b4b62d8..e508c61 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -1,10 +1,10 @@
-;;; elpher.el --- A friendly gopher client  -*- lexical-binding:t -*-
+;;; elpher.el --- A friendly gopher and gemini client  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2019 Tim Vaughan
 
 ;; Author: Tim Vaughan <plugd@thelambdalab.xyz>
 ;; Created: 11 April 2019
-;; Version: 2.7.4
+;; Version: 2.7.5
 ;; Keywords: comm gopher
 ;; Homepage: http://thelambdalab.xyz/elpher
 ;; Package-Requires: ((emacs "26"))
@@ -26,8 +26,8 @@
 
 ;;; Commentary:
 
-;; Elpher aims to provide a practical and friendly gopher, gemini,
-;; and finger client for GNU Emacs.  It supports:
+;; Elpher aims to provide a practical and friendly gopher and gemini
+;; client for GNU Emacs.  It supports:
 
 ;; - intuitive keyboard and mouse-driven browsing,
 ;; - out-of-the-box compatibility with evil-mode,
@@ -36,7 +36,7 @@
 ;; - pleasant and configurable colouring of Gopher directories,
 ;; - direct visualisation of image files,
 ;; - a simple bookmark management system,
-;; - connections using TLS encryption,
+;; - gopher connections using TLS encryption,
 ;; - the fledgling Gemini protocol,
 ;; - the greybeard Finger protocol.
 
@@ -70,7 +70,7 @@
 ;;; Global constants
 ;;
 
-(defconst elpher-version "2.7.4"
+(defconst elpher-version "2.7.5"
   "Current version of elpher.")
 
 (defconst elpher-margin-width 6
@@ -547,6 +547,7 @@ to ADDRESS."
     (error "Cannot retrieve gopher selector: port number > 65536"))
   (condition-case nil
       (let* ((kill-buffer-query-functions nil)
+             (gnutls-verify-error nil) ; We use the NSM for verification
              (port (elpher-address-port address))
              (host (elpher-address-host address))
              (selector-string-parts nil)
@@ -875,6 +876,7 @@ to ADDRESS."
       (error "Cannot establish gemini connection: port number > 65536"))
     (condition-case nil
         (let* ((kill-buffer-query-functions nil)
+               (gnutls-verify-error nil) ; We use the NSM for verification
                (port (elpher-address-port address))
                (host (elpher-address-host address))
                (response-string-parts nil)
@@ -954,7 +956,7 @@ that the response was malformed."
                     (meta (string-trim (substring header 2))))
                 (list code meta body))
             (error "Malformed response: No response status found in header %s" header)))
-      (error "Malformed response: No CRLF-delimited header found"))))
+      (error "Malformed response: No CRLF-delimited header found in response %s" response))))
 
 (defun elpher-process-gemini-response (response-string renderer)
   "Process the gemini response RESPONSE-STRING and pass the result to RENDERER."
@@ -1272,7 +1274,7 @@ by HEADER-LINE."
     (error "Command not supported for start page"))
   (elpher-with-clean-buffer
    (insert "     --------------------------------------------\n"
-           "                Elpher Gopher Client             \n"
+           "           Elpher Gopher and Gemini Client       \n"
            "                   version " elpher-version "\n"
            "     --------------------------------------------\n"
            "\n"
@@ -1296,14 +1298,16 @@ by HEADER-LINE."
            " - T: toggle TLS gopher mode\n"
            " - .: display the raw server response for the current page\n"
            "\n"
-           "Start your exploration of gopher space:\n")
+           "Start your exploration of gopher space and gemini:\n")
    (elpher-insert-index-record "Floodgap Systems Gopher Server"
                                (elpher-make-gopher-address ?1 "" "gopher.floodgap.com" 70))
+   (elpher-insert-index-record "Project Gemini home page"
+                               (elpher-address-from-url "gemini://gemini.circumlunar.space/"))
    (insert "\n"
            "Alternatively, select a search engine and enter some search terms:\n")
-   (elpher-insert-index-record "Veronica-2 Gopher Search Engine"
+   (elpher-insert-index-record "Gopher Search Engine (Veronica-2)"
                                (elpher-make-gopher-address ?7 "/v2/vs" "gopher.floodgap.com" 70))
-   (elpher-insert-index-record "GUS Gemini Search Engine"
+   (elpher-insert-index-record "Gemini Search Engine (GUS)"
                                (elpher-address-from-url "gemini://gus.guru/search"))
    (insert "\n"
            "This page contains your bookmarked sites (also visit with B):\n")