unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [NonGNU ELPA] New package: hyperdrive (repost)
@ 2023-08-26  6:56 Joseph Turner
  2023-08-26 11:55 ` Philip Kaludercic
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph Turner @ 2023-08-26  6:56 UTC (permalink / raw)
  To: Emacs Devel Mailing List; +Cc: Adam Porter, Paula Maas, Protesilaos Stavrou

[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

Hello all,

Adam Porter and I have been working on an Emacs interface
(<https://git.sr.ht/~ushin/hyperdrive.el>) for managing hyperdrives,
which are real-time, versioned, p2p filesystems.
(<https://docs.holepunch.to/building-blocks/hyperdrive>).

Some features have already been implemented and described in the manual
(<https://ushin.org/hyperdrive-manual.html>). We plan to work on a peer
discovery mechanism so you can announce interest in a topic, e.g.
"Emacs", and discover other online peers who share that topic interest.

I look forward to hearing feedback!

Best,

Joseph

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-elpa-packages-hyperdrive.patch --]
[-- Type: text/x-diff, Size: 460 bytes --]

diff --git a/elpa-packages b/elpa-packages
index 77d7a5409e..41a060bff0 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -340,6 +340,10 @@
   :ignored-files ("htmlize.el.html")
   :release-branch "stable")
 
+ (hyperdrive		:url "https://git.sr.ht/~ushin/hyperdrive.el"
+  :readme "README.md"
+  :doc "doc/hyperdrive-manual.org")
+
  (idle-highlight-mode	:url "https://codeberg.org/ideasman42/emacs-idle-highlight-mode"
   :ignored-files (".elisp-autofmt"))
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [NonGNU ELPA] New package: hyperdrive (repost)
  2023-08-26  6:56 [NonGNU ELPA] New package: hyperdrive (repost) Joseph Turner
@ 2023-08-26 11:55 ` Philip Kaludercic
  2023-08-26 19:19   ` Joseph Turner
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2023-08-26 11:55 UTC (permalink / raw)
  To: Joseph Turner
  Cc: Emacs Devel Mailing List, Adam Porter, Paula Maas,
	Protesilaos Stavrou

It would usually be better to just ping the previous thread, in case
the discussion died down to quickly.  From the archives, it seems there
was no further discussion on the matter, or did I miss something?

Joseph Turner <joseph@ushin.org> writes:

> Hello all,
>
> Adam Porter and I have been working on an Emacs interface
> (<https://git.sr.ht/~ushin/hyperdrive.el>) for managing hyperdrives,
> which are real-time, versioned, p2p filesystems.
> (<https://docs.holepunch.to/building-blocks/hyperdrive>).
>
> Some features have already been implemented and described in the manual
> (<https://ushin.org/hyperdrive-manual.html>). We plan to work on a peer
> discovery mechanism so you can announce interest in a topic, e.g.
> "Emacs", and discover other online peers who share that topic interest.
>
> I look forward to hearing feedback!
>
> Best,
>
> Joseph
>
>

-- 
Philip Kaludercic



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [NonGNU ELPA] New package: hyperdrive (repost)
  2023-08-26 11:55 ` Philip Kaludercic
@ 2023-08-26 19:19   ` Joseph Turner
  2023-08-26 20:27     ` [NonGNU ELPA] New package: hyperdrive (repast) Philip Kaludercic
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph Turner @ 2023-08-26 19:19 UTC (permalink / raw)
  To: Philip Kaludercic
  Cc: Emacs Devel Mailing List, Adam Porter, Paula Maas,
	Protesilaos Stavrou



On August 26, 2023 4:55:56 AM PDT, Philip Kaludercic <philipk@posteo.net> wrote:
>It would usually be better to just ping the previous thread, in case
>the discussion died down to quickly.  From the archives, it seems there
>was no further discussion on the matter, or did I miss something?

In the future I will do that. I didn't receive a response after a couple weeks, so I guessed that maybe the thread had slipped through the cracks.

Shall I continue discussion on the original thread or here?

Thanks,

