From: Étienne Deparis Date: Mon, 28 Jun 2021 16:20:46 +0000 (+0200) Subject: Avoid anoying error message on homepage when using elpher-go-current X-Git-Tag: v3.0.0~22^2~27^2~1 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=d202f3c0d5b211b5d43a7ec3eed0f5feb82e2d7f;p=elpher.git Avoid anoying error message on homepage when using elpher-go-current --- diff --git a/elpher.el b/elpher.el index 9fffce8..e16c52d 100644 --- a/elpher.el +++ b/elpher.el @@ -1854,10 +1854,10 @@ When run interactively HOST-OR-URL is read from the minibuffer." "Go to a particular site read from the minibuffer, initialized with the current URL." (interactive) (let ((address (elpher-page-address elpher-current-page))) - (if (elpher-address-special-p address) - (error "Command invalid for this page") - (let ((url (read-string "Gopher or Gemini URL: " (elpher-address-to-url address)))) - (elpher-visit-page (elpher-make-page url (elpher-address-from-url url))))))) + (let ((url (read-string "Gopher or Gemini URL: " + (unless (elpher-address-special-p address) + (elpher-address-to-url address))))) + (elpher-visit-page (elpher-make-page url (elpher-address-from-url url)))))) (defun elpher-visit-gemini-numbered-link (n) "Visit link designated by a number."