Fill links
authorAlex Schroeder <alex@gnu.org>
Tue, 3 Aug 2021 13:15:58 +0000 (15:15 +0200)
committerAlex Schroeder <alex@gnu.org>
Mon, 9 Aug 2021 12:52:09 +0000 (14:52 +0200)
Currently unhappy about it because fill-prefix is hard-coded to three
spaces since that's the apparent width of "→ " (possibly font
related?).

elpher.el

index 1dfdded..568abb8 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -1495,7 +1495,8 @@ treatment that a separate function is warranted."
          (display-string (elpher-gemini-get-link-display-string link-line))
          (address (elpher-address-from-gemini-url url))
          (type (if address (elpher-address-type address) nil))
          (display-string (elpher-gemini-get-link-display-string link-line))
          (address (elpher-address-from-gemini-url url))
          (type (if address (elpher-address-type address) nil))
-         (type-map-entry (cdr (assoc type elpher-type-map))))
+         (type-map-entry (cdr (assoc type elpher-type-map)))
+        (fill-prefix "   "))
     (when display-string
       (insert elpher-gemini-link-string)
       (if type-map-entry
     (when display-string
       (insert elpher-gemini-link-string)
       (if type-map-entry
@@ -1509,7 +1510,7 @@ treatment that a separate function is warranted."
                                 'follow-link t
                                 'help-echo #'elpher--page-button-help))
         (insert (propertize display-string 'face 'elpher-unknown)))
                                 'follow-link t
                                 'help-echo #'elpher--page-button-help))
         (insert (propertize display-string 'face 'elpher-unknown)))
-      (insert "\n"))))
+      (newline))))
 
 (defvar elpher--gemini-page-headings nil
   "List of headings on the page.")
 
 (defvar elpher--gemini-page-headings nil
   "List of headings on the page.")