[elpa] externals/beframe af8ef10149: Make beframe-infer-frame-name not choke on non-project directory

2024-07-31 Thread ELPA Syncer
branch: externals/beframe
commit af8ef1014912f6c2b3569ac22eba81a7fa62462f
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make beframe-infer-frame-name not choke on non-project directory

Thanks to duli for pointing this out and suggesting a solution. This
was done in issue 5: .
---
 README.org |  2 +-
 beframe.el | 38 +++---
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/README.org b/README.org
index 05a046f495..cae0aeb6ae 100644
--- a/README.org
+++ b/README.org
@@ -404,7 +404,7 @@ matters.
 + Contributions to code or the manual :: Edgar Vincent, Tony Zorman.
 
 + Ideas and/or user feedback :: Derek Passen, Karan Ahlawat, Karthik
-  Chikmagalur, Valentino.
+  Chikmagalur, Valentino, duli.
 
 * COPYING
 :PROPERTIES:
diff --git a/beframe.el b/beframe.el
index 230960b98b..0e807262de 100644
--- a/beframe.el
+++ b/beframe.el
@@ -619,25 +619,25 @@ Also see the variable `beframe-prefix-map'."
 (defun beframe-infer-frame-name (frame name)
   "Infer a suitable name for FRAME with given NAME.
 See `beframe-rename-frame'."
