[elpa] externals/denote f3b2f78dd0 16/19: Tweak how we deal with thing-at-point-provider-alist in denote-fontify-links-mode

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit f3b2f78dd05d89c921453e6b157a5b07620309a5
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Tweak how we deal with thing-at-point-provider-alist in 
denote-fontify-links-mode
---
 denote.el | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/denote.el b/denote.el
index 47bd53176c..5b556cbd50 100644
--- a/denote.el
+++ b/denote.el
@@ -4298,15 +4298,14 @@ To be used as a `thing-at' provider."
 (if denote-fontify-links-mode
 (progn
   (font-lock-add-keywords nil '(denote-fontify-links))
-  (make-local-variable 'thing-at-point-provider-alist)
-  (add-to-list 'thing-at-point-provider-alist
-   '(url . denote--get-link-file-path-at-point)))
+  (setq-local thing-at-point-provider-alist
+  (append thing-at-point-provider-alist
+  '((url . denote--get-link-file-path-at-point)
   (font-lock-remove-keywords nil '(denote-fontify-links))
-  (set 'thing-at-point-provider-alist
-   (cl-remove
-'(url . denote--get-link-file-path-at-point)
-(symbol-value 'thing-at-point-provider-alist)
-:test 'equal)))
+  (setq-local thing-at-point-provider-alist
+  (delete
+   '((url . denote--get-link-file-path-at-point))
+   thing-at-point-provider-alist)))
 (font-lock-update)))
 
 ; Backlinks' buffer



[elpa] externals/denote 487692d3af 08/19: Placate the compiler for the denote-fontify-links docstring

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 487692d3af6e7e7f060911adc9c4918d7ac887a0
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Placate the compiler for the denote-fontify-links docstring

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.
---
 denote.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/denote.el b/denote.el
index fe099f1dd1..043e7f6402 100644
--- a/denote.el
+++ b/denote.el
@@ -4231,9 +4231,9 @@ file's title.  This has the same meaning as in 
`denote-link'."
 (error "Cannot resolve the link at point")))
 
 (defun denote-fontify-links (&optional limit)
-  "Fontify denote links.
+  "Fontify Denote links up until optional LIMIT.
 
-Implementation based on `org-activate-links'"
+Implementation based on the function `org-activate-links'."
   (catch :exit
 (when-let (type (denote-filetype-heuristics (buffer-file-name)))
   (while (re-search-forward



[elpa] externals/denote efe29e6108 19/19: Remove faulty extra parentheses from a 'delete' in denote-fontify-links-mode

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit efe29e6108e5485df7137cfd478b70409a42d79d
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Remove faulty extra parentheses from a 'delete' in denote-fontify-links-mode
---
 denote.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index f8e6c7732c..a63b158dad 100644
--- a/denote.el
+++ b/denote.el
@@ -4284,7 +4284,7 @@ To be used as a `thing-at' provider."
   (font-lock-remove-keywords nil '(denote-fontify-links))
   (setq-local thing-at-point-provider-alist
   (delete
-   '((url . denote--get-link-file-path-at-point))
+   '(url . denote--get-link-file-path-at-point)
thing-at-point-provider-alist)))
 (font-lock-update)))
 



[elpa] externals/denote 5dcbf34fea 12/19: Make denote-fontify-links-mode not do anything in Org mode

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 5dcbf34feac371071687c0c99179cce122cb0f68
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make denote-fontify-links-mode not do anything in Org mode

We do not need it because Org fontifies 'denote:' links natively.

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.
---
 denote.el | 29 +++--
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/denote.el b/denote.el
index ac9dc67b90..129f651457 100644
--- a/denote.el
+++ b/denote.el
@@ -4290,20 +4290,21 @@ To be used as a `thing-at' provider."
   :init-value nil
   :global nil
   :group 'denote
-  (require 'thingatpt)
-  (if denote-fontify-links-mode
-  (progn
-(font-lock-add-keywords nil '(denote-fontify-links))
-(make-local-variable 'thing-at-point-provider-alist)
-(add-to-list 'thing-at-point-provider-alist
- '(url . denote--get-link-file-path-at-point)))
-(font-lock-remove-keywords nil '(denote-fontify-links))
-(set 'thing-at-point-provider-alist
- (cl-remove
-  '(url . denote--get-link-file-path-at-point)
-  (symbol-value 'thing-at-point-provider-alist)
-  :test 'equal)))
-  (font-lock-update))
+  (unless (derived-mode-p 'org-mode)
+(require 'thingatpt)
+(if denote-fontify-links-mode
+(progn
+  (font-lock-add-keywords nil '(denote-fontify-links))
+  (make-local-variable 'thing-at-point-provider-alist)
+  (add-to-list 'thing-at-point-provider-alist
+   '(url . denote--get-link-file-path-at-point)))
+  (font-lock-remove-keywords nil '(denote-fontify-links))
+  (set 'thing-at-point-provider-alist
+   (cl-remove
+'(url . denote--get-link-file-path-at-point)
+(symbol-value 'thing-at-point-provider-alist)
+:test 'equal)))
+(font-lock-update)))
 
 ; Backlinks' buffer
 



[elpa] externals/denote c10e33a01e 07/19: Make denote-link-open-at-mouse return an error if link is not resolved

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit c10e33a01ec3e758144eecfc243202e0e7608216
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make denote-link-open-at-mouse return an error if link is not resolved
---
 denote.el | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/denote.el b/denote.el
index eb8c4fdabc..fe099f1dd1 100644
--- a/denote.el
+++ b/denote.el
@@ -4222,11 +4222,13 @@ file's title.  This has the same meaning as in 
`denote-link'."
   "Keymap for mouse actions over fontified Denote links.")
 
 (defun denote-link-open-at-mouse (ev)
-  "Open denote link after mouse click."
+  "Open Denote link for mouse EV click."
   (interactive "e")
   (mouse-set-point ev)
-  (when-let ((id (get-text-property (point) 'denote-link-id)))
-(funcall denote-link-button-action (denote-get-path-by-id id
+  (if-let ((id (get-text-property (point) 'denote-link-id))
+   (path (denote-get-path-by-id id)))
+  (funcall denote-link-button-action path)
+(error "Cannot resolve the link at point")))
 
 (defun denote-fontify-links (&optional limit)
   "Fontify denote links.



[elpa] externals/denote 2b06213c3e 05/19: Rename the denote-link-mouse-map and make minor tweaks to it

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 2b06213c3e209e034960c5754d384955de48d18a
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Rename the denote-link-mouse-map and make minor tweaks to it

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.
---
 denote.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/denote.el b/denote.el
index 8d2f809c0c..0fc8172986 100644
--- a/denote.el
+++ b/denote.el
@@ -4243,13 +4243,13 @@ To be assigned to `markdown-follow-link-functions'."
   '(add-hook 'markdown-follow-link-functions #'denote-link-markdown-follow))
 
 ; Link fontification
-(defvar denote-link-keymap
+(defvar denote-link-mouse-map
   (let ((map (make-sparse-keymap)))
 (define-key map [mouse-2] #'denote-link-open-at-mouse)
 (define-key map [mouse-3] #'denote-link-open-at-mouse)
-(define-key map [follow-link] #'mouse-face)
+(define-key map [follow-link] 'mouse-face)
 map)
-  "Keymap used in fontified denote links")
+  "Keymap for mouse actions over fontified Denote links.")
 
 (defun denote-link-open-at-mouse (ev)
   "Open denote link after mouse click."
@@ -4280,7 +4280,7 @@ Implementation based on `org-activate-links'"
   (memq 'font-lock-comment-face face)
(eq 'font-lock-comment-face face)))
   (let* ((properties `(mouse-face highlight
- keymap ,denote-link-keymap
+  keymap ,denote-link-mouse-map
   denote-link-id ,id
   help-echo ,(concat "denote:" id)
  htmlize-link (:uri ,link)



[elpa] externals/denote bb380643f0 03/19: Remove now superfluous 'let' from 'denote-link'

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit bb380643f02f640924503c4f81db9a2ff0717c93
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Remove now superfluous 'let' from 'denote-link'

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.
---
 denote.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/denote.el b/denote.el
index 62d96e8ec9..8d2f809c0c 100644
--- a/denote.el
+++ b/denote.el
@@ -3948,9 +3948,8 @@ Also see `denote-link-with-signature'."
 (user-error "The current file type is not recognized by Denote"))
   (unless (file-exists-p file)
 (user-error "The linked file does not exist"))
-  (let ((beg (point)))
-(denote--delete-active-region-content)
-(insert (denote-format-link file description file-type id-only
+  (denote--delete-active-region-content)
+  (insert (denote-format-link file description file-type id-only)))
 
 (define-obsolete-function-alias
   'denote-link-insert-link



[elpa] externals/denote 5aeb714ae9 11/19: Change how denote-fontify-links-mode handles thingatpt dependency

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 5aeb714ae90cf05cc50b5968384401bd8d2c2a53
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Change how denote-fontify-links-mode handles thingatpt dependency

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.
---
 denote.el | 25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/denote.el b/denote.el
index ed8990434d..ac9dc67b90 100644
--- a/denote.el
+++ b/denote.el
@@ -4283,23 +4283,26 @@ To be used as a `thing-at' provider."
   (when-let (id (get-text-property (point) 'denote-link-id))
 (concat "file:" (denote-get-path-by-id id
 
+(defvar thing-at-point-provider-alist)
+
 (define-minor-mode denote-fontify-links-mode
-  "A minor mode to fontify and fold denote links."
+  "A minor mode to fontify and fold Denote links."
   :init-value nil
+  :global nil
   :group 'denote
+  (require 'thingatpt)
   (if denote-fontify-links-mode
-  (progn (font-lock-add-keywords nil '(denote-fontify-links))
- (with-eval-after-load 'thingatpt
-   (make-local-variable 'thing-at-point-provider-alist)
-   (add-to-list 'thing-at-point-provider-alist
+  (progn
+(font-lock-add-keywords nil '(denote-fontify-links))
+(make-local-variable 'thing-at-point-provider-alist)
+(add-to-list 'thing-at-point-provider-alist
  '(url . denote--get-link-file-path-at-point)))
 (font-lock-remove-keywords nil '(denote-fontify-links))
-(with-eval-after-load 'thingatpt
-  (set 'thing-at-point-provider-alist
-   (cl-remove
-'(url . denote--get-link-url-at-point)
-(symbol-value 'thing-at-point-provider-alist)
-:test 'equal
+(set 'thing-at-point-provider-alist
+ (cl-remove
+  '(url . denote--get-link-file-path-at-point)
+  (symbol-value 'thing-at-point-provider-alist)
+  :test 'equal)))
   (font-lock-update))
 
 ; Backlinks' buffer



[elpa] externals/denote 4d1245223c 01/19: Implemented a fontification method for displaying links and removed buttons

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 4d1245223c726ef4e740a10a619e264e1ffa20bd
Author: Al Haji-Ali 
Commit: Protesilaos Stavrou 

Implemented a fontification method for displaying links and removed buttons
---
 denote.el | 101 +++---
 1 file changed, 91 insertions(+), 10 deletions(-)

diff --git a/denote.el b/denote.el
index 34db7b5eee..cd7965d7bb 100644
--- a/denote.el
+++ b/denote.el
@@ -3828,12 +3828,14 @@ argument.
 Also see `denote-id-only-link-in-context-regexp'.")
 
 (defvar denote-org-link-in-context-regexp
-  (concat "\\[\\[" "denote:"  "\\(?1:" denote-id-regexp "\\)" "]" "\\[.*?]]")
+  (concat "\\[\\[" "denote:"  "\\(?1:" denote-id-regexp "\\)" "]" "\\["
+  "\\(?2:" ".*?" "\\)" "]]")
   "Regexp to match an Org link in its context.
 The format of such links is `denote-org-link-format'.")
 
 (defvar denote-md-link-in-context-regexp
-  (concat "\\[.*?]" "(denote:"  "\\(?1:" denote-id-regexp "\\)" ")")
+  (concat "\\[" "\\(?2:" ".*?" "\\)" "]"
+  "(denote:"  "\\(?1:" denote-id-regexp "\\)" ")")
   "Regexp to match a Markdown link in its context.
 The format of such links is `denote-md-link-format'.")
 
@@ -3948,9 +3950,7 @@ Also see `denote-link-with-signature'."
 (user-error "The linked file does not exist"))
   (let ((beg (point)))
 (denote--delete-active-region-content)
-(insert (denote-format-link file description file-type id-only))
-(unless (derived-mode-p 'org-mode)
-  (make-button beg (point) 'type 'denote-link-button
+(insert (denote-format-link file description file-type id-only
 
 (define-obsolete-function-alias
   'denote-link-insert-link
@@ -4243,6 +4243,90 @@ To be assigned to `markdown-follow-link-functions'."
 (eval-after-load 'markdown-mode
   '(add-hook 'markdown-follow-link-functions #'denote-link-markdown-follow))
 
+; Link fontification
+(defvar denote-link-keymap
+  (let ((map (make-sparse-keymap)))
+(define-key map [mouse-2] #'denote-link-open-at-mouse)
+(define-key map [mouse-3] #'denote-link-open-at-mouse)
+(define-key map [follow-link] #'mouse-face)
+map)
+  "Keymap used in fontified denote links")
+
+(defun denote-link-open-at-mouse (ev)
+  "Open denote link after mouse click."
+  (interactive "e")
+  (mouse-set-point ev)
+  (when-let ((id (get-text-property (point) 'denote-link-id)))
+(funcall denote-link-button-action (denote-get-path-by-id id
+
+(defun denote-fontify-links (&optional limit)
+  "Fontify denote links.
+
+Implementation based on `org-activate-links'"
+  (catch :exit
+(when-let (type (denote-filetype-heuristics (buffer-file-name)))
+  (while (re-search-forward
+  (denote--link-in-context-regexp type)
+  limit t)
+(save-match-data  ;; to return the matches to font-lock
+  (let* ((start (match-beginning 0))
+(end (match-end 0))
+(visible-start (match-beginning 2))
+(visible-end (match-end 2))
+ (id (match-string-no-properties 1))
+ (link (concat "file:" (denote-get-path-by-id id
+   (unless (let ((face (get-text-property
+(max (1- start) (point-min)) 'face)))
+ (if (consp face)
+  (memq 'font-lock-comment-face face)
+   (eq 'font-lock-comment-face face)))
+  (let* ((properties `(mouse-face highlight
+ keymap ,denote-link-keymap
+  denote-link-id ,id
+  help-echo ,(concat "denote:" id)
+ htmlize-link (:uri ,link)
+ font-lock-multiline t))
+ (non-sticky-props
+  '(rear-nonsticky (mouse-face highlight keymap invisible
+   intangible help-echo
+   htmlize-link)))
+ (face-property 'link)
+ (hidden (append '(invisible t) properties)))
+(remove-text-properties start end '(invisible nil))
+(add-text-properties start visible-start hidden)
+(add-face-text-property start end face-property)
+   (add-text-properties visible-start visible-end properties)
+   (add-text-properties visible-end end hidden)
+(dolist (pos (list end visible-start visible-end))
+  (add-text-properties (1- pos) pos non-sticky-props)))
+  (throw :exit t)) ;signal success
+nil))
+
+(defun denote--get-link-url-at-point ()
+  "Return the denote link under point.
+To be used as a `thing-at' provider."
+  (when-let (id (get-text-property (point) 'denote-link-id))
+(concat "file:" (denote-get-path-by-id id

[elpa] externals/denote 0e1936b35c 09/19: Make several tweaks to denote-fontify-links

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 0e1936b35c141d1ca1c101bb8001cfc257ef92d7
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make several tweaks to denote-fontify-links

This includes stylistic changes, but also the inclusion of a more
informative help-echo, as well as the denote-faces-link.

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.
---
 denote.el | 44 
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/denote.el b/denote.el
index 043e7f6402..6cc4d204b1 100644
--- a/denote.el
+++ b/denote.el
@@ -4236,41 +4236,45 @@ file's title.  This has the same meaning as in 
`denote-link'."
 Implementation based on the function `org-activate-links'."
   (catch :exit
 (when-let (type (denote-filetype-heuristics (buffer-file-name)))
-  (while (re-search-forward
-  (denote--link-in-context-regexp type)
-  limit t)
-(save-match-data  ;; to return the matches to font-lock
+  (while (re-search-forward (denote--link-in-context-regexp type) limit t)
+(save-match-data  ; to return the matches to font-lock
   (let* ((start (match-beginning 0))
-(end (match-end 0))
-(visible-start (match-beginning 2))
-(visible-end (match-end 2))
+ (end (match-end 0))
+ (visible-start (match-beginning 2))
+ (visible-end (match-end 2))
  (id (match-string-no-properties 1))
- (link (concat "file:" (denote-get-path-by-id id
-   (unless (let ((face (get-text-property
-(max (1- start) (point-min)) 'face)))
- (if (consp face)
+ (path (denote-get-path-by-id id))
+ (file-link (concat "file:" path)))
+;; FIXME 2024-06-19: Rewrite this (unless...let...if...)
+;; because it is hard to reason about. But it works, so no
+;; pressure.
+(unless (let ((face (get-text-property
+ (max (1- start) (point-min)) 'face)))
+  (if (consp face)
   (memq 'font-lock-comment-face face)
-   (eq 'font-lock-comment-face face)))
-  (let* ((properties `(mouse-face highlight
+(eq 'font-lock-comment-face face)))
+  (let* ((properties `(face denote-faces-link
+   mouse-face highlight
   keymap ,denote-link-mouse-map
   denote-link-id ,id
-  help-echo ,(concat "denote:" id)
- htmlize-link (:uri ,link)
- font-lock-multiline t))
+  help-echo ,(or 
(denote-retrieve-title-or-filename path type)
+ (concat "denote:" 
id))
+  htmlize-link (:uri ,file-link)
+  font-lock-multiline t))
  (non-sticky-props
   '(rear-nonsticky (mouse-face highlight keymap invisible
intangible help-echo
htmlize-link)))
- (face-property 'link)
+ (face-property 'file-link)
  (hidden (append '(invisible t) properties)))
 (remove-text-properties start end '(invisible nil))
 (add-text-properties start visible-start hidden)
 (add-face-text-property start end face-property)
-   (add-text-properties visible-start visible-end properties)
-   (add-text-properties visible-end end hidden)
+(add-text-properties visible-start visible-end properties)
+(add-text-properties visible-end end hidden)
 (dolist (pos (list end visible-start visible-end))
   (add-text-properties (1- pos) pos non-sticky-props)))
-  (throw :exit t)) ;signal success
+  (throw :exit t))  ; signal success
 nil))
 
 (defun denote--get-link-url-at-point ()



[elpa] externals/denote updated (dd3755e690 -> efe29e6108)

2024-06-19 Thread ELPA Syncer
elpasync pushed a change to branch externals/denote.

  from  dd3755e690 Document how to make silos work for Org export
   new  4d1245223c Implemented a fontification method for displaying links 
and removed buttons
   new  7b1bd891ce Untabify and re-indent 
denote--rename-get-file-info-from-prompts-or-existing
   new  bb380643f0 Remove now superfluous 'let' from 'denote-link'
   new  15c0765951 Acknowledge Abdul-Lateef Haji-Ali for commit 4d12452
   new  2b06213c3e Rename the denote-link-mouse-map and make minor tweaks 
to it
   new  ca79f359ff Make obsolete methods for buttonizing links
   new  c10e33a01e Make denote-link-open-at-mouse return an error if link 
is not resolved
   new  487692d3af Placate the compiler for the denote-fontify-links 
docstring
   new  0e1936b35c Make several tweaks to denote-fontify-links
   new  d3d30a5adc Rename a private function for consistency and tweak its 
docstring
   new  5aeb714ae9 Change how denote-fontify-links-mode handles thingatpt 
dependency
   new  5dcbf34fea Make denote-fontify-links-mode not do anything in Org 
mode
   new  2b1210c527 Reinstate denote-link-markdown-follow
   new  17db2b Document 'denote-fontify-links-mode'
   new  7cdb31acee Make stylistic tweaks to denote-fontify-links
   new  f3b2f78dd0 Tweak how we deal with thing-at-point-provider-alist in 
denote-fontify-links-mode
   new  76098aaafc Remove obsolete code
   new  ce1f59af6a Add TODO and FIXME for new link fontification mode
   new  efe29e6108 Remove faulty extra parentheses from a 'delete' in 
denote-fontify-links-mode


Summary of changes:
 README.org |  90 +++--
 denote.el  | 224 -
 2 files changed, 186 insertions(+), 128 deletions(-)



[elpa] externals/denote 15c0765951 04/19: Acknowledge Abdul-Lateef Haji-Ali for commit 4d12452

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 15c07659517012556260ab6507641169271314aa
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Acknowledge Abdul-Lateef Haji-Ali for commit 4d12452

Abdul-Lateef has already assigned copyright to the Free Software
Foundation. The new feature was done in pull request 344:
.
---
 README.org | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/README.org b/README.org
index 978b6ef1dc..d7a97774dc 100644
--- a/README.org
+++ b/README.org
@@ -5547,17 +5547,17 @@ Denote is meant to be a collective effort.  Every bit 
of help matters.
 
 + Author/maintainer :: Protesilaos Stavrou.
 
-+ Contributions to code or the manual :: Abin Simon, Adam Růžička,
-  Alan Schmitt, Alexandre Rousseau, Ashton Wiersdorf, Benjamin
-  Kästner, Bruno Boal, Charanjit Singh, Clemens Radermacher, Colin
-  McLear, Damien Cassou, Eduardo Grajeda, Elias Storms, Eshel Yaron,
-  Florian, Glenna D., Graham Marlow, Hilde Rhyne, Ivan Sokolov, Jack
-  Baty, Jean-Charles Bagneris, Jean-Philippe Gagné Guay, Jianwei Hou,
-  Joseph Turner, Jürgen Hötzel, Kaushal Modi, Kai von Fintel, Kostas
-  Andreadis, Kristoffer Balintona, Kyle Meyer, Marc Fargas, Matthew
-  Lemon, Noboru Ota (nobiot), Norwid Behrnd, Peter Prevos, Philip
-  Kaludercic, Quiliro Ordóñez, Stephen R. Kifer, Stefan Monnier,
-  Stefan Thesing, Thibaut Benjamin, Tomasz Hołubowicz, Vedang
++ Contributions to code or the manual :: Abdul-Lateef Haji-Ali, Abin
+  Simon, Adam Růžička, Alan Schmitt, Alexandre Rousseau, Ashton
+  Wiersdorf, Benjamin Kästner, Bruno Boal, Charanjit Singh, Clemens
+  Radermacher, Colin McLear, Damien Cassou, Eduardo Grajeda, Elias
+  Storms, Eshel Yaron, Florian, Glenna D., Graham Marlow, Hilde Rhyne,
+  Ivan Sokolov, Jack Baty, Jean-Charles Bagneris, Jean-Philippe Gagné
+  Guay, Jianwei Hou, Joseph Turner, Jürgen Hötzel, Kaushal Modi, Kai
+  von Fintel, Kostas Andreadis, Kristoffer Balintona, Kyle Meyer, Marc
+  Fargas, Matthew Lemon, Noboru Ota (nobiot), Norwid Behrnd, Peter
+  Prevos, Philip Kaludercic, Quiliro Ordóñez, Stephen R. Kifer, Stefan
+  Monnier, Stefan Thesing, Thibaut Benjamin, Tomasz Hołubowicz, Vedang
   Manerikar, Wesley Harvey, Zhenxu Xu, arsaber101, ezchi, jarofromel,
   leinfink (Henrik), l-o-l-h (Lincoln), mattyonweb, maxbrieiev,
   mentalisttraceur, pmenair, relict007.



[elpa] externals/denote 17dbaaaa2b 14/19: Document 'denote-fontify-links-mode'

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 17db2b204604d5c07015b84727ba41bcf2a6
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Document 'denote-fontify-links-mode'

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.
---
 README.org | 68 ++
 1 file changed, 42 insertions(+), 26 deletions(-)

diff --git a/README.org b/README.org
index d7a97774dc..9bc57241d6 100644
--- a/README.org
+++ b/README.org
@@ -2183,7 +2183,8 @@ Markdown they are expressed as 
=[DESCRIPTION](denote:IDENTIFIER)=.
 
 When ~denote-link~ is called with a prefix argument (=C-u= by
 default), it formats links like =[[denote:IDENTIFIER]]=, regardless of
-file type. The user might prefer its simplicity.
+file type ([[#h:156c5ea3-147b-4f9d-a404-86a00558c60a][Fontify links in non-Org 
buffers]]). The user might prefer
+its simplicity.
 
 By default, the description of the link is determined thus:
 
@@ -2197,22 +2198,6 @@ By default, the description of the link is determined 
thus:
   title is retrieved either from the front matter or the file name.
 - If the target file has no signature, the title is used.
 
-Inserted links are automatically buttonized and remain active for as
-long as the buffer is available. In Org this is handled by the major
-mode: the =denote:= hyperlink type works exactly like the standard
-=file:= type. In Markdown and plain text, Denote performs the
-buttonization of those links. To buttonize links in existing files
-while visiting them, the user must add this snippet to their setup (it
-already excludes Org):
-
-#+findex: denote-link-buttonize-buffer
-#+begin_src emacs-lisp
-(add-hook 'find-file-hook #'denote-link-buttonize-buffer)
-#+end_src
-
-The ~denote-link-buttonize-buffer~ is also an interactive function in
-case the user needs it.
-
 Links are created only for files which qualify as a "note" for our
 purposes ([[#h:fc913d54-26c8-4c41-be86-999839e8ad31][Linking notes]]). Users 
who need to link to Denote files from
 anywhere, can write a simple command to that effect:
@@ -2243,14 +2228,6 @@ like an ordinary link by default.  This is just a 
convenience for the
 user/theme in case they want =denote:= links to remain distinct from
 other links.
 
-#+findex: denote-link-markdown-follow
-In files whose major mode is ~markdown-mode~, the default key binding
-=C-c C-o= (which calls the command ~markdown-follow-thing-at-point~)
-correctly resolves =denote:= links. This method works in addition to
-the =RET= key, which is made available by the aforementioned
-buttonization. Interested users can refer to the function
-~denote-link-markdown-follow~ for the implementation details.
-
 ** The ~denote-org-store-link-to-heading~ user option
 :PROPERTIES:
 :CUSTOM_ID: h:d99de1fb-b1b7-4a74-8667-575636a4d6a4
@@ -2710,6 +2687,45 @@ that are relevant for this use-case:
   behaves like the one above. The difference is that it finds the file
   system path and converts it into its identifier.
 
+** Fontify links in non-Org buffers
+:PROPERTIES:
+:CUSTOM_ID: h:156c5ea3-147b-4f9d-a404-86a00558c60a
+:END:
+
+[ Part of {{{development-version}}}. ]
+
+#+findex: denote-fontify-links-mode
+Denote links are automatically fontified in Org buffers 
([[#h:5e5e3370-12ab-454f-ba09-88ff44214324][Adding a single link]]).
+This means that Org recognises the link and applies the relevant
+properties to it to make it clickable/actionable. Other major modes,
+such as ~markdown-mode~ (for =.md= files) or ~text-mode~ (for =.txt=
+files) do not have this feature built into them. Users can still get
+the same behaviour as with Org by activating the ~denote-fontify-links-mode~.
+
+The ~denote-fontify-links-mode~ is a buffer-local minor mode. Users
+can enable it automatically in all plain text files with something
+like this:
+
+#+begin_src emacs-lisp
+(add-hook 'text-mode-hook #'denote-fontify-links-mode)
+#+end_src
+
+The ~text-mode-hook~ applies to all modes derived from ~text-mode~,
+including ~markdown-mode~. Though a more explicit setup does no harm:
+
+#+begin_src emacs-lisp
+(add-hook 'markdown-mode-hook #'denote-fontify-links-mode)
+#+end_src
+
+Because Org already recognises =denote:= links, the minor mode
+~denote-fontify-links-mode~ will do nothing in Org buffers.
+
+#+findex: denote-link-markdown-follow
+In files whose major mode is ~markdown-mode~, the default key binding
+=C-c C-o= (which calls the command ~markdown-follow-thing-at-point~)
+correctly resolves =denote:= links. Interested users can refer to the
+function ~denote-link-markdown-follow~ for the implementation details.
+
 ** Miscellaneous information about links
 :PROPERTIES:
 :CUSTOM_ID: h:dd8f2231-8d77-49b9-acc4-af525c68b271
@@ -4170,7 +4186,7 @@ Everything is in place to set up the package.
 
 ;; If you use Markdown or plain text files (Org renders links as buttons
 ;; right a

[elpa] externals/denote ce1f59af6a 18/19: Add TODO and FIXME for new link fontification mode

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit ce1f59af6a06fd3c63ec8258c7083bfebbda92ad
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Add TODO and FIXME for new link fontification mode
---
 denote.el | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/denote.el b/denote.el
index 1ae00a0b8d..f8e6c7732c 100644
--- a/denote.el
+++ b/denote.el
@@ -4191,6 +4191,10 @@ To be assigned to `markdown-follow-link-functions'."
   '(add-hook 'markdown-follow-link-functions #'denote-link-markdown-follow))
 
 ; Link fontification
+
+;; TODO 2024-06-19: We need to bind RET and maybe even C-c C-o to a
+;; command that opens the link at point.  Then we may also rename this
+;; keymap.
 (defvar denote-link-mouse-map
   (let ((map (make-sparse-keymap)))
 (define-key map [mouse-2] #'denote-link-open-at-mouse)
@@ -4261,6 +4265,9 @@ To be used as a `thing-at' provider."
 
 (defvar thing-at-point-provider-alist)
 
+;; FIXME 2024-06-19: We are missing a function that clean up all those
+;; properties when the mode is disabled.  Otherwise, we are left with
+;; invisible text, which looks broken.
 (define-minor-mode denote-fontify-links-mode
   "A minor mode to fontify and fold Denote links."
   :init-value nil



[elpa] externals/denote d3d30a5adc 10/19: Rename a private function for consistency and tweak its docstring

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit d3d30a5adc5e4099cc75356ea7d5fc65d27cffac
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Rename a private function for consistency and tweak its docstring

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.
---
 denote.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/denote.el b/denote.el
index 6cc4d204b1..ed8990434d 100644
--- a/denote.el
+++ b/denote.el
@@ -4277,8 +4277,8 @@ Implementation based on the function 
`org-activate-links'."
   (throw :exit t))  ; signal success
 nil))
 
-(defun denote--get-link-url-at-point ()
-  "Return the denote link under point.
+(defun denote--get-link-file-path-at-point ()
+  "Return link to the Denote file path at point.
 To be used as a `thing-at' provider."
   (when-let (id (get-text-property (point) 'denote-link-id))
 (concat "file:" (denote-get-path-by-id id
@@ -4292,7 +4292,7 @@ To be used as a `thing-at' provider."
  (with-eval-after-load 'thingatpt
(make-local-variable 'thing-at-point-provider-alist)
(add-to-list 'thing-at-point-provider-alist
-'(url . denote--get-link-url-at-point
+ '(url . denote--get-link-file-path-at-point)))
 (font-lock-remove-keywords nil '(denote-fontify-links))
 (with-eval-after-load 'thingatpt
   (set 'thing-at-point-provider-alist



[elpa] externals/denote ca79f359ff 06/19: Make obsolete methods for buttonizing links

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit ca79f359ff32da056a7ffcbc2395bc9e06a6e299
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make obsolete methods for buttonizing links

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.

I still need to update the manual accordingly.
---
 denote.el | 46 --
 1 file changed, 8 insertions(+), 38 deletions(-)

diff --git a/denote.el b/denote.el
index 0fc8172986..eb8c4fdabc 100644
--- a/denote.el
+++ b/denote.el
@@ -4202,45 +4202,15 @@ file's title.  This has the same meaning as in 
`denote-link'."
  (file (denote-get-path-by-id id)))
 (funcall denote-link-button-action file)))
 
-;;;###autoload
-(defun denote-link-buttonize-buffer (&optional beg end)
-  "Make denote: links actionable buttons in the current buffer.
-
-Buttonization applies to the plain text and Markdown file types,
-per the user option `denote-file-types'.  It will not do anything
-in `org-mode' buffers, as buttons already work there.  If you do
-not use Markdown or plain text, then you do not need this.
-
-Links work when they point to a file inside the variable
-`denote-directory'.
-
-To buttonize links automatically add this function to the
-`find-file-hook'.  Or call it interactively for on-demand
-buttonization.
+(make-obsolete
+ 'denote-link-buttonize-buffer
+ 'denote-fontify-links-mode
+ "Use the `denote-fontify-links-mode', as it works better than buttonization. 
Since 3.0.0")
 
-When called from Lisp, with optional BEG and END as buffer
-positions, limit the process to the region in-between."
-  (interactive)
-  (when (and (not (derived-mode-p 'org-mode))
- buffer-file-name
- (denote-file-has-identifier-p buffer-file-name))
-(save-excursion
-  (goto-char (or beg (point-min)))
-  (while (re-search-forward denote-id-regexp end t)
-(when-let ((string (denote-link--link-at-point-string))
-   (beg (match-beginning 0))
-   (end (match-end 0)))
-  (make-button beg end 'type 'denote-link-button))
-
-(defun denote-link-markdown-follow (link)
-  "Function to open Denote file present in LINK.
-To be assigned to `markdown-follow-link-functions'."
-  (when (ignore-errors (string-match denote-id-regexp link))
-(funcall denote-link-button-action
- (denote-get-path-by-id (match-string 0 link)
-
-(eval-after-load 'markdown-mode
-  '(add-hook 'markdown-follow-link-functions #'denote-link-markdown-follow))
+(make-obsolete
+ 'denote-link-markdown-follow
+ 'denote-fontify-links-mode
+ "Use the `denote-fontify-links-mode', as it works better than buttonization. 
Since 3.0.0")
 
 ; Link fontification
 (defvar denote-link-mouse-map



[elpa] externals/denote 7b1bd891ce 02/19: Untabify and re-indent denote--rename-get-file-info-from-prompts-or-existing

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 7b1bd891cee6ed3693700a569feea202d6baee59
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Untabify and re-indent denote--rename-get-file-info-from-prompts-or-existing
---
 denote.el | 46 +++---
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/denote.el b/denote.el
index cd7965d7bb..62d96e8ec9 100644
--- a/denote.el
+++ b/denote.el
@@ -2950,29 +2950,29 @@ renaming commands."
  (title (or (denote-retrieve-title-or-filename file file-type) ""))
  (keywords (denote-extract-keywords-from-path file))
  (signature (or (denote-retrieve-filename-signature file) "")))
- (dolist (prompt denote-prompts)
-   (pcase prompt
- ('title
-  (setq title (denote-title-prompt
-   title
-   (format "Rename `%s' with TITLE (empty to remove)" 
file-in-prompt
- ('keywords
-  (setq keywords (denote-keywords-prompt
-  (format "Rename `%s' with KEYWORDS (empty to 
remove)" file-in-prompt)
-  (string-join keywords ","
- ('signature
-  (setq signature (denote-signature-prompt
-   signature
-   (format "Rename `%s' with SIGNATURE (empty to 
remove)" file-in-prompt
- ('date
-  ;; TODO: We currently prompt only if the current file has no
-  ;; identifier. Eventually, we may want to allow modifying the
-  ;; date/id. Then, it will be better to prompt according to
-  ;; `denote-prompts`, like other components (ie remove this
-  ;; condition).
-  (unless (denote-file-has-identifier-p file)
-(setq date (denote-date-prompt))
- (list title keywords signature date)))
+(dolist (prompt denote-prompts)
+  (pcase prompt
+('title
+ (setq title (denote-title-prompt
+  title
+  (format "Rename `%s' with TITLE (empty to remove)" 
file-in-prompt
+('keywords
+ (setq keywords (denote-keywords-prompt
+ (format "Rename `%s' with KEYWORDS (empty to remove)" 
file-in-prompt)
+ (string-join keywords ","
+('signature
+ (setq signature (denote-signature-prompt
+  signature
+  (format "Rename `%s' with SIGNATURE (empty to 
remove)" file-in-prompt
+('date
+ ;; TODO: We currently prompt only if the current file has no
+ ;; identifier. Eventually, we may want to allow modifying the
+ ;; date/id. Then, it will be better to prompt according to
+ ;; `denote-prompts`, like other components (ie remove this
+ ;; condition).
+ (unless (denote-file-has-identifier-p file)
+   (setq date (denote-date-prompt))
+(list title keywords signature date)))
 
 ;;;###autoload
 (defun denote-rename-file (file &optional title keywords signature date)



[elpa] externals/denote 76098aaafc 17/19: Remove obsolete code

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 76098aaafc13a10bbaf1df7700f0010492e46cb4
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Remove obsolete code
---
 denote.el | 27 ---
 1 file changed, 27 deletions(-)

diff --git a/denote.el b/denote.el
index 5b556cbd50..1ae00a0b8d 100644
--- a/denote.el
+++ b/denote.el
@@ -4160,33 +4160,6 @@ file's title.  This has the same meaning as in 
`denote-link'."
 
 ; Link buttons
 
-;; Evaluate: (info "(elisp) Button Properties")
-;;
-;; Button can provide a help-echo function as well, but I think we might
-;; not need it.
-(define-button-type 'denote-link-button
-  'follow-link t
-  'face 'denote-faces-link
-  'action #'denote-link--find-file-at-button)
-
-(autoload 'thing-at-point-looking-at "thingatpt")
-
-(defun denote-link--link-at-point-string ()
-  "Return identifier at point."
-  (when (or (thing-at-point-looking-at denote-id-only-link-in-context-regexp)
-(thing-at-point-looking-at denote-md-link-in-context-regexp)
-(thing-at-point-looking-at denote-org-link-in-context-regexp)
-;; Meant to handle the case where a link is broken by
-;; `fill-paragraph' into two lines, in which case it
-;; buttonizes only the "denote:ID" part.  Example:
-;;
-;; [[denote:20220619T175212][This is a
-;; test]]
-;;
-;; Maybe there is a better way?
-(thing-at-point-looking-at "\\[\\(denote:.*\\)]"))
-(match-string-no-properties 0)))
-
 ;; NOTE 2022-06-15: I add this as a variable for advanced users who may
 ;; prefer something else.  If there is demand for it, we can make it a
 ;; defcustom, but I think it would be premature at this stage.



[elpa] externals/denote 7cdb31acee 15/19: Make stylistic tweaks to denote-fontify-links

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 7cdb31aceee094c143ff986c75373cdf60fd18f2
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make stylistic tweaks to denote-fontify-links
---
 denote.el | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/denote.el b/denote.el
index 73d1df7e81..47bd53176c 100644
--- a/denote.el
+++ b/denote.el
@@ -4240,7 +4240,7 @@ To be assigned to `markdown-follow-link-functions'."
 
 Implementation based on the function `org-activate-links'."
   (catch :exit
-(when-let (type (denote-filetype-heuristics (buffer-file-name)))
+(when-let ((type (denote-filetype-heuristics (buffer-file-name
   (while (re-search-forward (denote--link-in-context-regexp type) limit t)
 (save-match-data  ; to return the matches to font-lock
   (let* ((start (match-beginning 0))
@@ -4267,10 +4267,8 @@ Implementation based on the function 
`org-activate-links'."
   htmlize-link (:uri ,file-link)
   font-lock-multiline t))
  (non-sticky-props
-  '(rear-nonsticky (mouse-face highlight keymap invisible
-   intangible help-echo
-   htmlize-link)))
- (face-property 'file-link)
+  '(rear-nonsticky (mouse-face highlight keymap invisible 
intangible help-echo htmlize-link)))
+ (face-property 'link)
  (hidden (append '(invisible t) properties)))
 (remove-text-properties start end '(invisible nil))
 (add-text-properties start visible-start hidden)



[elpa] externals/denote 2b1210c527 13/19: Reinstate denote-link-markdown-follow

2024-06-19 Thread ELPA Syncer
branch: externals/denote
commit 2b1210c527b2a4d05408232507f0dc71c133d6ca
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Reinstate denote-link-markdown-follow

I had removed it in commit ca79f35, but we seem to still need it for
Markdown's C-c C-o to do the right thing over a 'denote:' link.

This builds on top of the new fontification feature provided by 
Abdul-Lateef Haji-Ali in
pull request 344 (commit 4d12452): 
.
---
 denote.el | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/denote.el b/denote.el
index 129f651457..73d1df7e81 100644
--- a/denote.el
+++ b/denote.el
@@ -4207,10 +4207,15 @@ file's title.  This has the same meaning as in 
`denote-link'."
  'denote-fontify-links-mode
  "Use the `denote-fontify-links-mode', as it works better than buttonization. 
Since 3.0.0")
 
-(make-obsolete
- 'denote-link-markdown-follow
- 'denote-fontify-links-mode
- "Use the `denote-fontify-links-mode', as it works better than buttonization. 
Since 3.0.0")
+(defun denote-link-markdown-follow (link)
+  "Function to open Denote file present in LINK.
+To be assigned to `markdown-follow-link-functions'."
+  (when (ignore-errors (string-match denote-id-regexp link))
+(funcall denote-link-button-action
+ (denote-get-path-by-id (match-string 0 link)
+
+(eval-after-load 'markdown-mode
+  '(add-hook 'markdown-follow-link-functions #'denote-link-markdown-follow))
 
 ; Link fontification
 (defvar denote-link-mouse-map



[nongnu] elpa/helm updated (00faa55a8f -> f8949afd9b)

2024-06-19 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm.

  from  00faa55a8f Move quick delete action to its function
   new  47620c0da5 Remove last condition in *-acase left by error
   new  f8949afd9b Fix format error when prompt-formater is not specified


Summary of changes:
 helm-lib.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[nongnu] elpa/helm f8949afd9b 2/2: Fix format error when prompt-formater is not specified

2024-06-19 Thread ELPA Syncer
branch: elpa/helm
commit f8949afd9b44de4a8149874ef40e1250826d40bd
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Fix format error when prompt-formater is not specified
---
 helm-lib.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/helm-lib.el b/helm-lib.el
index 459095933e..0584166d56 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1366,14 +1366,15 @@ in LIST to be displayed in PROMPT."
(apply #'format
   (concat prompt "[y,n,!,q,h]")
   (helm-acase prompt-formater
-((guard (listp it))
+((guard (consp it))
  (mapcar (lambda (x)
(if (functionp x)
(funcall x elm)
  x))
  it))
 ((guard (functionp it))
- (list (funcall it elm)
+ (list (funcall it elm)))
+(t (list elm
'("y" "n" "!" "q")
(or help-function #'helm-read-answer-default-help-fn))
 ("y" (funcall action elm))



[nongnu] elpa/helm 47620c0da5 1/2: Remove last condition in *-acase left by error

2024-06-19 Thread ELPA Syncer
branch: elpa/helm
commit 47620c0da583f9b794ad00ca336e927ab5e8c25f
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Remove last condition in *-acase left by error
---
 helm-lib.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/helm-lib.el b/helm-lib.el
index 142d68886d..459095933e 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1373,8 +1373,7 @@ in LIST to be displayed in PROMPT."
  x))
  it))
 ((guard (functionp it))
- (list (funcall it elm)))
-(t it)))
+ (list (funcall it elm)
'("y" "n" "!" "q")
(or help-function #'helm-read-answer-default-help-fn))
 ("y" (funcall action elm))



[nongnu] elpa/helm-core updated (00faa55a8f -> f8949afd9b)

2024-06-19 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  00faa55a8f Move quick delete action to its function
  adds  47620c0da5 Remove last condition in *-acase left by error
  adds  f8949afd9b Fix format error when prompt-formater is not specified

No new revisions were added by this update.

Summary of changes:
 helm-lib.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[elpa] externals/jinx d053303b54: Version 1.8

2024-06-19 Thread ELPA Syncer
branch: externals/jinx
commit d053303b54d8ceb15ee496bf7019837e70876410
Author: Daniel Mendler 
Commit: Daniel Mendler 

Version 1.8
---
 CHANGELOG.org | 5 +
 jinx.el   | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 4c4c1f44b9..9a947095c0 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -2,6 +2,11 @@
 #+author: Daniel Mendler
 #+language: en
 
+* Version 1.8 (2024-06-19)
+
+- Bugfix in ~jinx-correct~: Fix ~wrong-type-argument~ error if no Enchant
+  dictionaries are found.
+
 * Version 1.7 (2024-05-15)
 
 - ~jinx--word-valid-p~: Do not error on invalid characters.
diff --git a/jinx.el b/jinx.el
index b9b61998aa..f4398973e5 100644
--- a/jinx.el
+++ b/jinx.el
@@ -5,7 +5,7 @@
 ;; Author: Daniel Mendler 
 ;; Maintainer: Daniel Mendler 
 ;; Created: 2023
-;; Version: 1.7
+;; Version: 1.8
 ;; Package-Requires: ((emacs "27.1") (compat "29.1.4.4"))
 ;; Homepage: https://github.com/minad/jinx
 ;; Keywords: convenience, text



[nongnu] elpa/proof-general 0b92513624 1/4: omit-proofs tests: add new test for bullets and braces

2024-06-19 Thread ELPA Syncer
branch: elpa/proof-general
commit 0b92513624579a9c96671bb3ff53b6009a2964ce
Author: Hendrik Tews 
Commit: hendriktews 

omit-proofs tests: add new test for bullets and braces

Currently bullets and braces are classified as commands that prevent
proof omission, therefore proofs containing bullets or braces are
never omitted. The new tests is therefore expected to fail.
---
 ci/simple-tests/coq-test-omit-proofs.el | 50 -
 ci/simple-tests/omit_test.v | 24 +---
 2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/ci/simple-tests/coq-test-omit-proofs.el 
b/ci/simple-tests/coq-test-omit-proofs.el
index ed7aea8d5f..68dcf21e3e 100644
--- a/ci/simple-tests/coq-test-omit-proofs.el
+++ b/ci/simple-tests/coq-test-omit-proofs.el
@@ -106,7 +106,7 @@ In particular, test that with proof-omit-proofs-option 
configured:
 
   ;; Check 1: check that the proof is valid and omit can be disabled
   (message "1: check that the proof is valid and omit can be disabled")
-  (should (search-forward "automatic test marker 4" nil t))
+  (should (search-forward "automatic test marker 4 " nil t))
   (forward-line -1)
   ;; simulate C-u prefix argument
   (proof-goto-point '(4))
@@ -140,19 +140,19 @@ In particular, test that with proof-omit-proofs-option 
configured:
 
   ;; Check 2: check proof-locked-face is active at marker 2 and 3
   (message "2: check proof-locked-face is active at marker 2 and 3")
-  (should (search-backward "automatic test marker 2" nil t))
+  (should (search-backward "automatic test marker 2 " nil t))
   (should (eq (first-overlay-face) 'proof-locked-face))
-  (should (search-forward "automatic test marker 3" nil t))
+  (should (search-forward "automatic test marker 3 " nil t))
   (should (eq (first-overlay-face) 'proof-locked-face))
 
   ;; Check 3: check that the second proof is omitted
   (message "3: check that the second proof is omitted")
   ;; first retract
-  (should (search-backward "automatic test marker 1" nil t))
+  (should (search-backward "automatic test marker 1 " nil t))
   (proof-goto-point)
   (wait-for-coq)
   ;; move forward again
-  (should (search-forward "automatic test marker 4" nil t))
+  (should (search-forward "automatic test marker 4 " nil t))
   (forward-line -1)
   (proof-goto-point)
   (wait-for-coq)
@@ -174,7 +174,7 @@ In particular, test that with proof-omit-proofs-option 
configured:
 
   ;; Check 4: check proof-omitted-proof-face is active at marker 3
   (message "4: check proof-omitted-proof-face is active at marker 3")
-  (should (search-backward "automatic test marker 3" nil t))
+  (should (search-backward "automatic test marker 3 " nil t))
   ;; debug overlay order
   ;; (mapc
   ;;  (lambda (ov)
@@ -185,9 +185,9 @@ In particular, test that with proof-omit-proofs-option 
configured:
 
   ;; Check 5: check proof-locked-face is active at marker 1 and 2
   (message "5: check proof-locked-face is active at marker 1 and 2")
-  (should (search-backward "automatic test marker 1" nil t))
+  (should (search-backward "automatic test marker 1 " nil t))
   (should (eq (first-overlay-face) 'proof-locked-face))
-  (should (search-forward "automatic test marker 2" nil t))
+  (should (search-forward "automatic test marker 2 " nil t))
   (should (eq (first-overlay-face) 'proof-locked-face))
 
   ;; Check 6: check that a partial proof at the end is not omitted
@@ -195,7 +195,7 @@ In particular, test that with proof-omit-proofs-option 
configured:
   (goto-char (point-min))
   (proof-goto-point)
   (wait-for-coq)
-  (should (search-forward "automatic test marker 3" nil t))
+  (should (search-forward "automatic test marker 3 " nil t))
   (forward-line 2)
   (proof-goto-point)
   (wait-for-coq)
@@ -223,11 +223,11 @@ The sources for the test contain a local attribute in 
form of
   (goto-char (point-min))
   ;; Check that proofs with Hint commands are never omitted
   (message "Check that proofs with Hint commands are never omitted")
-  (should (search-forward "automatic test marker 6" nil t))
+  (should (search-forward "automatic test marker 6 " nil t))
   (forward-line -1)
   (proof-goto-point)
   (wait-for-coq)
-  (should (search-backward "automatic test marker 5" nil t))
+  (should (search-backward "automatic test marker 5 " nil t))
   (should (eq (first-overlay-face) 'proof-locked-face)))
 
 
@@ -245,14 +245,36 @@ This test only checks the faces in the middle of the 
proof."
   (goto-char (point-min))
   ;; Check that proofs for Let local declarations are never omitted.
   (message "Check that proofs for Let local declarations are never omitted.")
-  (should (search-forward "automatic test marker 8" nil t))
+  (should (search-forward "automatic test marker 8 " nil t))
   (forward-line -1)
   (proof-goto-point)
   (wait-for-coq)
-  (should (search-backward "automatic test marker 7-1" nil t))
+  (should (search-backward "automatic test marker 7-1 " nil t))
   (should (eq (first-overlay-face) 'proof-locked-fa

[nongnu] elpa/proof-general 71c807ced2 3/4: proof-stat: admitted proofs should count as failing

2024-06-19 Thread ELPA Syncer
branch: elpa/proof-general
commit 71c807ced24371451341a3a9edeaec94f4e1b88e
Author: Hendrik Tews 
Commit: hendriktews 

proof-stat: admitted proofs should count as failing

Proofs terminated with Admitted should count as failing in the
statistics, even when Coq accepts the proofs without error.

The ERT test is marked expected fail, however, this is not possible
for the tests of goal coq-proof-stat-batch-test, therefore the
expected output is wrong, such that these tests succeed.
---
 ci/simple-tests/coq-test-proof-stat.el   | 6 --
 ci/simple-tests/proof_stat.human.exp-out | 3 ++-
 ci/simple-tests/proof_stat.tap.exp-out   | 3 ++-
 ci/simple-tests/proof_stat.v | 4 
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ci/simple-tests/coq-test-proof-stat.el 
b/ci/simple-tests/coq-test-proof-stat.el
index 86470f9548..8ec4e25fb9 100644
--- a/ci/simple-tests/coq-test-proof-stat.el
+++ b/ci/simple-tests/coq-test-proof-stat.el
@@ -24,6 +24,7 @@ source file."
 
 
 (ert-deftest proof-check-correct-stat ()
+  :expected-result :failed
   "Test `proof-check-report' on a file that is correct in non-opaque parts.
 Test that the report buffer contains the expected output."
   (setq proof-three-window-enable nil)
@@ -39,14 +40,15 @@ Test that the report buffer contains the expected output."
 ;; the summary should be correct
 (goto-char (point-min))
 (should
- (search-forward "3 opaque proofs recognized: 1 successful 2 FAILING"
+ (search-forward "4 opaque proofs recognized: 2 successful 2 FAILING"
  nil t))
 ;; results for all 3 test lemmas should be correct
 (mapc
  (lambda (s) (should (search-forward s nil t)))
  '("FAIL a1_equal_4"
"OK   b_equal_6"
-   "FAIL b2_equal_6"
+   "FAIL b2_equal_6"
+   "FAIL use_admit"
 
 
 (ert-deftest proof-check-error-on-error ()
diff --git a/ci/simple-tests/proof_stat.human.exp-out 
b/ci/simple-tests/proof_stat.human.exp-out
index 82346b541f..901c8b3820 100644
--- a/ci/simple-tests/proof_stat.human.exp-out
+++ b/ci/simple-tests/proof_stat.human.exp-out
@@ -1,9 +1,10 @@
 Proof check results for proof_stat.v
 
-3 opaque proofs recognized: 1 successful 2 FAILING
+4 opaque proofs recognized: 2 successful 2 FAILING
 
   FAIL a1_equal_4
   OK   b_equal_6
   FAIL b2_equal_6
+  OK   use_admit
 
 
diff --git a/ci/simple-tests/proof_stat.tap.exp-out 
b/ci/simple-tests/proof_stat.tap.exp-out
index 7903afc6aa..1735d29f79 100644
--- a/ci/simple-tests/proof_stat.tap.exp-out
+++ b/ci/simple-tests/proof_stat.tap.exp-out
@@ -1,7 +1,8 @@
 TAP version 13
-1..3
+1..4
 not ok 1 a1_equal_4
 ok 2 b_equal_6
 not ok 3 b2_equal_6
+ok 4 use_admit
 
 
diff --git a/ci/simple-tests/proof_stat.v b/ci/simple-tests/proof_stat.v
index c436431b02..415b18bc2d 100644
--- a/ci/simple-tests/proof_stat.v
+++ b/ci/simple-tests/proof_stat.v
@@ -22,3 +22,7 @@ Lemma b2_equal_6 : b = 2 * 3.   
(* FAIL *)
 Proof using.(* this proof should fail *)
 Qed.
 
+Lemma use_admit : 0 = 1.
+Proof using.   (* this proof succeeds but should count as failing 
*)
+  admit.
+Admitted.



[nongnu] elpa/proof-general updated (b9fdbbf0b5 -> 0e0170f96f)

2024-06-19 Thread ELPA Syncer
elpasync pushed a change to branch elpa/proof-general.

  from  b9fdbbf0b5 Merge pull request #768 from Matafou/splash-time
   new  0b92513624 omit-proofs tests: add new test for bullets and braces
   new  1226b6b32b omit-proofs: also omit proofs with bullets and braces
   new  71c807ced2 proof-stat: admitted proofs should count as failing
   new  0e0170f96f proof-stat: admitted proofs count as failing


Summary of changes:
 ci/simple-tests/coq-test-omit-proofs.el  | 49 +++-
 ci/simple-tests/coq-test-proof-stat.el   |  6 ++--
 ci/simple-tests/omit_test.v  | 24 +---
 ci/simple-tests/proof_stat.human.exp-out |  3 +-
 ci/simple-tests/proof_stat.tap.exp-out   |  3 +-
 ci/simple-tests/proof_stat.v |  4 +++
 coq/coq-syntax.el| 16 +++
 coq/coq.el   | 12 +---
 doc/PG-adapting.texi | 20 +++--
 doc/ProofGeneral.texi| 20 +++--
 generic/pg-user.el   | 21 +++---
 generic/proof-config.el  | 11 +++
 12 files changed, 148 insertions(+), 41 deletions(-)



[nongnu] elpa/proof-general 1226b6b32b 2/4: omit-proofs: also omit proofs with bullets and braces

2024-06-19 Thread ELPA Syncer
branch: elpa/proof-general
commit 1226b6b32b11cb22cf639bb7eafa46a73cbc6d59
Author: Hendrik Tews 
Commit: hendriktews 

omit-proofs: also omit proofs with bullets and braces
---
 ci/simple-tests/coq-test-omit-proofs.el |  1 -
 coq/coq-syntax.el   | 10 ++
 coq/coq.el  |  9 ++---
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/ci/simple-tests/coq-test-omit-proofs.el 
b/ci/simple-tests/coq-test-omit-proofs.el
index 68dcf21e3e..20a54b6e82 100644
--- a/ci/simple-tests/coq-test-omit-proofs.el
+++ b/ci/simple-tests/coq-test-omit-proofs.el
@@ -258,7 +258,6 @@ This test only checks the faces in the middle of the proof."
   (should (eq (first-overlay-face) 'proof-omitted-proof-face)))
 
 (ert-deftest omit-proofs-omit-bullets-and-braces ()
-  :expected-result :failed
   (let ((proof-omit-proofs-option t)
 pos-10)
 (message "omit-proofs-omit-bullets-and-braces: Check bullets and braces")
diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el
index 03b3f9089f..e68bb8f88d 100644
--- a/coq/coq-syntax.el
+++ b/coq/coq-syntax.el
@@ -1433,6 +1433,16 @@ different."
 Used in `coq-cmd-prevents-proof-omission' to identify tactics
 that only have proof-local effects.")
 
+(defconst coq-bullet-regexp "^\\(-+\\|\\++\\|\\*+\\)$"
+  "Regular expression matching bullets.
+Used in `coq-cmd-prevents-proof-omission' to identify tactics
+that only have proof-local effects.")
+
+(defconst coq-braces-regexp "^\\({\\|}\\)$"
+  "Regular expression matching braces used for focussing and unfocussing.
+Used in `coq-cmd-prevents-proof-omission' to identify tactics
+that only have proof-local effects.")
+
 (defcustom coq-cmd-force-next-proof-kept "Let"
   "Instantiating for `proof-script-cmd-force-next-proof-kept'.
 Regular expression for commands that prevent omitting the next
diff --git a/coq/coq.el b/coq/coq.el
index b48715d55b..4d4b5a33ec 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -745,9 +745,12 @@ have effects outside the proof, which would prohibit 
omitting the
 proof, see `proof-script-omit-proofs'.
 
 Commands starting lower case are deemed as tactics that have
-proof local effect only. Everything else is checked against the
-STATECH field in the coq syntax data base, see coq-db.el."
-  (if (proof-string-match coq-lowercase-command-regexp cmd)
+proof local effect only and so are bullets and braces. Everything
+else is checked against the STATECH field in the coq syntax data
+base, see coq-db.el."
+  (if (or (proof-string-match coq-lowercase-command-regexp cmd)
+  (proof-string-match coq-bullet-regexp cmd)
+  (proof-string-match coq-braces-regexp cmd))
   nil
 (not (coq-state-preserving-p cmd
 



[nongnu] elpa/proof-general 0e0170f96f 4/4: proof-stat: admitted proofs count as failing

2024-06-19 Thread ELPA Syncer
branch: elpa/proof-general
commit 0e0170f96f5feaeefe59052a08373080acc20393
Author: Hendrik Tews 
Commit: hendriktews 

proof-stat: admitted proofs count as failing

Change `proof-check-chunks' such that Admitted proofs are reported as
failing.
---
 ci/simple-tests/proof_stat.human.exp-out |  4 ++--
 ci/simple-tests/proof_stat.tap.exp-out   |  2 +-
 ci/simple-tests/proof_stat.v |  2 +-
 coq/coq-syntax.el|  6 ++
 coq/coq.el   |  3 ++-
 doc/PG-adapting.texi | 20 +---
 doc/ProofGeneral.texi| 20 
 generic/pg-user.el   | 21 +
 generic/proof-config.el  | 11 +++
 9 files changed, 69 insertions(+), 20 deletions(-)

diff --git a/ci/simple-tests/proof_stat.human.exp-out 
b/ci/simple-tests/proof_stat.human.exp-out
index 901c8b3820..472312ed81 100644
--- a/ci/simple-tests/proof_stat.human.exp-out
+++ b/ci/simple-tests/proof_stat.human.exp-out
@@ -1,10 +1,10 @@
 Proof check results for proof_stat.v
 
-4 opaque proofs recognized: 2 successful 2 FAILING
+4 opaque proofs recognized: 1 successful 3 FAILING
 
   FAIL a1_equal_4
   OK   b_equal_6
   FAIL b2_equal_6
-  OK   use_admit
+  FAIL use_admit
 
 
diff --git a/ci/simple-tests/proof_stat.tap.exp-out 
b/ci/simple-tests/proof_stat.tap.exp-out
index 1735d29f79..86bd533bac 100644
--- a/ci/simple-tests/proof_stat.tap.exp-out
+++ b/ci/simple-tests/proof_stat.tap.exp-out
@@ -3,6 +3,6 @@ TAP version 13
 not ok 1 a1_equal_4
 ok 2 b_equal_6
 not ok 3 b2_equal_6
-ok 4 use_admit
+not ok 4 use_admit
 
 
diff --git a/ci/simple-tests/proof_stat.v b/ci/simple-tests/proof_stat.v
index 415b18bc2d..ffdccda668 100644
--- a/ci/simple-tests/proof_stat.v
+++ b/ci/simple-tests/proof_stat.v
@@ -22,7 +22,7 @@ Lemma b2_equal_6 : b = 2 * 3.   
(* FAIL *)
 Proof using.(* this proof should fail *)
 Qed.
 
-Lemma use_admit : 0 = 1.
+Lemma use_admit : 0 = 1.(* FAIL *)
 Proof using.   (* this proof succeeds but should count as failing 
*)
   admit.
 Admitted.
diff --git a/coq/coq-syntax.el b/coq/coq-syntax.el
index e68bb8f88d..fbb5398f90 100644
--- a/coq/coq-syntax.el
+++ b/coq/coq-syntax.el
@@ -1136,6 +1136,12 @@ different."
   :type 'string
   :group 'coq)
 
+(defcustom coq-omit-cheating-regexp "Admitted"
+  "Value for `proof-omit-cheating-regexp'.
+Very similar to `coq-omit-proof-admit-command', but without the dot."
+  :type 'regexp
+  :group 'coq)
+
 ;; - keywords for font-lock.
 
 (defvar coq-keywords-kill-goal
diff --git a/coq/coq.el b/coq/coq.el
index 4d4b5a33ec..fdafe2dd43 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -1964,7 +1964,8 @@ at `proof-assistant-settings-cmds' evaluation time.")
proof-script-definition-end-regexp coq-definition-end-regexp
proof-script-proof-admit-command coq-omit-proof-admit-command
proof-script-cmd-prevents-proof-omission #'coq-cmd-prevents-proof-omission
-   proof-script-cmd-force-next-proof-kept coq-cmd-force-next-proof-kept)
+   proof-script-cmd-force-next-proof-kept coq-cmd-force-next-proof-kept
+   proof-omit-cheating-regexp coq-omit-cheating-regexp)
 
   ;; proof-check-report/proof-check-annotate config
   (setq
diff --git a/doc/PG-adapting.texi b/doc/PG-adapting.texi
index d63478a387..865a3083df 100644
--- a/doc/PG-adapting.texi
+++ b/doc/PG-adapting.texi
@@ -1289,9 +1289,12 @@ The other material is asserted in the usual way and
 opaque proofs it first tries to assert them in the usual way too. If
 this succeeds the proof is considered valid. Otherwise the proof is
 replaced with @code{proof-script-proof-admit-command} and the proof is
-considered invalid. To associate theorem names with opaque proofs, the
-function @code{proof-get-proof-info-fn} is called, which is identical
-to @code{proof-tree-get-proof-info}, @xref{Proof Tree Elisp
+considered invalid. In order to consider Admitted proofs as invalid
+ones, proofs whose last command matches
+@code{proof-omit-cheating-regexp} count as invalid. To associate
+theorem names with opaque proofs, the function
+@code{proof-get-proof-info-fn} is called, which is identical to
+@code{proof-tree-get-proof-info}, @xref{Proof Tree Elisp
 configuration}.
 
 To enable proof status statistics, the omit-proofs feature must be
@@ -1328,6 +1331,17 @@ This function takes a state as argument as returned by
 the proof assistant back to the same state.
 @end defvar
 
+@c TEXI DOCSTRING MAGIC: proof-omit-cheating-regexp
+@defvar proof-omit-cheating-regexp 
+Regular expression matching proof closing commands for incomplete proofs.@*
+If set, this regular expression is applied to the last command of
+opaque proofs. If it matches the proofs counts as invalid for the
+proof-status statistics and annotation feature. For Coq this is
+used to mark Admitted proofs as invalid.
+
+This option can be left at @sam

[elpa] externals/transient 4f0fe22caf: transient--expand-define-args: Use backward compatible signature

2024-06-19 Thread Jonas Bernoulli via
branch: externals/transient
commit 4f0fe22cafb6c2c8c8749a9037351ed01cf121ef
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

transient--expand-define-args: Use backward compatible signature

Closes #288.
---
 CHANGELOG | 5 +
 lisp/transient.el | 5 -
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG
index b84a9a5bcc..e7a591e92a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,9 @@
 # -*- mode: org -*-
+* v0.7.1UNRELEASED
+
+- Added a workaround for ~emoji.el~ from Emacs 29.1 calling an internal
+  function using an outdated number of arguments.  #288
+
 * v0.7.02024-06-18
 
 - Added new macro ~transient-augment-suffix~, which can be used to
diff --git a/lisp/transient.el b/lisp/transient.el
index e69288032f..a81b424ccb 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1078,7 +1078,10 @@ commands are aliases for."
 (and val (not (eq val 'transient--default-infix-command)) val)))
 
 (eval-and-compile ;transient--expand-define-args
-  (defun transient--expand-define-args (args arglist form &optional nobody)
+  (defun transient--expand-define-args (args &optional arglist form nobody)
+;; ARGLIST and FORM are only optional for backward compatibility.
+;; This is necessary because "emoji.el" from Emacs 29 calls this
+;; function directly, with just one argument.
 (unless (listp arglist)
   (error "Mandatory ARGLIST is missing"))
 (let (class keys suffixes docstr declare (interactive-only t))



[elpa] externals/transient f78aebdd03: Release version 0.7.1

2024-06-19 Thread Jonas Bernoulli via
branch: externals/transient
commit f78aebdd03292241b45023c4379bcad5c746fc4c
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Release version 0.7.1
---
 CHANGELOG   | 2 +-
 docs/transient.org  | 4 ++--
 docs/transient.texi | 4 ++--
 lisp/transient.el   | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index e7a591e92a..4fa6b6dc59 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,5 @@
 # -*- mode: org -*-
-* v0.7.1UNRELEASED
+* v0.7.12024-06-19
 
 - Added a workaround for ~emoji.el~ from Emacs 29.1 calling an internal
   function using an outdated number of arguments.  #288
diff --git a/docs/transient.org b/docs/transient.org
index ed32766ee1..d147c69a89 100644
--- a/docs/transient.org
+++ b/docs/transient.org
@@ -7,7 +7,7 @@
 #+texinfo_dir_category: Emacs misc features
 #+texinfo_dir_title: Transient: (transient).
 #+texinfo_dir_desc: Transient Commands
-#+subtitle: for version 0.7.0
+#+subtitle: for version 0.7.1
 
 #+setupfile: .orgconfig
 
@@ -20,7 +20,7 @@ resource to get over that hurdle is Psionic K's interactive 
tutorial,
 available at https://github.com/positron-solutions/transient-showcase.
 
 #+texinfo: @noindent
-This manual is for Transient version 0.7.0.
+This manual is for Transient version 0.7.1.
 
 #+texinfo: @insertcopying
 :END:
diff --git a/docs/transient.texi b/docs/transient.texi
index 8522093e45..62d15b8dd5 100644
--- a/docs/transient.texi
+++ b/docs/transient.texi
@@ -31,7 +31,7 @@ General Public License for more details.
 @finalout
 @titlepage
 @title Transient User and Developer Manual
-@subtitle for version 0.7.0
+@subtitle for version 0.7.1
 @author Jonas Bernoulli
 @page
 @vskip 0pt plus 1filll
@@ -53,7 +53,7 @@ resource to get over that hurdle is Psionic K's interactive 
tutorial,
 available at @uref{https://github.com/positron-solutions/transient-showcase}.
 
 @noindent
-This manual is for Transient version 0.7.0.
+This manual is for Transient version 0.7.1.
 
 @insertcopying
 @end ifnottex
diff --git a/lisp/transient.el b/lisp/transient.el
index a81b424ccb..043790d601 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -6,7 +6,7 @@
 ;; Homepage: https://github.com/magit/transient
 ;; Keywords: extensions
 
-;; Package-Version: 0.7.0
+;; Package-Version: 0.7.1
 ;; Package-Requires: ((emacs "26.1") (compat "29.1.4.5") (seq "2.24"))
 
 ;; SPDX-License-Identifier: GPL-3.0-or-later



[nongnu] elpa/evil 0ad84c5216: Combine after change calls during macro execution

2024-06-19 Thread ELPA Syncer
branch: elpa/evil
commit 0ad84c52169068021ec3372bf52503631f2261de
Author: Tom Dalziel 
Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com>

Combine after change calls during macro execution

Also temporarily disable pre- and post-command hooks
---
 evil-commands.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/evil-commands.el b/evil-commands.el
index 5605f146d6..4ad249fc9d 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -2552,7 +2552,9 @@ when called interactively."
(t
 (condition-case err
 (evil-with-single-undo
-  (execute-kbd-macro macro count))
+  (let (pre-command-hook post-command-hook) ; For performance
+(combine-after-change-calls
+  (execute-kbd-macro macro count
   ;; enter Normal state if the macro fails
   (error
(evil-normal-state)



[nongnu] elpa/proof-general 99f91e873e: fix(coq.el): (setq proof-shell-strip-crs-from-input nil) (#774)

2024-06-19 Thread ELPA Syncer
branch: elpa/proof-general
commit 99f91e873ec2fdc41079555db1130f07d9a9ce89
Author: Erik Martin-Dorel 
Commit: GitHub 

fix(coq.el): (setq proof-shell-strip-crs-from-input nil) (#774)

Related: https://github.com/ProofGeneral/PG/issues/773
---
 coq/coq.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/coq/coq.el b/coq/coq.el
index fdafe2dd43..28d1be2887 100644
--- a/coq/coq.el
+++ b/coq/coq.el
@@ -1988,6 +1988,10 @@ at `proof-assistant-settings-cmds' evaluation time.")
proof-shell-interrupt-regexp coq-interrupt-regexp
proof-shell-assumption-regexp coq-id
proof-shell-theorem-dependency-list-regexp 
coq-shell-theorem-dependency-list-regexp
+   ;; CRs now can and should be preserved (to support String-related theories),
+   ;; see also this GitHub issue: https://github.com/ProofGeneral/PG/issues/773
+   proof-shell-strip-crs-from-input nil
+
pg-subterm-first-special-char ?\360
;; The next three represent path annotation information
pg-subterm-start-char ?\372  ; not done



[elpa] externals/greader 772ee0da0b: greader version 0.11.5

2024-06-19 Thread ELPA Syncer
branch: externals/greader
commit 772ee0da0b1f9ba87c6bdff378d1d2471de2fa88
Author: Michelangelo Rodriguez 
Commit: Michelangelo Rodriguez 

greader version 0.11.5

Customization option `greader-audiobook-include-track-name-in-audio'
added: This option allow us to have the title of the current track
spoken at the start.

Customization option `greader-audiobook-pause-at-end-of-track' added:
This option allow us to specify that we want an artificial pause at
end of  the current track maybe because owr reader is buggy, and jumps
if the track currently playing does'nt have a final pause.
You can also customize the variable `greader-audiobook-pause-string'
to change the string that is used to generate the pause.
---
 greader-audiobook.el | 16 
 greader.el   |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/greader-audiobook.el b/greader-audiobook.el
index 4ce4e58b36..fb1f019b95 100644
--- a/greader-audiobook.el
+++ b/greader-audiobook.el
@@ -146,6 +146,17 @@ In this way, you will have only the zipped file containing 
the book."
 Only the final report will be printed."
   :type '(boolean))
 
+(defcustom greader-audiobook-include-track-name-in-audio nil
+  "If t, audio track names will be included at start of each file."
+  :type '(boolean))
+(defcustom greader-audiobook-pause-at-end-of-track t
+  "Enable to add a pause at end of each block."
+  :type '(boolean))
+
+(defcustom greader-audiobook-pause-string "\n.\n.\n.\n.\n.\n"
+  "The string that will be used to generate the pause at end of sentence."
+  :type '(string))
+
 ;; functions
 
 (defun greader-audiobook--get-block ()
@@ -207,9 +218,14 @@ Return the generated file name, or nil if at end of the 
buffer."
(text (when block (buffer-substring (car block) (cdr block)
 (if block
(progn
+ (when greader-audiobook-include-track-name-in-audio
+   (setq text (concat (file-name-sans-extension filename)
+  ".\n" text)))
  (setq text (greader-dehyphenate text))
  (when (or greader-dict-mode greader-dict-toggle-filters)
(setq text (greader-dict-check-and-replace text)))
+ (when greader-audiobook-pause-at-end-of-track
+   (setq text (concat text greader-audiobook-pause-string)))
  (setq output (call-process command nil "*espeak-output*" nil
 rate language
 wave-file text))
diff --git a/greader.el b/greader.el
index 82f4c1f6a7..dfcc428246 100644
--- a/greader.el
+++ b/greader.el
@@ -8,7 +8,7 @@
 ;; URL: https://gitlab.com/michelangelo-rodriguez/greader
 
 ;; package-requires: ((google-translate))
-;; Version: 0.11.4
+;; Version: 0.11.5
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by



[elpa] externals/org a92951d0c6: org-link-expand-abbrev: Auto-disable custom abbrevs that fail to expand

2024-06-19 Thread ELPA Syncer
branch: externals/org
commit a92951d0c65256695eab40dfd0138c0aceefad71
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-link-expand-abbrev: Auto-disable custom abbrevs that fail to expand

* lisp/ol.el (org-link-expand-abbrev): When a custom link abbrev
function errs or returns non-string, show a warning and disable that
abbrev.
---
 lisp/ol.el | 40 +---
 1 file changed, 29 insertions(+), 11 deletions(-)

diff --git a/lisp/ol.el b/lisp/ol.el
index a8a59ddaae..93ba9db6d9 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1158,17 +1158,35 @@ Abbreviations are defined in `org-link-abbrev-alist'."
   (if (not as)
  link
(setq rpl (cdr as))
-   (cond
-((symbolp rpl) (funcall rpl tag))
-((string-match "%(\\([^)]+\\))" rpl)
- (replace-match
-  (save-match-data
-(funcall (intern-soft (match-string 1 rpl)) tag))
-  t t rpl))
-((string-match "%s" rpl) (replace-match (or tag "") t t rpl))
-((string-match "%h" rpl)
- (replace-match (url-hexify-string (or tag "")) t t rpl))
-(t (concat rpl tag)))
+(cl-macrolet
+((eval-or-disable (&rest body)
+   "Run BODY and disable AS abbrev if it errs."
+   `(condition-case err
+   (progn ,@body)
+  (error
+   (org-display-warning
+(format "Disabling link abbrev %s <- %s after expansion 
failure: %S"
+rpl link (error-message-string err)))
+   (setq org-link-abbrev-alist-local (delete as 
org-link-abbrev-alist-local)
+org-link-abbrev-alist (delete as 
org-link-abbrev-alist))
+   link
+ (cond
+  ((symbolp rpl)
+(eval-or-disable
+ (let ((expanded (funcall rpl tag)))
+   (unless (stringp expanded)
+ (error "%s did not return a string: %S" rpl expanded))
+   expanded)))
+  ((string-match "%(\\([^)]+\\))" rpl)
+(eval-or-disable
+ (replace-match
+  (save-match-data
+(funcall (intern-soft (match-string 1 rpl)) tag))
+  t t rpl)))
+  ((string-match "%s" rpl) (replace-match (or tag "") t t rpl))
+  ((string-match "%h" rpl)
+   (replace-match (url-hexify-string (or tag "")) t t rpl))
+  (t (concat rpl tag
 
 (defun org-link-open (link &optional arg)
   "Open a link object LINK.



[elpa] externals-release/org fc0fb90b67: ; fix typos

2024-06-19 Thread ELPA Syncer
branch: externals-release/org
commit fc0fb90b67030e5179e689b52fa14f1e7ee2
Author: Morgan Smith 
Commit: Ihor Radchenko 

; fix typos

* doc/org-manual.org: Add missing '~'.
* lisp/org-element-ast.el (org-element-deferred): Fix typo in docstring.
* lisp/org-element.el (org-element-archive-tag,
org-element-drawer-re-nogroup, org-element--cache-log-message): Fix
typos in docstring.
(org-element--current-element, org-element--cache-find,
org-element-cache-map): Fix typos in comments.
---
 doc/org-manual.org  |  2 +-
 lisp/org-element-ast.el |  2 +-
 lisp/org-element.el | 13 ++---
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 170eea506a..33f1d164d9 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -23163,7 +23163,7 @@ specify a date December 1, 2005, the call might look 
like
 =(diary-date 12 1 2005)= or =(diary-date 1 12 2005)= or =(diary-date
 2005 12 1)=, depending on the settings.  This has been the source of
 much confusion.  Org mode users can resort to special versions of
-these functions, namely ~org-date~, ~org-anniversary~, ~org-cyclic, and
+these functions, namely ~org-date~, ~org-anniversary~, ~org-cyclic~, and
 ~org-block~.  These work just like the corresponding ~diary-~
 functions, but with stable ISO order of arguments (year, month, day)
 wherever applicable, independent of the value of
diff --git a/lisp/org-element-ast.el b/lisp/org-element-ast.el
index fba6b37e66..2c767e1ad2 100644
--- a/lisp/org-element-ast.el
+++ b/lisp/org-element-ast.el
@@ -270,7 +270,7 @@ Return value is the containing property name, as a keyword, 
or nil."
   "Dynamically computed value.
 
 The value can be obtained by calling FUNCTION with containing syntax
-node as first argument and ARGS list as remainting arguments.
+node as first argument and ARGS list as remaining arguments.
 
 If the function throws `:org-element-deferred-retry' signal, assume
 that the syntax node has been modified by side effect and retry
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 191bb5698d..811d322765 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -110,7 +110,7 @@
 ;; to current setup.
 
 (defconst org-element-archive-tag "ARCHIVE"
-  "Tag marking a substree as archived.")
+  "Tag marking a subtree as archived.")
 
 (defconst org-element-citation-key-re
   (rx "@" (group (one-or-more (any word "-.:?!`'/*@+|(){}<>&_^$#%~"
@@ -181,8 +181,7 @@ Drawer's name is located in match group 1.")
   (rx line-start (0+ (any ?\s ?\t))
   ":" (1+ (any ?- ?_ word)) ":"
   (0+ (any ?\s ?\t)) line-end)
-  "Regexp matching opening or closing line of a drawer.
-Drawer's name is located in match group 1.")
+  "Regexp matching opening or closing line of a drawer.")
 
 (defconst org-element-dynamic-block-open-re
   (rx line-start (0+ (any ?\s ?\t))
@@ -4679,7 +4678,7 @@ element it has to parse."
;;
;; In general, the checks below should be as efficient as
;; possible, especially early in the `cond' form.  (The
-   ;; early checks will contribute to al subsequent parsers as
+   ;; early checks will contribute to all subsequent parsers as
;; well).
(cond
;; Item.
@@ -5956,7 +5955,7 @@ better to remove the commands advised in such a way from 
this list.")
 
 (defmacro org-element--cache-log-message (format-string &rest args)
   "Add a new log message for org-element-cache.
-FORMAT-STRING and ARGS are the same arguments as in `foramt'."
+FORMAT-STRING and ARGS are the same arguments as in `format'."
   `(when (or org-element--cache-diagnostics
  (eq org-element--cache-self-verify 'backtrace))
  (let* ((format-string (concat (format "org-element-cache diagnostics(%s): 
"
@@ -6226,7 +6225,7 @@ the cache."
;; children starting at the same pos.
(not (org-element-type-p hashed '(section org-data table
   hashed
-;; No appriate HASHED.  Search the cache.
+;; No appropriate HASHED.  Search the cache.
 (while node
   (let* ((element (avl-tree--node-data node))
 (begin (org-element-begin element)))
@@ -8323,7 +8322,7 @@ the cache."
 limit-count))
 (cache-walk-abort))
   ;; Make sure that we have a cached
-  ;; element at the new STAR.
+  ;; element at the new START.
   (when start (element-match-at-point)))
 ;; Check if the buffer or cache has been modified.
 (unless (org-with-base-buffer nil



[nongnu] elpa/idris-mode 38dd2380dc 2/2: Merge pull request #631 from jfdm/spruce

2024-06-19 Thread ELPA Syncer
branch: elpa/idris-mode
commit 38dd2380dca5025311cee669cce2361fb8725f51
Merge: 01ecdba625 9ebf02d473
Author: Jan de Muijnck-Hughes 
Commit: GitHub 

Merge pull request #631 from jfdm/spruce

[ ci ] ensure we test idris1 againsts latest idris1 and emacs.
---
 .github/workflows/idris1.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/idris1.yml b/.github/workflows/idris1.yml
index 3095d7faac..6b1d126eed 100644
--- a/.github/workflows/idris1.yml
+++ b/.github/workflows/idris1.yml
@@ -19,8 +19,8 @@ jobs:
 timeout-minutes: 60
 strategy:
   matrix:
-emacs: [27.2, 28.2, 29.3]
-idris: [git, stackage]
+emacs: [29.3]
+idris: [git]
 env:
   EMACS_VERSION: ${{ matrix.emacs }}
   IDRIS_VERSION: ${{ matrix.idris }}



[nongnu] elpa/idris-mode 9ebf02d473 1/2: [ ci ] ensure we test idris1 againsts latest idris1 and emacs.

2024-06-19 Thread ELPA Syncer
branch: elpa/idris-mode
commit 9ebf02d4738646f7c5b446d2d8c583a465eb6e05
Author: Jan de Muijnck-Hughes 
Commit: Jan de Muijnck-Hughes 

[ ci ] ensure we test idris1 againsts latest idris1 and emacs.
---
 .github/workflows/idris1.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/idris1.yml b/.github/workflows/idris1.yml
index 3095d7faac..6b1d126eed 100644
--- a/.github/workflows/idris1.yml
+++ b/.github/workflows/idris1.yml
@@ -19,8 +19,8 @@ jobs:
 timeout-minutes: 60
 strategy:
   matrix:
-emacs: [27.2, 28.2, 29.3]
-idris: [git, stackage]
+emacs: [29.3]
+idris: [git]
 env:
   EMACS_VERSION: ${{ matrix.emacs }}
   IDRIS_VERSION: ${{ matrix.idris }}



[nongnu] elpa/xah-fly-keys e1331b7c1a: xah-copy-line-or-region, fixed issue with rectangle-mark-mode. bug #175

2024-06-19 Thread ELPA Syncer
branch: elpa/xah-fly-keys
commit e1331b7c1aeccc000826e909671f47a2ec57cdff
Author: Xah Lee 
Commit: Xah Lee 

xah-copy-line-or-region, fixed issue with rectangle-mark-mode. bug #175
---
 xah-fly-keys.el | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/xah-fly-keys.el b/xah-fly-keys.el
index e38fc805b5..10f5a581ea 100644
--- a/xah-fly-keys.el
+++ b/xah-fly-keys.el
@@ -4,7 +4,7 @@
 
 ;; Author: Xah Lee ( http://xahlee.info/ )
 ;; Maintainer: Xah Lee 
-;; Version: 25.8.20240618181451
+;; Version: 25.8.20240619081048
 ;; Created: 2013-09-10
 ;; Package-Requires: ((emacs "27"))
 ;; Keywords: convenience, vi, vim, ergoemacs, keybinding
@@ -354,16 +354,22 @@ Version: 2024-03-19"
 
 (defun xah-copy-line-or-region ()
   "Copy current line or selection.
-When called repeatedly, append copy subsequent lines.
+
+Copy current line. When called repeatedly, append copy subsequent lines.
+Except:
+
 If `universal-argument' is called first, copy whole buffer (respects 
`narrow-to-region').
+If `rectangle-mark-mode' is on, copy the rectangle.
+If `region-active-p', copy the region.
 
 URL `http://xahlee.info/emacs/emacs/emacs_copy_cut_current_line.html'
 Created: 2010-05-21
-Version: 2024-06-18"
+Version: 2024-06-19"
   (interactive)
   (cond
(current-prefix-arg (copy-region-as-kill (point-min) (point-max)))
-   (rectangle-mark-mode (copy-region-as-kill (region-beginning) (region-end) 
t))
+   ((and (boundp 'rectangle-mark-mode) rectangle-mark-mode)
+(copy-region-as-kill (region-beginning) (region-end) t))
((region-active-p) (copy-region-as-kill (region-beginning) (region-end)))
((eq last-command this-command)
 (if (eobp)



[elpa] externals/cape f61da109a9: `cape-company-to-capf` should not be used if `company-mode` is enabled

2024-06-19 Thread ELPA Syncer
branch: externals/cape
commit f61da109a9e4491614938c300291060fd8855c1b
Author: Daniel Mendler 
Commit: Daniel Mendler 

`cape-company-to-capf` should not be used if `company-mode` is enabled

Instead the Company backends should be used directly, to avoid the 
unnecessary
indirection and potential performance and compatibility issues due to the 
double
conversion Company -> Capf -> Company.
---
 cape.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cape.el b/cape.el
index b5f6c5d93a..adab1f1622 100644
--- a/cape.el
+++ b/cape.el
@@ -824,6 +824,8 @@ changed.  The function `cape-company-to-capf' is 
experimental."
   (lambda ()
 (when (and (symbolp backend) (not (fboundp backend)))
   (ignore-errors (require backend nil t)))
+(when (bound-and-true-p company-mode)
+  (error "`cape-company-to-capf' should not be used with `company-mode', 
use the Company backend directly instead"))
 (when (and (symbolp backend) (not (alist-get backend cape--company-init)))
   (funcall backend 'init)
   (put backend 'company-init t)



[nongnu] elpa/hyperdrive 488cc472b7: Revert "Change: (h/api-default-else) Use h/message instead of h/user-error"

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 488cc472b7c7710282248a5a85cbb361274951d3
Author: Joseph Turner 
Commit: Joseph Turner 

Revert "Change: (h/api-default-else) Use h/message instead of h/user-error"

This reverts commit 167d1e629fbfccf0a422fde900f7ad62d3fc38c0.  This
default else handler may be in a synchronous code path, so we need to
signal an error.  In the future, we might consider ways to polish the
way that the error message is displayed.
---
 hyperdrive-lib.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index d8817ebe75..c2ff1f70d2 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -239,10 +239,10 @@ PLZ-ERR should be a `plz-error' struct."
   (pcase plz-err
 ((app plz-error-curl-error `(7 . ,_message))
  ;; Curl error 7 is "Failed to connect to host."
- (h/message "Gateway not running.  Use \\[hyperdrive-start] to start it"))
+ (h/user-error "Gateway not running.  Use \\[hyperdrive-start] to start 
it"))
 ((app plz-error-response (cl-struct plz-response (status (or 403 405)) 
body))
  ;; 403 Forbidden or 405 Method Not Allowed: Display message from gateway.
- (h/message "%s" body))
+ (h/error "%s" body))
 ((guard else)
  (funcall else plz-err))
 (_



[nongnu] elpa/hyperdrive 21fa46a869 24/42: Comment: Add TODO

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 21fa46a869e56b935771ccd49b4b6bfbde4fd23d
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: Add TODO
---
 hyperdrive.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hyperdrive.el b/hyperdrive.el
index ff6f595a17..f731f368be 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -822,6 +822,9 @@ The return value of this function is the retrieval buffer."
((cl-struct plz-response body)
 (he/api 'get (h/url-entry url) :as 'response)))
 (with-current-buffer (generate-new-buffer " *hyperdrive-eww*")
+  ;; TODO: After refactoring to use :as 'response, this buffer no longer
+  ;; contains HTTP headers.  Confirm that EWW works properly when buffer
+  ;; lacks headers.
   (widen)
   (goto-char (point-min))
   (insert body)



[nongnu] elpa/hyperdrive 50e2ad1cb9 05/42: Tidy

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 50e2ad1cb9c08849d3094c8290ccdacc499d04a5
Author: Adam Porter 
Commit: Joseph Turner 

Tidy
---
 hyperdrive-dir.el | 1 +
 hyperdrive.el | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index afbdb957a0..be619f88ce 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -204,6 +204,7 @@ With point on header, returns directory entry."
 ;; `h/menu' is defined with `transient-define-prefix', which
 ;; `check-declare' doesn't recognize.
 (declare-function h/menu "hyperdrive-menu" nil t)
+(declare-function h/forget-file "hyperdrive")
 
 (defvar-keymap h/dir-mode-map
   :parent h/ewoc-mode-map
diff --git a/hyperdrive.el b/hyperdrive.el
index f12ce5c820..62ab08ccfc 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -194,7 +194,7 @@ modified; file blobs may be recoverable from other peers."
   (interactive (list (h//context-entry)))
   (when (yes-or-no-p
  (format-message
-  "Clear local copy of entry (data may not be recoverable—see 
manual):`%s'?  "
+  "Clear local copy of entry (data may not be recoverable—see 
manual):`%s'? "
   (h//format-entry entry)))
 (he/api 'post entry
   :headers '(("Cache-Control" . "no-store"))



[nongnu] elpa/hyperdrive 2b3bf323a0 08/42: Change: (he/api) Always use :as 'response

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 2b3bf323a0b1f03857bffa82bbfd43b6a754881f
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (he/api) Always use :as 'response
---
 hyperdrive-lib.el | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 763c3838d9..ada75be0ad 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -206,9 +206,14 @@ make the request."
 
 (defun he/api (method entry &rest rest)
   "Make hyperdrive API request by METHOD for ENTRY.
-REST is passed to `h/api', which see."
+REST is passed to `h/api', which see.
+`:as' keyword argument of `hyperdrive-api' is always `response'.
+"
   (declare (indent defun))
-  (cl-assert (eq 'response (plist-get rest :as)))
+  ;; Always use :as 'response
+  (cl-assert (null (plist-get rest :as)))
+  (plist-put rest :as 'response)
+
   (pcase-let* (((map :then) rest)
(then* (lambda (response)
 (he//api-then entry response)



[nongnu] elpa/hyperdrive 4a8915688b 15/42: Comment: Note plz.el Github issue

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 4a8915688b39fc274f0bb8a7e2836ab8122cde80
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: Note plz.el Github issue
---
 hyperdrive.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index 42ba2066c5..0e0d770ad1 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -472,7 +472,7 @@ in a directory.  Otherwise, or with universal prefix 
argument
   (delete-file filename))
 (h/api 'get url :as `(file ,filename))
 ;; TODO: If plz adds support for getting response headers when downloading
-;; as a file, use it here.
+;; as a file (), use it 
here.
 ;; Filling entry is necessary in order to update hyperdrive disk-usage.
 (h/fill (h/url-entry url
 



[nongnu] elpa/hyperdrive 84dd364b74 29/42: Change: (he//fill) Don't fill hyperdrive disk-usage

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 84dd364b74a46df496e250d2c5499b794fbdf772
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (he//fill) Don't fill hyperdrive disk-usage

This is now taken care of in he/api-then.
---
 hyperdrive-lib.el | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 157f70231d..ea96b8811c 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -735,9 +735,6 @@ Returns filled ENTRY."
  (cl-parse-integer content-length
 (setf (he/type entry) content-type)
 (setf (he/mtime entry) last-modified)
-(when x-drive-size
-  (setf (map-elt etc 'disk-usage) (cl-parse-integer x-drive-size)))
-(setf (h/etc hyperdrive) etc)
 (if persisted-hyperdrive
 ;; TODO: Consider moving this block into he/api-then.
 (progn



[nongnu] elpa/hyperdrive c3e9bc5e0a 35/42: Comment: Remove TODO

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit c3e9bc5e0a4279b00573b22bdd1ee5ac174244b8
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: Remove TODO
---
 hyperdrive-lib.el | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 46ccce299a..753e97f025 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -717,9 +717,6 @@ The following ENTRY slots are filled:
 - \\+`size'
 
 Returns filled ENTRY."
-  ;; TODO: Consider factoring out parts of this that should be done for every
-  ;; API entry response (i.e. in `he//api-then'; e.g. drive-size, 
version-range,
-  ;; latest-version).
   (pcase-let*
   (((map content-length content-type etag last-modified) headers))
 (when last-modified



[nongnu] elpa/hyperdrive 633e7171f6 13/42: Change: (h/url-loader) Use he/api

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 633e7171f633f9627cc83460fda36632b19fb419
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (h/url-loader) Use he/api
---
 hyperdrive.el | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index 3c3d959c0b..42ba2066c5 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -814,10 +814,7 @@ The return value of this function is the retrieval buffer."
;; TODO: When `plz.el' adds :as 'response-with-buffer, use that.
;; response-buffer will contain the loaded HTML, and will be 
deleted at the end of `eww-render'.
((cl-struct plz-response headers body)
-(h/api 'get url :as 'response)))
-;; Filling entry is necessary in order to update hyperdrive disk-usage.
-;; TODO: Use he/api and update disk usage automatically.
-(h//fill (h/url-entry url) headers)
+(he/api 'get (h/url-entry url) :as 'response)))
 (with-current-buffer (generate-new-buffer " *hyperdrive-eww*")
   (widen)
   (goto-char (point-min))



[nongnu] elpa/hyperdrive 53b76cc4a2 06/42: Add: (he//api-then)

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 53b76cc4a2a5476c6a33488147eccb788f2250e0
Author: Adam Porter 
Commit: Joseph Turner 

Add: (he//api-then)
---
 hyperdrive-lib.el | 21 -
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 24e9592b72..c8ceaf7849 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -208,7 +208,26 @@ make the request."
   "Make hyperdrive API request by METHOD for ENTRY.
 REST is passed to `h/api', which see."
   (declare (indent defun))
-  (apply #'h/api method (he/url entry) rest))
+  (cl-assert (eq 'response (plist-get rest :as)))
+  (pcase-let* (((map :then) rest)
+   (then* (lambda (response)
+(he//api-then entry response)
+(funcall then response
+(plist-put rest :then then*)
+(apply #'h/api method (he/url entry) rest)))
+
+(defun he//api-then (entry response)
+  "Update ENTRY's metadata according to RESPONSE.
+Updates ENTRY's hyperdrive's disk usage."
+  (pcase-let* (((cl-struct plz-response (headers (map x-drive-size)))
+response)
+   ((cl-struct h/entry hyperdrive) entry)
+   ((cl-struct hyperdrive etc) hyperdrive))
+(when x-drive-size
+  (setf (map-elt etc 'disk-usage) (cl-parse-integer x-drive-size)
+(h/etc hyperdrive) etc)
+  ;; TODO: Consider debouncing or something for hyperdrive-persist to 
minimize I/O.
+  (h/persist hyperdrive
 
 (defun h/gateway-needs-upgrade-p ()
   "Return non-nil if the gateway is responsive and needs upgraded."



[nongnu] elpa/hyperdrive updated (488cc472b7 -> 79541d4aab)

2024-06-19 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  488cc472b7 Revert "Change: (h/api-default-else) Use h/message 
instead of h/user-error"
   new  d13e6ffccb Revert "Change: (h//url-history) Use h//context-entry by 
default"
   new  2ad91d4c68 Fix: (h/read-url) Prompt for entry at point in dir-mode
   new  bc0ec7ffc5 Tidy: Indentation
   new  849de77a47 Add: (he/api) New function, and use it
   new  50e2ad1cb9 Tidy
   new  53b76cc4a2 Add: (he//api-then)
   new  167373402a Comment: Add TODO
   new  2b3bf323a0 Change: (he/api) Always use :as 'response
   new  c15b3ee54c Change: Remove :as 'response from calls to he/api
   new  783f73c602 Change: Remove unnecessary calls h//fill
   new  36b0293cdd Change: (h/write) Use he/api
   new  bc5104f80a Change: Remove unused functions he//write, h//write
   new  633e7171f6 Change: (h/url-loader) Use he/api
   new  565ba68065 Change: (h/api) Explain purpose in docstring
   new  4a8915688b Comment: Note plz.el Github issue
   new  a4d190a7bb Comment: Add TODO
   new  28d51a621b Comment: TODO
   new  9f07c4588e Change: (he/api) Fill latest version
   new  b09916654d Comment: Add TODO
   new  78e8eda8e9 Change: (he/fill) Rename from h/fill
   new  257c361e03 Change: (he//fill) Rename from h//fill
   new  3b564cdf22 Change: (h//?fill) Rename from h//?fill-latest-version
   new  631a533f70 Fix: Compilation errors
   new  21fa46a869 Comment: Add TODO
   new  57850eef88 Comment: Remove incorrect comment
   new  ad0dba6928 Fix: (he/api) Handle synchronous case
   new  f1bda470b4 Change: Remove unnecessary calls to h//fill
   new  08bd15b54d Fix: (h/seed-url) Fill disk usage after getting URL
   new  84dd364b74 Change: (he//fill) Don't fill hyperdrive disk-usage
   new  232e38a7ae Change: Use new X-Drive-Version header
   new  d348be0615 Comment: Remove old TODO
   new  ab8cd67c8a Remove: (h//fill) Unused function; move TODO comment
   new  c7bd3605b1 Change: (he/api) Set ENTRY hyperdrive to persisted copy
   new  11641c2d4f Change: (he/api) Set ENTRY hyperdrive writablep slot
   new  c3e9bc5e0a Comment: Remove TODO
   new  4fc73deeb4 Fix: (he/fill) Docstring
   new  9a48102788 Fix: (h/url-loader) Remove :as 'response
   new  66247fdfdf Meta: Update hyper-gateway-ushin to 3.10.1: More headers
   new  5943275a30 Fix: (he/api) Rebind modified plists
   new  17666ebbbc Fix: (h/url-loader) Add temporary hack for EWW
   new  f044f39bf8 Tidy: Docstring
   new  79541d4aab Merge: (he/api) Consolidate hyperdrive filling logic 
into callback


Summary of changes:
 hyperdrive-describe.el |   2 +-
 hyperdrive-diff.el |  14 +--
 hyperdrive-dir.el  |  10 +-
 hyperdrive-history.el  |   4 +-
 hyperdrive-lib.el  | 247 ++---
 hyperdrive-mirror.el   |   2 +-
 hyperdrive-vars.el |   2 +-
 hyperdrive.el  |  85 -
 8 files changed, 160 insertions(+), 206 deletions(-)



[nongnu] elpa/hyperdrive 849de77a47 04/42: Add: (he/api) New function, and use it

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 849de77a47ce2ab74c68b75e201dcdbd465dd891
Author: Adam Porter 
Commit: Joseph Turner 

Add: (he/api) New function, and use it
---
 hyperdrive-diff.el |  4 ++--
 hyperdrive-dir.el  |  5 ++---
 hyperdrive-lib.el  | 35 ---
 hyperdrive.el  | 34 +-
 4 files changed, 45 insertions(+), 33 deletions(-)

diff --git a/hyperdrive-diff.el b/hyperdrive-diff.el
index 9885d00aa5..2e8361337b 100644
--- a/hyperdrive-diff.el
+++ b/hyperdrive-diff.el
@@ -103,12 +103,12 @@ This function is intended to diff files, not directories."
  (kill-buffer old-buffer))
(when (buffer-live-p new-buffer)
  (kill-buffer new-buffer
-(h/api 'get (he/url old-entry)
+(he/api 'get old-entry
   :queue queue :as 'response :else #'ignore
   :then (lambda (response)
   (h//fill old-entry (plz-response-headers response))
   (setf old-response response)))
-(h/api 'get (he/url new-entry)
+(he/api 'get new-entry
   :queue queue :as 'response :else #'ignore
   :then (lambda (response)
   (h//fill new-entry (plz-response-headers response))
diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index b379422f6b..afbdb957a0 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -40,7 +40,6 @@ If THEN, call it in the directory buffer with no arguments."
   ;; NOTE: ENTRY is not necessarily "filled" yet.
   (pcase-let*
   (((cl-struct hyperdrive-entry hyperdrive version) directory-entry)
-   (url (he/url directory-entry))
(header (progn
  ;; Fill metadata first to get the current nickname.
  ;; TODO: Consider filling metadata earlier, outside
@@ -63,7 +62,7 @@ If THEN, call it in the directory buffer with no arguments."
   (when-let ((node (h/ewoc-find-node ewoc entry
  :predicate #'he/equal-p)))
 (goto-char (ewoc-location node)
-  (h/api 'get url :as 'response :noquery t
+  (he/api 'get directory-entry :as 'response :noquery t
 ;; Get "full" listing with metadata
 :headers `(("Accept" . "application/json; metadata=full"))
 :then (lambda (response)
@@ -350,7 +349,7 @@ see Info node `(elisp)Yanking Media'."
hyperdrive)
   :predicate #'h/writablep
   :default-path path :latest-version t)))
-  (h/api 'put (he/url entry)
+  (he/api 'put entry
 :body-type 'binary
 ;; TODO: Pass MIME type in a header? hyper-gateway detects it for us.
 :body image :as 'response
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 21e24b382a..24e9592b72 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -204,6 +204,12 @@ make the request."
;; We pass only the `plz-error' struct to the ELSE* function.
(funcall else* (caddr err))
 
+(defun he/api (method entry &rest rest)
+  "Make hyperdrive API request by METHOD for ENTRY.
+REST is passed to `h/api', which see."
+  (declare (indent defun))
+  (apply #'h/api method (he/url entry) rest))
+
 (defun h/gateway-needs-upgrade-p ()
   "Return non-nil if the gateway is responsive and needs upgraded."
   (and (h//gateway-ready-p)
@@ -254,6 +260,16 @@ PLZ-ERR should be a `plz-error' struct."
   h/gateway-port
   (substring url (length h//hyper-prefix
 
+(cl-defun he//write (entry &key body then else queue)
+  "Save BODY (a string) to hyperdrive ENTRY.
+THEN and ELSE are passed to `hyperdrive-api', which see."
+  (declare (indent defun))
+  (he/api 'put entry
+;; TODO: Investigate whether we should use 'text body type for text 
buffers.
+:body-type 'binary
+;; TODO: plz accepts buffer as a body, we should refactor calls to 
h//write to pass in a buffer instead of a buffer-string.
+:body body :as 'response :then then :else else :queue queue))
+
 (cl-defun h//write (url &key body then else queue)
   "Save BODY (a string) to hyperdrive URL.
 THEN and ELSE are passed to `hyperdrive-api', which see."
@@ -647,7 +663,7 @@ the given `plz-queue'"
 ('sync (condition-case err
(h//fill entry
 (plz-response-headers
- (h/api 'head (he/url entry)
+ (he/api 'head entry
:as 'response
:then 'sync
:noquery t)))
@@ -658,7 +674,7 @@ the given `plz-queue'"
  (h/update-nonexistent-version-range entry)))
   ;; Re-signal error for, e.g. `he/at'.
   (signal (car err) (cdr err)
-(_ (h/api 'head (he/url entry)
+(_ (he/api 'head entry
  :queue queue
  :as 'response
  :then (lambda (response)
@@ -765,10 +781,

[nongnu] elpa/hyperdrive 783f73c602 10/42: Change: Remove unnecessary calls h//fill

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 783f73c602ac64c98aa0b978f84bba94172b2afa
Author: Joseph Turner 
Commit: Joseph Turner 

Change: Remove unnecessary calls h//fill

Now that he/api fills disk usage, these calls to h//fill are not needed.
---
 hyperdrive-diff.el | 8 ++--
 hyperdrive-lib.el  | 3 ---
 hyperdrive.el  | 1 -
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/hyperdrive-diff.el b/hyperdrive-diff.el
index f804b66dca..3f633da749 100644
--- a/hyperdrive-diff.el
+++ b/hyperdrive-diff.el
@@ -104,13 +104,9 @@ This function is intended to diff files, not directories."
(when (buffer-live-p new-buffer)
  (kill-buffer new-buffer
 (he/api 'get old-entry :queue queue :else #'ignore
-  :then (lambda (response)
-  (h//fill old-entry (plz-response-headers response))
-  (setf old-response response)))
+  :then (lambda (response) (setf old-response response)))
 (he/api 'get new-entry :queue queue :else #'ignore
-  :then (lambda (response)
-  (h//fill new-entry (plz-response-headers response))
-  (setf new-response response)
+  :then (lambda (response) (setf new-response response)
 
  Mode
 
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 2a28d0c482..dcc20c6fcb 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1005,7 +1005,6 @@ HYPERDRIVE's public metadata file."
  (pcase-let
  (((cl-struct plz-response headers body)
(he/api 'get entry :noquery t)))
-   (h//fill entry headers)
(with-temp-buffer
  (insert body)
  (goto-char (point-min))
@@ -1396,8 +1395,6 @@ If then, then call THEN with no arguments.  Default 
handler."
 ;; TODO: Handle errors
 ;; TODO: When plz adds :as 'response-with-buffer, use that.
 (he/api 'get entry :noquery t))
-   ;; Filling entry is necessary in order to update hyperdrive disk-usage.
-   (_ (h//fill entry headers))
((cl-struct hyperdrive-entry hyperdrive version etc) entry)
((map target) etc))
 (with-current-buffer (h//get-buffer-create entry)
diff --git a/hyperdrive.el b/hyperdrive.el
index c8b66c0a12..3c3d959c0b 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -201,7 +201,6 @@ modified; file blobs may be recoverable from other peers."
   :else (lambda (err)
   (h/error "Unable to clear cache for `%s': %S" (he/url entry) 
err))
   :then (lambda (response)
-  (h//fill entry (plz-response-headers response))
   (h/message "Cleared `%s'" (h//format-entry entry))
   ;; TODO: When file sizes in hyperdrive-dir-mode are colorized
   ;; based locally downloaded sizes, refresh ewoc entry here.



[nongnu] elpa/hyperdrive 08bd15b54d 28/42: Fix: (h/seed-url) Fill disk usage after getting URL

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 08bd15b54d1bee1fb3f0fd5890ac6d85da91cda1
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: (h/seed-url) Fill disk usage after getting URL

While it's possible to fill this data in only a single request, I
think the semantic clarity of calling h/fill explicitly is worth the
negligible performance hit of making an additional HEAD request.
---
 hyperdrive-lib.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 30181dc6c0..157f70231d 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1351,9 +1351,7 @@ hyperdrive."
 (h/api 'get (format "hyper://localhost/?key=%s"
 (url-hexify-string seed))
   :as 'response :noquery t)))
-;; TODO: Update hyperdrive disk-usage.  The following doesn't work
-;; because the response doesn't have the proper ETag header:
-;; (he//fill (h/url-entry url) headers)
+(h/fill (h/url-entry url))
 url)
 (plz-error (if (= 400 (plz-response-status (plz-error-response (caddr 
err
;; FIXME: If plz-error is a curl-error, this block will 
fail.



[nongnu] elpa/hyperdrive bc5104f80a 12/42: Change: Remove unused functions he//write, h//write

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit bc5104f80a3564b6e2d09cfb60a5e8820d8bff85
Author: Joseph Turner 
Commit: Joseph Turner 

Change: Remove unused functions he//write, h//write
---
 hyperdrive-lib.el | 20 
 1 file changed, 20 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 7171cb59a5..b07d41b769 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -284,26 +284,6 @@ PLZ-ERR should be a `plz-error' struct."
   h/gateway-port
   (substring url (length h//hyper-prefix
 
-(cl-defun he//write (entry &key body then else queue)
-  "Save BODY (a string) to hyperdrive ENTRY.
-THEN and ELSE are passed to `hyperdrive-api', which see."
-  (declare (indent defun))
-  (he/api 'put entry
-;; TODO: Investigate whether we should use 'text body type for text 
buffers.
-:body-type 'binary
-;; TODO: plz accepts buffer as a body, we should refactor calls to 
h//write to pass in a buffer instead of a buffer-string.
-:body body :then then :else else :queue queue))
-
-(cl-defun h//write (url &key body then else queue)
-  "Save BODY (a string) to hyperdrive URL.
-THEN and ELSE are passed to `hyperdrive-api', which see."
-  (declare (indent defun))
-  (h/api 'put url
-;; TODO: Investigate whether we should use 'text body type for text 
buffers.
-:body-type 'binary
-;; TODO: plz accepts buffer as a body, we should refactor calls to 
h//write to pass in a buffer instead of a buffer-string.
-:body body :as 'response :then then :else else :queue queue))
-
 (defun h/parent (entry)
   "Return parent entry for ENTRY.
 If already at top-level directory, return nil."



[nongnu] elpa/hyperdrive 565ba68065 14/42: Change: (h/api) Explain purpose in docstring

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 565ba68065b6280b1b0325bfc853914fc3335bc3
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (h/api) Explain purpose in docstring
---
 hyperdrive-lib.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index b07d41b769..daf4e495b5 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -163,7 +163,11 @@ with `hyperdrive--hyper-prefix' to a URL starting with
 REST is passed to `plz', which see.
 
 REST may include the argument `:queue', a `plz-queue' in which to
-make the request."
+make the request.
+
+This low-level function should only be used when sending requests
+to the gateway which do not involve an entry.  Otherwise, use
+`hyperdrive-entry-api', which automatically fills metadata."
   ;; TODO: Document that the request/queue is returned.
   ;; TODO: Should we create a wrapper for `h/api' which calls
   ;; `h//fill-latest-version' for requests to directories/requests which modify



[nongnu] elpa/hyperdrive a4d190a7bb 16/42: Comment: Add TODO

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit a4d190a7bb7ff5499e7f128304198e6d6397313e
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: Add TODO
---
 hyperdrive-lib.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index daf4e495b5..79122b2651 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -71,6 +71,7 @@ Passes ARGS to `format-message'."
   (size nil :documentation "Size of file.")
   (version nil :documentation "Hyperdrive version specified in entry's URL.")
   (type nil :documentation "MIME type of the entry.")
+  ;; TODO: Consider adding gv-setters for etc slot keys
   (etc nil :documentation "Alist for extra data about the entry.
 - display-name :: Displayed in directory view instead of name.
 - target :: Link fragment to jump to."))
@@ -86,6 +87,7 @@ Passes ARGS to `format-message'."
   (domains nil :documentation "List of DNSLink domains which resolve to the 
drive's public-key.")
   (metadata nil :documentation "Public metadata alist.")
   (latest-version nil :documentation "Latest known version of hyperdrive.")
+  ;; TODO: Consider adding gv-setters for etc slot keys
   (etc nil :documentation "Alist of extra data.
 - disk-usage :: Number of bytes occupied locally by the drive.
 - safep :: Whether or not to treat this hyperdrive as safe."))



[nongnu] elpa/hyperdrive 9f07c4588e 18/42: Change: (he/api) Fill latest version

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 9f07c4588ee19d3235bbb3bd684480cfb874dfe5
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (he/api) Fill latest version
---
 hyperdrive-lib.el | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 2e00a91114..a5af890baf 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -229,16 +229,19 @@ REST is passed to `h/api', which see.
 
 (defun he//api-then (entry response)
   "Update ENTRY's metadata according to RESPONSE.
-Updates ENTRY's hyperdrive's disk usage."
-  (pcase-let* (((cl-struct plz-response (headers (map x-drive-size)))
+Updates ENTRY's hyperdrive's disk usage and latest version."
+  (pcase-let* (((cl-struct plz-response (headers (map x-drive-size etag)))
 response)
((cl-struct h/entry hyperdrive) entry)
((cl-struct hyperdrive etc) hyperdrive))
 (when x-drive-size
   (setf (map-elt etc 'disk-usage) (cl-parse-integer x-drive-size)
-(h/etc hyperdrive) etc)
-  ;; TODO: Consider debouncing or something for hyperdrive-persist to 
minimize I/O.
-  (h/persist hyperdrive
+(h/etc hyperdrive) etc))
+(when (and etag (h//entry-directory-p entry))
+  ;; Directory ETag header is always the latest version of the drive.
+  (setf (h/latest-version hyperdrive) (string-to-number etag)))
+;; TODO: Consider debouncing or something for hyperdrive-persist to 
minimize I/O.
+(h/persist hyperdrive)))
 
 (defun h/gateway-needs-upgrade-p ()
   "Return non-nil if the gateway is responsive and needs upgraded."



[nongnu] elpa/hyperdrive bc0ec7ffc5 03/42: Tidy: Indentation

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit bc0ec7ffc52079bd14b7f981657419fc39ef3a08
Author: Adam Porter 
Commit: Joseph Turner 

Tidy: Indentation
---
 hyperdrive.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index 19bae3470e..54edf5c31d 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -138,7 +138,7 @@ hyperdrive, the new hyperdrive's petname will be set to 
SEED."
   (pcase-let* (((cl-struct plz-response (body url))
 (h/api 'post (concat "hyper://localhost/?key="
  (url-hexify-string seed))
-   :as 'response))
+  :as 'response))
(hyperdrive (he/hyperdrive (h/url-entry url
 (setf (h/seed hyperdrive) seed)
 (setf (h/writablep hyperdrive) t)



[nongnu] elpa/hyperdrive 232e38a7ae 30/42: Change: Use new X-Drive-Version header

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 232e38a7aebee72a39826b075ef180d67e0a72a6
Author: Joseph Turner 
Commit: Joseph Turner 

Change: Use new X-Drive-Version header

Replace references to ETag with X-Drive-Version as semantically
appropriate.  Now, when we want the latest drive version, we use the
new header, and when we want the sequence number of an entry, we use
ETag.

Since the new X-Drive-Version header is returned for HEAD/GET requests
to file entries (whereas the ETag header only ever returned the latest
drive version in certain cases), we can now consolidate the logic for
filling the latest version of a hyperdrive into the he/api function.
---
 hyperdrive-lib.el | 41 -
 hyperdrive.el | 10 --
 2 files changed, 12 insertions(+), 39 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index ea96b8811c..490fe274da 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -230,16 +230,16 @@ REST is passed to `h/api', which see.
 (defun he//api-then (entry response)
   "Update ENTRY's metadata according to RESPONSE.
 Updates ENTRY's hyperdrive's disk usage and latest version."
-  (pcase-let* (((cl-struct plz-response (headers (map x-drive-size etag)))
-response)
-   ((cl-struct h/entry hyperdrive) entry)
-   ((cl-struct hyperdrive etc) hyperdrive))
+  (pcase-let*
+  (((cl-struct plz-response (headers (map x-drive-size x-drive-version)))
+response)
+   ((cl-struct h/entry hyperdrive) entry)
+   ((cl-struct hyperdrive etc) hyperdrive))
 (when x-drive-size
   (setf (map-elt etc 'disk-usage) (cl-parse-integer x-drive-size)
 (h/etc hyperdrive) etc))
-(when (and etag (h//entry-directory-p entry))
-  ;; Directory ETag header is always the latest version of the drive.
-  (setf (h/latest-version hyperdrive) (string-to-number etag)))
+(when x-drive-version
+  (setf (h/latest-version hyperdrive) (string-to-number x-drive-version)))
 ;; TODO: Consider debouncing or something for hyperdrive-persist to 
minimize I/O.
 (h/persist hyperdrive)))
 
@@ -588,11 +588,6 @@ echo area when the request for the file is made."
   (pcase-let* (((cl-struct hyperdrive-entry type) entry)
(handler (alist-get type h/type-handlers
nil nil #'string-match-p)))
-(unless (h//entry-directory-p entry)
-  ;; No need to fill latest version for directories,
-  ;; since we do it in `he//fill' already.
-  (h/fill hyperdrive))
-(h/persist hyperdrive)
 (funcall (or handler #'h/handler-default) entry :then then)))
   :else (lambda (err)
   (cl-labels ((not-found-action ()
@@ -708,7 +703,6 @@ The following ENTRY hyperdrive slots are filled:
 - \\+`public-key'
 - \\+`writablep' (when headers include Allow)
 - \\+`domains' (merged with current persisted value)
-- \\+`etc' (disk-usage)
 
 Returns filled ENTRY."
   ;; TODO: Consider factoring out parts of this that should be done for every
@@ -716,10 +710,8 @@ Returns filled ENTRY."
   ;; latest-version).
   (pcase-let*
   (((cl-struct hyperdrive-entry hyperdrive) entry)
-   ((cl-struct hyperdrive writablep domains etc) hyperdrive)
-   ((map link content-length content-type etag
- last-modified allow x-drive-size)
-headers)
+   ((cl-struct hyperdrive writablep domains) hyperdrive)
+   ((map link content-length content-type etag last-modified allow) 
headers)
;; If URL hostname was a DNSLink domain,
;; entry doesn't yet have a public-key slot.
(public-key (progn (string-match h//public-key-re link)
@@ -750,18 +742,9 @@ Returns filled ENTRY."
 ;; but no public-key.
 (cl-pushnew domain (h/domains (he/hyperdrive entry)) :test 
#'equal)))
   (setf (h/public-key hyperdrive) public-key))
-(when etag
-  (if (and (h//entry-directory-p entry)
-   (null (he/version entry)))
-  ;; Version-less directory HEAD/GET request ETag header always have 
the
-  ;; hyperdrive's latest version. We don't currently store
-  ;; version ranges for directories (since they don't
-  ;; technically have versions in hyperdrive).
-  (h//fill hyperdrive headers)
-;; File HEAD/GET request ETag header does not retrieve the
-;; hyperdrive's latest version, so `h/update-existent-version-range'
-;; will not necessarily fill in the entry's last range.
-(h/update-existent-version-range entry (string-to-number etag
+(when (and etag (not (h//entry-directory-p entry)))
+  ;; Directory version ranges are not supported.
+  (h/update-existent-version-range entry (string-to-number etag)))
 entry))
 
 (defun h//fill-listing-entries (listing hyperdrive ve

[nongnu] elpa/hyperdrive 3b564cdf22 22/42: Change: (h//?fill) Rename from h//?fill-latest-version

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 3b564cdf2211e52e61b73ebf1f256567ba9211d5
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (h//?fill) Rename from h//?fill-latest-version
---
 hyperdrive-describe.el |  2 +-
 hyperdrive-lib.el  | 18 +-
 hyperdrive.el  | 12 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/hyperdrive-describe.el b/hyperdrive-describe.el
index 8eb6c6e428..c7cf1baeb9 100644
--- a/hyperdrive-describe.el
+++ b/hyperdrive-describe.el
@@ -48,7 +48,7 @@ Universal prefix argument \\[universal-argument] forces
 `hyperdrive-complete-hyperdrive' to prompt for a hyperdrive."
   (interactive (list (h/complete-hyperdrive :force-prompt current-prefix-arg)))
   ;; TODO: Do we want to asynchronously fill the hyperdrive's latest version?
-  (h/fill-latest-version hyperdrive)
+  (h/fill hyperdrive)
   (with-current-buffer
   (get-buffer-create (h//format hyperdrive "*Hyperdrive: %k"))
 (with-silent-modifications
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index f08de5833b..28858f9205 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -172,9 +172,9 @@ to the gateway which do not involve an entry.  Otherwise, 
use
 `hyperdrive-entry-api', which automatically fills metadata."
   ;; TODO: Document that the request/queue is returned.
   ;; TODO: Should we create a wrapper for `h/api' which calls
-  ;; `h//fill-latest-version' for requests to directories/requests which modify
+  ;; `h//fill' for requests to directories/requests which modify
   ;; the drive (and therefore always return the latest version number).  If we
-  ;; did this, we could remove redundant calls to `h//fill-latest-version'
+  ;; did this, we could remove redundant calls to `h//fill'
   ;; everywhere else.  X-Drive-Size is returned by many types of requests, and 
it
   ;; would simplify the code to handle updating the hyperdrive disk-usage in 
one
   ;; place.  Once implemented, go through each call to `h/api' to verify that
@@ -518,7 +518,7 @@ Sends a request to the gateway for hyperdrive's latest 
version."
 
   ;; ENTRY's version is not nil.
   (let ((next-entry (h/copy-tree entry t))
-(latest-version (h/fill-latest-version (he/hyperdrive entry
+(latest-version (h/fill (he/hyperdrive entry
 
 ;; ENTRY version is the latest version: return ENTRY with nil version.
 (when (eq latest-version (he/version entry))
@@ -591,7 +591,7 @@ echo area when the request for the file is made."
 (unless (h//entry-directory-p entry)
   ;; No need to fill latest version for directories,
   ;; since we do it in `he//fill' already.
-  (h/fill-latest-version hyperdrive))
+  (h/fill hyperdrive))
 (h/persist hyperdrive)
 (funcall (or handler #'h/handler-default) entry :then then)))
   :else (lambda (err)
@@ -744,7 +744,7 @@ Returns filled ENTRY."
   ;; Ensure that entry's hyperdrive is the persisted
   ;; hyperdrive, since it may be used later as part of a
   ;; `h/version-ranges' key and compared using `eq'.
-  ;; Also, we want the call to `h//fill-latest-version'
+  ;; Also, we want the call to `h//fill'
   ;; below to update the persisted hyperdrive.
   (setf (he/hyperdrive entry) persisted-hyperdrive)
   (when domain
@@ -760,7 +760,7 @@ Returns filled ENTRY."
   ;; hyperdrive's latest version. We don't currently store
   ;; version ranges for directories (since they don't
   ;; technically have versions in hyperdrive).
-  (h//fill-latest-version hyperdrive headers)
+  (h//fill hyperdrive headers)
 ;; File HEAD/GET request ETag header does not retrieve the
 ;; hyperdrive's latest version, so `h/update-existent-version-range'
 ;; will not necessarily fill in the entry's last range.
@@ -789,14 +789,14 @@ entry as a side-effect."
entry))
listing))
 
-(defun h/fill-latest-version (hyperdrive)
+(defun h/fill (hyperdrive)
   "Synchronously fill the latest version slot in HYPERDRIVE.
 Returns the latest version number."
   (pcase-let (((cl-struct plz-response headers)
(he/api 'head (he/create :hyperdrive hyperdrive :path "/"
-(h//fill-latest-version hyperdrive headers)))
+(h//fill hyperdrive headers)))
 
-(defun h//fill-latest-version (hyperdrive headers)
+(defun h//fill (hyperdrive headers)
   "Fill the latest version slot in HYPERDRIVE from HEADERS.
 HEADERS must from a HEAD/GET request to a directory or a
 PUT/DELETE request to a file or directory, as only those requests
diff --git a/hyperdrive.el b/hyperdrive.el
index 2b84e2852b..01b35dfb25 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -277,13 +277,13 @@ Universal prefix argument \\[universal-argument] forces
   (cl-callf map-delete (h/metadata hyperdrive) 'name)
   (h/put-metadata hyperdrive

[nongnu] elpa/hyperdrive f044f39bf8 41/42: Tidy: Docstring

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit f044f39bf8e2c443d306c8e80cef6fdc122e901e
Author: Adam Porter 
Commit: Adam Porter 

Tidy: Docstring
---
 hyperdrive-lib.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 63fdadf3fd..907991b3d0 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -202,9 +202,10 @@ to the gateway which do not involve an entry.  Otherwise, 
use
 
 (defun he/api (method entry &rest rest)
   "Make hyperdrive API request by METHOD for ENTRY.
-REST is passed to `h/api', which see.
-`:as' keyword argument of `hyperdrive-api' is always `response'.
-"
+REST is passed to `hyperdrive-api', which see.  AS keyword should
+be nil, because it is always set to `response'.  Automatically
+calls `hyperdrive-entry--api-then' to update metadata from the
+response."
   (declare (indent defun))
   ;; Always use :as 'response
   (cl-assert (null (plist-get rest :as)))



[nongnu] elpa/hyperdrive 2ad91d4c68 02/42: Fix: (h/read-url) Prompt for entry at point in dir-mode

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 2ad91d4c680acfd25340a553007f9c41a5e50c95
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: (h/read-url) Prompt for entry at point in dir-mode
---
 hyperdrive-lib.el | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 16f096d035..21e24b382a 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1284,10 +1284,12 @@ is passed to `read-string' as its DEFAULT-VALUE 
argument."
 (cl-defun h/read-url (&key (prompt "Hyperdrive URL"))
   "Return URL trimmed of whitespace.
 Prompts with PROMPT.  Defaults to current entry if it exists."
-  (let ((default (and h/current-entry
-  (he/url h/current-entry
-(string-trim (read-string (format-prompt prompt default)
-  nil 'h//url-history default
+  (let* ((default-entry
+  (cond ((derived-mode-p 'h/dir-mode) (h/dir--entry-at-point))
+(h/current-entry h/current-entry)))
+ (default-url (and default-entry (he/url default-entry
+(string-trim (read-string (format-prompt prompt default-url)
+  nil 'h//url-history default-url
 
 (defvar h//name-history nil
   "Minibuffer history of `hyperdrive-read-name'.")



[nongnu] elpa/hyperdrive d13e6ffccb 01/42: Revert "Change: (h//url-history) Use h//context-entry by default"

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit d13e6ffccb7cda1d343383f5b1b9882f2a9ebd84
Author: Joseph Turner 
Commit: Joseph Turner 

Revert "Change: (h//url-history) Use h//context-entry by default"

With prefix arg or when no current entry exists, h//context-entry
prompts using h/read-entry.  In this function, we never want to prompt
with h/read-entry.

This reverts commit 1f8a2def63e45c2d800811425c28bbdb628a39f4.
---
 hyperdrive-lib.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index c2ff1f70d2..16f096d035 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1284,7 +1284,8 @@ is passed to `read-string' as its DEFAULT-VALUE argument."
 (cl-defun h/read-url (&key (prompt "Hyperdrive URL"))
   "Return URL trimmed of whitespace.
 Prompts with PROMPT.  Defaults to current entry if it exists."
-  (let ((default (he/url (h//context-entry
+  (let ((default (and h/current-entry
+  (he/url h/current-entry
 (string-trim (read-string (format-prompt prompt default)
   nil 'h//url-history default
 



[nongnu] elpa/hyperdrive 167373402a 07/42: Comment: Add TODO

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 167373402a231135988270f90aa29200de785569
Author: Adam Porter 
Commit: Joseph Turner 

Comment: Add TODO
---
 hyperdrive-lib.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index c8ceaf7849..763c3838d9 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -722,6 +722,9 @@ The following ENTRY hyperdrive slots are filled:
 - \\+`etc' (disk-usage)
 
 Returns filled ENTRY."
+  ;; TODO: Consider factoring out parts of this that should be done for every
+  ;; API entry response (i.e. in `he//api-then'; e.g. drive-size, 
version-range,
+  ;; latest-version).
   (pcase-let*
   (((cl-struct hyperdrive-entry hyperdrive) entry)
((cl-struct hyperdrive writablep domains etc) hyperdrive)



[nongnu] elpa/hyperdrive 257c361e03 21/42: Change: (he//fill) Rename from h//fill

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 257c361e0307f688bdae30c70e5a3b76ec427e01
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (he//fill) Rename from h//fill
---
 hyperdrive-dir.el |  2 +-
 hyperdrive-lib.el | 12 ++--
 hyperdrive.el |  4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index c54f19d508..2dd6b622d8 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -72,7 +72,7 @@ If THEN, call it in the directory buffer with no arguments."
(json-read-from-string body)
hyperdrive version))
  (parent-entry (h/parent directory-entry)))
-  (setf directory-entry (h//fill directory-entry headers))
+  (setf directory-entry (he//fill directory-entry headers))
   (when parent-entry
 (setf (alist-get 'display-name (he/etc parent-entry)) 
"../")
 (push parent-entry entries))
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 882388d67b..f08de5833b 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -590,7 +590,7 @@ echo area when the request for the file is made."
nil nil #'string-match-p)))
 (unless (h//entry-directory-p entry)
   ;; No need to fill latest version for directories,
-  ;; since we do it in `h//fill' already.
+  ;; since we do it in `he//fill' already.
   (h/fill-latest-version hyperdrive))
 (h/persist hyperdrive)
 (funcall (or handler #'h/handler-default) entry :then then)))
@@ -674,8 +674,8 @@ the given `plz-queue'"
 (h/message "hyperdrive-entry-fill: error: %S" 
plz-error))
   (pcase then
 ('sync (condition-case err
-   (h//fill entry (plz-response-headers
-   (he/api 'head entry :then 'sync :noquery t)))
+   (he//fill entry (plz-response-headers
+(he/api 'head entry :then 'sync :noquery t)))
  (plz-error
   (pcase (plz-response-status (plz-error-response (caddr err)))
 ;; FIXME: If plz-error is a curl-error, this block will fail.
@@ -686,7 +686,7 @@ the given `plz-queue'"
 (_ (he/api 'head entry
  :queue queue
  :then (lambda (response)
- (funcall then (h//fill entry (plz-response-headers 
response
+ (funcall then (he//fill entry (plz-response-headers 
response
  :else (lambda (&rest args)
  (when (he/version entry)
;; If request is canceled, the entry may not have a version.
@@ -695,7 +695,7 @@ the given `plz-queue'"
  (apply else args))
  :noquery t
 
-(defun h//fill (entry headers)
+(defun he//fill (entry headers)
   "Fill ENTRY and its hyperdrive from HEADERS.
 
 The following ENTRY slots are filled:
@@ -1356,7 +1356,7 @@ hyperdrive."
   :as 'response :noquery t)))
 ;; TODO: Update hyperdrive disk-usage.  The following doesn't work
 ;; because the response doesn't have the proper ETag header:
-;; (h//fill (h/url-entry url) headers)
+;; (he//fill (h/url-entry url) headers)
 url)
 (plz-error (if (= 400 (plz-response-status (plz-error-response (caddr 
err
;; FIXME: If plz-error is a curl-error, this block will 
fail.
diff --git a/hyperdrive.el b/hyperdrive.el
index d2e42a96cf..2b84e2852b 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -518,7 +518,7 @@ use, see `hyperdrive-write'."
 (set-auto-mode)))
 (h/mode))
   ;; NOTE: `h/fill-latest-version' must come before
-  ;; `h//fill' because the latter calls
+  ;; `he//fill' because the latter calls
   ;; `h/update-existent-version-range' internally.
 
   ;; TODO: Instead of calling `h/fill-latest-version', we 
should
@@ -527,7 +527,7 @@ use, see `hyperdrive-write'."
   ;; on the latest version of the hyperdrive.
 
   (h/fill-latest-version hyperdrive)
-  (h//fill entry (plz-response-headers response))
+  (he//fill entry (plz-response-headers response))
   ;; PUT responses only include ETag and Last-Modified
   ;; headers, so we need to set other entry metadata manually.
   ;; FIXME: For large buffers, `buffer-size' returns a 
different



[nongnu] elpa/hyperdrive 28d51a621b 17/42: Comment: TODO

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 28d51a621bf2da0e0cdf3effa72cb70c2e496255
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: TODO
---
 hyperdrive-lib.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 79122b2651..2e00a91114 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -736,6 +736,7 @@ Returns filled ENTRY."
   (setf (map-elt etc 'disk-usage) (cl-parse-integer x-drive-size)))
 (setf (h/etc hyperdrive) etc)
 (if persisted-hyperdrive
+;; TODO: Consider moving this block into he/api-then.
 (progn
   ;; Ensure that entry's hyperdrive is the persisted
   ;; hyperdrive, since it may be used later as part of a



[nongnu] elpa/hyperdrive 78e8eda8e9 20/42: Change: (he/fill) Rename from h/fill

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 78e8eda8e915e2dc56893236263fcf672b596870
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (he/fill) Rename from h/fill
---
 hyperdrive-history.el |  4 ++--
 hyperdrive-lib.el | 10 +-
 hyperdrive-mirror.el  |  2 +-
 hyperdrive.el |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 928011a246..744ea88e86 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -202,7 +202,7 @@ prefix argument \\[universal-argument], prompt for ENTRY."
   (with-silent-modifications
 (h/history-mode)
 (setq-local h/history-current-entry entry)
-(setf ewoc h/ewoc) ; Bind this for the h/fill lambda.
+(setf ewoc h/ewoc) ; Bind this for the he/fill lambda.
 (ewoc-filter h/ewoc #'ignore)
 (erase-buffer)
 (ewoc-set-hf h/ewoc header "")
@@ -234,7 +234,7 @@ prefix argument \\[universal-argument], prompt for ENTRY."
   (mapc (lambda (range-entry)
   (when (eq t (h/range-entry-exists-p range-entry))
 ;; TODO: Handle failures?
-(h/fill (cdr range-entry) :queue queue :then #'ignore)))
+(he/fill (cdr range-entry) :queue queue :then #'ignore)))
 range-entries)
   (set-buffer-modified-p nil)
   (goto-char (point-min)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index a5af890baf..882388d67b 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -497,7 +497,7 @@ When VERSION is nil, return latest version of ENTRY."
 (setf (he/version entry) version)
 (condition-case err
 ;; FIXME: Requests to out of range version currently hang.
-(h/fill entry)
+(he/fill entry)
   (plz-error
(pcase (plz-response-status (plz-error-response (caddr err)))
  ;; FIXME: If plz-error is a curl-error, this block will fail.
@@ -583,7 +583,7 @@ echo area when the request for the file is made."
   ;; FIXME: Some of the synchronous filling functions we've added now cause 
this to be blocking,
   ;; which is very noticeable when a file can't be loaded from the gateway and 
eventually times out.
   (let ((hyperdrive (he/hyperdrive entry)))
-(h/fill entry
+(he/fill entry
   :then (lambda (entry)
   (pcase-let* (((cl-struct hyperdrive-entry type) entry)
(handler (alist-get type h/type-handlers
@@ -651,7 +651,7 @@ echo area when the request for the file is made."
 (when messagep
   (h/message "Opening <%s>..." (he/url entry)
 
-(cl-defun h/fill (entry &key queue (then 'sync) else)
+(cl-defun he/fill (entry &key queue (then 'sync) else)
   "Fill ENTRY's metadata and call THEN.
 If THEN is `sync', return the filled entry and ignore ELSE.
 Otherwise, make request asynchronously and call THEN with the
@@ -671,7 +671,7 @@ the given `plz-queue'"
 ;; (e.g. if the user reverted too quickly).
 nil)
(_
-(h/message "hyperdrive-fill: error: %S" plz-error))
+(h/message "hyperdrive-entry-fill: error: %S" 
plz-error))
   (pcase then
 ('sync (condition-case err
(h//fill entry (plz-response-headers
@@ -991,7 +991,7 @@ HYPERDRIVE's public metadata file."
;; NOTE: Don't attempt to fill hyperdrive struct with old 
metadata
:version nil))
(metadata (condition-case err
- ;; TODO: Refactor to use :as 'response-with-buffer and 
call h/fill
+ ;; TODO: Refactor to use :as 'response-with-buffer and 
call he/fill
  (pcase-let
  (((cl-struct plz-response headers body)
(he/api 'get entry :noquery t)))
diff --git a/hyperdrive-mirror.el b/hyperdrive-mirror.el
index 324db6b5a0..1dbd3ae93c 100644
--- a/hyperdrive-mirror.el
+++ b/hyperdrive-mirror.el
@@ -157,7 +157,7 @@ been checked."
   (let ((entry (he/create
 :hyperdrive hyperdrive
 :path (expand-file-name (file-relative-name file source) 
target-dir
-(h/fill entry :queue metadata-queue
+(he/fill entry :queue metadata-queue
   :then (lambda (entry)
   (let* ((drive-mtime (floor (float-time (he/mtime entry
  (local-mtime (floor (float-time 
(file-attribute-modification-time (file-attributes file)
diff --git a/hyperdrive.el b/hyperdrive.el
index 8648114d53..d2e42a96cf 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -474,7 +474,7 @@ in a directory.  Otherwise, or with universal prefix 
argument
 ;; TODO: If plz adds support for getting response headers when downloading
 ;; as a file (), use it 
here.
 ;; Filling entry is necessary in order to update hyperdrive disk-usage.
-(h/fill (h/url-entry url)

[nongnu] elpa/hyperdrive 36b0293cdd 11/42: Change: (h/write) Use he/api

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 36b0293cdd879fbea664e491f082a194c52e802e
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (h/write) Use he/api
---
 hyperdrive-lib.el | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index dcc20c6fcb..7171cb59a5 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1038,9 +1038,14 @@ Call ELSE if request fails."
 :else else))
 
 (cl-defun h/write (entry &key body then else queue)
-  "Write BODY to hyperdrive ENTRY's URL."
+  "Write BODY to hyperdrive ENTRY's URL.
+THEN and ELSE are passed to `hyperdrive-entry-api', which see."
   (declare (indent defun))
-  (h//write (he/url entry)
+  (he/api 'put entry
+;; TODO: Investigate whether we should use 'text body type for text 
buffers.
+:body-type 'binary
+;; TODO: plz accepts buffer as a body, we should refactor calls to h/write
+;; to pass in a buffer instead of a buffer-string.
 :body body :then then :else else :queue queue))
 
 (cl-defun h//format-entry-url



[nongnu] elpa/hyperdrive 631a533f70 23/42: Fix: Compilation errors

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 631a533f70946ebba37f46ad955b51fd9ee2a62c
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: Compilation errors
---
 hyperdrive-lib.el | 4 ++--
 hyperdrive.el | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 28858f9205..d3db1a1b56 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -993,7 +993,7 @@ HYPERDRIVE's public metadata file."
(metadata (condition-case err
  ;; TODO: Refactor to use :as 'response-with-buffer and 
call he/fill
  (pcase-let
- (((cl-struct plz-response headers body)
+ (((cl-struct plz-response body)
(he/api 'get entry :noquery t)))
(with-temp-buffer
  (insert body)
@@ -1386,7 +1386,7 @@ Otherwise, return nil.  SLOT may be one of
   "Load ENTRY's file into an Emacs buffer.
 If then, then call THEN with no arguments.  Default handler."
   (pcase-let*
-  (((cl-struct plz-response headers body)
+  (((cl-struct plz-response body)
 ;; TODO: Handle errors
 ;; TODO: When plz adds :as 'response-with-buffer, use that.
 (he/api 'get entry :noquery t))
diff --git a/hyperdrive.el b/hyperdrive.el
index 01b35dfb25..ff6f595a17 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -200,7 +200,7 @@ modified; file blobs may be recoverable from other peers."
   :headers '(("Cache-Control" . "no-store"))
   :else (lambda (err)
   (h/error "Unable to clear cache for `%s': %S" (he/url entry) 
err))
-  :then (lambda (response)
+  :then (lambda (_response)
   (h/message "Cleared `%s'" (h//format-entry entry))
   ;; TODO: When file sizes in hyperdrive-dir-mode are colorized
   ;; based locally downloaded sizes, refresh ewoc entry here.
@@ -819,7 +819,7 @@ The return value of this function is the retrieval buffer."
   (pcase-let* ((url (url-recreate-url parsed-url))
;; TODO: When `plz.el' adds :as 'response-with-buffer, use that.
;; response-buffer will contain the loaded HTML, and will be 
deleted at the end of `eww-render'.
-   ((cl-struct plz-response headers body)
+   ((cl-struct plz-response body)
 (he/api 'get (h/url-entry url) :as 'response)))
 (with-current-buffer (generate-new-buffer " *hyperdrive-eww*")
   (widen)



[nongnu] elpa/org-transclusion-http a764f05a9e 2/3: v0.4

2024-06-19 Thread ELPA Syncer
branch: elpa/org-transclusion-http
commit a764f05a9eaeca002c76b85d090ca6b036e9dbaf
Author: Joseph Turner 
Commit: Joseph Turner 

v0.4
---
 README.org   | 2 +-
 org-transclusion-http.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 88f5a6dd06..145cd7e49c 100644
--- a/README.org
+++ b/README.org
@@ -75,7 +75,7 @@ questions can be submitted to the 
[[https://lists.sr.ht/~ushin/ushin][ushin publ
 
 ** Changelog
 
-*** 0.4-pre
+*** 0.4
 
  Fix
 
diff --git a/org-transclusion-http.el b/org-transclusion-http.el
index e6c718d179..d718f3ae54 100644
--- a/org-transclusion-http.el
+++ b/org-transclusion-http.el
@@ -5,7 +5,7 @@
 ;; Author: Joseph Turner 
 ;; Maintainer: Joseph Turner <~ushin/us...@lists.sr.ht>
 ;; Created: 2024
-;; Version: 0.4-pre
+;; Version: 0.4
 ;; Package-Requires: ((emacs "28.1") (org-transclusion "1.4.0") (plz "0.7.2"))
 ;; Homepage: https://git.sr.ht/~ushin/org-transclusion-http
 



[nongnu] elpa/hyperdrive 57850eef88 25/42: Comment: Remove incorrect comment

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 57850eef8885ffc3b8150d19f118b003f6394d01
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: Remove incorrect comment
---
 hyperdrive-lib.el | 2 --
 1 file changed, 2 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index d3db1a1b56..7bbb3daecf 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -153,8 +153,6 @@ See `hyperdrive-directory-sort' for the type of DIRECTION."
 
  API
 
-;; These functions take a URL argument, not a hyperdrive-entry struct.
-
 (cl-defun h/api (method url &rest rest)
   "Make hyperdrive API request by METHOD to URL.
 Calls `hyperdrive--httpify-url' to convert HYPER-URL starting



[nongnu] elpa/hyperdrive d348be0615 31/42: Comment: Remove old TODO

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit d348be0615d67882aca0d6806b97ae867f0a5785
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: Remove old TODO
---
 hyperdrive-lib.el | 8 
 1 file changed, 8 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 490fe274da..94e691ef41 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -169,14 +169,6 @@ This low-level function should only be used when sending 
requests
 to the gateway which do not involve an entry.  Otherwise, use
 `hyperdrive-entry-api', which automatically fills metadata."
   ;; TODO: Document that the request/queue is returned.
-  ;; TODO: Should we create a wrapper for `h/api' which calls
-  ;; `h//fill' for requests to directories/requests which modify
-  ;; the drive (and therefore always return the latest version number).  If we
-  ;; did this, we could remove redundant calls to `h//fill'
-  ;; everywhere else.  X-Drive-Size is returned by many types of requests, and 
it
-  ;; would simplify the code to handle updating the hyperdrive disk-usage in 
one
-  ;; place.  Once implemented, go through each call to `h/api' to verify that
-  ;; disk-usage is updated correctly.
   (declare (indent defun))
   (pcase method
 ((and (or 'get 'head)



[nongnu] elpa/hyperdrive 9a48102788 37/42: Fix: (h/url-loader) Remove :as 'response

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 9a48102788fc686a80832d56d5f619cf96824e27
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: (h/url-loader) Remove :as 'response
---
 hyperdrive.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index 9ecd29b9b3..94901f0253 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -803,7 +803,7 @@ The return value of this function is the retrieval buffer."
;; TODO: When `plz.el' adds :as 'response-with-buffer, use that.
;; response-buffer will contain the loaded HTML, and will be 
deleted at the end of `eww-render'.
((cl-struct plz-response body)
-(he/api 'get (h/url-entry url) :as 'response)))
+(he/api 'get (h/url-entry url
 (with-current-buffer (generate-new-buffer " *hyperdrive-eww*")
   ;; TODO: After refactoring to use :as 'response, this buffer no longer
   ;; contains HTTP headers.  Confirm that EWW works properly when buffer



[nongnu] elpa/hyperdrive 5943275a30 39/42: Fix: (he/api) Rebind modified plists

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 5943275a3055980106f211e639ae7ff717c68f77
Author: Adam Porter 
Commit: Adam Porter 

Fix: (he/api) Rebind modified plists
---
 hyperdrive-lib.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 4e2ad8be8a..63fdadf3fd 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -208,13 +208,13 @@ REST is passed to `h/api', which see.
   (declare (indent defun))
   ;; Always use :as 'response
   (cl-assert (null (plist-get rest :as)))
-  (plist-put rest :as 'response)
-
+  (setf (plist-get rest :as) 'response)
   (pcase-let* (((map :then) rest))
 (when then
-  (plist-put rest :then (lambda (response)
-  (he//api-then entry response)
-  (funcall then response
+  (setf (plist-get rest :then)
+(lambda (response)
+  (he//api-then entry response)
+  (funcall then response
 (let ((response (apply #'h/api method (he/url entry) rest)))
   (unless then (funcall 'he//api-then entry response))
   response)))



[nongnu] elpa/hyperdrive 17666ebbbc 40/42: Fix: (h/url-loader) Add temporary hack for EWW

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 17666ebbbcbd430792ae1d6ece880507bce17ab1
Author: Adam Porter 
Commit: Adam Porter 

Fix: (h/url-loader) Add temporary hack for EWW
---
 hyperdrive.el | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index b1abccf78d..ef0c40192a 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -802,14 +802,17 @@ The return value of this function is the retrieval 
buffer."
   (pcase-let* ((url (url-recreate-url parsed-url))
;; TODO: When `plz.el' adds :as 'response-with-buffer, use that.
;; response-buffer will contain the loaded HTML, and will be 
deleted at the end of `eww-render'.
-   ((cl-struct plz-response body)
+   ((cl-struct plz-response headers body)
 (he/api 'get (h/url-entry url
 (with-current-buffer (generate-new-buffer " *hyperdrive-eww*")
-  ;; TODO: After refactoring to use :as 'response, this buffer no longer
-  ;; contains HTTP headers.  Confirm that EWW works properly when buffer
-  ;; lacks headers.
   (widen)
   (goto-char (point-min))
+  ;; TODO: When `plz' gains `:as '(response :with buffer)' or whatever, 
use it instead of this hack.
+  ;; HACK: Insert headers because `eww-render' expects them to be in the 
buffer.
+  (map-do (lambda (header value)
+(insert (format "%s: %s\n" header value)))
+  headers)
+  (insert "\n\n")
   (insert body)
   (while (search-forward (string ?\C-m) nil t)
 ;; Strip CRLF from headers so that `eww-parse-headers' works correctly.



[nongnu] elpa/hyperdrive ad0dba6928 26/42: Fix: (he/api) Handle synchronous case

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit ad0dba6928280c1668825dd8288d9b2ef5ad55af
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: (he/api) Handle synchronous case
---
 hyperdrive-lib.el | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 7bbb3daecf..ff8f4bf2bb 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -218,12 +218,14 @@ REST is passed to `h/api', which see.
   (cl-assert (null (plist-get rest :as)))
   (plist-put rest :as 'response)
 
-  (pcase-let* (((map :then) rest)
-   (then* (lambda (response)
-(he//api-then entry response)
-(funcall then response
-(plist-put rest :then then*)
-(apply #'h/api method (he/url entry) rest)))
+  (pcase-let* (((map :then) rest))
+(when then
+  (plist-put rest :then (lambda (response)
+  (he//api-then entry response)
+  (funcall then response
+(let ((response (apply #'h/api method (he/url entry) rest)))
+  (unless then (funcall 'he//api-then entry response))
+  response)))
 
 (defun he//api-then (entry response)
   "Update ENTRY's metadata according to RESPONSE.



[nongnu] elpa/org-transclusion-http 67ac5ed6f0 1/3: README: Note fix

2024-06-19 Thread ELPA Syncer
branch: elpa/org-transclusion-http
commit 67ac5ed6f0aec49afc340160742569f57d24c482
Author: Joseph Turner 
Commit: Joseph Turner 

README: Note fix
---
 README.org | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index b13d942b60..88f5a6dd06 100644
--- a/README.org
+++ b/README.org
@@ -77,7 +77,9 @@ questions can be submitted to the 
[[https://lists.sr.ht/~ushin/ushin][ushin publ
 
 *** 0.4-pre
 
-Nothing yet...
+ Fix
+
+  - Fix byte compilation error.  Thanks to Chris Rayner for reporting!
 
 *** 0.3
 



[nongnu] elpa/hyperdrive 66247fdfdf 38/42: Meta: Update hyper-gateway-ushin to 3.10.1: More headers

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 66247fdfdf4461d3c2d70102b3e97d99960021db
Author: Joseph Turner 
Commit: Joseph Turner 

Meta: Update hyper-gateway-ushin to 3.10.1: More headers
---
 hyperdrive-vars.el |  2 +-
 hyperdrive.el  | 18 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 2c9c26ebef..05ff6ce914 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -380,7 +380,7 @@ values are alists mapping version range starts to plists 
with
 ; Internals
 
 (defvar h/gateway-version-expected
-  '(:name "hyper-gateway-ushin" :version "3.9.2"))
+  '(:name "hyper-gateway-ushin" :version "3.10.1"))
 
 (defvar h/gateway-version-checked-p nil
   "Non-nil if the gateway's version has been checked.
diff --git a/hyperdrive.el b/hyperdrive.el
index 94901f0253..b1abccf78d 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1386,21 +1386,21 @@ Intended for relative (i.e. non-full) URLs."
   ;; TODO: sr.ht build ()
   ;; fail due to a kernel issue: https://github.com/nodejs/node/issues/53051
   '((gnu/linux
- ( :url 
"https://codeberg.org/USHIN/hyper-gateway-ushin/releases/download/v3.9.2/hyper-gateway-ushin-linux";
-   :sha256 
"f0cb3e793b3d27ce159e8e034e03b5a14cbdc53d47bd8f0761310792d5b6a7aa")
- ;; ( :url 
"https://git.sr.ht/~ushin/hyper-gateway-ushin/refs/download/v3.9.2/hyper-gateway-linux-v3.9.2";
+ ( :url 
"https://codeberg.org/USHIN/hyper-gateway-ushin/releases/download/v3.10.1/hyper-gateway-ushin-linux";
+   :sha256 
"6a93dd6f5b023cc2cc2e99aba728cbcccd4c9ed426b506da0a4b24d8c0ea5afa")
+ ;; ( :url 
"https://git.sr.ht/~ushin/hyper-gateway-ushin/refs/download/v3.10.1/hyper-gateway-linux-v3.10.1";
  ;;   :sha256 
"331dbc0048decd42d197667f96aabdaf25306ba4e7ba0451dd9a2f31868fa86c")
  )
 (darwin
- ( :url 
"https://codeberg.org/USHIN/hyper-gateway-ushin/releases/download/v3.9.2/hyper-gateway-ushin-macos";
-   :sha256 
"bb472bf7a536eb30bc2443ce90cfca1bf2aa71177afdc1377f4fc9b61414c24c")
- ;; ( :url 
"https://git.sr.ht/~ushin/hyper-gateway-ushin/refs/download/v3.9.2/hyper-gateway-macos-v3.9.2";
+ ( :url 
"https://codeberg.org/USHIN/hyper-gateway-ushin/releases/download/v3.10.1/hyper-gateway-ushin-macos";
+   :sha256 
"7072e7fd52626affe5a17380845b50ec5116210d70f409c23bcb5415142a4053")
+ ;; ( :url 
"https://git.sr.ht/~ushin/hyper-gateway-ushin/refs/download/v3.10.1/hyper-gateway-macos-v3.10.1";
  ;;   :sha256 
"e78d3c1394774fc49212d86827eb615d46ae1a04c82fc0328ac31bbbdb201aa0")
  )
 (windows-nt
- ( :url 
"https://codeberg.org/USHIN/hyper-gateway-ushin/releases/download/v3.9.2/hyper-gateway-ushin-windows.exe";
-   :sha256 
"7a72010cd7bc1b0357673838f5ccb069e58bf3c229bc873bedd0ee9faa805188")
- ;; ( :url 
"https://git.sr.ht/~ushin/hyper-gateway-ushin/refs/download/v3.9.2/hyper-gateway-windows-v3.9.2.exe";
+ ( :url 
"https://codeberg.org/USHIN/hyper-gateway-ushin/releases/download/v3.10.1/hyper-gateway-ushin-windows.exe";
+   :sha256 
"b87aa17bc92c6f5a1c388f5e352a47b228d33c5f177ab6a11aad0312e891df0d")
+ ;; ( :url 
"https://git.sr.ht/~ushin/hyper-gateway-ushin/refs/download/v3.10.1/hyper-gateway-windows-v3.10.1.exe";
  ;;   :sha256 
"d4fa29aca473148e2d13215d042e4be40657080035caa2d3a699b741b6a45845")
  ))
   "Alist mapping `system-type' to URLs where the gateway can be downloaded.")



[nongnu] elpa/org-transclusion-http 65caad0d9b 3/3: Meta: v0.5-pre

2024-06-19 Thread ELPA Syncer
branch: elpa/org-transclusion-http
commit 65caad0d9b19bf19c815bd7c033ffb907c3ebb12
Author: Joseph Turner 
Commit: Joseph Turner 

Meta: v0.5-pre
---
 README.org   | 4 
 org-transclusion-http.el | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 145cd7e49c..4cd92880fc 100644
--- a/README.org
+++ b/README.org
@@ -75,6 +75,10 @@ questions can be submitted to the 
[[https://lists.sr.ht/~ushin/ushin][ushin publ
 
 ** Changelog
 
+*** 0.5-pre
+
+Nothing yet...
+
 *** 0.4
 
  Fix
diff --git a/org-transclusion-http.el b/org-transclusion-http.el
index d718f3ae54..04eb694f5e 100644
--- a/org-transclusion-http.el
+++ b/org-transclusion-http.el
@@ -5,7 +5,7 @@
 ;; Author: Joseph Turner 
 ;; Maintainer: Joseph Turner <~ushin/us...@lists.sr.ht>
 ;; Created: 2024
-;; Version: 0.4
+;; Version: 0.5-pre
 ;; Package-Requires: ((emacs "28.1") (org-transclusion "1.4.0") (plz "0.7.2"))
 ;; Homepage: https://git.sr.ht/~ushin/org-transclusion-http
 



[nongnu] elpa/hyperdrive c15b3ee54c 09/42: Change: Remove :as 'response from calls to he/api

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit c15b3ee54c04fcc656e610a5e55a53fdd783657e
Author: Joseph Turner 
Commit: Joseph Turner 

Change: Remove :as 'response from calls to he/api
---
 hyperdrive-diff.el |  6 ++
 hyperdrive-dir.el  |  6 ++
 hyperdrive-lib.el  | 21 ++---
 hyperdrive.el  |  2 --
 4 files changed, 10 insertions(+), 25 deletions(-)

diff --git a/hyperdrive-diff.el b/hyperdrive-diff.el
index 2e8361337b..f804b66dca 100644
--- a/hyperdrive-diff.el
+++ b/hyperdrive-diff.el
@@ -103,13 +103,11 @@ This function is intended to diff files, not directories."
  (kill-buffer old-buffer))
(when (buffer-live-p new-buffer)
  (kill-buffer new-buffer
-(he/api 'get old-entry
-  :queue queue :as 'response :else #'ignore
+(he/api 'get old-entry :queue queue :else #'ignore
   :then (lambda (response)
   (h//fill old-entry (plz-response-headers response))
   (setf old-response response)))
-(he/api 'get new-entry
-  :queue queue :as 'response :else #'ignore
+(he/api 'get new-entry :queue queue :else #'ignore
   :then (lambda (response)
   (h//fill new-entry (plz-response-headers response))
   (setf new-response response)
diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index be619f88ce..c54f19d508 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -62,7 +62,7 @@ If THEN, call it in the directory buffer with no arguments."
   (when-let ((node (h/ewoc-find-node ewoc entry
  :predicate #'he/equal-p)))
 (goto-char (ewoc-location node)
-  (he/api 'get directory-entry :as 'response :noquery t
+  (he/api 'get directory-entry :noquery t
 ;; Get "full" listing with metadata
 :headers `(("Accept" . "application/json; metadata=full"))
 :then (lambda (response)
@@ -350,10 +350,8 @@ see Info node `(elisp)Yanking Media'."
hyperdrive)
   :predicate #'h/writablep
   :default-path path :latest-version t)))
-  (he/api 'put entry
-:body-type 'binary
+  (he/api 'put entry :body image :body-type 'binary
 ;; TODO: Pass MIME type in a header? hyper-gateway detects it for us.
-:body image :as 'response
 :then (lambda (_res) (h/open entry))
 :else (lambda (plz-error)
 (h/message "Unable to yank media: %S" plz-error)
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index ada75be0ad..2a28d0c482 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -292,7 +292,7 @@ THEN and ELSE are passed to `hyperdrive-api', which see."
 ;; TODO: Investigate whether we should use 'text body type for text 
buffers.
 :body-type 'binary
 ;; TODO: plz accepts buffer as a body, we should refactor calls to 
h//write to pass in a buffer instead of a buffer-string.
-:body body :as 'response :then then :else else :queue queue))
+:body body :then then :else else :queue queue))
 
 (cl-defun h//write (url &key body then else queue)
   "Save BODY (a string) to hyperdrive URL.
@@ -685,12 +685,8 @@ the given `plz-queue'"
 (h/message "hyperdrive-fill: error: %S" plz-error))
   (pcase then
 ('sync (condition-case err
-   (h//fill entry
-(plz-response-headers
- (he/api 'head entry
-   :as 'response
-   :then 'sync
-   :noquery t)))
+   (h//fill entry (plz-response-headers
+   (he/api 'head entry :then 'sync :noquery t)))
  (plz-error
   (pcase (plz-response-status (plz-error-response (caddr err)))
 ;; FIXME: If plz-error is a curl-error, this block will fail.
@@ -700,7 +696,6 @@ the given `plz-queue'"
   (signal (car err) (cdr err)
 (_ (he/api 'head entry
  :queue queue
- :as 'response
  :then (lambda (response)
  (funcall then (h//fill entry (plz-response-headers 
response
  :else (lambda (&rest args)
@@ -808,8 +803,7 @@ entry as a side-effect."
   "Synchronously fill the latest version slot in HYPERDRIVE.
 Returns the latest version number."
   (pcase-let (((cl-struct plz-response headers)
-   (he/api 'head (he/create :hyperdrive hyperdrive :path "/")
- :as 'response)))
+   (he/api 'head (he/create :hyperdrive hyperdrive :path "/"
 (h//fill-latest-version hyperdrive headers)))
 
 (defun h//fill-latest-version (hyperdrive headers)
@@ -951,7 +945,6 @@ Once all requests return, call FINALLY with no arguments."
(cl-return))
  (he/api 'head prev-entry
:queu

[nongnu] elpa/hyperdrive 79541d4aab 42/42: Merge: (he/api) Consolidate hyperdrive filling logic into callback

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 79541d4aab9f165c861ea32f3f2890be0d7cb31f
Merge: 2ad91d4c68 f044f39bf8
Author: Adam Porter 
Commit: Adam Porter 

Merge: (he/api) Consolidate hyperdrive filling logic into callback
---
 hyperdrive-describe.el |   2 +-
 hyperdrive-diff.el |  14 +--
 hyperdrive-dir.el  |  10 +--
 hyperdrive-history.el  |   4 +-
 hyperdrive-lib.el  | 238 +
 hyperdrive-mirror.el   |   2 +-
 hyperdrive-vars.el |   2 +-
 hyperdrive.el  |  85 --
 8 files changed, 154 insertions(+), 203 deletions(-)

diff --git a/hyperdrive-describe.el b/hyperdrive-describe.el
index 8eb6c6e428..c7cf1baeb9 100644
--- a/hyperdrive-describe.el
+++ b/hyperdrive-describe.el
@@ -48,7 +48,7 @@ Universal prefix argument \\[universal-argument] forces
 `hyperdrive-complete-hyperdrive' to prompt for a hyperdrive."
   (interactive (list (h/complete-hyperdrive :force-prompt current-prefix-arg)))
   ;; TODO: Do we want to asynchronously fill the hyperdrive's latest version?
-  (h/fill-latest-version hyperdrive)
+  (h/fill hyperdrive)
   (with-current-buffer
   (get-buffer-create (h//format hyperdrive "*Hyperdrive: %k"))
 (with-silent-modifications
diff --git a/hyperdrive-diff.el b/hyperdrive-diff.el
index 9885d00aa5..3f633da749 100644
--- a/hyperdrive-diff.el
+++ b/hyperdrive-diff.el
@@ -103,16 +103,10 @@ This function is intended to diff files, not directories."
  (kill-buffer old-buffer))
(when (buffer-live-p new-buffer)
  (kill-buffer new-buffer
-(h/api 'get (he/url old-entry)
-  :queue queue :as 'response :else #'ignore
-  :then (lambda (response)
-  (h//fill old-entry (plz-response-headers response))
-  (setf old-response response)))
-(h/api 'get (he/url new-entry)
-  :queue queue :as 'response :else #'ignore
-  :then (lambda (response)
-  (h//fill new-entry (plz-response-headers response))
-  (setf new-response response)
+(he/api 'get old-entry :queue queue :else #'ignore
+  :then (lambda (response) (setf old-response response)))
+(he/api 'get new-entry :queue queue :else #'ignore
+  :then (lambda (response) (setf new-response response)
 
  Mode
 
diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index b379422f6b..2dd6b622d8 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -40,7 +40,6 @@ If THEN, call it in the directory buffer with no arguments."
   ;; NOTE: ENTRY is not necessarily "filled" yet.
   (pcase-let*
   (((cl-struct hyperdrive-entry hyperdrive version) directory-entry)
-   (url (he/url directory-entry))
(header (progn
  ;; Fill metadata first to get the current nickname.
  ;; TODO: Consider filling metadata earlier, outside
@@ -63,7 +62,7 @@ If THEN, call it in the directory buffer with no arguments."
   (when-let ((node (h/ewoc-find-node ewoc entry
  :predicate #'he/equal-p)))
 (goto-char (ewoc-location node)
-  (h/api 'get url :as 'response :noquery t
+  (he/api 'get directory-entry :noquery t
 ;; Get "full" listing with metadata
 :headers `(("Accept" . "application/json; metadata=full"))
 :then (lambda (response)
@@ -73,7 +72,7 @@ If THEN, call it in the directory buffer with no arguments."
(json-read-from-string body)
hyperdrive version))
  (parent-entry (h/parent directory-entry)))
-  (setf directory-entry (h//fill directory-entry headers))
+  (setf directory-entry (he//fill directory-entry headers))
   (when parent-entry
 (setf (alist-get 'display-name (he/etc parent-entry)) 
"../")
 (push parent-entry entries))
@@ -205,6 +204,7 @@ With point on header, returns directory entry."
 ;; `h/menu' is defined with `transient-define-prefix', which
 ;; `check-declare' doesn't recognize.
 (declare-function h/menu "hyperdrive-menu" nil t)
+(declare-function h/forget-file "hyperdrive")
 
 (defvar-keymap h/dir-mode-map
   :parent h/ewoc-mode-map
@@ -350,10 +350,8 @@ see Info node `(elisp)Yanking Media'."
hyperdrive)
   :predicate #'h/writablep
   :default-path path :latest-version t)))
-  (h/api 'put (he/url entry)
-:body-type 'binary
+  (he/api 'put entry :body image :body-type 'binary
 ;; TODO: Pass MIME type in a header? hyper-gateway detects it for us.
-:body image :as 'response
 :then (lambda (_res) (h/open entry))
 :else (lambda (plz-error)
 (h/message "Unable to yank media: %S" plz-error)
dif

[nongnu] elpa/hyperdrive c7bd3605b1 33/42: Change: (he/api) Set ENTRY hyperdrive to persisted copy

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit c7bd3605b11fa90a01c748e4b5768074ebeaac0e
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (he/api) Set ENTRY hyperdrive to persisted copy

Also remove this logic from he//fill.
---
 hyperdrive-lib.el | 64 +++
 1 file changed, 31 insertions(+), 33 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 7379d6d677..ef2cb4db0c 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -221,20 +221,41 @@ REST is passed to `h/api', which see.
 
 (defun he//api-then (entry response)
   "Update ENTRY's metadata according to RESPONSE.
-Updates ENTRY's hyperdrive's disk usage and latest version."
+Sets ENTRY's hyperdrive to the persisted version of the drive if
+it exists.  Updates ENTRY's hyperdrive's disk usage and latest
+version.  Finally, persists ENTRY's hyperdrive."
   (pcase-let*
-  (((cl-struct plz-response (headers (map x-drive-size x-drive-version)))
+  (((cl-struct plz-response
+   (headers (map link x-drive-size x-drive-version)))
 response)
-   ((cl-struct h/entry hyperdrive) entry)
-   ((cl-struct hyperdrive etc) hyperdrive))
+   ;; RESPONSE is guaranteed to have a "Link" header with the public key,
+   ;; while ENTRY may have a DNSLink domain but no public key yet.
+   (public-key (progn (string-match h//public-key-re link)
+  (match-string 1 link)))
+   ;; NOTE: Don't destructure `persisted-hyperdrive' with `pcase' here 
since it may be nil.
+   (persisted-hyperdrive (gethash public-key h/hyperdrives)))
+
+(when persisted-hyperdrive
+  ;; ENTRY's hyperdrive already persisted: merge domains into persisted
+  ;; hyperdrive and set ENTRY's hyperdrive slot to the persisted copy.
+  (setf (h/domains persisted-hyperdrive)
+(delete-dups (append (h/domains persisted-hyperdrive)
+ (h/domains (he/hyperdrive entry)
+  (setf (he/hyperdrive entry) persisted-hyperdrive))
+
+;; Ensure that ENTRY's hyperdrive has a public key.
+(setf (h/public-key (he/hyperdrive entry)) public-key)
+
+;; Fill hyperdrive.
 (when x-drive-size
-  (setf (map-elt etc 'disk-usage) (cl-parse-integer x-drive-size)
-(h/etc hyperdrive) etc))
+  (setf (map-elt (h/etc (he/hyperdrive entry)) 'disk-usage)
+(cl-parse-integer x-drive-size)))
 (when x-drive-version
-  (setf (h/latest-version hyperdrive) (string-to-number x-drive-version)))
+  (setf (h/latest-version (he/hyperdrive entry))
+(string-to-number x-drive-version)))
 ;; TODO: Update buffers like h/describe-hyperdrive after updating drive.
 ;; TODO: Consider debouncing or something for hyperdrive-persist to 
minimize I/O.
-(h/persist hyperdrive)))
+(h/persist (he/hyperdrive entry
 
 (defun h/gateway-needs-upgrade-p ()
   "Return non-nil if the gateway is responsive and needs upgraded."
@@ -693,9 +714,7 @@ The following ENTRY slots are filled:
 - \\+`hyperdrive' (from persisted value if it exists)
 
 The following ENTRY hyperdrive slots are filled:
-- \\+`public-key'
 - \\+`writablep' (when headers include Allow)
-- \\+`domains' (merged with current persisted value)
 
 Returns filled ENTRY."
   ;; TODO: Consider factoring out parts of this that should be done for every
@@ -703,14 +722,8 @@ Returns filled ENTRY."
   ;; latest-version).
   (pcase-let*
   (((cl-struct hyperdrive-entry hyperdrive) entry)
-   ((cl-struct hyperdrive writablep domains) hyperdrive)
-   ((map link content-length content-type etag last-modified allow) 
headers)
-   ;; If URL hostname was a DNSLink domain,
-   ;; entry doesn't yet have a public-key slot.
-   (public-key (progn (string-match h//public-key-re link)
-  (match-string 1 link)))
-   (persisted-hyperdrive (gethash public-key h/hyperdrives))
-   (domain (car domains)))
+   ((cl-struct hyperdrive writablep) hyperdrive)
+   ((map content-length content-type etag last-modified allow) headers))
 (when last-modified
   (setf last-modified (encode-time (parse-time-string last-modified
 (when (and allow (eq 'unknown writablep))
@@ -720,21 +733,6 @@ Returns filled ENTRY."
  (cl-parse-integer content-length
 (setf (he/type entry) content-type)
 (setf (he/mtime entry) last-modified)
-(if persisted-hyperdrive
-;; TODO: Consider moving this block into he/api-then.
-(progn
-  ;; Ensure that entry's hyperdrive is the persisted
-  ;; hyperdrive, since it may be used later as part of a
-  ;; `h/version-ranges' key and compared using `eq'.
-  ;; Also, we want the call to `h//fill'
-  ;; below to update the persisted hyperdrive.
-  (setf (he/hyperdrive entry) persisted-hyperdrive)
-  (when domain
-;; The previous ca

[nongnu] elpa/hyperdrive 4fc73deeb4 36/42: Fix: (he/fill) Docstring

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 4fc73deeb4f9f03827b592a3e08340c5f0ec81bf
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: (he/fill) Docstring
---
 hyperdrive-lib.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 753e97f025..4e2ad8be8a 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -709,13 +709,14 @@ the given `plz-queue'"
  :noquery t
 
 (defun he//fill (entry headers)
-  "Fill ENTRY from HEADERS.
+  "Fill ENTRY slots from HEADERS.
 
-The following ENTRY slots are filled:
 - \\+`type'
 - \\+`mtime'
 - \\+`size'
 
+Also fills existent range in `hyperdrive-version-ranges'.
+
 Returns filled ENTRY."
   (pcase-let*
   (((map content-length content-type etag last-modified) headers))



[nongnu] elpa/hyperdrive b09916654d 19/42: Comment: Add TODO

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit b09916654d12524c4a536732267b4a010806f191
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: Add TODO
---
 hyperdrive.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/hyperdrive.el b/hyperdrive.el
index 0e0d770ad1..8648114d53 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -520,6 +520,12 @@ use, see `hyperdrive-write'."
   ;; NOTE: `h/fill-latest-version' must come before
   ;; `h//fill' because the latter calls
   ;; `h/update-existent-version-range' internally.
+
+  ;; TODO: Instead of calling `h/fill-latest-version', we 
should
+  ;; set the hyperdrive's `latest-version' to the Etag of the
+  ;; PUT response header, since a successful PUT can only 
happen
+  ;; on the latest version of the hyperdrive.
+
   (h/fill-latest-version hyperdrive)
   (h//fill entry (plz-response-headers response))
   ;; PUT responses only include ETag and Last-Modified



[nongnu] elpa/hyperdrive ab8cd67c8a 32/42: Remove: (h//fill) Unused function; move TODO comment

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit ab8cd67c8a6dec18b11eace8382955642fb483e6
Author: Joseph Turner 
Commit: Joseph Turner 

Remove: (h//fill) Unused function; move TODO comment
---
 hyperdrive-lib.el | 15 +--
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 94e691ef41..7379d6d677 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -232,6 +232,7 @@ Updates ENTRY's hyperdrive's disk usage and latest version."
 (h/etc hyperdrive) etc))
 (when x-drive-version
   (setf (h/latest-version hyperdrive) (string-to-number x-drive-version)))
+;; TODO: Update buffers like h/describe-hyperdrive after updating drive.
 ;; TODO: Consider debouncing or something for hyperdrive-persist to 
minimize I/O.
 (h/persist hyperdrive)))
 
@@ -765,20 +766,6 @@ entry as a side-effect."
   "Synchronously fill the latest version slot in HYPERDRIVE."
   (he/api 'head (he/create :hyperdrive hyperdrive :path "/")))
 
-(defun h//fill (hyperdrive headers)
-  "Fill the latest version slot in HYPERDRIVE from HEADERS.
-HEADERS must from a HEAD/GET request to a directory or a
-PUT/DELETE request to a file or directory, as only those requests
-return the correct ETag header.  Returns latest version number."
-  ;; TODO: Update relevant buffers when hyperdrive latest version
-  ;; updates, at the least describe-hyperdrive buffers.
-  ;; TODO: Consider updating version range here.  First check all the
-  ;; places where this function is called.  Better yet, update
-  ;; `h/version-ranges' (and `h/hyperdrives'?)  in a
-  ;; lower-level function, perhaps a wrapper for `h/api'?
-  (setf (h/latest-version hyperdrive)
-(string-to-number (map-elt headers 'etag
-
 ;; TODO: Consider using symbol-macrolet to simplify place access.
 
 (defun h/update-existent-version-range (entry range-start)



[nongnu] elpa/hyperdrive f1bda470b4 27/42: Change: Remove unnecessary calls to h//fill

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit f1bda470b42025bf08a3bfe690d6c6ebcd07c1cb
Author: Joseph Turner 
Commit: Joseph Turner 

Change: Remove unnecessary calls to h//fill
---
 hyperdrive-lib.el |  7 ++-
 hyperdrive.el | 11 ++-
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index ff8f4bf2bb..30181dc6c0 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -790,11 +790,8 @@ entry as a side-effect."
listing))
 
 (defun h/fill (hyperdrive)
-  "Synchronously fill the latest version slot in HYPERDRIVE.
-Returns the latest version number."
-  (pcase-let (((cl-struct plz-response headers)
-   (he/api 'head (he/create :hyperdrive hyperdrive :path "/"
-(h//fill hyperdrive headers)))
+  "Synchronously fill the latest version slot in HYPERDRIVE."
+  (he/api 'head (he/create :hyperdrive hyperdrive :path "/")))
 
 (defun h//fill (hyperdrive headers)
   "Fill the latest version slot in HYPERDRIVE from HEADERS.
diff --git a/hyperdrive.el b/hyperdrive.el
index f731f368be..7fcd2ef14b 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -276,16 +276,10 @@ Universal prefix argument \\[universal-argument] forces
 (progn
   (cl-callf map-delete (h/metadata hyperdrive) 'name)
   (h/put-metadata hyperdrive
-:then (pcase-lambda ((cl-struct plz-response headers))
-(h//fill hyperdrive headers)
-(h/persist hyperdrive)
-(funcall then hyperdrive
+:then (lambda (_response) (funcall then hyperdrive
   (setf (alist-get 'name (h/metadata hyperdrive)) nickname)
   (h/put-metadata hyperdrive
-:then (pcase-lambda ((cl-struct plz-response headers))
-(h//fill hyperdrive headers)
-(h/persist hyperdrive)
-(funcall then hyperdrive
+:then (lambda (_response) (funcall then hyperdrive
 ;; TODO: Consider refreshing buffer names, directory headers, etc, 
especially host-meta.json entry buffer.
 )
   hyperdrive)
@@ -432,7 +426,6 @@ directory.  Otherwise, or with universal prefix argument
  ((map etag) headers)
  (nonexistent-entry (h/copy-tree entry t)))
   (setf (he/version nonexistent-entry) (string-to-number etag))
-  (h//fill (he/hyperdrive entry) headers)
   (h/update-nonexistent-version-range nonexistent-entry)
   ;; Since there's no way for `h//write-contents' to run when
   ;; `buffer-modified-p' returns nil, this is a workaround to 
ensure that



[nongnu] elpa/org-transclusion-http updated (d80fa9faeb -> 65caad0d9b)

2024-06-19 Thread ELPA Syncer
elpasync pushed a change to branch elpa/org-transclusion-http.

  from  d80fa9faeb Fix: Require url.el for byte compilation
   new  67ac5ed6f0 README: Note fix
   new  a764f05a9e v0.4
   new  65caad0d9b Meta: v0.5-pre


Summary of changes:
 README.org   | 8 +++-
 org-transclusion-http.el | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)



[nongnu] elpa/hyperdrive 11641c2d4f 34/42: Change: (he/api) Set ENTRY hyperdrive writablep slot

2024-06-19 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 11641c2d4fc15821aaf53f1ccb18173a21bf91ed
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (he/api) Set ENTRY hyperdrive writablep slot

Also remove this logic from he//fill.
---
 hyperdrive-lib.el | 18 +++---
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index ef2cb4db0c..46ccce299a 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -226,7 +226,7 @@ it exists.  Updates ENTRY's hyperdrive's disk usage and 
latest
 version.  Finally, persists ENTRY's hyperdrive."
   (pcase-let*
   (((cl-struct plz-response
-   (headers (map link x-drive-size x-drive-version)))
+   (headers (map link allow x-drive-size x-drive-version)))
 response)
;; RESPONSE is guaranteed to have a "Link" header with the public key,
;; while ENTRY may have a DNSLink domain but no public key yet.
@@ -247,6 +247,10 @@ version.  Finally, persists ENTRY's hyperdrive."
 (setf (h/public-key (he/hyperdrive entry)) public-key)
 
 ;; Fill hyperdrive.
+(when allow
+  ;; NOTE: "Allow" header is only present on HEAD requests.  We can change
+  ;; this, but it's fine as-is since we only need to check writability 
once.
+  (setf (h/writablep (he/hyperdrive entry)) (string-match-p "PUT" allow)))
 (when x-drive-size
   (setf (map-elt (h/etc (he/hyperdrive entry)) 'disk-usage)
 (cl-parse-integer x-drive-size)))
@@ -705,29 +709,21 @@ the given `plz-queue'"
  :noquery t
 
 (defun he//fill (entry headers)
-  "Fill ENTRY and its hyperdrive from HEADERS.
+  "Fill ENTRY from HEADERS.
 
 The following ENTRY slots are filled:
 - \\+`type'
 - \\+`mtime'
 - \\+`size'
-- \\+`hyperdrive' (from persisted value if it exists)
-
-The following ENTRY hyperdrive slots are filled:
-- \\+`writablep' (when headers include Allow)
 
 Returns filled ENTRY."
   ;; TODO: Consider factoring out parts of this that should be done for every
   ;; API entry response (i.e. in `he//api-then'; e.g. drive-size, 
version-range,
   ;; latest-version).
   (pcase-let*
-  (((cl-struct hyperdrive-entry hyperdrive) entry)
-   ((cl-struct hyperdrive writablep) hyperdrive)
-   ((map content-length content-type etag last-modified allow) headers))
+  (((map content-length content-type etag last-modified) headers))
 (when last-modified
   (setf last-modified (encode-time (parse-time-string last-modified
-(when (and allow (eq 'unknown writablep))
-  (setf (h/writablep hyperdrive) (string-match-p "PUT" allow)))
 (setf (he/size entry) (and content-length
(ignore-errors
  (cl-parse-integer content-length