From: Tim Vaughan Date: Thu, 4 Jun 2020 19:05:25 +0000 (+0200) Subject: elpher-go now trims surrounding whitespace from input string. X-Git-Tag: v2.7.10~1 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=b4fc468a644bdcbfcc371311c9984deb623bafff;p=elpher.git elpher-go now trims surrounding whitespace from input string. --- diff --git a/elpher.el b/elpher.el index 1988656..1ea9e71 100644 --- a/elpher.el +++ b/elpher.el @@ -1538,11 +1538,12 @@ If ADDRESS is already bookmarked, update the label only." "Go to a particular gopher site HOST-OR-URL. When run interactively HOST-OR-URL is read from the minibuffer." (interactive "sGopher or Gemini URL: ") - (let ((page (elpher-make-page host-or-url - (elpher-address-from-url host-or-url)))) + (let* ((cleaned-host-or-url (string-trim host-or-url)) + (address (elpher-address-from-url cleaned-host-or-url)) + (page (elpher-make-page cleaned-host-or-url address))) (switch-to-buffer "*elpher*") (elpher-visit-page page) - '())) + nil)) (defun elpher-go-current () "Go to a particular site read from the minibuffer, initialized with the current URL."