-  (when-let (((frame-list))
- (buffer (car (frame-parameter frame 'buffer-list)))
- (file-name (when (bufferp buffer) (buffer-file-name buffer)))
- (buf-name (buffer-name buffer))
- (dir (with-current-buffer buffer (or (vc-root-dir) 
default-directory)))
- (projectp (and (bound-and-true-p project--list)
-(listp project--list)
-(member (list dir) project--list
-(cond
- ((and name (stringp name))
-  name)
- ((and projectp buf-name)
-  (format "%s" (file-name-nondirectory (directory-file-name dir
- ((and (not (minibufferp)) file-name)
-  (format "%s %s" buf-name dir))
- ((not (minibufferp))
-  buf-name)
- (t
-  dir
+  (when (frame-list)
+(let* ((buffer (car (frame-parameter frame 'buffer-list)))
+   (file-name (when (bufferp buffer) (buffer-file-name buffer)))
+   (buf-name (buffer-name buffer))
+   (dir (with-current-buffer buffer (or (vc-root-dir) 
default-directory)))
+   (projectp (and (bound-and-true-p project--list)
+  (listp project--list)
+  (member (list dir) project--list
+  (cond
+   ((and name (stringp name))
+name)
+   ((and projectp buf-name)
+(format "%s" (file-name-nondirectory (directory-file-name dir
+   ((and (not (minibufferp)) file-name)
+(format "%s %s" buf-name dir))
+   ((not (minibufferp))
+buf-name)
+   (t
+dir)
 
 ;;;###autoload
 (defun beframe-rename-frame (frame &optional name)



[elpa] externals/eev c4f6a3d489: Small changes, mostly for (find-lean4-intro).

2024-07-31 Thread ELPA Syncer
branch: externals/eev
commit c4f6a3d489d47fd2b2005e9fd75f71d9905aeee0
Author: Eduardo Ochs 
Commit: Eduardo Ochs 

Small changes, mostly for (find-lean4-intro).
---
 ChangeLog | 12 
 VERSION   |  4 ++--
 eev-intro.el  | 20 +---
 eev-lean4.el  | 23 +--
 eev-rstdoc.el | 12 ++--
 eev-tlinks.el | 29 +++--
 eev.el|  2 +-
 7 files changed, 70 insertions(+), 32 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e1fc2edf40..969b3fc712 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-07-31  Eduardo Ochs  
+
+   * eev-rstdoc.el: replaced all occurrences of "python3.9" by
+   "python3.11".
+
+2024-07-30  Eduardo Ochs  
+
+   * eev-tlinks.el (find-newbrowser2-links): renamed to
+   `find-altbrowser-links'.
+
+   * eev-intro.el (find-lean4-intro): Small changes.
+
 2024-07-29  Eduardo Ochs  
 
* eev-intro.el (find-emacs-keys-intro): list some key sequences
diff --git a/VERSION b/VERSION
index eaa4d2db80..ab26d69983 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Mon Jul 29 05:03:02 GMT 2024
-Mon Jul 29 02:03:02 -03 2024
+Wed Jul 31 05:54:56 GMT 2024
+Wed Jul 31 02:54:56 -03 2024
diff --git a/eev-intro.el b/eev-intro.el
index 2b9f419280..97a62e212f 100644
--- a/eev-intro.el
+++ b/eev-intro.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author: Eduardo Ochs 
 ;; Maintainer: Eduardo Ochs 
-;; Version:20240729
+;; Version:20240731
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://anggtwu.net/eev-current/eev-intro.el>
@@ -17908,11 +17908,16 @@ Use: (find-dot-emacs-links \"eevgit eev angges melpa 
lean4 maxima5470 mfms\")
   (find-leanmetadoc  \"main/01_intro\")
   (find-tclean4doc   \"trust/trust\")
   (find-tpil4doc \"introduction\")
-  (find-fplean4page)
-  (find-lean4page)
-  (find-leanmetapage)
-  (find-tclean4page)
-  (find-tpil4page)
+  (find-fplean4page  9 \"Evaluating Expressions\")
+  (find-fplean4text  9 \"Evaluating Expressions\")
+  (find-lean4page1 \"What is Lean\")
+  (find-lean4text1 \"What is Lean\")
+  (find-leanmetapage 1 \"What's the goal of this book?\")
+  (find-leanmetatext 1 \"What's the goal of this book?\")
+  (find-tclean4page  5 \"Trust\")
+  (find-tclean4text  5 \"Trust\")
+  (find-tpil4page1 \"Introduction\")
+  (find-tpil4text1 \"Introduction\")
 
   Broken - I did not include this one:
   (find-leanrefdoc   \"using_lean#using-lean-with-emacs\")
@@ -18037,7 +18042,8 @@ an option (\"i\") to say that it is at the directory 
above, i.e., at:
 
   ~/.elan/toolchains/leanprover--lean4---stable/
 
-I don't understand projects and project roots well... =(
+Answer \"i\". Note: I don't understand projects and project roots well
+enough... =(
 
 
 
diff --git a/eev-lean4.el b/eev-lean4.el
index 2c824f1119..ecabc2ba60 100644
--- a/eev-lean4.el
+++ b/eev-lean4.el
@@ -282,7 +282,7 @@ local files for the leandoc PL."
 ;; (kill-new \"/tmp/print.pdf\")
 ;; {baseweb}print.html
 ;;
-;;  c) Copy the `print.pdf' to the right place:
+;;  c) Copy the `print.pdf' to the right (local) place:
 ;; (find-sh0 \"cp -v /tmp/print.pdf {basewebl}\")
 ;;
 ;;  d) Generate the `print.txt':
@@ -290,11 +290,30 @@ local files for the leandoc PL."
 ;; (find-{kw}docfile \"\" \"print\")
 ;; (find-{kw}docsh \"pdftotext -layout print.pdf print.txt\")
 ;; (find-{kw}docfile \"print.txt\")
-
+;;
+;;  e) Copy the `print.pdf' to anggtwu.net:
+
+ (eepitch-eshell)
+ (eepitch-kill)
+ (eepitch-eshell)
+ls$S/https/{baseweb-}
+ls   $Linp/snarf/https/{baseweb-}
+ls   $Lins/snarf/https/{baseweb-}
+mkdir -p $Linp/snarf/https/{baseweb-}
+mkdir -p $Lins/snarf/https/{baseweb-}
+cp -v $S/https/{baseweb-}print.pdf \\
+ $Linp/snarf/https/{baseweb-}
+cp -v $S/https/{baseweb-}print.pdf \\
+ $Lins/snarf/https/{baseweb-}
 
 ;; 3. I use this to adjust how blogme htmlizes `find-{kw}doc':
 ;;(find-blogme3-rstdoc-links \"{kw}\")
 ;;^ This only works on my machine!
+;;
+;; 4. Similar, but for `find-{kw}page':
+;;(find-blogme3 \"sandwiches-defs.lua\")
+code_pdf(\"{kw}\", \"http://anggtwu.net/snarf/https/{baseweb-}print.pdf\";)
+
 ")
)
   pos-spec-list
diff --git a/eev-rstdoc.el b/eev-rstdoc.el
index 8c0e1ec202..d5327566d0 100644
--- a/eev-rstdoc.el
+++ b/eev-rstdoc.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author: Eduardo Ochs 
 ;; Maintainer: Eduardo Ochs 
-;; Version:20240619
+;; Version:20240731
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://anggtwu.net/eev-current/eev-rstdoc.el>
@@ -134,7 +134,7 @@
 

[elpa] externals/hyperbole f89d3b4677 5/7: Merge branch 'master' into rsw

2024-07-31 Thread ELPA Syncer
branch: externals/hyperbole
commit f89d3b46775c2b3de32f04c96bff17aeaec3ea39
Merge: bcc6ebd031 9ee1f8ea12
Author: bw 
Commit: bw 

Merge branch 'master' into rsw
---
 ChangeLog  | 41 +-
 Makefile   |  4 +--
 hact.el|  6 ++---
 hargs.el   |  4 +--
 hasht.el   | 11 ++--
 hsys-consult.el| 15 +--
 hui-mouse.el   |  8 +++---
 test/hibtypes-tests.el | 34 ++---
 test/hpath-tests.el| 23 -
 test/hsys-org-tests.el | 69 +-
 test/hui-tests.el  |  9 ++-
 test/hywiki-tests.el   | 21 +--
 12 files changed, 220 insertions(+), 25 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5c093c48ef..74c232414e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,12 +24,46 @@
   (hsys-org--agenda-tags-string): Improve doc string and fix to 
return
 non-nil only when point is within a tag string.  Simplify return value 
creation.
 
+2024-07-28  Mats Lidell  
+
+* test/hibtypes-tests.el (ibtypes:org-id-test): Test org-id ibut.
+
+2024-07-27  Mats Lidell  
+
+* test/hsys-org-tests.el (hsys-org--get-agenda-tags): Test
+hsys-org-get-agenda-tags.
+
+2024-07-26  Mats Lidell  
+
+* hsys-org.el (hsys-org--agenda-tags-string): Update docstring.
+
+* test/hsys-org-tests.el (hsys-org--mode-p): Test hsys-org-mode-p.
+(hsys-org---agenda-tags-string): Test hsys-org--agenda-tags-string.
+
+* test/hywiki-tests.el (hywiki-tests--at-tags-p): Test hywiki-at-tags-p.
+
+* test/hsys-org-tests.el (hsys-org--directory-at-tags-p): Test
+hsys-org-directory-at-tags-p.
+
 2024-07-15  Bob Weiner  
 
 * hywiki.el (hywiki-in-page-p): Change to use 'default-directory' instead
 of 'buffer-file-name' so works with temp buffers created during Org
 export to other formats, e.g. html.
 
+2024-07-15  Mats Lidell  
+
+* test/hsys-org-tests.el (hsys-org--at-tags-p): Test hsys-org-at-tags-p.
+
+* test/hpath-tests.el (hpath--to-markup-anchor): Test hpath:to-markup-anchor.
+
+* test/hui-tests.el (hui--link-possible-types): Add test for single-line
+region.
+
+2024-07-14  Mats Lidell  
+
+* Makefile (DOCKER_VERSIONS): Use 29.4 for local docker builds.
+
 2024-07-14  Bob Weiner  
 
 * hywiki.el (hywiki-convert-words-to-org-links, hywiki-map-words): Add.
@@ -48,6 +82,11 @@
 (hywiki-buttonize-word): Add.
(hywiki-maybe-highlight-page-name): Rewrite to use above function.
 
+2024-07-12  Mats Lidell  
+
+* test/hywiki-tests.el (hywiki-tests--maybe-at-wikiword-beginning): Fix
+set of acceptable chars and use escaped notation.
+
 2024-07-10  Bob Weiner  
 
 * hywiki.el (hywiki-org-link-export): Add as [[hy:WikiWord]] link-export 
property.
@@ -248,7 +287,7 @@
 (hynote-file): Add ibtype to display non-HyWikiWord files in
 hywiki-directory'.
 
-* Makefile: (docker-run): Add to intweractively run docker versions
+* Makefile: (docker-run): Add to interactively run docker versions
 of Emacs with Hyperbole.  Update Commentary to summarize docker
 targets that build, byte-compile and run Hyperbole.
 
diff --git a/Makefile b/Makefile
index c9a9e405c5..1bd33371a2 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 # Author:   Bob Weiner
 #
 # Orig-Date:15-Jun-94 at 03:42:38
-# Last-Mod:  7-Jul-24 at 22:21:42 by Mats Lidell
+# Last-Mod:  9-Jul-24 at 09:06:21 by Mats Lidell
 #
 # Copyright (C) 1994-2023  Free Software Foundation, Inc.
 # See the file HY-COPY for license information.
@@ -176,7 +176,7 @@ ELISP_TO_COMPILE = $(pkg_parent)/elc-${USER}
 HYPB_WEB_REPO_LOCATION = "../hyweb/hyperbole/"
 
 # CI/CD Emacs versions for local docker based tests
-DOCKER_VERSIONS=27.2 28.2 29.3 master
+DOCKER_VERSIONS=27.2 28.2 29.4 master
 
 ##
 # NO CHANGES REQUIRED BELOW HERE.#
diff --git a/hact.el b/hact.el
index 553c0d4366..073a35a581 100644
--- a/hact.el
+++ b/hact.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:18-Sep-91 at 02:57:09
-;; Last-Mod: 22-Jun-24 at 22:50:10 by Mats Lidell
+;; Last-Mod: 12-Jul-24 at 23:32:57 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -368,7 +368,7 @@ Autoloads action function if need be to get the parameter 
list."
   (action:params-emacs action)))
((symbolp action)
 (car (cdr (and (fboundp action) (hypb:indirect-function action)
-   ((and (fboundp #'closurep) (closurep action))
+   ((and (fboundp 'closurep) (closurep action))
 (aref action 0
 
 (defun action:param-list (action)
@@ -414,7 +414,7 @@ performing ACTION."
   (setq args (hpath:absolute-arguments actype args)))
   (let ((hist-elt (hhist:element)))
(run-hooks 'action-act-hook)
-   (prog1 (or (when (and (fboundp #'closurep) (closurep action))
+

[elpa] externals/hyperbole d977223650 6/7: Fix hsys-org tag handling test

2024-07-31 Thread ELPA Syncer
branch: externals/hyperbole
commit d97722365083e4f86d76111376ed7b80f53f1be2
Author: bw 
Commit: bw 

Fix hsys-org tag handling test
---
 ChangeLog  | 11 +--
 hibtypes.el|  4 +++-
 test/hsys-org-tests.el | 10 +-
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 74c232414e..2b983bcc38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-07-31  Bob Weiner  
+
+* hibtypes.el (org-uuid-regexp): Add variable def for when missing in certain 
earlier Org
+versions.
+
+* test/hsys-org-tests.el (hsys-org---agenda-tags-string): Fix to current tag 
handling code.
+
 2024-07-28  Bob Weiner  
 
 * hproperty.el (hproperty:but-add): Add a button only when a button with the 
same property
@@ -130,8 +137,8 @@
 
 2024-07-06  Bob Weiner  
 
-* hibtypes.el (org-id): Fix bug in older versions of Org where where
-'org-uuid-regexp' was not bound.
+* hibtypes.el (org-id): Fix bug in older versions of Org where 
'org-uuid-regexp'
+was not bound.
 
 * hbut.el (ibut:create): Improved when err occurs in type to print the err 
before
 triggering a backtrace when in batch mode.
diff --git a/hibtypes.el b/hibtypes.el
index 1d12df73cc..78742fa0da 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:19-Sep-91 at 20:45:31
-;; Last-Mod: 14-Jul-24 at 12:11:19 by Bob Weiner
+;; Last-Mod: 31-Jul-24 at 01:31:32 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -67,6 +67,8 @@
 
 (defvar cscope-output-line-regexp)
 
+(defvar org-uuid-regexp)
+
 (declare-function actype:eval "hact")
 (declare-function actype:identity "hact")
 (declare-function hact "hact")
diff --git a/test/hsys-org-tests.el b/test/hsys-org-tests.el
index 62c647267c..ff4b70864b 100644
--- a/test/hsys-org-tests.el
+++ b/test/hsys-org-tests.el
@@ -3,7 +3,7 @@
 ;; Author:   Mats Lidell 
 ;;
 ;; Orig-Date:23-Apr-21 at 20:55:00
-;; Last-Mod: 28-Jul-24 at 11:44:20 by Mats Lidell
+;; Last-Mod: 31-Jul-24 at 01:46:48 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -205,18 +205,18 @@ This is independent of the setting of 
`hsys-org-enable-smart-keys'."
 (font-lock-ensure)
 
 (should (and (search-forward "header ") (looking-at-p ":tag1:")))
-(should (string= ":tag1:tag2:tag3" (hsys-org--agenda-tags-string)))
+(should (string= ":tag1:tag2:tag3:" (hsys-org--agenda-tags-string)))
 
 (forward-char)
 (should (looking-at-p "tag1:"))
-(should (string= ":tag1" (hsys-org--agenda-tags-string)))
+(should (string= "tag1" (hsys-org--agenda-tags-string)))
 
 (should (and (search-forward "tag1") (looking-at-p ":tag2:")))
-(should (string= ":tag1:tag2:tag3" (hsys-org--agenda-tags-string)))
+(should (string= ":tag1:tag2:tag3:" (hsys-org--agenda-tags-string)))
 
 (forward-char)
 (should (looking-at-p "tag2:"))
-(should (string= ":tag2" (hsys-org--agenda-tags-string)
+(should (string= "tag2" (hsys-org--agenda-tags-string)
 
 (ert-deftest hsys-org--get-agenda-tags ()
   "Verify `hsys-org-get-agenda-tags' calls org-consult-agenda-function."



[elpa] externals/hyperbole updated (9ee1f8ea12 -> 2d2112713d)

2024-07-31 Thread ELPA Syncer
elpasync pushed a change to branch externals/hyperbole.

  from  9ee1f8ea12 add tests for hypb 9 0 2 part1 (#562)
   new  b8687ce867 Remove # function quoting from derived-mode-p argument
   new  ec0236813f Add `help-mode' to `smart-lisp-mode-p' predicate
   new  9e4862fc4f Add HyWikiWord highlighting only when not already 
highlighted
   new  bcc6ebd031 Highlight [HyWikiWord], , not 
[[HyWikiWord]], <>
   new  f89d3b4677 Merge branch 'master' into rsw
   new  d977223650 Fix hsys-org tag handling test
   new  2d2112713d Merge pull request #565 from rswgnu/rsw


Summary of changes:
 ChangeLog  |  68 +++-
 hbut.el|  11 +-
 hibtypes.el|  12 +-
 hmouse-tag.el  |   6 +-
 hproperty.el   |  14 +-
 hsys-org-roam.el   |  14 +-
 hsys-org.el|  65 ---
 hui.el |   4 +-
 hyrolo.el  |  12 +-
 hywiki.el  | 448 -
 kotl/klink.el  |   6 +-
 kotl/kotl-orgtbl.el|   4 +-
 test/hsys-org-tests.el |  10 +-
 13 files changed, 441 insertions(+), 233 deletions(-)



[elpa] externals/hyperbole ec0236813f 2/7: Add `help-mode' to `smart-lisp-mode-p' predicate

2024-07-31 Thread ELPA Syncer
branch: externals/hyperbole
commit ec0236813fe05ca23fbccc37c328c3cfc3ccbf3b
Author: bw 
Commit: bw 

Add `help-mode' to `smart-lisp-mode-p' predicate
---
 ChangeLog   |  6 ++
 hibtypes.el | 10 +-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c5a233db50..42150229d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+* hibtypes.el (Info-node): Handle decoding of Info node names in
+Hyperbole Help buffer lbl-key: lines, eliminating excess underscores.
+
+* hmouse-tag.el (smart-lisp-mode-p): Add 'help-mode', e.g. for output of {C-h 
A}
+to make Hyperbole cross-references work.
+
 2024-07-07  Bob Weiner  
 
 * hibtypes.el (elisp-compiler-msg): Fix to handle both of these cases:
diff --git a/hibtypes.el b/hibtypes.el
index d660bd0945..1d12df73cc 100644
--- a/hibtypes.el
+++ b/hibtypes.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:19-Sep-91 at 20:45:31
-;; Last-Mod:  7-Jul-24 at 23:38:46 by Bob Weiner
+;; Last-Mod: 14-Jul-24 at 12:11:19 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -1427,6 +1427,14 @@ Activates only if point is within the first line of the 
Info-node name."
  (node-ref (and (stringp ref)
 (or (string-match-p "\\`([^\): \t\n\r\f]+)\\'" ref)
 (string-match-p "\\`([^\): \t\n\r\f]+)[^ :;\"'`]" 
ref))
+   ;; Below handle decoding of Info node names in
+   ;; Hyperbole Help buffer lbl-key: lines,
+   ;; eliminating excess underscores.
+   (save-excursion
+ (beginning-of-line)
+ (when (looking-at "\\s-+lbl-key:\\s-+\"")
+   (setq ref (ibut:key-to-label ref)))
+ t)
 (hpath:is-p ref nil t
 (and node-ref
  (ibut:label-set node-ref-and-pos)



[elpa] externals/hyperbole b8687ce867 1/7: Remove # function quoting from derived-mode-p argument

2024-07-31 Thread ELPA Syncer
branch: externals/hyperbole
commit b8687ce867faee05ba540b908dc3fc4dfe534427
Author: bw 
Commit: bw 

Remove # function quoting from derived-mode-p argument
---
 hmouse-tag.el   | 6 +++---
 hui.el  | 4 ++--
 kotl/klink.el   | 6 +++---
 kotl/kotl-orgtbl.el | 4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/hmouse-tag.el b/hmouse-tag.el
index 6fb7d3ffe6..c44cdc917c 100644
--- a/hmouse-tag.el
+++ b/hmouse-tag.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:24-Aug-91
-;; Last-Mod: 22-Jun-24 at 22:58:03 by Mats Lidell
+;; Last-Mod: 14-Jul-24 at 11:55:33 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -859,9 +859,9 @@ on the first line of a non-alias Lisp definition."
 
 ;;;###autoload
 (defun smart-lisp-mode-p ()
-  "Return t if in a mode which use Lisp symbols."
+  "Return t if in a mode which uses Lisp symbols."
   (or (smart-emacs-lisp-mode-p)
-  (apply #'derived-mode-p '(lisp-mode scheme-mode
+  (apply #'derived-mode-p '(lisp-mode scheme-mode help-mode
 
 ;;;###autoload
 (defun smart-objc (&optional identifier next)
diff --git a/hui.el b/hui.el
index abc26cfa9c..769249bd92 100644
--- a/hui.el
+++ b/hui.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:19-Sep-91 at 21:42:03
-;; Last-Mod: 29-May-24 at 00:57:49 by Bob Weiner
+;; Last-Mod: 14-Jul-24 at 23:32:10 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -1889,7 +1889,7 @@ Buffer without File  link-to-buffer-tmp"
  (list 
'link-to-Info-index-item (hargs:at-p)))
  (let ((hargs:reading-type 
'Info-node))
(list 'link-to-Info-node 
(hargs:at-p)
-  ((and (derived-mode-p 
#'texinfo-mode)
+  ((and (derived-mode-p 
'texinfo-mode)
 (save-excursion
   (beginning-of-line)
   (or (looking-at "@node ")
diff --git a/kotl/klink.el b/kotl/klink.el
index f91366c779..f4870aee9b 100644
--- a/kotl/klink.el
+++ b/kotl/klink.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:15-Nov-93 at 12:15:16
-;; Last-Mod: 30-Jun-24 at 11:36:47 by Bob Weiner
+;; Last-Mod: 14-Jul-24 at 23:32:32 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -181,7 +181,7 @@ link-end-position, (including delimiters)."
   (not (br-browser-buffer-p))
 t)
   ;; If in a programming mode, Klinks can occur only within comments.
-  (if (and (derived-mode-p #'prog-mode)
+  (if (and (derived-mode-p 'prog-mode)
(not (derived-mode-p 'lisp-interaction-mode))
(not (memq major-mode hui-select-markup-modes)))
   ;; Next line means point is within a comment
@@ -306,7 +306,7 @@ See `actypes::link-to-kotl' for valid KLINK formats."
   (let ((obuf (current-buffer)))
 ;; Perform klink's action which is to jump to klink referent.
 (prog1 (hact 'link-to-kotl klink)
-  (when (derived-mode-p #'kotl-mode)
+  (when (derived-mode-p 'kotl-mode)
(save-excursion
  ;; Update klink label if need be, which might be in a different buffer
  ;; than the current one.
diff --git a/kotl/kotl-orgtbl.el b/kotl/kotl-orgtbl.el
index 15ec8476f8..0defa6913c 100644
--- a/kotl/kotl-orgtbl.el
+++ b/kotl/kotl-orgtbl.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:10/18/2020
-;; Last-Mod:  3-Oct-23 at 22:24:23 by Mats Lidell
+;; Last-Mod: 14-Jul-24 at 23:32:40 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -76,7 +76,7 @@
 (defun orgtbl-tab (arg)
   "Justification and field motion for `orgtbl-mode' with Koutline support."
   (interactive "P")
-  (cond ((and (derived-mode-p #'kotl-mode) arg)
+  (cond ((and (derived-mode-p 'kotl-mode) arg)
 (kotl-mode:tab-command (if (= (prefix-numeric-value arg) 1) nil arg)))
(arg
 (org-table-edit-field t))



[elpa] externals/hyperbole 2d2112713d 7/7: Merge pull request #565 from rswgnu/rsw

2024-07-31 Thread ELPA Syncer
branch: externals/hyperbole
commit 2d2112713d0783897411a65d5fbbb099c809353a
Merge: 9ee1f8ea12 d977223650
Author: Robert Weiner 
Commit: GitHub 

Merge pull request #565 from rswgnu/rsw

Bug fixes and highlighting single square and angle bracketed HyWikiWords
---
 ChangeLog  |  68 +++-
 hbut.el|  11 +-
 hibtypes.el|  12 +-
 hmouse-tag.el  |   6 +-
 hproperty.el   |  14 +-
 hsys-org-roam.el   |  14 +-
 hsys-org.el|  65 ---
 hui.el |   4 +-
 hyrolo.el  |  12 +-
 hywiki.el  | 448 -
 kotl/klink.el  |   6 +-
 kotl/kotl-orgtbl.el|   4 +-
 test/hsys-org-tests.el |  10 +-
 13 files changed, 441 insertions(+), 233 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 15f5fec671..2b983bcc38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2024-07-31  Bob Weiner  
+
+* hibtypes.el (org-uuid-regexp): Add variable def for when missing in certain 
earlier Org
+versions.
+
+* test/hsys-org-tests.el (hsys-org---agenda-tags-string): Fix to current tag 
handling code.
+
+2024-07-28  Bob Weiner  
+
+* hproperty.el (hproperty:but-add): Add a button only when a button with the 
same property
+value, start, and end does not already exist, to prevent duplicates.
+
+* hywiki.el (hywiki-maybe-highlight-page-name): Fix to dehighlight wiki words 
only if within
+double square or angle brackets (leaving these to Org to handle).
+(hywiki-buttonize-non-character-commands): Add 'delete-' commands.
+(hywiki--highlighting-done-flag): Add and use in 
'hywiki-maybe-highlight-page-name'.
+(hywiki-maybe-highlight-org-element-backward,
+ hywiki-maybe-highlight-org-element-forward): Add these two functions.
+(hywiki-maybe-highlight-page-names): Fix to not use whole buffer highlight 
flag when
+   given a region.
+
+* hsys-org-roam.el (hsys-org-roam-tags-view):
+  hsys-org.el (hsys-org-tags-view):
+  hywiki.el (hywiki-tags-view):
+  hyrolo.el (hyrolo-tags-view): Add doc for 'match' arg.
+
+* hsys-org.el (hsys-org-get-agenda-tags): Rename arg from
+'org-consult-agenda-function' to 'agenda-tags-view-function' since does
+not require the consult package and don't want to override any org
+package name.  Improve doc string.
+  (hsys-org--agenda-tags-string): Improve doc string and fix to 
return
+non-nil only when point is within a tag string.  Simplify return value 
creation.
+
 2024-07-28  Mats Lidell  
 
 * test/hibtypes-tests.el (ibtypes:org-id-test): Test org-id ibut.
@@ -19,6 +52,12 @@
 * test/hsys-org-tests.el (hsys-org--directory-at-tags-p): Test
 hsys-org-directory-at-tags-p.
 
+2024-07-15  Bob Weiner  
+
+* hywiki.el (hywiki-in-page-p): Change to use 'default-directory' instead
+of 'buffer-file-name' so works with temp buffers created during Org
+export to other formats, e.g. html.
+
 2024-07-15  Mats Lidell  
 
 * test/hsys-org-tests.el (hsys-org--at-tags-p): Test hsys-org-at-tags-p.
@@ -32,11 +71,36 @@
 
 * Makefile (DOCKER_VERSIONS): Use 29.4 for local docker builds.
 
+2024-07-14  Bob Weiner  
+
+* hywiki.el (hywiki-convert-words-to-org-links, hywiki-map-words): Add.
+
+* hibtypes.el (Info-node): Handle decoding of Info node names in
+Hyperbole Help buffer lbl-key: lines, eliminating excess underscores.
+
+* hmouse-tag.el (smart-lisp-mode-p): Add 'help-mode', e.g. for output of {C-h 
A}
+to make Hyperbole cross-references work.
+
+2024-07-13  Bob Weiner  
+
+* hywiki.el (hywiki--range): Add to hold (start . end) range values.
+(hywiki-word-at): If word is already highlighted with
+'hywiki-word-face', use that as a shortcut to get the word.
+(hywiki-buttonize-word): Add.
+   (hywiki-maybe-highlight-page-name): Rewrite to use above function.
+
 2024-07-12  Mats Lidell  
 
 * test/hywiki-tests.el (hywiki-tests--maybe-at-wikiword-beginning): Fix
 set of acceptable chars and use escaped notation.
 
+2024-07-10  Bob Weiner  
+
+* hywiki.el (hywiki-org-link-export): Add as [[hy:WikiWord]] link-export 
property.
+(hywiki-org-link-resolve): Add to resolve HyWikiWord link to its 
page.
+(hywiki-org-link-store): Change :description property to be just
+the 'page-name' itself.
+
 2024-07-07  Bob Weiner  
 
 * hibtypes.el (elisp-compiler-msg): Fix to handle both of these cases:
@@ -73,8 +137,8 @@
 
 2024-07-06  Bob Weiner  
 
-* hibtypes.el (org-id): Fix bug in older versions of Org where where
-'org-uuid-regexp' was not bound.
+* hibtypes.el (org-id): Fix bug in older versions of Org where 
'org-uuid-regexp'
+was not bound.
 
 * hbut.el (ibut:create): Improved when err occurs in type to print the err 
before
 triggering a backtrace when in batch mode.
diff --git a/hbut.el b/hbut.el
index e89a9688c1..ce4967ce6a 100644
--- a/hbut.el
+++ b/hbut.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 

[elpa] externals/hyperbole 9e4862fc4f 3/7: Add HyWikiWord highlighting only when not already highlighted

2024-07-31 Thread ELPA Syncer
branch: externals/hyperbole
commit 9e4862fc4f76d29bc460fd98c5a022bc50e6e258
Author: bw 
Commit: bw 

Add HyWikiWord highlighting only when not already highlighted
---
 ChangeLog|  3 +++
 hproperty.el | 14 +-
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 42150229d2..e47deb3513 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+* hproperty.el (hproperty:but-add): Add a button only when a button with the 
same property
+value, start, and end does not already exist, to prevent duplicates.
+
 * hibtypes.el (Info-node): Handle decoding of Info node names in
 Hyperbole Help buffer lbl-key: lines, eliminating excess underscores.
 
diff --git a/hproperty.el b/hproperty.el
index 2a34918c23..11fad38c95 100644
--- a/hproperty.el
+++ b/hproperty.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:21-Aug-92
-;; Last-Mod: 29-Jun-24 at 18:57:42 by Bob Weiner
+;; Last-Mod: 28-Jul-24 at 23:58:16 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -150,14 +150,18 @@ This is shown when hovering over the button with the 
mouse."
 
 (defun hproperty:but-add (start end face)
   "Add between START and END a button using FACE in current buffer.
+Button is added only if it does not already exist.
 
 If `hproperty:but-emphasize-flag' is non-nil when this is called,
 emphasize that button is selectable whenever the mouse cursor
 moves over it."
-  (let ((but (make-overlay start end nil t)))
-(overlay-put but 'face face)
-(when hproperty:but-emphasize-flag
-  (overlay-put but 'mouse-face 'highlight
+  (let ((but (hproperty:but-get start 'face face)))
+(unless (and but (eq start (hproperty:but-start but))
+(eq end (hproperty:but-end but)))
+  (setq but (make-overlay start end nil t))
+  (overlay-put but 'face face)
+  (when hproperty:but-emphasize-flag
+   (overlay-put but 'mouse-face 'highlight)
 
 (defun hproperty:but-clear (&optional pos property value)
   "Remove highlighting from any named Hyperbole button at point or POS.



[elpa] externals/hyperbole bcc6ebd031 4/7: Highlight [HyWikiWord], , not [[HyWikiWord]], <>

2024-07-31 Thread ELPA Syncer
branch: externals/hyperbole
commit bcc6ebd03141f4c54149452659f31923ea5f8097
Author: bw 
Commit: bw 

Highlight [HyWikiWord], , not [[HyWikiWord]], <>

Handle delete commands that may affect whether or not a HyWikiWord is 
highlighted.
---
 ChangeLog|  48 ++
 hbut.el  |  11 +-
 hsys-org-roam.el |   9 +-
 hsys-org.el  |  55 +++
 hyrolo.el|   9 +-
 hywiki.el| 447 ---
 6 files changed, 386 insertions(+), 193 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e47deb3513..5c093c48ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,60 @@
+2024-07-28  Bob Weiner  
+
 * hproperty.el (hproperty:but-add): Add a button only when a button with the 
same property
 value, start, and end does not already exist, to prevent duplicates.
 
+* hywiki.el (hywiki-maybe-highlight-page-name): Fix to dehighlight wiki words 
only if within
+double square or angle brackets (leaving these to Org to handle).
+(hywiki-buttonize-non-character-commands): Add 'delete-' commands.
+(hywiki--highlighting-done-flag): Add and use in 
'hywiki-maybe-highlight-page-name'.
+(hywiki-maybe-highlight-org-element-backward,
+ hywiki-maybe-highlight-org-element-forward): Add these two functions.
+(hywiki-maybe-highlight-page-names): Fix to not use whole buffer highlight 
flag when
+   given a region.
+
+* hsys-org-roam.el (hsys-org-roam-tags-view):
+  hsys-org.el (hsys-org-tags-view):
+  hywiki.el (hywiki-tags-view):
+  hyrolo.el (hyrolo-tags-view): Add doc for 'match' arg.
+
+* hsys-org.el (hsys-org-get-agenda-tags): Rename arg from
+'org-consult-agenda-function' to 'agenda-tags-view-function' since does
+not require the consult package and don't want to override any org
+package name.  Improve doc string.
+  (hsys-org--agenda-tags-string): Improve doc string and fix to 
return
+non-nil only when point is within a tag string.  Simplify return value 
creation.
+
+2024-07-15  Bob Weiner  
+
+* hywiki.el (hywiki-in-page-p): Change to use 'default-directory' instead
+of 'buffer-file-name' so works with temp buffers created during Org
+export to other formats, e.g. html.
+
+2024-07-14  Bob Weiner  
+
+* hywiki.el (hywiki-convert-words-to-org-links, hywiki-map-words): Add.
+
 * hibtypes.el (Info-node): Handle decoding of Info node names in
 Hyperbole Help buffer lbl-key: lines, eliminating excess underscores.
 
 * hmouse-tag.el (smart-lisp-mode-p): Add 'help-mode', e.g. for output of {C-h 
A}
 to make Hyperbole cross-references work.
 
+2024-07-13  Bob Weiner  
+
+* hywiki.el (hywiki--range): Add to hold (start . end) range values.
+(hywiki-word-at): If word is already highlighted with
+'hywiki-word-face', use that as a shortcut to get the word.
+(hywiki-buttonize-word): Add.
+   (hywiki-maybe-highlight-page-name): Rewrite to use above function.
+
+2024-07-10  Bob Weiner  
+
+* hywiki.el (hywiki-org-link-export): Add as [[hy:WikiWord]] link-export 
property.
+(hywiki-org-link-resolve): Add to resolve HyWikiWord link to its 
page.
+(hywiki-org-link-store): Change :description property to be just
+the 'page-name' itself.
+
 2024-07-07  Bob Weiner  
 
 * hibtypes.el (elisp-compiler-msg): Fix to handle both of these cases:
diff --git a/hbut.el b/hbut.el
index e89a9688c1..ce4967ce6a 100644
--- a/hbut.el
+++ b/hbut.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:18-Sep-91 at 02:57:09
-;; Last-Mod:  7-Jul-24 at 14:57:30 by Bob Weiner
+;; Last-Mod: 15-Jul-24 at 01:42:17 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -2246,11 +2246,12 @@ first encountered."
 Without the start and end delimiter arguments, this is the normalized
 key form of the optional name that may precede an implicit button.
 If the delimiter arguments are given, return the key form of the
-implicit button text at point between those delimiters.  Assume point is
-within the first line of any button.
+implicit button text at point between those delimiters.  Point must be
+within the first line and after the opening delimiter of any button to
+get the key.
 
-Use `ibut:at-p' instead to test if point is on either the implicit
-button text itself or the name.
+Alternatively, use `ibut:at-p' to test if point is on either the
+implicit button text itself or the name.
 
 All following arguments are optional.  If AS-LABEL is non-nil, label is
 returned rather than the key derived from the label.  START-DELIM and
diff --git a/hsys-org-roam.el b/hsys-org-roam.el
index 52c674b3e8..62e34bbfcf 100644
--- a/hsys-org-roam.el
+++ b/hsys-org-roam.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date:26-Feb-23 at 11:20:15 by Bob Weiner
-;; Last-Mod:  7-Jul-24 at 17:04:57 by Bob Weiner
+;; Last-Mod: 28-Jul-24 at 12:33:29 by Bob Weiner
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -

[nongnu] elpa/hyperdrive updated (1aabcbb570 -> 52297ba0bd)

2024-07-31 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  1aabcbb570 Meta: Update changelog
   new  b3d1bddde9 Meta: Update CHANGELOG link in README
   new  01906c0bee Comment: Remove old TODO
   new  52297ba0bd Meta: Update changelog


Summary of changes:
 CHANGELOG.org | 3 ++-
 README.org| 2 +-
 hyperdrive.el | 5 +
 3 files changed, 4 insertions(+), 6 deletions(-)



[nongnu] elpa/hyperdrive 01906c0bee 2/3: Comment: Remove old TODO

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 01906c0bee46cbcbb9aaa2f98c7941bb713d3acf
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: Remove old TODO
---
 hyperdrive.el | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index 4d1dc9a7ad..dac0d1982f 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -201,10 +201,7 @@ 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/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.
-  
+  (h/message "Cleared `%s'" (h//format-entry entry))
 
 ;;;###autoload
 (defun hyperdrive-purge (hyperdrive)



[nongnu] elpa/hyperdrive b3d1bddde9 1/3: Meta: Update CHANGELOG link in README

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit b3d1bddde9d68dbdbb9f479810632e6808e41cec
Author: Joseph Turner 
Commit: Joseph Turner 

Meta: Update CHANGELOG link in README
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 1e6474c04b..6ced4aab13 100644
--- a/README.org
+++ b/README.org
@@ -14,7 +14,7 @@ See 
[[https://ushin.org/hyperdrive/hyperdrive-manual.html#Installation][the manu
 ** Manual
 
 For more information, please see 
[[https://ushin.org/hyperdrive/hyperdrive-manual.html][the manual]].  For 
recent changes, see
-the [[file:CHANGELOG.org][changelog]].
+the [[https://ushin.org/hyperdrive/hyperdrive-changelog.html][changelog]].
 
 ** Bugs and Patches
 



[nongnu] elpa/hyperdrive 52297ba0bd 3/3: Meta: Update changelog

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 52297ba0bdb2f9d3f3d3632d36374dbd3ab83ac0
Author: Joseph Turner 
Commit: Joseph Turner 

Meta: Update changelog
---
 CHANGELOG.org | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index e6f0f5845c..8367842cce 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -7,7 +7,8 @@ This project adheres to 
[[https://semver.org/spec/v2.0.0.html][Semantic Versioni
 * 0.4-pre
 
 Version ~0.4~ features 
[[https://ushin.org/hyperdrive/hyperdrive-manual.html#Org_002dtransclusion-integration][org-transclusion
 integration]], easy gateway
-installation with ~M-x hyperdrive-install~, and a faster directory UI!
+installation with ~M-x hyperdrive-install~, and a command to save disk
+space by "forgetting" your copy of a file (~hyperdrive-forget-file~)!
 
 ** Security
 



[elpa] externals/denote 917645b0ec: Make denote--get-link-file-path-at-point accept optional POINT

2024-07-31 Thread ELPA Syncer
branch: externals/denote
commit 917645b0ec6513b09bb95c665e61f16ace6a8b23
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make denote--get-link-file-path-at-point accept optional POINT
---
 denote.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index 1d9781cf46..495690dfa3 100644
--- a/denote.el
+++ b/denote.el
@@ -4220,8 +4220,11 @@ Implementation based on the function 
`org-activate-links'."
 
 (defun denote--get-link-file-path-at-point ()
   "Return link to the Denote file path at point.
+(defun denote--get-link-file-path-at-point (&optional point)
+  "Return link to the Denote file path at point or optional POINT.
 To be used as a `thing-at' provider."
-  (when-let (id (get-text-property (point) 'denote-link-id))
+  (when-let ((position (or point (point)))
+ (id (get-text-property position 'denote-link-id)))
 (concat "file:" (denote-get-path-by-id id
 
 (defvar thing-at-point-provider-alist)



[nongnu] elpa/keycast 82affc7bb8: keycast-mode-line-mode: Handle being enabled twice

2024-07-31 Thread ELPA Syncer
branch: elpa/keycast
commit 82affc7bb85b4b7c53c849cfd216b115d9f84972
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

keycast-mode-line-mode: Handle being enabled twice

A user may enable the mode twice, without disabling it in between.
The second time, this has to be done non-interactively, because
invoking a mode command interactively toggles the mode.  I consider
that a user-error, but let's recover from it anyway.

Closes #34.
---
 keycast.el | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/keycast.el b/keycast.el
index d2e835ae6e..a5255f44b3 100644
--- a/keycast.el
+++ b/keycast.el
@@ -538,6 +538,7 @@ t to show the actual COMMAND, or a symbol to be shown 
instead."
 (defvar keycast--mode-line-removed-tail nil)
 (defvar keycast--temporary-mode-line nil)
 (defvar keycast--mode-line-modified-buffers nil)
+(defvar keycast--mode-line-enabled nil)
 
 ;;;###autoload
 (define-minor-mode keycast-mode-line-mode
@@ -545,6 +546,9 @@ t to show the actual COMMAND, or a symbol to be shown 
instead."
   :global t
   (cond
(keycast-mode-line-mode
+(when keycast--mode-line-enabled
+  (keycast-mode-line-mode -1)
+  (setq keycast-mode-line-mode t))
 (let ((format (default-value 'mode-line-format)))
   (cond ((not format)
  (setq keycast--temporary-mode-line t)
@@ -565,7 +569,8 @@ t to show the actual COMMAND, or a symbol to be shown 
instead."
 (t
  (setcdr cons (cl-pushnew 'keycast-mode-line (cdr cons)
   (add-hook 'post-command-hook #'keycast--update t)
-  (add-hook 'minibuffer-exit-hook #'keycast--minibuffer-exit t)))
+  (add-hook 'minibuffer-exit-hook #'keycast--minibuffer-exit t))
+(setq keycast--mode-line-enabled t))
(t
 (let ((cons (keycast--tree-member 'keycast-mode-line
   (default-value 'mode-line-format
@@ -588,7 +593,8 @@ t to show the actual COMMAND, or a symbol to be shown 
instead."
   (keycast--tree-member 'keycast-mode-line mode-line-format 'delete
 (unless (keycast--mode-active-p)
   (remove-hook 'post-command-hook #'keycast--update)
-  (remove-hook 'minibuffer-exit-hook #'keycast--minibuffer-exit)
+  (remove-hook 'minibuffer-exit-hook #'keycast--minibuffer-exit))
+(setq keycast--mode-line-enabled nil
 
 (defvar keycast-mode-line
   '(:eval



[elpa] externals/cursor-undo 2264853e77: * cursor-undo.el: Fix cursor-undo for read-only buffers.

2024-07-31 Thread Luke Lee
branch: externals/cursor-undo
commit 2264853e77872122a085fb2733b43c80337c44ca
Author: Luke Lee 
Commit: Luke Lee 

* cursor-undo.el: Fix cursor-undo for read-only buffers.
(cundo-track-screen-start, cundo-track-prev-point): new functions to
make `def-cursor-undo' more clean, also fix read-only buffer issues.
(def-cursor-undo): use the above functions to fix the issue.
* README.org: Newly added README file to provide more info.
---
 README.org | 112 +
 cursor-undo.el |  18 +++---
 2 files changed, 126 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
new file mode 100644
index 00..d192a5a4b4
--- /dev/null
+++ b/README.org
@@ -0,0 +1,112 @@
+# Cursor Undo Mode-*- mode: org; -*-
+
+* _About_
+
+Cursor-undo allows you to undo cursor movement commands using the
+Emacs standard `undo' command.
+
+For frequent cursor movements such as up/down/left/right, it combines
+the movements of the same direction into a single undo entry.  This
+prevents the undo command from reversing each individual character
+movement separately.  For example, if you move the cursor 20
+characters to the right and then 10 lines up, the first undo will go
+down 10 lines back, and the next undo move back 20 characters left.
+On the other hand, for search commands that often jump across multiple
+pages, each search command has its own undo entry, allowing you to
+undo them one at a time rather than as a combined operation.
+
+* _A "Brief" History_
+
+This cursor-undo functionality has existed in my local Emacs init file
+for over 11+ years, since version 0 on 2013-06-26.  It was originally
+intended to support my ELPA package 
[[https://elpa.gnu.org/packages/brief.html][BriefMode]] only, but I later found
+it would be more useful if implemented in a more generalized way.  For
+years I have hoped for an official implementation of this feature,
+which is commonly seen among various editors.  Considering my
+implementation using advice functions a bit inelegant so I have always
+hesitated to release it till recently.
+
+Until there is official support for the cursor undo feature, this
+package serves most common daily needs.  The core design is to align
+with Emacs's native `undo' function by recording cursor positions and
+screen-relative position undo entries in the `buffer-undo-list' in
+accordance with its documentation.
+
+As this package primarily consists of advice functions to wrap cursor
+movement commands, each cursor movement command needs to be manually
+wrapped with `def-cursor-undo'.  For interactive functions that
+heavily invoke advised cursor movement commands, you may even need to
+advise them with `disable-cursor-tracking' to prevent generating
+numerous distinct cursor undo entries from a single command.  For user
+convenience, I have prepared ready `def-cursor-undo' advice sets for
+standard Emacs cursor movement commands, Brief Editor mode, Viper
+mode, and EVIL mode.
+
+* _Usage_
+
+This package is released as a standard 
[[https://elpa.gnu.org/packages/cursor-undo.html][ELPA package]].  Just go to 
Emacs
+main menu -> "Options" -> "Manage Emacs Packages" and install it.
+Once this package is installed, you only need to enable cursor-undo
+mode by adding the following line into your Emacs init file .emacs or
+init.el:
+
+#+begin_src
+  (cursor-undo 1)
+#+end_src
+
+That's all.  You can now move your cursor around and use stand Emacs
+`undo' (C-_, C-/ or C-x u) to move it back.  Even in read-only buffers
+you can still undo cursor movements.  This is convenient especially
+when browsing a huge file.
+
+* _Notes for read-only buffers_
+
+Notice that the original `undo' cannot be performed in read-only
+buffers.  Here, I also advised the undo operation in read-only buffers
+as long as the pending undo list is still a cursor movement.
+
+This also enables a editing trick: If you are just editing a big file
+and moving the cursor to browse other parts but forgot where you were,
+you can undo cursor movements to go back to your last edited position
+by long-holding  until the last editing command.  However, by
+doing so you risk missing your last edited operation as it might flash
+by so quickly that you don't even notice but keep undoing other cursor
+commands you don't want to undo.
+
+In this case, you can switch the buffer to read-only mode (by setting
+`buffer-read-only' to t), then long press  until the undo
+command warns you that you're trying to edit a read-only buffer.  At
+this point, you're exactly at the latest editing position you are
+looking for.  You can then safely set `buffer-read-only' flag back to
+NIL and continue your editing.
+
+* _Notes for EVIL mode user_
+
+If you choose to use the default Emacs `undo' system, you should be
+able to use `evil-undo' to undo cursor movements.  If your choice is
+tree-undo or another undo system, you might need to use Emacs default
+`undo' (C-_, C-/ or C-x u

[elpa] main 84bf43901e: * elpa-packages (cursor-undo): Add `:doc` document

2024-07-31 Thread Luke Lee
branch: main
commit 84bf43901ed7d0d9840aa311ad8eeacf328bc0f8
Author: Luke Lee 
Commit: Luke Lee 

* elpa-packages (cursor-undo): Add `:doc` document
---
 elpa-packages | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/elpa-packages b/elpa-packages
index 509c2eba4f..6ed92cfd7b 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -198,7 +198,8 @@
  (csharp-mode  :url "https://github.com/emacs-csharp/csharp-mode";
   :readme "README.org")
  (csv-mode :url nil)
- (cursor-undo  :url nil)
+ (cursor-undo  :url nil
+  :doc "README.org")
  (cursory  :url "https://github.com/protesilaos/cursory";
   :doc "README.org"
   :news "CHANGELOG.org"



[elpa] externals/denote updated (917645b0ec -> 47e619feef)

2024-07-31 Thread ELPA Syncer
elpasync pushed a change to branch externals/denote.

  from  917645b0ec Make denote--get-link-file-path-at-point accept optional 
POINT
   new  3ea15caf42 Define denote-get-identifier-at-point function
   new  aab124232c Fix a case in denote-get-identifier-at-point where there 
are many faces
   new  7e53ab30b3 Remove reference to function that no longer exists
   new  47e619feef Make denote-rename-file-using-front-matter also read 
file-at-point in Dired


Summary of changes:
 README.org | 26 +-
 denote.el  | 28 
 2 files changed, 29 insertions(+), 25 deletions(-)



[elpa] externals/denote 47e619feef 4/4: Make denote-rename-file-using-front-matter also read file-at-point in Dired

2024-07-31 Thread ELPA Syncer
branch: externals/denote
commit 47e619feefb47c5e512be9b2940622c147aba7a4
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make denote-rename-file-using-front-matter also read file-at-point in Dired

This makes it consistent with how 'denote-rename-file' works. I am
implementing this in response to issue 401 where Alp Eren Kose assumed
this was the default behaviour: 


I think it makes sense to have it this way to avoid such confusion.
Still, it seems easier to edit the file and call 
'denote-rename-file-using-front-matter'
directly, rather do an intermediate step through Dired.
---
 README.org | 20 ++--
 denote.el  | 15 +--
 2 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/README.org b/README.org
index df122a3077..d05e139c10 100644
--- a/README.org
+++ b/README.org
@@ -5915,16 +5915,16 @@ Denote is meant to be a collective effort.  Every bit 
of help matters.
 
 + Ideas and/or user feedback :: Abin Simon, Aditya Yadav, Alan
   Schmitt, Aleksandr Vityazev, Alex Hirschfeld, Alexis Purslane,
-  Alfredo Borrás, Ashton Wiersdorf, Benjamin Kästner, Claudio
-  Migliorelli, Claudiu Tănăselia, Colin McLear, Damien Cassou, Elias
-  Storms, Federico Stilman, Florian, Frédéric Willem Frank Ehmsen,
-  Glenna D., Guo Yong, Hanspeter Gisler Harold Ollivier, Jack Baty,
-  Jay Rajput, Jean-Charles Bagneris, Jens Östlund, Jeremy Friesen,
-  Jonathan Sahar, Johan Bolmsjö, Jousimies, Juanjo Presa, Julian Hoch,
-  Kai von Fintel, Kaushal Modi, Kolmas, M. Hadi Timachi, Maikol Solis,
-  Mark Olson, Mirko Hernandez, Niall Dooley, Nick Bell, Paul van
-  Gelder, Peter Prevos, Peter Smith, Samuel W. Flint, Suhail Singh,
-  Shreyas Ragavan, Stefan Thesing, Summer Emacs, Sven Seebeck,
+  Alfredo Borrás, Alp Eren Kose, Ashton Wiersdorf, Benjamin Kästner,
+  Claudio Migliorelli, Claudiu Tănăselia, Colin McLear, Damien Cassou,
+  Elias Storms, Federico Stilman, Florian, Frédéric Willem Frank
+  Ehmsen, Glenna D., Guo Yong, Hanspeter Gisler Harold Ollivier, Jack
+  Baty, Jay Rajput, Jean-Charles Bagneris, Jens Östlund, Jeremy
+  Friesen, Jonathan Sahar, Johan Bolmsjö, Jousimies, Juanjo Presa,
+  Julian Hoch, Kai von Fintel, Kaushal Modi, Kolmas, M. Hadi Timachi,
+  Maikol Solis, Mark Olson, Mirko Hernandez, Niall Dooley, Nick Bell,
+  Paul van Gelder, Peter Prevos, Peter Smith, Samuel W. Flint, Suhail
+  Singh, Shreyas Ragavan, Stefan Thesing, Summer Emacs, Sven Seebeck,
   Taoufik, TJ Stankus, Vick (VicZz), Viktor Haag, Wade Mealing, Yi
   Liu, Ypot, atanasj, azegas, babusri, doolio, duli, drcxd, elge70,
   fingerknight, hpgisler, mentalisttraceur, pRot0ta1p, rbenit68,
diff --git a/denote.el b/denote.el
index bacbbb5d38..73d91fea46 100644
--- a/denote.el
+++ b/denote.el
@@ -3251,15 +3251,10 @@ Also see the specialized commands to only add or remove 
keywords:
 ;;;###autoload
 (defun denote-rename-file-using-front-matter (file)
   "Rename FILE using its front matter as input.
-When called interactively, FILE is the return value of the
-function `buffer-file-name' which is subsequently inspected for
-the requisite front matter.  It is thus implied that the FILE has
-a file type that is supported by Denote, per `denote-file-type'.
-
-Never modify the identifier of the FILE, if any, even if it is
-edited in the front matter.  Denote considers the file name to be
-the source of truth in this case to avoid potential breakage with
-typos and the like.
+When called interactively, FILE is the variable `buffer-file-name' or
+the Dired file at point, which is subsequently inspected for the
+requisite front matter.  It is thus implied that the FILE has a file
+type that is supported by Denote, per `denote-file-type'.
 
 The values of `denote-rename-confirmations' and `denote-save-buffers'
 are respected.  Though there is no prompt to confirm the rewrite of the
@@ -3272,7 +3267,7 @@ with typos and the like.
 
 Construct the file name in accordance with the user option
 `denote-file-name-components-order'."
-  (interactive (list buffer-file-name))
+  (interactive (list (or (dired-get-filename nil t) buffer-file-name)))
   (unless (denote-file-is-writable-and-supported-p file)
 (user-error "The file is not writable or does not have a supported file 
extension"))
   (if-let ((file-type (denote-filetype-heuristics file))



[elpa] externals/denote 3ea15caf42 1/4: Define denote-get-identifier-at-point function

2024-07-31 Thread ELPA Syncer
branch: externals/denote
commit 3ea15caf42e8f5d17475e87dc41ab894753acea7
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Define denote-get-identifier-at-point function

I am implementing this in response to a question by Alan Schmitt in
issue 400: .
---
 README.org |  4 
 denote.el  | 11 +--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 23d9330fb0..0d31076686 100644
--- a/README.org
+++ b/README.org
@@ -4682,6 +4682,10 @@ might change them without further notice.
 + Function ~denote-get-path-by-id~ :: Return absolute path of =ID=
   string in ~denote-directory-files~.
 
+#+findex: denote-get-identifier-at-point
++ Function ~denote-get-identifier-at-point~ :: Return the identifier
+  at point or =POINT=. [ Part of {{{development-version}}}. ]
+
 #+findex: denote-barf-duplicate-id
 + Function ~denote-barf-duplicate-id~ :: Throw a ~user-error~ if
   =IDENTIFIER= already exists.
diff --git a/denote.el b/denote.el
index 495690dfa3..51212e442f 100644
--- a/denote.el
+++ b/denote.el
@@ -4218,8 +4218,15 @@ Implementation based on the function 
`org-activate-links'."
   (throw :exit t))  ; signal success
 nil))
 
-(defun denote--get-link-file-path-at-point ()
-  "Return link to the Denote file path at point.
+(defun denote-get-identifier-at-point (&optional point)
+  "Return the Denote identifier at point or optional POINT."
+  (when-let ((position (or point (point)))
+ (_ (eq (get-text-property position 'face) 'denote-faces-link)))
+(or (get-text-property position 'denote-link-id)
+(let ((property (get-text-property position 'help-echo)))
+  (string-match denote-id-regexp property)
+  (match-string-no-properties 0 property)
+
 (defun denote--get-link-file-path-at-point (&optional point)
   "Return link to the Denote file path at point or optional POINT.
 To be used as a `thing-at' provider."



[elpa] externals/denote aab124232c 2/4: Fix a case in denote-get-identifier-at-point where there are many faces

2024-07-31 Thread ELPA Syncer
branch: externals/denote
commit aab124232cb330c2764c0d02eac95dd9ca8b1f1d
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Fix a case in denote-get-identifier-at-point where there are many faces
---
 denote.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index 51212e442f..bacbbb5d38 100644
--- a/denote.el
+++ b/denote.el
@@ -4221,7 +4221,9 @@ Implementation based on the function 
`org-activate-links'."
 (defun denote-get-identifier-at-point (&optional point)
   "Return the Denote identifier at point or optional POINT."
   (when-let ((position (or point (point)))
- (_ (eq (get-text-property position 'face) 'denote-faces-link)))
+ (face-at-point (get-text-property position 'face))
+ (_ (or (eq face-at-point 'denote-faces-link)
+(member 'denote-faces-link face-at-point
 (or (get-text-property position 'denote-link-id)
 (let ((property (get-text-property position 'help-echo)))
   (string-match denote-id-regexp property)



[elpa] externals/denote 7e53ab30b3 3/4: Remove reference to function that no longer exists

2024-07-31 Thread ELPA Syncer
branch: externals/denote
commit 7e53ab30b3f751483f8463a35ff1f13dcfa6f292
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Remove reference to function that no longer exists
---
 README.org | 4 
 1 file changed, 4 deletions(-)

diff --git a/README.org b/README.org
index 0d31076686..df122a3077 100644
--- a/README.org
+++ b/README.org
@@ -4686,10 +4686,6 @@ might change them without further notice.
 + Function ~denote-get-identifier-at-point~ :: Return the identifier
   at point or =POINT=. [ Part of {{{development-version}}}. ]
 
-#+findex: denote-barf-duplicate-id
-+ Function ~denote-barf-duplicate-id~ :: Throw a ~user-error~ if
-  =IDENTIFIER= already exists.
-
 #+findex: denote-sluggify
 + Function ~denote-sluggify~ :: Make =STR= an appropriate slug for
   file name =COMPONENT= 
([[#h:ae8b19a1-7f67-4258-96b3-370a72c43f4e][Sluggification of file name 
components]]).



[nongnu] elpa/slime 3fca003ac6: Fix slime-modeline-string

2024-07-31 Thread ELPA Syncer
branch: elpa/slime
commit 3fca003ac639df989af3cfbfc8112bd34ea1a042
Author: mavbozo 
Commit: Stas Boukarev 

Fix slime-modeline-string

In emacs version < 28, slime-modeline-string execution
throws (void-function string-replace). string-replace exists in emacs
version > 28.

This commit changes string-replace usage with replace-regexp-in-string
and also add tests for slime-modeline-string function.
---
 slime-tests.el | 20 
 slime.el   |  2 +-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/slime-tests.el b/slime-tests.el
index 4673775f64..f71e9fffab 100644
--- a/slime-tests.el
+++ b/slime-tests.el
@@ -1328,6 +1328,26 @@ Reconnect afterwards."
   (not (member hook slime-connected-hook)))
 5
 
+(def-slime-test slime-modeline-string-test
+  (expected current-connection buffer-connection
+   connection-name current-package modeline-state-string)
+  "slime-modeline-string returns string in proper format."
+  '((" Slime" nil nil nil nil nil)
+(" {sbcl local-conn-1 state}" 'mocked-conn 'mocked-local-conn
+ "local-conn-1" "sbcl" " state")
+(" [sbcl conn-1 state]" 'mocked-conn nil "conn-1" "sbcl" " state"))
+  (with-temp-buffer
+(lisp-mode)
+(slime-check ("slime-modeline-string returns \"%s\"" expected)
+  (cl-letf (((symbol-function 'slime-current-connection)
+(lambda () (or buffer-connection current-connection)))
+   ((symbol-function 'slime-connection-name) (lambda (_) 
connection-name))
+   ((symbol-function 'slime-current-package) (lambda () 
current-package))
+   ((symbol-function 'slime-modeline-state-string)
+ (lambda (_) modeline-state-string)))
+   (setq slime-buffer-connection buffer-connection)
+   (equal expected (slime-modeline-string))
+
 
  SLIME-loading tests that launch separate Emacsen
 
diff --git a/slime.el b/slime.el
index 9832937d87..d7934f6940 100644
--- a/slime.el
+++ b/slime.el
@@ -504,7 +504,7 @@ information."
 (pkg   (slime-current-package)))
 (concat " "
 (if local "{" "[")
-(if pkg (string-replace "%" "%%" (slime-pretty-package-name 
pkg)) "?")
+(if pkg (replace-regexp-in-string "%" "%%" 
(slime-pretty-package-name pkg)) "?")
 " "
 ;; ignore errors for closed connections
 (ignore-errors (slime-connection-name conn))



[elpa] externals/auctex 406ae0e2a5: Require cl-lib and subr-x at compile- and runtime

2024-07-31 Thread ELPA Syncer
branch: externals/auctex
commit 406ae0e2a5de67ddec76b7cea87fd4b77f0e8e39
Author: Tassilo Horn 
Commit: Tassilo Horn 

Require cl-lib and subr-x at compile- and runtime

cl-macros might expand to cl-functions (see bug#72313) and there's
nothing wrong with requiring cl-lib (and the very small subr-x).
---
 bib-cite.el| 2 --
 font-latex.el  | 3 ---
 latex-flymake.el   | 3 +--
 latex.el   | 5 -
 style/babel.el | 3 ---
 style/caption.el   | 3 ---
 style/empheq.el| 2 --
 style/enumitem.el  | 2 --
 style/floatrow.el  | 4 
 style/listings.el  | 4 
 style/mdframed.el  | 3 ---
 style/pstricks.el  | 2 --
 style/tcolorbox.el | 4 
 tex-fold.el| 3 ---
 tex-info.el| 3 ---
 tex.el | 5 ++---
 toolbar-x.el   | 3 +--
 17 files changed, 4 insertions(+), 50 deletions(-)

diff --git a/bib-cite.el b/bib-cite.el
index 5a9f6f8351..fe5ae9e343 100644
--- a/bib-cite.el
+++ b/bib-cite.el
@@ -590,8 +590,6 @@
 
 (require 'tex)
 (require 'latex)
-(eval-when-compile
-  (require 'cl-lib))
 
 ;; Silence the compiler:
 (declare-function reftex-view-crossref "ext:reftex-dcr"
diff --git a/font-latex.el b/font-latex.el
index 7018674883..6cd5c24a53 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -37,9 +37,6 @@
 (require 'font-lock)
 (require 'tex)
 
-(eval-when-compile
-  (require 'cl-lib))
-
 (defgroup font-latex nil
   "Font-latex text highlighting package."
   :prefix "font-latex-"
diff --git a/latex-flymake.el b/latex-flymake.el
index 5cffc92412..e4c6617199 100644
--- a/latex-flymake.el
+++ b/latex-flymake.el
@@ -34,8 +34,7 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (require 'cl-lib))
+(require 'cl-lib)
 (require 'flymake)
 
 (defvar-local LaTeX--flymake-proc nil)
diff --git a/latex.el b/latex.el
index 66f50485c1..68d79caa5d 100644
--- a/latex.el
+++ b/latex.el
@@ -32,11 +32,6 @@
 (require 'tex-style)
 (require 'tex-ispell)
 (require 'latex-flymake)
-(eval-when-compile
-  (require 'cl-lib)
-  ;; Require subr-x.el for `string-trim' which wasn't autoloaded:
-  (when (< emacs-major-version 29)
-(require 'subr-x)))
 
 ;; Silence the compiler for functions:
 (declare-function multi-prompt "multi-prompt")
diff --git a/style/babel.el b/style/babel.el
index 495e9f6468..1147cce3c3 100644
--- a/style/babel.el
+++ b/style/babel.el
@@ -33,9 +33,6 @@
 (require 'tex)
 (require 'latex)
 
-(eval-when-compile
-  (require 'cl-lib))
-
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
   "font-latex"
diff --git a/style/caption.el b/style/caption.el
index 68366e843d..ff9dcc00f1 100644
--- a/style/caption.el
+++ b/style/caption.el
@@ -34,9 +34,6 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (require 'cl-lib))
-
 ;; Needed for compiling `LaTeX-check-insert-macro-default-style':
 (require 'latex)
 
diff --git a/style/empheq.el b/style/empheq.el
index 39c3f00e38..534e3cebe4 100644
--- a/style/empheq.el
+++ b/style/empheq.el
@@ -33,8 +33,6 @@
 
 (require 'tex)
 (require 'latex)
-(eval-when-compile
-  (require 'cl-lib))
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
diff --git a/style/enumitem.el b/style/enumitem.el
index d03e4a0d24..545661935b 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -40,8 +40,6 @@
 
 (require 'tex)
 (require 'latex)
-(eval-when-compile
-  (require 'cl-lib))
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
diff --git a/style/floatrow.el b/style/floatrow.el
index c0023687db..872053bd98 100644
--- a/style/floatrow.el
+++ b/style/floatrow.el
@@ -58,10 +58,6 @@
 
 ;;; Code:
 
-;; Needed for compiling `cl-pushnew':
-(eval-when-compile
-  (require 'cl-lib))
-
 (require 'tex)
 (require 'latex)
 
diff --git a/style/listings.el b/style/listings.el
index d8e1dce2a4..ae6223f4df 100644
--- a/style/listings.el
+++ b/style/listings.el
@@ -42,10 +42,6 @@
 
 ;;; Code:
 
-;; Needed for compiling `cl-pushnew':
-(eval-when-compile
-  (require 'cl-lib))
-
 ;; Needed for auto-parsing:
 (require 'tex)
 (require 'latex)
diff --git a/style/mdframed.el b/style/mdframed.el
index b04f2f37a8..a28818b349 100644
--- a/style/mdframed.el
+++ b/style/mdframed.el
@@ -39,9 +39,6 @@
 
 (require 'tex)
 (require 'latex)
-;; Needed for compiling `cl-pushnew':
-(eval-when-compile
-  (require 'cl-lib))
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
diff --git a/style/pstricks.el b/style/pstricks.el
index f40db099b1..74f50118e8 100644
--- a/style/pstricks.el
+++ b/style/pstricks.el
@@ -62,8 +62,6 @@
 
 (require 'tex)
 (require 'latex)
-(eval-when-compile
-  (require 'cl-lib))
 
 ;;; General Functions
 
diff --git a/style/tcolorbox.el b/style/tcolorbox.el
index edc39e23c8..60a57dac32 100644
--- a/style/tcolorbox.el
+++ b/style/tcolorbox.el
@@ -41,10 +41,6 @@
 
 ;;; Code:
 
-;; Needed for compiling `cl-pushnew':
-(eval-when-compile
-  (require 'cl-lib))
-
 ;; Needed for auto-parsing:
 (require 'tex)
 (require 'latex)
diff --git a/tex-fold.el b/tex-fold.el
index f7b1c32f53..ee275ad74e 

[elpa] externals/inspector 9be2a62028 3/3: Release 0.37

2024-07-31 Thread ELPA Syncer
branch: externals/inspector
commit 9be2a62028065b4a9158858d69ec807d2dabae8e
Author: Mariano Montone 
Commit: GitHub 

Release 0.37
---
 inspector.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inspector.el b/inspector.el
index f7fe059af4..ac205b1b33 100644
--- a/inspector.el
+++ b/inspector.el
@@ -5,7 +5,7 @@
 ;; Author: Mariano Montone 
 ;; URL: https://github.com/mmontone/emacs-inspector
 ;; Keywords: debugging, tool, lisp, development
-;; Version: 0.36
+;; Version: 0.37
 ;; Package-Requires: ((emacs "27.1"))
 
 ;; This program is free software; you can redistribute it and/or modify



[elpa] externals/inspector 85a87a6cba 2/3: Merge pull request #33 from daanturo/killed-inspector--temp-buffer

2024-07-31 Thread ELPA Syncer
branch: externals/inspector
commit 85a87a6cbaaa26e4fb0d6749163d0781a93db7c4
Merge: 4e85b25e3e e5cc60aecd
Author: Mariano Montone 
Commit: GitHub 

Merge pull request #33 from daanturo/killed-inspector--temp-buffer

Fix corner case inspector--temp-buffer is killed
---
 inspector.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/inspector.el b/inspector.el
index 39d14723f7..f7fe059af4 100644
--- a/inspector.el
+++ b/inspector.el
@@ -241,9 +241,10 @@ See: `inspector--with-inspector-temp-buffer'.")
 
 (defun inspector--get-inspector-temp-buffer ()
   "Return a (cached) inspector temporary buffer."
-  (or inspector--temp-buffer
-  (setq inspector--temp-buffer
-(get-buffer-create "*inspector-temp*"
+  (unless (buffer-live-p inspector--temp-buffer)
+(setq inspector--temp-buffer
+  (get-buffer-create "*inspector-temp*")))
+  inspector--temp-buffer)
 
 (defun inspector--print-truncated (object &optional limit)
   "Print OBJECT to a string, truncated.



[elpa] externals/inspector e5cc60aecd 1/3: Fix corner case inspector--temp-buffer is killed

2024-07-31 Thread ELPA Syncer
branch: externals/inspector
commit e5cc60aecd7b847356900df3bb1e440c499cbc2c
Author: Daanturo 
Commit: Daanturo 

Fix corner case inspector--temp-buffer is killed

When the said variable is non-nil but is a kill buffer, operations that
use it will raise an error.
---
 inspector.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/inspector.el b/inspector.el
index 39d14723f7..f7fe059af4 100644
--- a/inspector.el
+++ b/inspector.el
@@ -241,9 +241,10 @@ See: `inspector--with-inspector-temp-buffer'.")
 
 (defun inspector--get-inspector-temp-buffer ()
   "Return a (cached) inspector temporary buffer."
-  (or inspector--temp-buffer
-  (setq inspector--temp-buffer
-(get-buffer-create "*inspector-temp*"
+  (unless (buffer-live-p inspector--temp-buffer)
+(setq inspector--temp-buffer
+  (get-buffer-create "*inspector-temp*")))
+  inspector--temp-buffer)
 
 (defun inspector--print-truncated (object &optional limit)
   "Print OBJECT to a string, truncated.



[elpa] externals/inspector updated (4e85b25e3e -> 9be2a62028)

2024-07-31 Thread ELPA Syncer
elpasync pushed a change to branch externals/inspector.

  from  4e85b25e3e Use a cached temporary buffer for truncated printing
   new  e5cc60aecd Fix corner case inspector--temp-buffer is killed
   new  85a87a6cba Merge pull request #33 from 
daanturo/killed-inspector--temp-buffer
   new  9be2a62028 Release 0.37


Summary of changes:
 inspector.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)



[nongnu] elpa/hyperdrive 015917ecd3 14/19: Fix: (h//download-monitor) Cancel timer if buffer killed

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 015917ecd326f1d7a7fca57ecd601253e61b0368
Author: Adam Porter 
Commit: Adam Porter 

Fix: (h//download-monitor) Cancel timer if buffer killed
---
 hyperdrive-download-monitor.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index ee9a723f57..73d5f3acf9 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -50,7 +50,11 @@ UPDATE-INTERVAL seconds."
 (map-elt h/download-monitor-etc :preamble) preamble
 (map-elt h/download-monitor-etc :started-at) (current-time)
 (map-elt h/download-monitor-etc :timer)
-(run-at-time nil update-interval #'h//download-monitor-update 
buffer)))
+(run-at-time nil update-interval #'h//download-monitor-update 
buffer))
+  (setq-local kill-buffer-hook
+  (cons (lambda ()
+  (cancel-timer (map-elt h/download-monitor-etc 
:timer)))
+kill-buffer-hook)))
 buffer))
 
 (defun h//download-monitor-update (buffer)



[nongnu] elpa/hyperdrive 36744a367d 15/19: Add: Restart gateway button in monitor buffer

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 36744a367d0178d56103a70654f246f35870ff4a
Author: Adam Porter 
Commit: Adam Porter 

Add: Restart gateway button in monitor buffer
---
 hyperdrive-download-monitor.el |  2 +-
 hyperdrive.el  | 32 +---
 2 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index 73d5f3acf9..75b245bddd 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -74,7 +74,7 @@ UPDATE-INTERVAL seconds."
 (erase-buffer)
 (insert preamble
 "Downloaded: " (file-size-human-readable current-size nil " ")
-" / " (file-size-human-readable total-size) "\n"
+" / " (file-size-human-readable total-size nil " ") "\n"
 "Elapsed: " (format-seconds "%hh%mm%ss%z" elapsed) "\n"
 "Speed: " (file-size-human-readable speed) "/s")
 
diff --git a/hyperdrive.el b/hyperdrive.el
index 68b94c3e84..d79825dfb6 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1417,7 +1417,7 @@ If FORCEP, don't prompt for confirmation before 
downloading."
 (h/user-error "Not downloading; aborted"
   (let ((urls-and-hashes (alist-get system-type h/gateway-urls-and-hashes))
 (destination (expand-file-name h/gateway-program h/gateway-directory))
-size)
+monitor-buffer size)
 (cl-labels
 ((try ()
(pcase-let (((map :url :sha256) (pop urls-and-hashes)))
@@ -1453,16 +1453,15 @@ If FORCEP, don't prompt for confirmation before 
downloading."
   (expand-file-name "hyperdrive-gateway-"
 temporary-file-directory)))
   (preamble (format "Downloading gateway from:\n\nURL: %s\nTo: 
%s\n"
-url destination))
-  (monitor-buffer (h//download-monitor
+url destination)))
+ (setf monitor-buffer (h//download-monitor
:preamble preamble
:buffer-name "*hyperdrive-install*"
:path temp-file
-   :total-size size)))
- (setf h/install-process
+   :total-size size)
+   h/install-process
(plz 'get url :as `(file ,temp-file) :timeout nil
  :then (lambda (filename)
- (h//download-monitor-close monitor-buffer)
  (check filename sha256 url))
  :else (lambda (plz-error)
  (pcase (plz-error-curl-error plz-error)
@@ -1500,10 +1499,29 @@ If FORCEP, don't prompt for confirmation before 
downloading."
(chmod destination #o755)
(setf h/install-process nil)
(h/menu-refresh)
+   (insert-restart-button monitor-buffer)
(h/message "Gateway installed.  Try \\[%s]"
   (if (h//gateway-ready-p)
   "hyperdrive-restart"
-"hyperdrive-start"
+"hyperdrive-start")))
+ (insert-restart-button (buffer)
+   (with-current-buffer buffer
+ (with-silent-modifications
+   (when (timerp (map-elt h/download-monitor-etc :timer))
+ (cancel-timer (map-elt h/download-monitor-etc :timer)))
+   (erase-buffer)
+   (insert "Gateway installed!  "
+   (buttonize (format "Click here to %s the gateway."
+  (if (h//gateway-ready-p)
+  "restart"
+"start"))
+  (lambda (_)
+(if (h//gateway-ready-p)
+(h/restart)
+  (h/start))
+(h//download-monitor-close buffer)))
+   ;; Prevent button from going to end of the visual line.
+   " ")
   (try
 
 (defun h/cancel-install ()



[nongnu] elpa/hyperdrive 4c5fc6ca76 19/19: Merge: Download monitor fixes/improvements

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 4c5fc6ca7692ea01f2674113dbf229bfae74ebc9
Merge: 015917ecd3 35d04e8cc5
Author: Adam Porter 
Commit: Adam Porter 

Merge: Download monitor fixes/improvements
---
 hyperdrive-download-monitor.el | 19 +++
 hyperdrive-menu.el |  1 -
 hyperdrive.el  | 36 +---
 3 files changed, 40 insertions(+), 16 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index 73d5f3acf9..a1fc2d1417 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -53,7 +53,8 @@ UPDATE-INTERVAL seconds."
 (run-at-time nil update-interval #'h//download-monitor-update 
buffer))
   (setq-local kill-buffer-hook
   (cons (lambda ()
-  (cancel-timer (map-elt h/download-monitor-etc 
:timer)))
+  (when (timerp (map-elt h/download-monitor-etc 
:timer))
+(cancel-timer (map-elt h/download-monitor-etc 
:timer
 kill-buffer-hook)))
 buffer))
 
@@ -74,18 +75,20 @@ UPDATE-INTERVAL seconds."
 (erase-buffer)
 (insert preamble
 "Downloaded: " (file-size-human-readable current-size nil " ")
-" / " (file-size-human-readable total-size) "\n"
+" / " (file-size-human-readable total-size nil " ") "\n"
 "Elapsed: " (format-seconds "%hh%mm%ss%z" elapsed) "\n"
 "Speed: " (file-size-human-readable speed) "/s")
 
 (defun h//download-monitor-close (buffer)
   "Close download monitor BUFFER."
-  (with-current-buffer buffer
-(cancel-timer (map-elt h/download-monitor-etc :timer)))
-  (let ((buffer-window (get-buffer-window buffer)))
-(when buffer-window
-  (quit-window nil buffer-window)))
-  (kill-buffer buffer))
+  (when (buffer-live-p buffer)
+(with-current-buffer buffer
+  (when (timerp (map-elt h/download-monitor-etc :timer))
+(cancel-timer (map-elt h/download-monitor-etc :timer
+(let ((buffer-window (get-buffer-window buffer)))
+  (when buffer-window
+(quit-window nil buffer-window)))
+(kill-buffer buffer)))
 
 (provide 'hyperdrive-download-monitor)
 
diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index 7a7164f95b..0b6e04c564 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -225,7 +225,6 @@
 ("G i" "Install" h/install
  :description
  (lambda () (if (h/gateway-needs-upgrade-p) "Upgrade" "Install"))
- :transient t
  :if (lambda ()
(and (not (h/gateway-installing-p))
 (or (not (h/gateway-installed-p))
diff --git a/hyperdrive.el b/hyperdrive.el
index 68b94c3e84..a29d43727b 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1417,7 +1417,7 @@ If FORCEP, don't prompt for confirmation before 
downloading."
 (h/user-error "Not downloading; aborted"
   (let ((urls-and-hashes (alist-get system-type h/gateway-urls-and-hashes))
 (destination (expand-file-name h/gateway-program h/gateway-directory))
-size)
+monitor-buffer size)
 (cl-labels
 ((try ()
(pcase-let (((map :url :sha256) (pop urls-and-hashes)))
@@ -1453,16 +1453,15 @@ If FORCEP, don't prompt for confirmation before 
downloading."
   (expand-file-name "hyperdrive-gateway-"
 temporary-file-directory)))
   (preamble (format "Downloading gateway from:\n\nURL: %s\nTo: 
%s\n"
-url destination))
-  (monitor-buffer (h//download-monitor
+url destination)))
+ (setf monitor-buffer (h//download-monitor
:preamble preamble
:buffer-name "*hyperdrive-install*"
:path temp-file
-   :total-size size)))
- (setf h/install-process
+   :total-size size)
+   h/install-process
(plz 'get url :as `(file ,temp-file) :timeout nil
  :then (lambda (filename)
- (h//download-monitor-close monitor-buffer)
  (check filename sha256 url))
  :else (lambda (plz-error)
  (pcase (plz-error-curl-error plz-error)
@@ -1500,10 +1499,33 @@ If FORCEP, don't prompt for confirmation before 
downloading."
(chmod destination #o755)
(setf h/install-process nil)
(h/menu-refresh)
+   (insert-restart-button monitor-buffer)
(h/message "Gateway installed.  Try \\[%s]"
   (if (h//gateway-ready-p)
   "hyperdrive-restart"
-"hyperdrive-start"
+  

[nongnu] elpa/hyperdrive 84b59e1f8f 02/19: WIP: hyperdrive-download-monitor

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 84b59e1f8f5e1febb349193a3a60f6b049a88f3c
Author: Adam Porter 
Commit: Adam Porter 

WIP: hyperdrive-download-monitor
---
 hyperdrive-download-monitor.el | 81 ++
 hyperdrive.el  |  6 
 2 files changed, 87 insertions(+)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
new file mode 100644
index 00..c93ab79477
--- /dev/null
+++ b/hyperdrive-download-monitor.el
@@ -0,0 +1,81 @@
+;;; hyperdrive-download-monitor.el ----*- lexical-binding: t; -*-
+
+;; Copyright (C) 2024 USHIN, Inc.
+
+;; Author: Joseph Turner 
+;; Author: Adam Porter 
+;; Maintainer: Joseph Turner <~ushin/us...@lists.sr.ht>
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU Affero General Public License
+;; as published by the Free Software Foundation; either version 3 of
+;; the License, or (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; Affero General Public License for more details.
+
+;; You should have received a copy of the GNU Affero General Public
+;; License along with this program. If not, see
+;; .
+
+;;; Commentary:
+
+;; Monitor a file download's progress in a buffer.
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'map)
+(require 'pcase)
+
+ Variables
+
+(defvar-local h/download-monitor-etc nil)
+
+ Functions
+
+(cl-defun h/download-monitor
+(&key buffer-name path total-size setup-fn completed-fn canceled-fn
+  (update-interval 1))
+  "Return buffer that monitors the download to PATH."
+  (let* ((buffer (generate-new-buffer buffer-name)))
+(with-current-buffer buffer
+  (setf (map-elt h/download-monitor-etc :path) path
+(map-elt h/download-monitor-etc :total-size) total-size
+(map-elt h/download-monitor-etc :completed-fn) completed-fn
+(map-elt h/download-monitor-etc :canceled-fn) canceled-fn)
+  (h/download-monitor-update buffer)
+  (setf (map-elt h/download-monitor-etc 'timer)
+(run-at-time update-interval t #'h/download-monitor-update buffer))
+  (when setup-fn
+(funcall setup-fn)))
+buffer))
+
+(defun h/download-monitor-update (buffer)
+  (with-current-buffer buffer
+(pcase-let* (((map :path :total-size) h/download-monitor-etc)
+ (attributes (file-attributes path))
+ (current-size (file-attribute-size attributes)))
+  ;; TODO: Check download process status to see whether download was 
canceled.
+  (if (= current-size total-size)
+  ;; Download complete.
+  (funcall (map-elt h/download-monitor-etc :completed-fn))
+;; Download in progress: update buffer.
+(erase-buffer)
+(insert "Downloading:\n\n"
+"File: " path "\n"
+"Downloaded: " (file-size-human-readable current-size nil " ")
+" / " (file-size-human-readable total-size) "\n")
+
+(provide 'hyperdrive-download-monitor)
+
+;; Local Variables:
+;; read-symbol-shorthands: (
+;;   ("he//" . "hyperdrive-entry--")
+;;   ("he/"  . "hyperdrive-entry-")
+;;   ("h//"  . "hyperdrive--")
+;;   ("h/"   . "hyperdrive-"))
+;; End:
+;;; hyperdrive-download-monitor.el ends here
diff --git a/hyperdrive.el b/hyperdrive.el
index 7c12dd14af..bf981a16d2 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1467,6 +1467,12 @@ If FORCEP, don't prompt for confirmation before 
downloading."
 (try)))
  (when (file-exists-p temp-file)
(delete-file temp-file)
+ (require 'hyperdrive-download-monitor)
+ (pop-to-buffer
+  (h/download-monitor :buffer-name "*hyperdrive-install*"
+  :path temp-file
+  :total-size size
+  :completed-fn #'kill-buffer-and-window))
  (h/message "Downloading %s from %S to %S" size url destination)))
  (check (file-name sha256 url)
(if (with-temp-buffer



[nongnu] elpa/hyperdrive 34e27bca27 10/19: Show elapsed time

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 34e27bca2742f41b8192f1d9ba98fd032b2ff539
Author: Adam Porter 
Commit: Adam Porter 

Show elapsed time
---
 hyperdrive-download-monitor.el | 10 +++---
 hyperdrive.el  |  2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index 05abe03473..c0957cb6e5 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -47,6 +47,7 @@ UPDATE-INTERVAL seconds."
   (setf (map-elt h/download-monitor-etc :path) path
 (map-elt h/download-monitor-etc :total-size) total-size
 (map-elt h/download-monitor-etc :preamble) preamble
+(map-elt h/download-monitor-etc :started-at) (current-time)
 (map-elt h/download-monitor-etc :timer)
 (run-at-time nil update-interval #'h//download-monitor-update 
buffer)))
 buffer))
@@ -54,17 +55,20 @@ UPDATE-INTERVAL seconds."
 (defun h//download-monitor-update (buffer)
   "Update download monitor in BUFFER."
   (with-current-buffer buffer
-(pcase-let* (((map :preamble :path :total-size) h/download-monitor-etc)
+(pcase-let* (((map :preamble :path :total-size :started-at)
+  h/download-monitor-etc)
  (attributes (and (file-exists-p path)
   (file-attributes path)))
  (current-size (or (and attributes
 (file-attribute-size attributes))
-   0)))
+   0))
+ (elapsed (float-time (time-subtract (current-time) 
started-at
   ;; TODO: Consider using `format-spec'.
   (erase-buffer)
   (insert preamble
   "Downloaded: " (file-size-human-readable current-size nil " ")
-  " / " (file-size-human-readable total-size) "\n"
+  " / " (file-size-human-readable total-size) "\n"
+  "Elapsed: " (format-seconds "%hh%mm%ss%z" elapsed)
 
 (defun h//download-monitor-close (buffer)
   "Close download monitor BUFFER."
diff --git a/hyperdrive.el b/hyperdrive.el
index 23265965c6..68b94c3e84 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1452,7 +1452,7 @@ If FORCEP, don't prompt for confirmation before 
downloading."
(let* ((temp-file (make-temp-name
   (expand-file-name "hyperdrive-gateway-"
 temporary-file-directory)))
-  (preamble (format "Downloading gateway from:\n\nURL: 
%s\nTo:\n"
+  (preamble (format "Downloading gateway from:\n\nURL: %s\nTo: 
%s\n"
 url destination))
   (monitor-buffer (h//download-monitor
:preamble preamble



[nongnu] elpa/hyperdrive 4742b430fa 07/19: Fix: Killing monitor buffer

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 4742b430fa87b2891d23c03cf05a5dbfbdeee0d9
Author: Adam Porter 
Commit: Adam Porter 

Fix: Killing monitor buffer
---
 hyperdrive-download-monitor.el | 50 +++---
 1 file changed, 27 insertions(+), 23 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index 71cedf3941..f00f4b461e 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -39,11 +39,13 @@
 (cl-defun h/download-monitor
 (&key buffer-name path total-size setup-fn canceled-fn
   (update-interval 1) (completed-fn
-   (lambda ()
- (let ((buffer (current-buffer)))
-   (quit-window)
+   (lambda (buffer)
+ (let ((buffer-window (get-buffer-window 
buffer)))
+   (when buffer-window
+ (quit-window nil buffer-window))
(kill-buffer buffer)
-  "Return buffer that monitors the download to PATH."
+  "Return buffer that monitors the download to PATH.
+COMPLETED-FN is called with the monitor buffer as its argument."
   (let* ((buffer (generate-new-buffer buffer-name)))
 (with-current-buffer buffer
   (setf (map-elt h/download-monitor-etc :path) path
@@ -59,25 +61,27 @@
 buffer))
 
 (defun h/download-monitor-update (buffer)
-  (with-current-buffer buffer
-(pcase-let* (((map :path :total-size :completed-fn)
-  h/download-monitor-etc))
-  (if (file-exists-p path)
-  (let* ((attributes (file-attributes path))
- (current-size (file-attribute-size attributes)))
-(if (= current-size total-size)
-;; Download complete.
-(funcall (map-elt h/download-monitor-etc :completed-fn))
-  ;; Download in progress: update buffer.
-  (erase-buffer)
-  (insert "Downloading:\n\n"
-  "File: " path "\n"
-  "Downloaded: " (file-size-human-readable current-size 
nil " ")
-  " / " (file-size-human-readable total-size) "\n")))
-;; Download completed or canceled.
-;; FIXME: We just assume here that it completed and wasn't canceled.
-(when completed-fn
-  (funcall completed-fn))
+  (let (completedp)
+(with-current-buffer buffer
+  (pcase-let* (((map :path :total-size) h/download-monitor-etc))
+(if (file-exists-p path)
+(let* ((attributes (file-attributes path))
+   (current-size (file-attribute-size attributes)))
+  (if (= current-size total-size)
+  ;; Download complete.
+  (setf completedp t)
+;; Download in progress: update buffer.
+(erase-buffer)
+(insert "Downloading:\n\n"
+"File: " path "\n"
+"Downloaded: " (file-size-human-readable current-size 
nil " ")
+" / " (file-size-human-readable total-size) "\n")))
+  ;; Download completed or canceled.
+  (setf completedp t
+(when completedp
+  ;; FIXME: We just assume here that it completed and wasn't canceled.
+  (when-let ((completed-fn (map-elt h/download-monitor-etc :completed-fn)))
+(funcall completed-fn buffer)
 
 (provide 'hyperdrive-download-monitor)
 



[nongnu] elpa/hyperdrive 35d04e8cc5 18/19: Fix: Close monitor from ready hook; ensure buffer is live

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 35d04e8cc57dd845b6045383e4123526f239ff91
Author: Adam Porter 
Commit: Adam Porter 

Fix: Close monitor from ready hook; ensure buffer is live
---
 hyperdrive-download-monitor.el | 15 ---
 hyperdrive.el  |  8 ++--
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index ff66fc53bc..a1fc2d1417 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -81,13 +81,14 @@ UPDATE-INTERVAL seconds."
 
 (defun h//download-monitor-close (buffer)
   "Close download monitor BUFFER."
-  (with-current-buffer buffer
-(when (timerp (map-elt h/download-monitor-etc :timer))
-  (cancel-timer (map-elt h/download-monitor-etc :timer
-  (let ((buffer-window (get-buffer-window buffer)))
-(when buffer-window
-  (quit-window nil buffer-window)))
-  (kill-buffer buffer))
+  (when (buffer-live-p buffer)
+(with-current-buffer buffer
+  (when (timerp (map-elt h/download-monitor-etc :timer))
+(cancel-timer (map-elt h/download-monitor-etc :timer
+(let ((buffer-window (get-buffer-window buffer)))
+  (when buffer-window
+(quit-window nil buffer-window)))
+(kill-buffer buffer)))
 
 (provide 'hyperdrive-download-monitor)
 
diff --git a/hyperdrive.el b/hyperdrive.el
index d79825dfb6..a29d43727b 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1505,6 +1505,11 @@ If FORCEP, don't prompt for confirmation before 
downloading."
   "hyperdrive-restart"
 "hyperdrive-start")))
  (insert-restart-button (buffer)
+   (letrec ((hook-fn (lambda ()
+   (ignore-errors
+ (h//download-monitor-close buffer))
+   (remove-hook 'h/gateway-ready-hook hook-fn
+ (add-hook 'h/gateway-ready-hook hook-fn))
(with-current-buffer buffer
  (with-silent-modifications
(when (timerp (map-elt h/download-monitor-etc :timer))
@@ -1518,8 +1523,7 @@ If FORCEP, don't prompt for confirmation before 
downloading."
   (lambda (_)
 (if (h//gateway-ready-p)
 (h/restart)
-  (h/start))
-(h//download-monitor-close buffer)))
+  (h/start
;; Prevent button from going to end of the visual line.
" ")
   (try



[nongnu] elpa/hyperdrive 4af29a6156 06/19: Fix: Completing download

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 4af29a61566f99ebf44ce0f9facb3edc5b1f1bf7
Author: Adam Porter 
Commit: Adam Porter 

Fix: Completing download
---
 hyperdrive-download-monitor.el | 37 +++--
 1 file changed, 23 insertions(+), 14 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index 14b62c447b..71cedf3941 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -37,8 +37,12 @@
  Functions
 
 (cl-defun h/download-monitor
-(&key buffer-name path total-size setup-fn completed-fn canceled-fn
-  (update-interval 1))
+(&key buffer-name path total-size setup-fn canceled-fn
+  (update-interval 1) (completed-fn
+   (lambda ()
+ (let ((buffer (current-buffer)))
+   (quit-window)
+   (kill-buffer buffer)
   "Return buffer that monitors the download to PATH."
   (let* ((buffer (generate-new-buffer buffer-name)))
 (with-current-buffer buffer
@@ -56,19 +60,24 @@
 
 (defun h/download-monitor-update (buffer)
   (with-current-buffer buffer
-(pcase-let* (((map :path :total-size) h/download-monitor-etc)
- (attributes (file-attributes path))
+(pcase-let* (((map :path :total-size :completed-fn)
+  h/download-monitor-etc))
+  (if (file-exists-p path)
+  (let* ((attributes (file-attributes path))
  (current-size (file-attribute-size attributes)))
-  ;; TODO: Check download process status to see whether download was 
canceled.
-  (if (= current-size total-size)
-  ;; Download complete.
-  (funcall (map-elt h/download-monitor-etc :completed-fn))
-;; Download in progress: update buffer.
-(erase-buffer)
-(insert "Downloading:\n\n"
-"File: " path "\n"
-"Downloaded: " (file-size-human-readable current-size nil " ")
-" / " (file-size-human-readable total-size) "\n")
+(if (= current-size total-size)
+;; Download complete.
+(funcall (map-elt h/download-monitor-etc :completed-fn))
+  ;; Download in progress: update buffer.
+  (erase-buffer)
+  (insert "Downloading:\n\n"
+  "File: " path "\n"
+  "Downloaded: " (file-size-human-readable current-size 
nil " ")
+  " / " (file-size-human-readable total-size) "\n")))
+;; Download completed or canceled.
+;; FIXME: We just assume here that it completed and wasn't canceled.
+(when completed-fn
+  (funcall completed-fn))
 
 (provide 'hyperdrive-download-monitor)
 



[nongnu] elpa/hyperdrive 5434098b4a 11/19: Show speed

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 5434098b4a8592e0371fb35202cf339413941c02
Author: Adam Porter 
Commit: Adam Porter 

Show speed
---
 hyperdrive-download-monitor.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index c0957cb6e5..75c69481d0 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -62,13 +62,15 @@ UPDATE-INTERVAL seconds."
  (current-size (or (and attributes
 (file-attribute-size attributes))
0))
- (elapsed (float-time (time-subtract (current-time) 
started-at
+ (elapsed (float-time (time-subtract (current-time) 
started-at)))
+ (speed (/ current-size elapsed)))
   ;; TODO: Consider using `format-spec'.
   (erase-buffer)
   (insert preamble
   "Downloaded: " (file-size-human-readable current-size nil " ")
   " / " (file-size-human-readable total-size) "\n"
-  "Elapsed: " (format-seconds "%hh%mm%ss%z" elapsed)
+  "Elapsed: " (format-seconds "%hh%mm%ss%z" elapsed) "\n"
+  "Speed: " (file-size-human-readable speed) "/s"
 
 (defun h//download-monitor-close (buffer)
   "Close download monitor BUFFER."



[nongnu] elpa/hyperdrive 9156b1a7ac 16/19: Fix: Ensure timer before canceling

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 9156b1a7ac8eccf023c8397100e406079cb96556
Author: Adam Porter 
Commit: Adam Porter 

Fix: Ensure timer before canceling
---
 hyperdrive-download-monitor.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index 75b245bddd..ff66fc53bc 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -53,7 +53,8 @@ UPDATE-INTERVAL seconds."
 (run-at-time nil update-interval #'h//download-monitor-update 
buffer))
   (setq-local kill-buffer-hook
   (cons (lambda ()
-  (cancel-timer (map-elt h/download-monitor-etc 
:timer)))
+  (when (timerp (map-elt h/download-monitor-etc 
:timer))
+(cancel-timer (map-elt h/download-monitor-etc 
:timer
 kill-buffer-hook)))
 buffer))
 
@@ -81,7 +82,8 @@ UPDATE-INTERVAL seconds."
 (defun h//download-monitor-close (buffer)
   "Close download monitor BUFFER."
   (with-current-buffer buffer
-(cancel-timer (map-elt h/download-monitor-etc :timer)))
+(when (timerp (map-elt h/download-monitor-etc :timer))
+  (cancel-timer (map-elt h/download-monitor-etc :timer
   (let ((buffer-window (get-buffer-window buffer)))
 (when buffer-window
   (quit-window nil buffer-window)))



[nongnu] elpa/hyperdrive 481df10760 05/19: Fix: Timer

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 481df107600a602ac8d51f4e3b65dcfa58b258d4
Author: Adam Porter 
Commit: Adam Porter 

Fix: Timer
---
 hyperdrive-download-monitor.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index c93ab79477..14b62c447b 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -48,7 +48,8 @@
 (map-elt h/download-monitor-etc :canceled-fn) canceled-fn)
   (h/download-monitor-update buffer)
   (setf (map-elt h/download-monitor-etc 'timer)
-(run-at-time update-interval t #'h/download-monitor-update buffer))
+(run-at-time update-interval update-interval
+ #'h/download-monitor-update buffer))
   (when setup-fn
 (funcall setup-fn)))
 buffer))



[nongnu] elpa/hyperdrive fc3b754ca4 17/19: Fix: (hyperdrive-menu) Make install command non-transient

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit fc3b754ca4927aab940a8efa14ba39667dcdf204
Author: Adam Porter 
Commit: Adam Porter 

Fix: (hyperdrive-menu) Make install command non-transient
---
 hyperdrive-menu.el | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index 7a7164f95b..0b6e04c564 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -225,7 +225,6 @@
 ("G i" "Install" h/install
  :description
  (lambda () (if (h/gateway-needs-upgrade-p) "Upgrade" "Install"))
- :transient t
  :if (lambda ()
(and (not (h/gateway-installing-p))
 (or (not (h/gateway-installed-p))



[nongnu] elpa/hyperdrive c35423cdd4 12/19: Use special-mode

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit c35423cdd47a8ca2bf4dd026c35be5b90ba09d8e
Author: Adam Porter 
Commit: Adam Porter 

Use special-mode
---
 hyperdrive-download-monitor.el | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index 75c69481d0..ee9a723f57 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -44,6 +44,7 @@ the top of the buffer.  Monitor buffer is updated every
 UPDATE-INTERVAL seconds."
   (let ((buffer (generate-new-buffer buffer-name)))
 (with-current-buffer buffer
+  (special-mode)
   (setf (map-elt h/download-monitor-etc :path) path
 (map-elt h/download-monitor-etc :total-size) total-size
 (map-elt h/download-monitor-etc :preamble) preamble
@@ -65,12 +66,13 @@ UPDATE-INTERVAL seconds."
  (elapsed (float-time (time-subtract (current-time) 
started-at)))
  (speed (/ current-size elapsed)))
   ;; TODO: Consider using `format-spec'.
-  (erase-buffer)
-  (insert preamble
-  "Downloaded: " (file-size-human-readable current-size nil " ")
-  " / " (file-size-human-readable total-size) "\n"
-  "Elapsed: " (format-seconds "%hh%mm%ss%z" elapsed) "\n"
-  "Speed: " (file-size-human-readable speed) "/s"
+  (with-silent-modifications
+(erase-buffer)
+(insert preamble
+"Downloaded: " (file-size-human-readable current-size nil " ")
+" / " (file-size-human-readable total-size) "\n"
+"Elapsed: " (format-seconds "%hh%mm%ss%z" elapsed) "\n"
+"Speed: " (file-size-human-readable speed) "/s")
 
 (defun h//download-monitor-close (buffer)
   "Close download monitor BUFFER."



[nongnu] elpa/hyperdrive 53ce1cf3f4 04/19: Fix: Wait for download to start

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 53ce1cf3f48d94fda6549f4fc6600268f2e1bc1b
Author: Adam Porter 
Commit: Adam Porter 

Fix: Wait for download to start
---
 hyperdrive.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/hyperdrive.el b/hyperdrive.el
index 9e9571620c..852f52f448 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1468,6 +1468,12 @@ If FORCEP, don't prompt for confirmation before 
downloading."
  (when (file-exists-p temp-file)
(delete-file temp-file)
  (require 'hyperdrive-download-monitor)
+ ;; Wait for download to start before showing monitor.
+ (cl-loop until (file-exists-p temp-file)
+  do (sleep-for 0.1)
+  for times below 100
+  finally (unless (file-exists-p temp-file)
+(error "Download not started after 10 
seconds")))
  (pop-to-buffer
   (h/download-monitor :buffer-name "*hyperdrive-install*"
   :path temp-file



[nongnu] elpa/hyperdrive 04caa99d91 13/19: Merge: Download monitor for installing gateway

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 04caa99d918317ad89942f07f29ce2baeaf34a0d
Merge: 472e01a805 c35423cdd4
Author: Adam Porter 
Commit: Adam Porter 

Merge: Download monitor for installing gateway
---
 hyperdrive-download-monitor.el | 95 ++
 hyperdrive.el  | 28 +
 2 files changed, 115 insertions(+), 8 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
new file mode 100644
index 00..ee9a723f57
--- /dev/null
+++ b/hyperdrive-download-monitor.el
@@ -0,0 +1,95 @@
+;;; hyperdrive-download-monitor.el ----*- lexical-binding: t; -*-
+
+;; Copyright (C) 2024 USHIN, Inc.
+
+;; Author: Joseph Turner 
+;; Author: Adam Porter 
+;; Maintainer: Joseph Turner <~ushin/us...@lists.sr.ht>
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU Affero General Public License
+;; as published by the Free Software Foundation; either version 3 of
+;; the License, or (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; Affero General Public License for more details.
+
+;; You should have received a copy of the GNU Affero General Public
+;; License along with this program. If not, see
+;; .
+
+;;; Commentary:
+
+;; Monitor a file download's progress in a buffer.
+
+;;; Code:
+
+(require 'cl-lib)
+(require 'map)
+(require 'pcase)
+
+ Variables
+
+(defvar-local h/download-monitor-etc nil)
+
+ Functions
+
+(cl-defun h//download-monitor
+(&key buffer-name path total-size preamble (update-interval 1))
+  "Return buffer that monitors the download to PATH expecting it to be 
TOTAL-SIZE.
+Buffer's name is based on BUFFER-NAME.  PREAMBLE is inserted at
+the top of the buffer.  Monitor buffer is updated every
+UPDATE-INTERVAL seconds."
+  (let ((buffer (generate-new-buffer buffer-name)))
+(with-current-buffer buffer
+  (special-mode)
+  (setf (map-elt h/download-monitor-etc :path) path
+(map-elt h/download-monitor-etc :total-size) total-size
+(map-elt h/download-monitor-etc :preamble) preamble
+(map-elt h/download-monitor-etc :started-at) (current-time)
+(map-elt h/download-monitor-etc :timer)
+(run-at-time nil update-interval #'h//download-monitor-update 
buffer)))
+buffer))
+
+(defun h//download-monitor-update (buffer)
+  "Update download monitor in BUFFER."
+  (with-current-buffer buffer
+(pcase-let* (((map :preamble :path :total-size :started-at)
+  h/download-monitor-etc)
+ (attributes (and (file-exists-p path)
+  (file-attributes path)))
+ (current-size (or (and attributes
+(file-attribute-size attributes))
+   0))
+ (elapsed (float-time (time-subtract (current-time) 
started-at)))
+ (speed (/ current-size elapsed)))
+  ;; TODO: Consider using `format-spec'.
+  (with-silent-modifications
+(erase-buffer)
+(insert preamble
+"Downloaded: " (file-size-human-readable current-size nil " ")
+" / " (file-size-human-readable total-size) "\n"
+"Elapsed: " (format-seconds "%hh%mm%ss%z" elapsed) "\n"
+"Speed: " (file-size-human-readable speed) "/s")
+
+(defun h//download-monitor-close (buffer)
+  "Close download monitor BUFFER."
+  (with-current-buffer buffer
+(cancel-timer (map-elt h/download-monitor-etc :timer)))
+  (let ((buffer-window (get-buffer-window buffer)))
+(when buffer-window
+  (quit-window nil buffer-window)))
+  (kill-buffer buffer))
+
+(provide 'hyperdrive-download-monitor)
+
+;; Local Variables:
+;; read-symbol-shorthands: (
+;;   ("he//" . "hyperdrive-entry--")
+;;   ("he/"  . "hyperdrive-entry-")
+;;   ("h//"  . "hyperdrive--")
+;;   ("h/"   . "hyperdrive-"))
+;; End:
+;;; hyperdrive-download-monitor.el ends here
diff --git a/hyperdrive.el b/hyperdrive.el
index 7c12dd14af..68b94c3e84 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -67,6 +67,7 @@
 
 (require 'hyperdrive-lib)
 (require 'hyperdrive-org)
+(require 'hyperdrive-download-monitor)
 
  Links
 
@@ -1425,12 +1426,12 @@ If FORCEP, don't prompt for confirmation before 
downloading."
(ignore-errors
  (h/message "Checking server %S..."
 (url-host (url-generic-parse-url url)))
- (setf size (file-size-human-readable
- (head-size url)
+ (setf size (head-size url
  (if size
  (if (or forcep
  (yes-or-no-p
-  (format

[nongnu] elpa/hyperdrive a2120e57e9 03/19: Fix: Size

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit a2120e57e97053b175c1eddc579049950508ec56
Author: Adam Porter 
Commit: Adam Porter 

Fix: Size
---
 hyperdrive.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index bf981a16d2..9e9571620c 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1425,12 +1425,12 @@ If FORCEP, don't prompt for confirmation before 
downloading."
(ignore-errors
  (h/message "Checking server %S..."
 (url-host (url-generic-parse-url url)))
- (setf size (file-size-human-readable
- (head-size url)
+ (setf size (head-size url
  (if size
  (if (or forcep
  (yes-or-no-p
-  (format "Download and install gateway (%s)? " size)))
+  (format "Download and install gateway (%s)? "
+  (file-size-human-readable size
  (progn
(setf forcep t) ;; Don't prompt again.
(download url sha256))
@@ -1473,7 +1473,8 @@ If FORCEP, don't prompt for confirmation before 
downloading."
   :path temp-file
   :total-size size
   :completed-fn #'kill-buffer-and-window))
- (h/message "Downloading %s from %S to %S" size url destination)))
+ (h/message "Downloading %s from %S to %S"
+(file-size-human-readable size) url destination)))
  (check (file-name sha256 url)
(if (with-temp-buffer
  (insert-file-contents-literally file-name)



[nongnu] elpa/hyperdrive 95323b4bf6 08/19: Refactoring, fixes

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 95323b4bf65abf484d59319352a1a4f85b91bd47
Author: Adam Porter 
Commit: Adam Porter 

Refactoring, fixes
---
 hyperdrive-download-monitor.el | 72 ++
 hyperdrive.el  | 23 --
 2 files changed, 44 insertions(+), 51 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index f00f4b461e..2fa5bc35c3 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -36,52 +36,42 @@
 
  Functions
 
-(cl-defun h/download-monitor
-(&key buffer-name path total-size setup-fn canceled-fn
-  (update-interval 1) (completed-fn
-   (lambda (buffer)
- (let ((buffer-window (get-buffer-window 
buffer)))
-   (when buffer-window
- (quit-window nil buffer-window))
-   (kill-buffer buffer)
-  "Return buffer that monitors the download to PATH.
-COMPLETED-FN is called with the monitor buffer as its argument."
-  (let* ((buffer (generate-new-buffer buffer-name)))
+(cl-defun h//download-monitor
+(&key buffer-name path total-size preamble (update-interval 1))
+  "Return buffer that monitors the download to PATH expecting it to be 
TOTAL-SIZE.
+Buffer's name is based on BUFFER-NAME.  PREAMBLE is inserted at
+the top of the buffer.  Monitor buffer is updated every
+UPDATE-INTERVAL seconds."
+  (let ((buffer (generate-new-buffer buffer-name)))
 (with-current-buffer buffer
   (setf (map-elt h/download-monitor-etc :path) path
 (map-elt h/download-monitor-etc :total-size) total-size
-(map-elt h/download-monitor-etc :completed-fn) completed-fn
-(map-elt h/download-monitor-etc :canceled-fn) canceled-fn)
-  (h/download-monitor-update buffer)
-  (setf (map-elt h/download-monitor-etc 'timer)
-(run-at-time update-interval update-interval
- #'h/download-monitor-update buffer))
-  (when setup-fn
-(funcall setup-fn)))
+(map-elt h/download-monitor-etc :preamble) preamble
+(map-elt h/download-monitor-etc :timer)
+(run-at-time nil update-interval #'h//download-monitor-update 
buffer)))
 buffer))
 
-(defun h/download-monitor-update (buffer)
-  (let (completedp)
-(with-current-buffer buffer
-  (pcase-let* (((map :path :total-size) h/download-monitor-etc))
-(if (file-exists-p path)
-(let* ((attributes (file-attributes path))
-   (current-size (file-attribute-size attributes)))
-  (if (= current-size total-size)
-  ;; Download complete.
-  (setf completedp t)
-;; Download in progress: update buffer.
-(erase-buffer)
-(insert "Downloading:\n\n"
-"File: " path "\n"
-"Downloaded: " (file-size-human-readable current-size 
nil " ")
-" / " (file-size-human-readable total-size) "\n")))
-  ;; Download completed or canceled.
-  (setf completedp t
-(when completedp
-  ;; FIXME: We just assume here that it completed and wasn't canceled.
-  (when-let ((completed-fn (map-elt h/download-monitor-etc :completed-fn)))
-(funcall completed-fn buffer)
+(defun h//download-monitor-update (buffer)
+  (with-current-buffer buffer
+(pcase-let (((map :preamble :path :total-size) h/download-monitor-etc))
+  ;; TODO: Consider using `format-spec'.
+  (when (file-exists-p path)
+(let* ((attributes (file-attributes path))
+   (current-size (file-attribute-size attributes)))
+  (erase-buffer)
+  (insert preamble "\n\n"
+  "File: " path "\n"
+  "Downloaded: " (file-size-human-readable current-size nil " 
")
+  " / " (file-size-human-readable total-size) "\n"))
+
+(defun h//download-monitor-close (buffer)
+  "Close download monitor BUFFER."
+  (with-current-buffer buffer
+(cancel-timer (map-elt h/download-monitor-etc :timer)))
+  (let ((buffer-window (get-buffer-window buffer)))
+(when buffer-window
+  (quit-window nil buffer-window)))
+  (kill-buffer buffer))
 
 (provide 'hyperdrive-download-monitor)
 
diff --git a/hyperdrive.el b/hyperdrive.el
index 852f52f448..5715b69769 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -67,6 +67,7 @@
 
 (require 'hyperdrive-lib)
 (require 'hyperdrive-org)
+(require 'hyperdrive-download-monitor)
 
  Links
 
@@ -1448,12 +1449,18 @@ If FORCEP, don't prompt for confirmation before 
downloading."
  (cl-parse-integer
   (alist-get 'content-length (plz-response-headers response)
  (download (url sha256)
-   (let ((temp-file (make-temp-name
- (expand-file-name

[nongnu] elpa/hyperdrive 472e01a805 01/19: Fix: (h/install) Use temp file in temporary-file-directory

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 472e01a805e8d3b7941cfa3ad1928b0c7859b86b
Author: Adam Porter 
Commit: Adam Porter 

Fix: (h/install) Use temp file in temporary-file-directory
---
 hyperdrive.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index dac0d1982f..7c12dd14af 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1448,7 +1448,9 @@ If FORCEP, don't prompt for confirmation before 
downloading."
  (cl-parse-integer
   (alist-get 'content-length (plz-response-headers response)
  (download (url sha256)
-   (let ((temp-file (make-temp-name "hyperdrive-gateway-")))
+   (let ((temp-file (make-temp-name
+ (expand-file-name "hyperdrive-gateway-"
+   temporary-file-directory
  (setf h/install-process
(plz 'get url :as `(file ,temp-file) :timeout nil
  :then (lambda (filename)



[nongnu] elpa/hyperdrive 95f814ddb7 09/19: Tidy, improve

2024-07-31 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 95f814ddb7d618c2d4a1cab2e1eea169599bda4f
Author: Adam Porter 
Commit: Adam Porter 

Tidy, improve
---
 hyperdrive-download-monitor.el | 20 +++-
 hyperdrive.el  | 10 +++---
 2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/hyperdrive-download-monitor.el b/hyperdrive-download-monitor.el
index 2fa5bc35c3..05abe03473 100644
--- a/hyperdrive-download-monitor.el
+++ b/hyperdrive-download-monitor.el
@@ -52,17 +52,19 @@ UPDATE-INTERVAL seconds."
 buffer))
 
 (defun h//download-monitor-update (buffer)
+  "Update download monitor in BUFFER."
   (with-current-buffer buffer
-(pcase-let (((map :preamble :path :total-size) h/download-monitor-etc))
+(pcase-let* (((map :preamble :path :total-size) h/download-monitor-etc)
+ (attributes (and (file-exists-p path)
+  (file-attributes path)))
+ (current-size (or (and attributes
+(file-attribute-size attributes))
+   0)))
   ;; TODO: Consider using `format-spec'.
-  (when (file-exists-p path)
-(let* ((attributes (file-attributes path))
-   (current-size (file-attribute-size attributes)))
-  (erase-buffer)
-  (insert preamble "\n\n"
-  "File: " path "\n"
-  "Downloaded: " (file-size-human-readable current-size nil " 
")
-  " / " (file-size-human-readable total-size) "\n"))
+  (erase-buffer)
+  (insert preamble
+  "Downloaded: " (file-size-human-readable current-size nil " ")
+  " / " (file-size-human-readable total-size) "\n"
 
 (defun h//download-monitor-close (buffer)
   "Close download monitor BUFFER."
diff --git a/hyperdrive.el b/hyperdrive.el
index 5715b69769..23265965c6 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -1452,8 +1452,10 @@ If FORCEP, don't prompt for confirmation before 
downloading."
(let* ((temp-file (make-temp-name
   (expand-file-name "hyperdrive-gateway-"
 temporary-file-directory)))
+  (preamble (format "Downloading gateway from:\n\nURL: 
%s\nTo:\n"
+url destination))
   (monitor-buffer (h//download-monitor
-   :preamble "Downloading gateway..."
+   :preamble preamble
:buffer-name "*hyperdrive-install*"
:path temp-file
:total-size size)))
@@ -1475,12 +1477,6 @@ If FORCEP, don't prompt for confirmation before 
downloading."
  (when (file-exists-p temp-file)
(delete-file temp-file))
  (h//download-monitor-close monitor-buffer
- ;; Wait for download to start before showing monitor.
- (cl-loop until (file-exists-p temp-file)
-  do (sleep-for 0.1)
-  for times below 100
-  finally (unless (file-exists-p temp-file)
-(error "Download not started after 10 
seconds")))
  (pop-to-buffer monitor-buffer)
  (h/message "Downloading %s from %S to %S"
 (file-size-human-readable size) url destination)))



[nongnu] elpa/hyperdrive updated (52297ba0bd -> 4c5fc6ca76)

2024-07-31 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  52297ba0bd Meta: Update changelog
   new  472e01a805 Fix: (h/install) Use temp file in 
temporary-file-directory
   new  84b59e1f8f WIP: hyperdrive-download-monitor
   new  a2120e57e9 Fix: Size
   new  53ce1cf3f4 Fix: Wait for download to start
   new  481df10760 Fix: Timer
   new  4af29a6156 Fix: Completing download
   new  4742b430fa Fix: Killing monitor buffer
   new  95323b4bf6 Refactoring, fixes
   new  95f814ddb7 Tidy, improve
   new  34e27bca27 Show elapsed time
   new  5434098b4a Show speed
   new  c35423cdd4 Use special-mode
   new  04caa99d91 Merge: Download monitor for installing gateway
   new  015917ecd3 Fix: (h//download-monitor) Cancel timer if buffer killed
   new  36744a367d Add: Restart gateway button in monitor buffer
   new  9156b1a7ac Fix: Ensure timer before canceling
   new  fc3b754ca4 Fix: (hyperdrive-menu) Make install command non-transient
   new  35d04e8cc5 Fix: Close monitor from ready hook; ensure buffer is live
   new  4c5fc6ca76 Merge: Download monitor fixes/improvements


Summary of changes:
 hyperdrive-download-monitor.el | 102 +
 hyperdrive-menu.el |   1 -
 hyperdrive.el  |  54 ++
 3 files changed, 147 insertions(+), 10 deletions(-)
 create mode 100644 hyperdrive-download-monitor.el



[elpa] externals/persist 076bf3ffc4: Replace obsolete function to avoid byte compilation warning

2024-07-31 Thread Adam Porter
branch: externals/persist
commit 076bf3ffc4fb0fa904c6ace9620fccaacb3454ba
Author: Joseph Turner 
Commit: Adam Porter 

Replace obsolete function to avoid byte compilation warning
---
 test/persist-tests.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/persist-tests.el b/test/persist-tests.el
index 4439fa3e07..6bf2ed3708 100644
--- a/test/persist-tests.el
+++ b/test/persist-tests.el
@@ -15,7 +15,7 @@
(let ((persist--symbols nil)
  (sym (cl-gensym)))
  (persist-symbol sym 10)
- (seq-contains persist--symbols sym
+ (seq-contains-p persist--symbols sym
 
 (ert-deftest test-persist-save-only-persistant ()
   ;; do not save not persist variables