Joseph



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [NonGNU ELPA] New package: hyperdrive (repast)
  2023-08-26 19:19   ` Joseph Turner
@ 2023-08-26 20:27     ` Philip Kaludercic
  2023-08-29  4:04       ` Joseph Turner
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2023-08-26 20:27 UTC (permalink / raw)
  To: Joseph Turner
  Cc: Emacs Devel Mailing List, Adam Porter, Paula Maas,
	Protesilaos Stavrou

Joseph Turner <joseph@ushin.org> writes:

> On August 26, 2023 4:55:56 AM PDT, Philip Kaludercic <philipk@posteo.net> wrote:
>>It would usually be better to just ping the previous thread, in case
>>the discussion died down to quickly.  From the archives, it seems there
>>was no further discussion on the matter, or did I miss something?
>
> In the future I will do that. I didn't receive a response after a couple weeks, so I guessed that maybe the thread had slipped through the cracks.

That was certainly the case for me.

> Shall I continue discussion on the original thread or here?

Either is fine.  My main difficulty is understanding what Hyperdrive
is...  The second issue I have is that there is quite a lot of code, and
I'd like to take a look at everything before I add anything.

> Thanks,
>
> Joseph



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [NonGNU ELPA] New package: hyperdrive (repast)
  2023-08-26 20:27     ` [NonGNU ELPA] New package: hyperdrive (repast) Philip Kaludercic
@ 2023-08-29  4:04       ` Joseph Turner
  2023-08-29 11:56         ` Philip Kaludercic
  0 siblings, 1 reply; 8+ messages in thread
From: Joseph Turner @ 2023-08-29  4:04 UTC (permalink / raw)
  To: Philip Kaludercic
  Cc: Emacs Devel Mailing List, Adam Porter, Paula Maas,
	Protesilaos Stavrou

> My main difficulty is understanding what Hyperdrive is...

Hyperdrive is a p2p file-sharing tool (like Dropbox, but FLOSS and with
no third-party intermediary; like Bittorrent, but mutable and versioned;
like IPFS, but without CIDs and faster for mutable data).

User story: Alice creates a new hyperdrive and adds some files. Her
computer returns a public key URL that uniquely identies the hyperdrive.
Alice shares that URL with Bob, who can then download Alice's files
directly from Alice's computer (no third-party servers are required to
route the connection - they find each other using a DHT or using mDNS if
they're on the same LAN). Bob can download some of Alice's without
having to load her whole drive.

Data is distributed on the network; once Bob has loaded Alice's files,
Carol can get them from Bob even when Alice is offline. Drives are
mutable; When Alice adds/removes/changes files in the drive, Bob can
refresh her drive on his machine to get the latest changes. Drives are
versioned; anyone with the URL can "check out" prior versions of Alice's
drive to see what her files used to look like.

There's more info in the manual, especially in the Concepts section:

https://ushin.org/hyperdrive/hyperdrive-manual.html#Concepts

There's also this talk at LibrePlanet 2023. Comparison of peer-to-peer
protocols starts @36:49:

https://media.libreplanet.org/u/libreplanet/m/emacs-for-p2p-deliberation/

> The second issue I have is that there is quite a lot of code, and
> I'd like to take a look at everything before I add anything.

Take your time. I'm happy to get on a videocall to go through the code
together with you.

Thank you!

Joseph



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [NonGNU ELPA] New package: hyperdrive (repast)
  2023-08-29  4:04       ` Joseph Turner
@ 2023-08-29 11:56         ` Philip Kaludercic
  2023-09-03  8:18           ` Philip Kaludercic
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2023-08-29 11:56 UTC (permalink / raw)
  To: Joseph Turner
  Cc: Emacs Devel Mailing List, Adam Porter, Paula Maas,
	Protesilaos Stavrou

Joseph Turner <joseph@ushin.org> writes:

>> My main difficulty is understanding what Hyperdrive is...
>
> Hyperdrive is a p2p file-sharing tool (like Dropbox, but FLOSS and with
> no third-party intermediary; like Bittorrent, but mutable and versioned;
> like IPFS, but without CIDs and faster for mutable data).
>
> User story: Alice creates a new hyperdrive and adds some files. Her
> computer returns a public key URL that uniquely identies the hyperdrive.
> Alice shares that URL with Bob, who can then download Alice's files
> directly from Alice's computer (no third-party servers are required to
> route the connection - they find each other using a DHT or using mDNS if
> they're on the same LAN). Bob can download some of Alice's without
> having to load her whole drive.
>
> Data is distributed on the network; once Bob has loaded Alice's files,
> Carol can get them from Bob even when Alice is offline. Drives are
> mutable; When Alice adds/removes/changes files in the drive, Bob can
> refresh her drive on his machine to get the latest changes. Drives are
> versioned; anyone with the URL can "check out" prior versions of Alice's
> drive to see what her files used to look like.
>
> There's more info in the manual, especially in the Concepts section:
>
> https://ushin.org/hyperdrive/hyperdrive-manual.html#Concepts
>
> There's also this talk at LibrePlanet 2023. Comparison of peer-to-peer
> protocols starts @36:49:
>
> https://media.libreplanet.org/u/libreplanet/m/emacs-for-p2p-deliberation/

Thanks!

>> The second issue I have is that there is quite a lot of code, and
>> I'd like to take a look at everything before I add anything.
>
> Take your time. I'm happy to get on a videocall to go through the code
> together with you.

That is not necessary, I'll understand what is going on, the issue is
just finding the time to at least skim through everything once.

> Thank you!
>
> Joseph



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [NonGNU ELPA] New package: hyperdrive (repast)
  2023-08-29 11:56         ` Philip Kaludercic
