X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=blobdiff_plain;f=elpher.el;h=8b3a7f9a76049a798ab718bdd9930e2e7398a0ac;hb=266027bd600a85f1e488b116275d9f3a9a6ba057;hp=58072009e1e9e6a562fe482b3d3a7ac051884968;hpb=2c17a690daa544a4c9e7da150748a7e64bf660aa;p=elpher.git diff --git a/elpher.el b/elpher.el index 5807200..8b3a7f9 100644 --- a/elpher.el +++ b/elpher.el @@ -4,7 +4,7 @@ ;; Author: Tim Vaughan ;; Created: 11 April 2019 -;; Version: 2.10.1 +;; Version: 2.10.2 ;; Keywords: comm gopher ;; Homepage: http://thelambdalab.xyz/elpher ;; Package-Requires: ((emacs "26.2")) @@ -71,7 +71,7 @@ ;;; Global constants ;; -(defconst elpher-version "2.10.0" +(defconst elpher-version "2.10.2" "Current version of elpher.") (defconst elpher-margin-width 6 @@ -616,7 +616,8 @@ the host operating system and the local network capabilities." (unless (< (elpher-address-port address) 65536) (error "Cannot establish network connection: port number > 65536")) (when (and (eq use-tls 'gemini) (not elpher-gemini-TLS-cert-checks)) - (setq-local network-security-level 'low)) + (setq-local network-security-level 'low) + (setq-local gnutls-verify-error nil)) (condition-case nil (let* ((kill-buffer-query-functions nil) (port (elpher-address-port address)) @@ -1365,17 +1366,20 @@ treatment that a separate function is warranted." The gemini map file line describing the header is given by HEADER-LINE." (when (string-match "^\\(#+\\)[ \t]*" header-line) - (let ((level (length (match-string 1 header-line))) - (header (substring header-line (match-end 0)))) + (let* ((level (length (match-string 1 header-line))) + (header (substring header-line (match-end 0))) + (face (pcase level + (1 'elpher-gemini-heading1) + (2 'elpher-gemini-heading2) + (3 'elpher-gemini-heading3) + (_ 'default))) + (fill-column (/ (* fill-column + (font-get (font-spec :name (face-font 'default)) :size)) + (font-get (font-spec :name (face-font face)) :size)))) (unless (display-graphic-p) (insert (make-string level ?#) " ")) - (insert (propertize header 'face - (pcase level - (1 'elpher-gemini-heading1) - (2 'elpher-gemini-heading2) - (3 'elpher-gemini-heading3) - (_ 'default))) - "\n")))) + (insert (propertize header 'face face)) + (newline)))) (defun elpher-gemini-insert-text (text-line) "Insert a plain non-preformatted TEXT-LINE into a text/gemini document.