From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joseph Turner Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] New package: hyperdrive (repast) Date: Sun, 03 Sep 2023 10:47:20 -0700 Message-ID: <87il8rno2k.fsf@ushin.org> References: <87bkeucmu8.fsf@ushin.org> <87msyeow4z.fsf@posteo.net> <874jklk0rf.fsf_-_@posteo.net> <87jzte32as.fsf@ushin.org> <87ttsikqog.fsf@posteo.net> <8734zv4qm1.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8915"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel Mailing List , Adam Porter , Paula Maas , Protesilaos Stavrou To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 03 20:22:22 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qcrjp-00024Q-JQ for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Sep 2023 20:22:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcrj1-0007im-FH; Sun, 03 Sep 2023 14:21:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qcrFH-0004hn-99 for emacs-devel@gnu.org; Sun, 03 Sep 2023 13:50:47 -0400 Original-Received: from out-218.mta0.migadu.com ([2001:41d0:1004:224b::da]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qcrFD-0004K4-1A for emacs-devel@gnu.org; Sun, 03 Sep 2023 13:50:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ushin.org; s=key1; t=1693763433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Cc8zr3UK1q3YVkREE+mi8rdLvoS3fzbN+lZkGbkjNfM=; b=WllLyJtNDxWhXjrv1icLuUkDbh9ufBisk91c/+qQ2GrL8WVFnn54grVS7PF/PPTBBCLqL7 rl7HaEnhDCiA54jBCSNy7/oMc1Tt4peYkWlbU4BVQvPX7BehFFQnZOE9s6khHOhYonS7YV ANtgrhuMf7cO4oBz8pSalfS8JBqlUTbcbcIehEs7WQzyhE5UGHKVhTA1IO/qxYRAto/cGr PD+80qMzoACcfK7TtLGO/YWtnuhCgt/09OhOFVPr4OKMM087MAqzsl/ZWFUHO9mZdUBH8W KzdPBzh3IdTaPUd6aoXf0fqNBBRGzF/LNpVR8BFLC1mlY3QlMonu0AQVN3yWiw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <8734zv4qm1.fsf@posteo.net> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:1004:224b::da; envelope-from=joseph@ushin.org; helo=out-218.mta0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 03 Sep 2023 14:21:29 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310016 Archived-At: Philip Kaludercic 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 . > (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 > > -;; Author: Joseph Turner > +;; Author: Joseph Turner > ;; Author: Adam Porter > -;; Maintainer: Joseph Turner > +;; 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