@ 2023-09-03  8:18           ` Philip Kaludercic
  2023-09-03 17:47             ` Joseph Turner
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2023-09-03  8:18 UTC (permalink / raw)
  To: Joseph Turner
  Cc: Emacs Devel Mailing List, Adam Porter, Paula Maas,
	Protesilaos Stavrou

[-- Attachment #1: Type: text/plain, Size: 2191 bytes --]

Philip Kaludercic <philipk@posteo.net> writes:

> Joseph Turner <joseph@ushin.org> writes:
>
>>> My main difficulty is understanding what Hyperdrive is...
>>
>> Hyperdrive is a p2p file-sharing tool (like Dropbox, but FLOSS and with
>> no third-party intermediary; like Bittorrent, but mutable and versioned;
>> like IPFS, but without CIDs and faster for mutable data).
>>
>> User story: Alice creates a new hyperdrive and adds some files. Her
>> computer returns a public key URL that uniquely identies the hyperdrive.
>> Alice shares that URL with Bob, who can then download Alice's files
>> directly from Alice's computer (no third-party servers are required to
>> route the connection - they find each other using a DHT or using mDNS if
>> they're on the same LAN). Bob can download some of Alice's without
>> having to load her whole drive.
>>
>> Data is distributed on the network; once Bob has loaded Alice's files,
>> Carol can get them from Bob even when Alice is offline. Drives are
>> mutable; When Alice adds/removes/changes files in the drive, Bob can
>> refresh her drive on his machine to get the latest changes. Drives are
>> versioned; anyone with the URL can "check out" prior versions of Alice's
>> drive to see what her files used to look like.
>>
>> There's more info in the manual, especially in the Concepts section:
>>
>> https://ushin.org/hyperdrive/hyperdrive-manual.html#Concepts
>>
>> There's also this talk at LibrePlanet 2023. Comparison of peer-to-peer
>> protocols starts @36:49:
>>
>> https://media.libreplanet.org/u/libreplanet/m/emacs-for-p2p-deliberation/
>
> Thanks!
>
>>> The second issue I have is that there is quite a lot of code, and
>>> I'd like to take a look at everything before I add anything.
>>
>> Take your time. I'm happy to get on a videocall to go through the code
>> together with you.
>
> That is not necessary, I'll understand what is going on, the issue is
> just finding the time to at least skim through everything once.
>
>> Thank you!
>>
>> Joseph

Done.  Overall it looks fine, and I'll add the
package to NonGNU ELPA, it would be nice if you could take a look and
consider addressing the changes I propose and comments I made:


[-- Attachment #2: Type: text/plain, Size: 7212 bytes --]

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 43ca32e3cb..d77b3d1e3c 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1034,6 +1034,8 @@ Affected by option `hyperdrive-reuse-buffers', which see."
   "Call `message' with MESSAGE and ARGS, prefixing MESSAGE with \"Hyperdrive:\"."
   (apply #'message (concat "Hyperdrive: " message) args))
 
+;; Might be nice to use `define-error' for `condition-case' to detect
+;; this as a specific error type?
 (defun hyperdrive-error (string &rest args)
   "Call `error' with STRING and ARGS, prefixing STRING with \"Hyperdrive:\"."
   (apply #'error (concat "Hyperdrive: " string) args))
@@ -1099,6 +1101,8 @@ When BASE is non-nil, PATH will be expanded against BASE instead."
 ;; of Emacs (going back to the version we declare support for), for
 ;; features that aren't present in `compat'.
 
+;; If there is anything you'd like to see in Compat, please mention it.
+
 (eval-and-compile
   (if (< emacs-major-version 29)
       (define-derived-mode hyperdrive-clean-mode fundamental-mode "Clean"
diff --git a/hyperdrive-mirror.el b/hyperdrive-mirror.el
index caa9e881b7..27113c5052 100644
--- a/hyperdrive-mirror.el
+++ b/hyperdrive-mirror.el
@@ -166,7 +166,7 @@ predicate and set NO-CONFIRM to t."
 ;;;; Mode
 
 (defvar-keymap hyperdrive-mirror-mode-map
-  :parent  tabulated-list-mode-map
+  :parent tabulated-list-mode-map
   :doc "Local keymap for `hyperdrive-mirror-mode' buffers."
   "C-c C-c"   #'hyperdrive-mirror-do-upload)
 
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index afc3cf6ef5..ba59e042d9 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -39,18 +39,15 @@
 (defcustom hyperdrive-storage-location
   (expand-file-name "~/.local/share/hyper-gateway-nodejs/")
   "Location to store Hypercore data."
-  :type '(file :must-match t)
-  :group 'hyperdrive)
+  :type '(file :must-match t))
 
 (defcustom hyperdrive-hyper-gateway-port 4973
   "Port on which to run the hyper-gateway server."
-  :type 'natnum
-  :group 'hyperdrive)
+  :type 'natnum)
 
 (defcustom hyperdrive-honor-auto-mode-alist t
   "If non-nil, use file extension of hyperdrive file to set `major-mode'."
-  :type 'boolean
-  :group 'hyperdrive)
+  :type 'boolean)
 
 (defcustom hyperdrive-persist-location nil
   "Location where `persist' will store data.
@@ -58,19 +55,18 @@
 - `hyperdrive-hyperdrives'
 - `hyperdrive-version-ranges'"
   :type '(choice (const :tag "Use default persist location" nil)
-                 (file :tag "Custom location"))
-  :group 'hyperdrive)
-
-(defcustom hyperdrive-download-directory (expand-file-name
-                                          (if (bound-and-true-p eww-download-directory)
-                                              (if (stringp eww-download-directory)
-                                                  eww-download-directory
-                                                (funcall eww-download-directory))
-                                            "~/"))
+                 (file :tag "Custom location")))
+
+(defcustom hyperdrive-download-directory
+  (expand-file-name
+   (if (bound-and-true-p eww-download-directory)
+       (if (stringp eww-download-directory)
+           eww-download-directory
+         (funcall eww-download-directory))
+     "~/"))
   "Location where `hyperdrive-download-url' will download files.
 Defaults to `eww-download-directory'."
-  :type '(file :must-match t)
-  :group 'hyperdrive)
+  :type '(file :must-match t))
 
 (defvar hyperdrive-timestamp-format-string)
 (defcustom hyperdrive-timestamp-format "%x %X"
@@ -78,20 +74,20 @@ Defaults to `eww-download-directory'."
 Passed to `format-time-string', which see."
   :type 'string
   :set (lambda (option value)
-         (set option value)
+         (set-default option value)
          (setf hyperdrive-timestamp-format-string
                (format "%%%ds"
                        ;; FIXME: This value varies based on current
                        ;;        time. (format-time-string "%-I") will
                        ;;        be one or two characters long
                        ;;        depending on the time of day
-                       (string-width (format-time-string value)))))
-  :group 'hyperdrive)
+                       (string-width (format-time-string value))))))
 
 (defcustom hyperdrive-directory-display-buffer-action
   '(display-buffer-same-window)
   "Display buffer action for hyperdrive directories.
 Passed to `display-buffer', which see."
+  ;; Perhaps use `display-buffer--action-custom-type'?
   :type '(choice (const :tag "Same window" (display-buffer-same-window))
                  (const :tag "Pop up window" (display-buffer-pop-up-window))
                  (sexp :tag "Other"))
@@ -103,13 +99,11 @@ Passed to `display-buffer', which see."
 Passed to `display-buffer', which see."
   :type '(choice (const :tag "Same window" (display-buffer-same-window))
                  (const :tag "Pop up window" (display-buffer-pop-up-window))
-                 (sexp :tag "Other"))
-  :group 'hyperdrive)
+                 (sexp :tag "Other")))
 
-(defcustom hyperdrive-column-headers 't
+(defcustom hyperdrive-column-headers t
   "Display column headers in `hyperdrive-dir' and `hyperdrive-history' buffers."
-  :type 'boolean
-  :group 'hyperdrive)
+  :type 'boolean)
 
 (defcustom hyperdrive-default-host-format
   '(petname nickname domain seed short-key public-key)
@@ -125,8 +119,7 @@ used."
                   (const :tag "DNSLink domain" domain)
                   (const :tag "Seed" seed)
                   (const :tag "Shortened public key" short-key)
-                  (const :tag "Full public key" public-key)))
-  :group 'hyperdrive)
+                  (const :tag "Full public key" public-key))))
 
 (defcustom hyperdrive-stream-player-command "mpv --force-window=immediate %s"
   "Command used to play streamable URLs externally.
@@ -135,19 +128,17 @@ quoted, because the arguments are passed directly rather than
 through a shell)."
   :type '(choice (const :tag "MPV" "mpv --force-window=immediate %s")
                  (const :tag "VLC" "vlc %s")
-                 (string :tag "Other command"))
-  :group 'hyperdrive)
+                 (string :tag "Other command")))
 
 (defcustom hyperdrive-queue-size 2
   "Default size of request queues."
   ;; TODO: Use this elsewhere also.
-  :type 'integer
-  :group 'hyperdrive)
+  :type 'integer)			;natnum?
+
 
 (defcustom hyperdrive-render-html t
   "Render HTML hyperdrive files with EWW."
-  :type 'boolean
-  :group 'hyperdrive)
+  :type 'boolean)
 
 (defcustom hyperdrive-reuse-buffers 'any-version
   "How to reuse buffers when showing entries.
diff --git a/hyperdrive.el b/hyperdrive.el
index f3024417ae..c94da62fb0 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -2,9 +2,9 @@
 
 ;; Copyright (C) 2022 Joseph Turner <joseph@ushin.org>
 
-;; Author: Joseph Turner
+;; Author: Joseph Turner <joseph@ushin.org>
 ;; Author: Adam Porter <adam@alphapapa.net>
-;; Maintainer: Joseph Turner <joseph@ushin.org>
+;; Maintainer: Joseph Turner <~ushin/ushin@lists.sr.ht>
 ;; Created: 2022
 ;; Version: 0.2-pre
 ;; Package-Requires: ((emacs "27.1") (map "3.0") (compat "29.1.4.0") (plz "0.7") (persist "0.5"))

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [NonGNU ELPA] New package: hyperdrive (repast)
  2023-09-03  8:18           ` Philip Kaludercic
@ 2023-09-03 17:47             ` Joseph Turner
  0 siblings, 0 replies; 8+ messages in thread
From: Joseph Turner @ 2023-09-03 17:47 UTC (permalink / raw)
  To: Philip Kaludercic
  Cc: Emacs Devel Mailing List, Adam Porter, Paula Maas,
	Protesilaos Stavrou


Philip Kaludercic <philipk@posteo.net> writes:

> Done.  Overall it looks fine, and I'll add the
> package to NonGNU ELPA, it would be nice if you could take a look and
> consider addressing the changes I propose and comments I made:

Thank you for the approval and especially for your code review!!

> diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
> index 43ca32e3cb..d77b3d1e3c 100644
> --- a/hyperdrive-lib.el
> +++ b/hyperdrive-lib.el
> @@ -1034,6 +1034,8 @@ Affected by option `hyperdrive-reuse-buffers', which see."
>    "Call `message' with MESSAGE and ARGS, prefixing MESSAGE with \"Hyperdrive:\"."
>    (apply #'message (concat "Hyperdrive: " message) args))
>
> +;; Might be nice to use `define-error' for `condition-case' to detect
> +;; this as a specific error type?

I made this change in a separate branch for Adam and I to consider together.

>  (defun hyperdrive-error (string &rest args)
>    "Call `error' with STRING and ARGS, prefixing STRING with \"Hyperdrive:\"."
>    (apply #'error (concat "Hyperdrive: " string) args))
> @@ -1099,6 +1101,8 @@ When BASE is non-nil, PATH will be expanded against BASE instead."
>  ;; of Emacs (going back to the version we declare support for), for
>  ;; features that aren't present in `compat'.
>
> +;; If there is anything you'd like to see in Compat, please mention it.
> +

See <https://github.com/emacs-compat/compat/issues/27>.

>  (eval-and-compile
>    (if (< emacs-major-version 29)
>        (define-derived-mode hyperdrive-clean-mode fundamental-mode "Clean"
> diff --git a/hyperdrive-mirror.el b/hyperdrive-mirror.el
> index caa9e881b7..27113c5052 100644
> --- a/hyperdrive-mirror.el
> +++ b/hyperdrive-mirror.el
> @@ -166,7 +166,7 @@ predicate and set NO-CONFIRM to t."
>  ;;;; Mode
>
>  (defvar-keymap hyperdrive-mirror-mode-map
> -  :parent  tabulated-list-mode-map
> +  :parent tabulated-list-mode-map
>    :doc "Local keymap for `hyperdrive-mirror-mode' buffers."
>    "C-c C-c"   #'hyperdrive-mirror-do-upload)
>
> diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
> index afc3cf6ef5..ba59e042d9 100644
> --- a/hyperdrive-vars.el
> +++ b/hyperdrive-vars.el
> @@ -39,18 +39,15 @@
>  (defcustom hyperdrive-storage-location
>    (expand-file-name "~/.local/share/hyper-gateway-nodejs/")
>    "Location to store Hypercore data."
> -  :type '(file :must-match t)
> -  :group 'hyperdrive)
> +  :type '(file :must-match t))
>
>  (defcustom hyperdrive-hyper-gateway-port 4973
>    "Port on which to run the hyper-gateway server."
> -  :type 'natnum
> -  :group 'hyperdrive)
> +  :type 'natnum)
>
>  (defcustom hyperdrive-honor-auto-mode-alist t
>    "If non-nil, use file extension of hyperdrive file to set `major-mode'."
> -  :type 'boolean
> -  :group 'hyperdrive)
> +  :type 'boolean)
>
>  (defcustom hyperdrive-persist-location nil
>    "Location where `persist' will store data.
> @@ -58,19 +55,18 @@
>  - `hyperdrive-hyperdrives'
>  - `hyperdrive-version-ranges'"
>    :type '(choice (const :tag "Use default persist location" nil)
> -                 (file :tag "Custom location"))
> -  :group 'hyperdrive)
> -
> -(defcustom hyperdrive-download-directory (expand-file-name
> -                                          (if (bound-and-true-p eww-download-directory)
> -                                              (if (stringp eww-download-directory)
> -                                                  eww-download-directory
> -                                                (funcall eww-download-directory))
> -                                            "~/"))
> +                 (file :tag "Custom location")))
> +
> +(defcustom hyperdrive-download-directory
> +  (expand-file-name
> +   (if (bound-and-true-p eww-download-directory)
> +       (if (stringp eww-download-directory)
> +           eww-download-directory
> +         (funcall eww-download-directory))
> +     "~/"))
>    "Location where `hyperdrive-download-url' will download files.
>  Defaults to `eww-download-directory'."
> -  :type '(file :must-match t)
> -  :group 'hyperdrive)
> +  :type '(file :must-match t))
>
>  (defvar hyperdrive-timestamp-format-string)
>  (defcustom hyperdrive-timestamp-format "%x %X"
> @@ -78,20 +74,20 @@ Defaults to `eww-download-directory'."
>  Passed to `format-time-string', which see."
>    :type 'string
>    :set (lambda (option value)
> -         (set option value)
> +         (set-default option value)
>           (setf hyperdrive-timestamp-format-string
>                 (format "%%%ds"
>                         ;; FIXME: This value varies based on current
>                         ;;        time. (format-time-string "%-I") will
>                         ;;        be one or two characters long
>                         ;;        depending on the time of day
> -                       (string-width (format-time-string value)))))
> -  :group 'hyperdrive)
> +                       (string-width (format-time-string value))))))
>
>  (defcustom hyperdrive-directory-display-buffer-action
>    '(display-buffer-same-window)
>    "Display buffer action for hyperdrive directories.
>  Passed to `display-buffer', which see."
> +  ;; Perhaps use `display-buffer--action-custom-type'?
>    :type '(choice (const :tag "Same window" (display-buffer-same-window))
>                   (const :tag "Pop up window" (display-buffer-pop-up-window))
>                   (sexp :tag "Other"))
> @@ -103,13 +99,11 @@ Passed to `display-buffer', which see."
>  Passed to `display-buffer', which see."
>    :type '(choice (const :tag "Same window" (display-buffer-same-window))
>                   (const :tag "Pop up window" (display-buffer-pop-up-window))
> -                 (sexp :tag "Other"))
> -  :group 'hyperdrive)
> +                 (sexp :tag "Other")))
>
> -(defcustom hyperdrive-column-headers 't
> +(defcustom hyperdrive-column-headers t
>    "Display column headers in `hyperdrive-dir' and `hyperdrive-history' buffers."
> -  :type 'boolean
> -  :group 'hyperdrive)
> +  :type 'boolean)
>
>  (defcustom hyperdrive-default-host-format
>    '(petname nickname domain seed short-key public-key)
> @@ -125,8 +119,7 @@ used."
>                    (const :tag "DNSLink domain" domain)
>                    (const :tag "Seed" seed)
>                    (const :tag "Shortened public key" short-key)
> -                  (const :tag "Full public key" public-key)))
> -  :group 'hyperdrive)
> +                  (const :tag "Full public key" public-key))))
>
>  (defcustom hyperdrive-stream-player-command "mpv --force-window=immediate %s"
>    "Command used to play streamable URLs externally.
> @@ -135,19 +128,17 @@ quoted, because the arguments are passed directly rather than
>  through a shell)."
>    :type '(choice (const :tag "MPV" "mpv --force-window=immediate %s")
>                   (const :tag "VLC" "vlc %s")
> -                 (string :tag "Other command"))
> -  :group 'hyperdrive)
> +                 (string :tag "Other command")))
>
>  (defcustom hyperdrive-queue-size 2
>    "Default size of request queues."
>    ;; TODO: Use this elsewhere also.
> -  :type 'integer
> -  :group 'hyperdrive)
> +  :type 'integer)			;natnum?
> +
>
>  (defcustom hyperdrive-render-html t
>    "Render HTML hyperdrive files with EWW."
> -  :type 'boolean
> -  :group 'hyperdrive)
> +  :type 'boolean)
>
>  (defcustom hyperdrive-reuse-buffers 'any-version
>    "How to reuse buffers when showing entries.
> diff --git a/hyperdrive.el b/hyperdrive.el
> index f3024417ae..c94da62fb0 100644
> --- a/hyperdrive.el
> +++ b/hyperdrive.el
> @@ -2,9 +2,9 @@
>
>  ;; Copyright (C) 2022 Joseph Turner <joseph@ushin.org>
>
> -;; Author: Joseph Turner
> +;; Author: Joseph Turner <joseph@ushin.org>
>  ;; Author: Adam Porter <adam@alphapapa.net>
> -;; Maintainer: Joseph Turner <joseph@ushin.org>
> +;; Maintainer: Joseph Turner <~ushin/ushin@lists.sr.ht>
>  ;; Created: 2022
>  ;; Version: 0.2-pre
>  ;; Package-Requires: ((emacs "27.1") (map "3.0") (compat "29.1.4.0") (plz "0.7") (persist "0.5"))

I committed these remaining changes to master and attributed authorship
to you.

Thank you!!

Joseph



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-09-03 17:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-26  6:56 [NonGNU ELPA] New package: hyperdrive (repost) Joseph Turner
2023-08-26 11:55 ` Philip Kaludercic
2023-08-26 19:19   ` Joseph Turner
2023-08-26 20:27     ` [NonGNU ELPA] New package: hyperdrive (repast) Philip Kaludercic
2023-08-29  4:04       ` Joseph Turner
2023-08-29 11:56         ` Philip Kaludercic
2023-09-03  8:18           ` Philip Kaludercic
2023-09-03 17:47             ` Joseph Turner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).