- ;;; elpher.el --- A friendly gopher and gemini client -*- lexical-binding:t -*-
-
- ;; Copyright (C) 2019-2020 Tim Vaughan
+ ;;; elpher.el --- A friendly gopher and gemini client -*- lexical-binding: t -*-
+
+ ;; Copyright (C) 2021 Jens Östlund <jostlund@gmail.com>
+ ;; Copyright (C) 2021 F. Jason Park <jp@neverwas.me>
+ ;; Copyright (C) 2021 Christopher Brannon <chris@the-brannons.com>
+ ;; Copyright (C) 2021 Omar Polo <op@omarpolo.com>
+ ;; Copyright (C) 2021 Noodles! <nnoodle@chiru.no>
+ ;; Copyright (C) 2020-2021 Alex Schroeder <alex@gnu.org>
+ ;; Copyright (C) 2020 Zhiwei Chen <chenzhiwei03@kuaishou.com>
+ ;; Copyright (C) 2020 condy0919 <condy0919@gmail.com>
+ ;; Copyright (C) 2020 Alexis <flexibeast@gmail.com>
+ ;; Copyright (C) 2020 Étienne Deparis <etienne@depar.is>
+ ;; Copyright (C) 2020 Simon Nicolussi <sinic@sinic.name>
+ ;; Copyright (C) 2020 Michel Alexandre Salim <michel@michel-slm.name>
+ ;; Copyright (C) 2020 Koushk Roy <kroy@twilio.com>
+ ;; Copyright (C) 2020 Vee <vee@vnsf.xyz>
+ ;; Copyright (C) 2020 Simon South <simon@simonsouth.net>
-;; Copyright (C) 2019-2020 Tim Vaughan <plugd@thelambdalab.xyz>
++;; Copyright (C) 2019-2021 Tim Vaughan <plugd@thelambdalab.xyz>
;; Author: Tim Vaughan <plugd@thelambdalab.xyz>
;; Created: 11 April 2019
(let ((url (url-generic-parse-url url-string)))
(unless (and (not (url-fullness url)) (url-type url))
(setf (url-fullness url) t)
- (setf (url-filename url)
- (url-unhex-string (url-filename url)))
(unless (url-type url)
- (setf (url-type url) "gopher"))
+ (setf (url-type url) elpher-default-url-type))
+ (unless (url-host url)
+ (let ((p (split-string (url-filename url) "/" nil nil)))
+ (setf (url-host url) (car p))
+ (setf (url-filename url)
+ (if (cdr p)
+ (concat "/" (mapconcat #'identity (cdr p) "/"))
+ ""))))
(when (or (equal "gopher" (url-type url))
(equal "gophers" (url-type url)))
;; Gopher defaults