Display both URL and IRI for page info when they differ.
authorplugd <plugd@thelambdalab.xyz>
Mon, 23 Aug 2021 09:41:07 +0000 (11:41 +0200)
committerplugd <plugd@thelambdalab.xyz>
Mon, 23 Aug 2021 09:41:07 +0000 (11:41 +0200)
elpher.el

index c57df7d..7df595d 100644 (file)
--- a/elpher.el
+++ b/elpher.el
@@ -2281,8 +2281,12 @@ When run interactively HOST-OR-URL is read from the minibuffer."
 
 (defun elpher-info-page (page)
   "Display URL of PAGE in minibuffer."
-  (let ((address (elpher-page-address page)))
-    (message "%s" (elpher-address-to-iri address))))
+  (let* ((address (elpher-page-address page))
+         (url (elpher-address-to-url address))
+         (iri (elpher-address-to-iri address)))
+    (if (equal url iri)
+        (message "%s" url)
+      (message "%s (Raw: %s)" iri url))))
 
 (defun elpher-info-link ()
   "Display information on page corresponding to link at point."