[elpa] externals/breadcrumb ff5fb77e25: Bump version to 1.0.1

2023-09-06 Thread ELPA Syncer
branch: externals/breadcrumb
commit ff5fb77e2556c42aee9f1131f824bdfb955d861f
Author: João Távora 
Commit: João Távora 

Bump version to 1.0.1

breadcrumb.el (Version): Bump to 1.0.1
---
 breadcrumb.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/breadcrumb.el b/breadcrumb.el
index 4bc731a570..12195c69d3 100644
--- a/breadcrumb.el
+++ b/breadcrumb.el
@@ -4,7 +4,7 @@
 
 ;; Author: João Távora 
 ;; Package-Requires: ((emacs "28.1") (project "0.9.8"))
-;; Version: 1.0.0
+;; Version: 1.0.1
 ;; Keywords:
 
 ;; This program is free software; you can redistribute it and/or modify



[elpa] externals/greader 6b6449d3e3: greader.el: greader-auto-bookmark-mode global minor mode added.

2023-09-06 Thread ELPA Syncer
branch: externals/greader
commit 6b6449d3e3ba58d422a7f73186d3800967e10bf5
Author: Michelangelo Rodriguez 
Commit: Michelangelo Rodriguez 

greader.el: greader-auto-bookmark-mode global minor mode added.
---
 greader.el | 16 
 1 file changed, 16 insertions(+)

diff --git a/greader.el b/greader.el
index 85adbf5504..39402bbdab 100644
--- a/greader.el
+++ b/greader.el
@@ -288,6 +288,22 @@ if set to t, when you call function `greader-read', that 
function sets a
   :keymap greader-reading-map
   :lighter "reading...")
 
+(defun set-bookmark-for-greader ()
+  "Imposta il segnalibro ad ogni interruzione della lettura."
+  (when buffer-file-name
+(let ((inhibit-message t))
+  (bookmark-set (buffer-name)
+
+(define-minor-mode greader-auto-bookmark-mode
+  "Enable automatic bookmarking.
+Each time the reading of the buffer is stopped a bookmark is saved
+when the buffer is visiting a file."
+  :lighter "bk"
+  :global t
+  (if greader-auto-bookmark-mode
+  (add-hook 'greader-after-stop-hook 'set-bookmark-for-greader)
+(remove-hook 'greader-after-stop-hook 'set-bookmark-for-greader)))
+
 (defun greader-set-register ()
   "Set the `?G' register to the point in current buffer."
   (when greader-use-prefix



[nongnu] elpa/hyperdrive 006dcb9261 12/14: Meta: Update changelog

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 006dcb926186801916431274616395019642ab80
Author: Joseph Turner 
Commit: Joseph Turner 

Meta: Update changelog
---
 CHANGELOG.org | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 4960fd0dea..c12d07df58 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -26,6 +26,7 @@ This project adheres to 
[[https://semver.org/spec/v2.0.0.html][Semantic Versioni
 - Removed unused defcustom ~hyperdrive-hyper-gateway-p2p-port~
 - Fixed version history navigation in directories
 - Allow entering URLs without ~hyper://~
+- Prevent accidental loss of unsaved hyperdrive files
 - Improved error handling
 
 * 0.1 [2023-08-12 Sat]



[nongnu] elpa/hyperdrive 466cbdd551 01/14: Comment: Remove TODO

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 466cbdd551f43b35218005452905059d4cfa4bd3
Author: Joseph Turner 
Commit: Joseph Turner 

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

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index eb366d096d..03114f3f71 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -544,7 +544,6 @@ The following ENTRY hyperdrive slots are filled:
   (ignore-errors
 (cl-parse-integer content-length)))
   (hyperdrive-entry-type entry) content-type
-  ;; TODO: Rename slot to "mtime" to avoid confusion.
   (hyperdrive-entry-mtime entry) last-modified)
 (if persisted-hyperdrive
 (progn



[nongnu] elpa/hyperdrive d888a2d1c3 04/14: Add: (hyperdrive-view-file) Open hyperdrive file in view-mode

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit d888a2d1c37eb86461a43a3ceafdc0f2b9d64f16
Author: Joseph Turner 
Commit: Joseph Turner 

Add: (hyperdrive-view-file) Open hyperdrive file in view-mode
---
 hyperdrive.el | 12 
 1 file changed, 12 insertions(+)

diff --git a/hyperdrive.el b/hyperdrive.el
index 214b2e9594..4aa808f79b 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -349,6 +349,18 @@ for more information.  See `hyperdrive-read-entry' and
   (interactive (list (hyperdrive-read-entry :force-prompt current-prefix-arg)))
   (hyperdrive-open entry))
 
+;;;###autoload
+(defun hyperdrive-view-file (entry)
+  "View ENTRY in `view-mode', returning to previous buffer when done.
+Interactively, prompts for known hyperdrive and path.
+
+With universal prefix argument \\[universal-argument], prompts
+for more information.  See `hyperdrive-read-entry' and
+`hyperdrive-complete-hyperdrive'."
+  (interactive (list (hyperdrive-read-entry :force-prompt current-prefix-arg)))
+  (hyperdrive-open entry
+:createp nil :then (lambda () (view-buffer (current-buffer)
+
 ;;;###autoload
 (defun hyperdrive-open-url (url)
   "Open hyperdrive URL."



[nongnu] elpa/hyperdrive e85bd37f52 14/14: Fix: (-entry-version-ranges-no-gaps) Handle unknown entries

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit e85bd37f522eed33aecc7b2690521da476d65f7d
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: (-entry-version-ranges-no-gaps) Handle unknown entries
---
 hyperdrive-lib.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index d4791f39a1..a6c6519063 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -358,6 +358,8 @@ hyperdrive's latest-version slot, the final gap is filled."
 (pcase-let* ((final-known-range (car ranges))
  (`(,_range-start . ,(map (:range-end final-known-range-end))) 
final-known-range)
  (latest-version (hyperdrive-latest-version 
(hyperdrive-entry-hyperdrive entry
+  (unless final-known-range-end
+(setf final-known-range-end 0))
   (when (< final-known-range-end latest-version)
 ;; Insert possible final gap between latest known range and 
hyperdrive's latest-version
 (push `(,(1+ final-known-range-end) . (:range-end ,latest-version , 
:existsp unknown)) ranges)))



[nongnu] elpa/hyperdrive 38e110b99f 02/14: Change: (hyperdrive-open) Add createp flag

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 38e110b99fc9f1cbf964797c735e43d243317baf
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-open) Add createp flag

This allows for a hyperdrive-view-file function.
---
 hyperdrive-lib.el | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 03114f3f71..6f81c722d2 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -393,11 +393,12 @@ When VERSION is nil, return latest version of ENTRY."
  (_ (signal (car err) (cdr err
 
 (declare-function hyperdrive-history "hyperdrive-history")
-(cl-defun hyperdrive-open (entry &key then recurse)
+(cl-defun hyperdrive-open (entry &key then recurse (createp t))
   "Open hyperdrive ENTRY.
 If RECURSE, proceed up the directory hierarchy if given path is
-not found.  THEN may be a function to pass to the handler to call
-in the buffer opened by the handler."
+not found. THEN may be a function to pass to the handler to call
+in the buffer opened by the handler. When a writable ENTRY is not
+found and CREATEP is non-nil, create a new buffer for ENTRY."
   (declare (indent defun))
   ;; TODO: Add `find-file'-like interface. See 

   ;; TODO: When possible, check whether drive is writable with a HEAD request, 
and set writablep in the
@@ -446,7 +447,8 @@ in the buffer opened by the handler."
  ;; Root directory not found: Drive has not been
  ;; loaded locally, and no peers are found seeding it.
  (hyperdrive-message "No peers found for %s" 
(hyperdrive-entry-url entry)))
-((and (not (hyperdrive--entry-directory-p entry))
+((and createp
+  (not (hyperdrive--entry-directory-p entry))
   (hyperdrive-writablep hyperdrive)
   (not (hyperdrive-entry-version entry)))
  ;; Entry is a writable file: create a new buffer



[nongnu] elpa/hyperdrive aa29fa3652 06/14: Add: (hyperdrive-history-view-file) View file from history mode

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit aa29fa3652bb0514091a9e2b03a2c592f2cc5017
Author: Joseph Turner 
Commit: Joseph Turner 

Add: (hyperdrive-history-view-file) View file from history mode
---
 hyperdrive-history.el | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 08372a033f..27a04e2d38 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -119,6 +119,7 @@ and ENTRY's version are nil."
   :parent  hyperdrive-ewoc-mode-map
   :doc "Local keymap for `hyperdrive-history-mode' buffers."
   "RET" #'hyperdrive-history-find-file
+  "v"   #'hyperdrive-history-view-file
   "="   #'hyperdrive-history-diff
   "w"   #'hyperdrive-history-copy-url
   "d"   #'hyperdrive-history-download-file)
@@ -263,6 +264,28 @@ buffer."
  ;; TODO: Design options
  (hyperdrive-message "File not known to exist. What do you want to do?"
 
+(declare-function hyperdrive-view-file "hyperdrive")
+(defun hyperdrive-history-view-file (range-entry)
+  "Open hyperdrive entry in RANGE-ENTRY at point in `view-mode'.
+When entry does not exist or is not known to exist, does nothing
+and returns nil.
+
+Interactively, visit entry at point in `hyperdrive-history'
+buffer."
+  (declare (modes hyperdrive-history-mode))
+  (interactive (list (hyperdrive-history-range-entry-at-point)))
+  (pcase-exhaustive (hyperdrive-range-entry-exists-p range-entry)
+('t
+ ;; Known to exist: open it.
+ (hyperdrive-view-file (cdr range-entry)))
+('nil
+ ;; Known to not exist: warn user.
+ (hyperdrive-user-error "File does not exist!"))
+('unknown
+ ;; Not known to exist: prompt user
+ ;; TODO: Design options
+ (hyperdrive-message "File not known to exist. What do you want to do?"
+
 (declare-function hyperdrive-copy-url "hyperdrive")
 
 (defun hyperdrive-history-copy-url (range-entry)



[nongnu] elpa/hyperdrive 55494532f3 07/14: Docs: Document hyperdrive-view-file and dir/history wrappers

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 55494532f3f971e1c805e0348847c4dd5c474fe3
Author: Joseph Turner 
Commit: Joseph Turner 

Docs: Document hyperdrive-view-file and dir/history wrappers
---
 doc/hyperdrive-manual.org | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org
index 41065a5b75..3140c4344f 100644
--- a/doc/hyperdrive-manual.org
+++ b/doc/hyperdrive-manual.org
@@ -151,11 +151,14 @@ seed cannot be changed.
 ** Open a hyperdrive
 #+findex: hyperdrive-open-url
 #+findex: hyperdrive-find-file
+#+findex: hyperdrive-view-file
 
-You can open a hyperdrive folder or file by pasting in a ~hyper://~ URL
-after ~M-x hyperdrive-open-url~. Alternatively, ~M-x hyperdrive-find-file~
-remembers hyperdrives you have already created or visited. It will
-prompt you for a known hyperdrive and a path inside it.
+You can open a hyperdrive folder or file by pasting in a ~hyper://~
+URL after ~M-x hyperdrive-open-url~. Alternatively, ~M-x
+hyperdrive-find-file~ remembers hyperdrives you have already created
+or visited. It will prompt you for a known hyperdrive and a path
+inside it. ~hyperdrive-view-file~ is like ~hyperdrive-find-file~, but
+it opens the file in [[info:emacs#View Mode][view-mode]].
 
 *** Directory view
 
@@ -167,6 +170,8 @@ default:
 - ~n~ and ~p~ move between entries
 #+kindex: hyperdrive-dir-find-file
 - ~RET~ opens file or directory at point
+#+kindex: hyperdrive-dir-view-file
+- ~v~ opens file or directory at point in [[info:emacs#View Mode][view-mode]].
 #+kindex: hyperdrive-up
 - ~^~ goes up to the parent directory
 #+kindex: revert-buffer
@@ -287,6 +292,8 @@ default:
 
 #+kindex: hyperdrive-history-find-file
 - ~RET~ opens the file at the start of the range at point
+#+kindex: hyperdrive-history-view-file
+- ~v~ opens the file at the start of the range at point in [[info:emacs#View 
Mode][view-mode]]
 #+kindex: hyperdrive-history-copy-url
 - ~w~ copies the URL of the file at the start of the range at point
 #+kindex: hyperdrive-history-download-file



[nongnu] elpa/hyperdrive 109452e780 09/14: Merge branch 'view-file'

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 109452e7806a5583d81010d9c96a052ef4be56cc
Merge: 466cbdd551 dff584bbe9
Author: Joseph Turner 
Commit: Joseph Turner 

Merge branch 'view-file'
---
 CHANGELOG.org |  1 +
 doc/hyperdrive-manual.org | 15 +++
 hyperdrive-dir.el | 10 ++
 hyperdrive-history.el | 23 +++
 hyperdrive-lib.el | 15 ++-
 hyperdrive.el | 12 
 6 files changed, 67 insertions(+), 9 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 1aa7066a01..4960fd0dea 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -10,6 +10,7 @@ This project adheres to 
[[https://semver.org/spec/v2.0.0.html][Semantic Versioni
 - ~yank-media~ support (on Emacs 29 or later)
 - ~save-some-buffers~ integration
 - ~info-look~ integration
+- ~view-mode~ integration
 - Org-mode link completion
 - directory view sorting by column
 
diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org
index 41065a5b75..3140c4344f 100644
--- a/doc/hyperdrive-manual.org
+++ b/doc/hyperdrive-manual.org
@@ -151,11 +151,14 @@ seed cannot be changed.
 ** Open a hyperdrive
 #+findex: hyperdrive-open-url
 #+findex: hyperdrive-find-file
+#+findex: hyperdrive-view-file
 
-You can open a hyperdrive folder or file by pasting in a ~hyper://~ URL
-after ~M-x hyperdrive-open-url~. Alternatively, ~M-x hyperdrive-find-file~
-remembers hyperdrives you have already created or visited. It will
-prompt you for a known hyperdrive and a path inside it.
+You can open a hyperdrive folder or file by pasting in a ~hyper://~
+URL after ~M-x hyperdrive-open-url~. Alternatively, ~M-x
+hyperdrive-find-file~ remembers hyperdrives you have already created
+or visited. It will prompt you for a known hyperdrive and a path
+inside it. ~hyperdrive-view-file~ is like ~hyperdrive-find-file~, but
+it opens the file in [[info:emacs#View Mode][view-mode]].
 
 *** Directory view
 
@@ -167,6 +170,8 @@ default:
 - ~n~ and ~p~ move between entries
 #+kindex: hyperdrive-dir-find-file
 - ~RET~ opens file or directory at point
+#+kindex: hyperdrive-dir-view-file
+- ~v~ opens file or directory at point in [[info:emacs#View Mode][view-mode]].
 #+kindex: hyperdrive-up
 - ~^~ goes up to the parent directory
 #+kindex: revert-buffer
@@ -287,6 +292,8 @@ default:
 
 #+kindex: hyperdrive-history-find-file
 - ~RET~ opens the file at the start of the range at point
+#+kindex: hyperdrive-history-view-file
+- ~v~ opens the file at the start of the range at point in [[info:emacs#View 
Mode][view-mode]]
 #+kindex: hyperdrive-history-copy-url
 - ~w~ copies the URL of the file at the start of the range at point
 #+kindex: hyperdrive-history-download-file
diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index ce2ba3351b..840597f83e 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -199,6 +199,7 @@ With point on header, returns directory entry."
   :doc "Local keymap for `hyperdrive-dir-mode' buffers."
   "RET" #'hyperdrive-dir-find-file
   "f"   #'hyperdrive-find-file ;; Alternatively, define new function which 
fills in name of entry at point.
+  "v"   #'hyperdrive-dir-view-file
   "j"   #'imenu
   "w"   #'hyperdrive-dir-copy-url
   "d"   #'hyperdrive-dir-download-file
@@ -229,6 +230,15 @@ Interactively, visit file or directory at point in
   (interactive (list (hyperdrive-dir--entry-at-point)))
   (hyperdrive-open entry))
 
+(declare-function hyperdrive-view-file "hyperdrive")
+(defun hyperdrive-dir-view-file (entry)
+  "Open hyperdrive ENTRY at point in `view-mode'.
+Interactively, opens file or directory at point in
+`hyperdrive-dir' buffer."
+  (declare (modes hyperdrive-dir-mode))
+  (interactive (list (hyperdrive-dir--entry-at-point)))
+  (hyperdrive-view-file entry))
+
 (declare-function hyperdrive-copy-url "hyperdrive")
 
 (defun hyperdrive-dir-copy-url (entry)
diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 08372a033f..27a04e2d38 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -119,6 +119,7 @@ and ENTRY's version are nil."
   :parent  hyperdrive-ewoc-mode-map
   :doc "Local keymap for `hyperdrive-history-mode' buffers."
   "RET" #'hyperdrive-history-find-file
+  "v"   #'hyperdrive-history-view-file
   "="   #'hyperdrive-history-diff
   "w"   #'hyperdrive-history-copy-url
   "d"   #'hyperdrive-history-download-file)
@@ -263,6 +264,28 @@ buffer."
  ;; TODO: Design options
  (hyperdrive-message "File not known to exist. What do you want to do?"
 
+(declare-function hyperdrive-view-file "hyperdrive")
+(defun hyperdrive-history-view-file (range-entry)
+  "Open hyperdrive entry in RANGE-ENTRY at point in `view-mode'.
+When entry does not exist or is not known to exist, does nothing
+and returns nil.
+
+Interactively, visit entry at point in `hyperdrive-history'
+buffer."
+  (declare (modes hyperdrive-history-mode))
+  (interactive (list (hyperdrive-history-range-entry-at-point)))
+  (pcase-exhaustive (hyperdrive-range-entry-exists-p

[nongnu] elpa/hyperdrive f9e2623048 05/14: Add: (hyperdrive-dir-view-file) View file from hyperdrive-dir-mode

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit f9e2623048f62917913800e615de15d7a3d7b2e2
Author: Joseph Turner 
Commit: Joseph Turner 

Add: (hyperdrive-dir-view-file) View file from hyperdrive-dir-mode
---
 hyperdrive-dir.el | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index ce2ba3351b..840597f83e 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -199,6 +199,7 @@ With point on header, returns directory entry."
   :doc "Local keymap for `hyperdrive-dir-mode' buffers."
   "RET" #'hyperdrive-dir-find-file
   "f"   #'hyperdrive-find-file ;; Alternatively, define new function which 
fills in name of entry at point.
+  "v"   #'hyperdrive-dir-view-file
   "j"   #'imenu
   "w"   #'hyperdrive-dir-copy-url
   "d"   #'hyperdrive-dir-download-file
@@ -229,6 +230,15 @@ Interactively, visit file or directory at point in
   (interactive (list (hyperdrive-dir--entry-at-point)))
   (hyperdrive-open entry))
 
+(declare-function hyperdrive-view-file "hyperdrive")
+(defun hyperdrive-dir-view-file (entry)
+  "Open hyperdrive ENTRY at point in `view-mode'.
+Interactively, opens file or directory at point in
+`hyperdrive-dir' buffer."
+  (declare (modes hyperdrive-dir-mode))
+  (interactive (list (hyperdrive-dir--entry-at-point)))
+  (hyperdrive-view-file entry))
+
 (declare-function hyperdrive-copy-url "hyperdrive")
 
 (defun hyperdrive-dir-copy-url (entry)



[nongnu] elpa/hyperdrive 465e8a1aca 10/14: Comment: Explanation

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 465e8a1aca351bae5720e2a66750bebd56d702b9
Author: Joseph Turner 
Commit: Joseph Turner 

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

diff --git a/hyperdrive.el b/hyperdrive.el
index 4aa808f79b..f375ace2e2 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -359,6 +359,8 @@ for more information.  See `hyperdrive-read-entry' and
 `hyperdrive-complete-hyperdrive'."
   (interactive (list (hyperdrive-read-entry :force-prompt current-prefix-arg)))
   (hyperdrive-open entry
+;; `view-buffer' checks the mode-class symbol property of
+;; `major-mode' and avoids putting directory buffers in `view-mode'.
 :createp nil :then (lambda () (view-buffer (current-buffer)
 
 ;;;###autoload



[nongnu] elpa/hyperdrive ab00310b84 03/14: Fix: Describe return values in docstrings

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit ab00310b8424466ee92fc395e71fa6e56b60792b
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: Describe return values in docstrings
---
 hyperdrive-lib.el | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 6f81c722d2..211e8f1cb0 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -396,9 +396,10 @@ When VERSION is nil, return latest version of ENTRY."
 (cl-defun hyperdrive-open (entry &key then recurse (createp t))
   "Open hyperdrive ENTRY.
 If RECURSE, proceed up the directory hierarchy if given path is
-not found. THEN may be a function to pass to the handler to call
-in the buffer opened by the handler. When a writable ENTRY is not
-found and CREATEP is non-nil, create a new buffer for ENTRY."
+not found. THEN is a function to pass to the handler which will
+be called with no arguments in the buffer opened by the handler.
+When a writable ENTRY is not found and CREATEP is non-nil, create
+a new buffer for ENTRY."
   (declare (indent defun))
   ;; TODO: Add `find-file'-like interface. See 

   ;; TODO: When possible, check whether drive is writable with a HEAD request, 
and set writablep in the
@@ -531,7 +532,9 @@ The following ENTRY slots are filled:
 
 The following ENTRY hyperdrive slots are filled:
 - public-key
-- domains (merged with current persisted value)"
+- domains (merged with current persisted value)
+
+Returns filled ENTRY."
   (pcase-let* (((cl-struct hyperdrive-entry hyperdrive) entry)
((map link content-length content-type etag last-modified) 
headers)
;; If URL hostname was a DNSLink domain, entry doesn't yet have 
a public-key slot.



[nongnu] elpa/hyperdrive f30fe3d890 11/14: Add: kill-buffer-query-functions integration

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit f30fe3d890bb426901819573c35c5af38af5bdf5
Author: Joseph Turner 
Commit: Joseph Turner 

Add: kill-buffer-query-functions integration

This prevents accidental loss of unsaved hyperdrive files.
---
 hyperdrive.el | 36 ++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/hyperdrive.el b/hyperdrive.el
index f375ace2e2..8422bbf013 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -317,8 +317,6 @@ Intended to be passed to `buffer-local-restore-state'.")
  write-contents-functions (cl-adjoin 
#'hyperdrive--write-contents write-contents-functions)
  ;; TODO: Modify buffer-local value of 
`save-some-buffers-action-alist'
  ;; to allow diffing modified buffer with hyperdrive file
- ;; TODO(A): Add to `kill-buffer-query-functions' to
- ;; query before killing hyperdrive buffers.
  buffer-offer-save t))
 (add-hook 'after-change-major-mode-hook
   #'hyperdrive--hack-write-contents-functions nil 'local))
@@ -746,6 +744,40 @@ The return value of this function is the retrieval buffer."
 (rx-to-string `(or ,eww-use-browse-url (seq bos "hyper://")))
   (rx bos "hyper://"
 
+ `kill-buffer-query-functions' integration
+
+(defun hyperdrive--kill-buffer-possibly-save (buffer)
+  "Ask whether to kill modified hyperdrive file BUFFER."
+  ;; Mostly copied from `kill-buffer--possibly-save'.
+  (cl-assert (and hyperdrive-mode hyperdrive-current-entry))
+  (let ((response
+ (cadr
+  (read-multiple-choice
+   (format "Hyperdrive file %s modified; kill anyway?"
+   (hyperdrive-entry-description hyperdrive-current-entry))
+   '((?y "yes" "kill buffer without saving")
+ (?n "no" "exit without doing anything")
+ (?s "save and then kill" "save the buffer and then kill it"))
+   nil nil (and (not use-short-answers)
+(not (use-dialog-box-p)))
+(if (equal response "no")
+nil
+  (unless (equal response "yes")
+(with-current-buffer buffer
+  (save-buffer)))
+  t)))
+
+(defun hyperdrive-kill-buffer-query-function ()
+  "Ask before killing an unsaved hyperdrive file buffer."
+  (if (and hyperdrive-mode
+   hyperdrive-current-entry
+   (not (hyperdrive--entry-directory-p hyperdrive-current-entry))
+   (buffer-modified-p))
+  (hyperdrive--kill-buffer-possibly-save (current-buffer))
+t))
+
+(cl-pushnew #'hyperdrive-kill-buffer-query-function 
kill-buffer-query-functions)
+
  Footer
 
 (provide 'hyperdrive)



[nongnu] elpa/hyperdrive updated (fcfff46d68 -> e85bd37f52)

2023-09-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  fcfff46d68 Tidy: Remove unnecessary declare-function statements
   new  466cbdd551 Comment: Remove TODO
   new  38e110b99f Change: (hyperdrive-open) Add createp flag
   new  ab00310b84 Fix: Describe return values in docstrings
   new  d888a2d1c3 Add: (hyperdrive-view-file) Open hyperdrive file in 
view-mode
   new  f9e2623048 Add: (hyperdrive-dir-view-file) View file from 
hyperdrive-dir-mode
   new  aa29fa3652 Add: (hyperdrive-history-view-file) View file from 
history mode
   new  55494532f3 Docs: Document hyperdrive-view-file and dir/history 
wrappers
   new  dff584bbe9 Meta: Update changelog
   new  109452e780 Merge branch 'view-file'
   new  465e8a1aca Comment: Explanation
   new  f30fe3d890 Add: kill-buffer-query-functions integration
   new  006dcb9261 Meta: Update changelog
   new  a000cfb8ff Comment: Explanation
   new  e85bd37f52 Fix: (-entry-version-ranges-no-gaps) Handle unknown 
entries


Summary of changes:
 CHANGELOG.org |  2 ++
 doc/hyperdrive-manual.org | 15 ++
 hyperdrive-dir.el | 10 ++
 hyperdrive-history.el | 23 ++
 hyperdrive-lib.el | 19 --
 hyperdrive.el | 50 +--
 6 files changed, 107 insertions(+), 12 deletions(-)



[nongnu] elpa/hyperdrive dff584bbe9 08/14: Meta: Update changelog

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit dff584bbe970b3b52789ef47bdf1fe4ebe0bd81d
Author: Joseph Turner 
Commit: Joseph Turner 

Meta: Update changelog
---
 CHANGELOG.org | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 1aa7066a01..4960fd0dea 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -10,6 +10,7 @@ This project adheres to 
[[https://semver.org/spec/v2.0.0.html][Semantic Versioni
 - ~yank-media~ support (on Emacs 29 or later)
 - ~save-some-buffers~ integration
 - ~info-look~ integration
+- ~view-mode~ integration
 - Org-mode link completion
 - directory view sorting by column
 



[nongnu] elpa/popup 4712fec8d9 1/2: Bump actions/checkout from 3 to 4

2023-09-06 Thread ELPA Syncer
branch: elpa/popup
commit 4712fec8d93debcb3529a5df63614abf0dcdeb76
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Commit: GitHub 

Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] 
---
 .github/workflows/test.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index bbc9581d8b..fe3a9da173 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -37,7 +37,7 @@ jobs:
   experimental: true
 
 steps:
-- uses: actions/checkout@v3
+- uses: actions/checkout@v4
 
 - uses: jcs090218/setup-emacs@master
   with:



[nongnu] elpa/hyperdrive a000cfb8ff 13/14: Comment: Explanation

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit a000cfb8ffc8be38d5bb446e7110730149e3dc61
Author: Joseph Turner 
Commit: Joseph Turner 

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

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 211e8f1cb0..d4791f39a1 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -348,6 +348,7 @@ hyperdrive's latest-version slot, the final gap is filled."
   (let ((ranges '())
 (previous-range-end 0))
 (pcase-dolist (`(,range-start . ,(map (:range-end range-end) (:existsp 
existsp))) (hyperdrive-entry-version-ranges entry))
+  ;; If hyperdrive-entry-version-ranges returns nil, this whole loop will 
be skipped.
   (let ((next-range-start (1+ previous-range-end)))
 (when (> range-start next-range-start)
   ;; Insert an "unknown" gap range



[nongnu] elpa/popup 2868885b2b 2/2: Merge pull request #141 from auto-complete/dependabot/github_actions/actions/checkout-4

2023-09-06 Thread ELPA Syncer
branch: elpa/popup
commit 2868885b2ba64fd469f0aa10a734ceeaf49a1baa
Merge: 769318d039 4712fec8d9
Author: Jen-Chieh Shen 
Commit: GitHub 

Merge pull request #141 from 
auto-complete/dependabot/github_actions/actions/checkout-4

Bump actions/checkout from 3 to 4
---
 .github/workflows/test.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index bbc9581d8b..fe3a9da173 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -37,7 +37,7 @@ jobs:
   experimental: true
 
 steps:
-- uses: actions/checkout@v3
+- uses: actions/checkout@v4
 
 - uses: jcs090218/setup-emacs@master
   with:



[nongnu] main b04be206b9: * elpa-packages (afternoon-theme): Prefer HTTPS. (Bug#60229)

2023-09-06 Thread Stefan Kangas
branch: main
commit b04be206b9ce6eb43b806402e7a47c2d3191ff0c
Author: Stefan Kangas 
Commit: Stefan Kangas 

* elpa-packages (afternoon-theme): Prefer HTTPS.  (Bug#60229)
---
 elpa-packages | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elpa-packages b/elpa-packages
index f506a69171..f8ba4ee5c1 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -153,7 +153,7 @@
   :ignored-files ("tests" "Eldev")
   :news "CHANGELOG.md")
 
- (elpher   :url "git://thelambdalab.xyz/elpher.git"
+ (elpher   :url "https://thelambdalab.xyz/git/elpher.git";
   :doc "elpher.texi"
   :ignored-files ("Makefile" "ISSUES.org" "RELEASE" "config.mk"))
 



[elpa] externals/org 13e4ee7371 1/2: org-babel-comint-with-output: Fix for edge case of `comint-prompt-regexp'

2023-09-06 Thread ELPA Syncer
branch: externals/org
commit 13e4ee73716a8c918df23c8af05a496b33f41414
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-babel-comint-with-output: Fix for edge case of `comint-prompt-regexp'

* lisp/ob-comint.el (org-babel-comint-with-output): Implement more
universal algorithm catching agglomerated prompts.  The new approach
works for regexps that match ^, but not as the first char in the
regexp string.
* testing/lisp/test-ob-octave.el (ob-octave/session-multiline): Add
new test.

Reported-by: Paul Stansell 
Link: 
https://orgmode.org/list/CAMJKaZwuTV-06pPz5nv87CNcoVcqCwFjEodubXTzXs15Q=o...@mail.gmail.com
---
 lisp/ob-comint.el  | 34 ++
 testing/lisp/test-ob-octave.el | 10 ++
 2 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
index d6c048c58f..407e9d239a 100644
--- a/lisp/ob-comint.el
+++ b/lisp/ob-comint.el
@@ -76,7 +76,10 @@ or user `keyboard-quit' during execution of body."
(remove-echo (nth 2 meta))
(full-body (nth 3 meta))
 (org-babel-comint-prompt-separator
- "org-babel-comint-prompt-separator"))
+ ;; We need newline in case if we do progressive replacement
+ ;; of agglomerated comint prompts with `comint-prompt-regexp'
+ ;; containing ^.
+ "org-babel-comint-prompt-separator\n"))
 `(org-babel-comint-in-buffer ,buffer
(let* ((string-buffer "")
  (comint-output-filter-functions
@@ -106,21 +109,20 @@ or user `keyboard-quit' during execution of body."
 (insert dangling-text)
 
  ;; Filter out prompts.
- (setq string-buffer
-   (replace-regexp-in-string
-;; Sometimes, we get multiple agglomerated
-;; prompts together in a single output:
-;; "prompt prompt prompt output"
-;; Or even "promptprompt ...>.
-;; Remove them progressively, so that
-;; possible "^" in the prompt regexp gets to
-;; work as we remove the heading prompt
-;; instance.
-(if (string-prefix-p "^" comint-prompt-regexp)
-(format "^\\([ \t]*%s\\)+" (substring comint-prompt-regexp 
1))
-  comint-prompt-regexp)
-,org-babel-comint-prompt-separator
-string-buffer))
+ (while (string-match-p comint-prompt-regexp string-buffer)
+   (setq string-buffer
+ (replace-regexp-in-string
+  ;; Sometimes, we get multiple agglomerated
+  ;; prompts together in a single output:
+  ;; "prompt prompt prompt output"
+  ;; Or even "promptprompt ...>.
+  ;; Remove them progressively, so that
+  ;; possible "^" in the prompt regexp gets to
+  ;; work as we remove the heading prompt
+  ;; instance.
+  (format "\\(?:%s\\)?\\(?:%s\\)[ \t]*" 
,org-babel-comint-prompt-separator comint-prompt-regexp)
+  ,org-babel-comint-prompt-separator
+  string-buffer)))
 ;; remove echo'd FULL-BODY from input
 (when (and ,remove-echo ,full-body
(string-match
diff --git a/testing/lisp/test-ob-octave.el b/testing/lisp/test-ob-octave.el
index bbe9676de7..dfcfc01906 100644
--- a/testing/lisp/test-ob-octave.el
+++ b/testing/lisp/test-ob-octave.el
@@ -122,5 +122,15 @@ sombrero;
   (when (get-buffer "*Org-Babel Error Output*")
 (kill-buffer "*Org-Babel Error Output*")
 
+(ert-deftest ob-octave/session-multiline ()
+  "Test multiline session input."
+  (dotimes (_ 3)
+(org-test-with-temp-text
+"#+begin_src octave :session oct2 :results output
+  x = 1;
+  x = 1;
+  x = 1
+#+end_src"
+  (should (equal "x = 1" (org-babel-execute-src-block))
 
 (provide 'test-ob-octave)



[elpa] externals/org updated (f6fc385ed0 -> 4fe52fc8ac)

2023-09-06 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  f6fc385ed0 ob-lilypond.el: Fix docstring typos
   new  13e4ee7371 org-babel-comint-with-output: Fix for edge case of 
`comint-prompt-regexp'
   new  4fe52fc8ac lisp/ob-lilypond.el: refactor 
org-babel-lilypond-compile-lilyfile


Summary of changes:
 etc/ORG-NEWS |  3 +++
 lisp/ob-comint.el| 34 ++
 lisp/ob-lilypond.el  | 35 ++-
 testing/lisp/test-ob-lilypond.el | 31 ++-
 testing/lisp/test-ob-octave.el   | 10 ++
 5 files changed, 63 insertions(+), 50 deletions(-)



[elpa] externals/org 4fe52fc8ac 2/2: lisp/ob-lilypond.el: refactor org-babel-lilypond-compile-lilyfile

2023-09-06 Thread ELPA Syncer
branch: externals/org
commit 4fe52fc8acb598195ea6bbba537a1f9c5beee1dd
Author: Nicholas Vollmer 
Commit: Ihor Radchenko 

lisp/ob-lilypond.el: refactor org-babel-lilypond-compile-lilyfile

* ob-lilypond.el (org-babel-lilypond-compile-lilyfile):
Correct compilation message.
Remove superfluous local variables.
Remove unused ad-hoc debugging TEST parameter.

* test-ob-lilypond.el (ob-lilypond/ly-compile-lilyfile):
Locally bind variables which may generate output files.
Refactor to account for removed TEST parameter.
---
 etc/ORG-NEWS |  3 +++
 lisp/ob-lilypond.el  | 35 ++-
 testing/lisp/test-ob-lilypond.el | 31 ++-
 3 files changed, 35 insertions(+), 34 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 4db9d258a1..252c5a9f92 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -304,6 +304,9 @@ setting the ~STYLE~ property for each sub-task.
 
 The change is breaking when ~org-use-property-inheritance~ is set to ~t~.
 
+*** ~org-babel-lilypond-compile-lilyfile~ ignores optional second argument
+
+The =TEST= parameter is better served by Emacs debugging tools.
 ** New and changed options
 *** ~org-export-smart-quotes-alist~ is now a custom option
 
diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el
index ca4005d711..445d61bd9f 100644
--- a/lisp/ob-lilypond.el
+++ b/lisp/ob-lilypond.el
@@ -235,27 +235,20 @@ If error in compilation, attempt to mark the error in 
lilypond org file."
(org-babel-lilypond-attempt-to-open-pdf org-babel-lilypond-temp-file)
(org-babel-lilypond-attempt-to-play-midi 
org-babel-lilypond-temp-file)
 
-(defun org-babel-lilypond-compile-lilyfile (file-name &optional test)
-  "Compile lilypond file and check for compile errors.
-FILE-NAME is full path to lilypond (.ly) file."
-  (message "Compiling LilyPond...")
-  (let ((arg-1 org-babel-lilypond-ly-command) ;program
-;; (arg-2 nil);infile
-(arg-3 "*lilypond*")   ;buffer
-   (arg-4 t)  ;display
-   (arg-5 (if org-babel-lilypond-gen-png  "--png"  "")) ;&rest...
-   (arg-6 (if org-babel-lilypond-gen-html "--html" ""))
-(arg-7 (if org-babel-lilypond-gen-pdf "--pdf" ""))
-(arg-8 (if org-babel-lilypond-use-eps  "-dbackend=eps" ""))
-(arg-9 (if org-babel-lilypond-gen-svg  "-dbackend=svg" ""))
-(arg-10 (concat "--output=" (file-name-sans-extension file-name)))
-(arg-11 file-name))
-(if test
-`(,arg-1 ,nil ,arg-3 ,arg-4 ,arg-5 ,arg-6 ;; arg-2
- ,arg-7 ,arg-8 ,arg-9 ,arg-10 ,arg-11)
-  (call-process
-   arg-1 nil arg-3 arg-4 arg-5 arg-6 ;; arg-2
-   arg-7 arg-8 arg-9 arg-10 arg-11
+;;Ignoring second arg for pre Org 9.7 compatibility
+(defun org-babel-lilypond-compile-lilyfile (filename &optional _)
+  "Compile Lilypond FILENAME and check for compile errors."
+  (message "Compiling %s..." filename)
+  (let ((args (delq nil (list
+ (and org-babel-lilypond-gen-png  "--png")
+ (and org-babel-lilypond-gen-html "--html")
+ (and org-babel-lilypond-gen-pdf  "--pdf")
+ (and org-babel-lilypond-use-eps  "-dbackend=eps")
+ (and org-babel-lilypond-gen-svg  "-dbackend=svg")
+ (concat "--output=" (file-name-sans-extension 
filename))
+ filename
+(apply #'call-process org-babel-lilypond-ly-command nil
+   "*lilypond*" 'display args)))
 
 (defun org-babel-lilypond-check-for-compile-error (file-name &optional test)
   "Check for compile error.
diff --git a/testing/lisp/test-ob-lilypond.el b/testing/lisp/test-ob-lilypond.el
index b829b8a10c..5f439793b8 100644
--- a/testing/lisp/test-ob-lilypond.el
+++ b/testing/lisp/test-ob-lilypond.el
@@ -46,19 +46,24 @@
   :type 'error)
 
 (ert-deftest ob-lilypond/ly-compile-lilyfile ()
-  (should (equal
-   `(,org-babel-lilypond-ly-command;program
- nil;infile
- "*lilypond*"   ;buffer
- t  ;display
- ,(if org-babel-lilypond-gen-png  "--png"  "") ;&rest...
- ,(if org-babel-lilypond-gen-html "--html" "")
- ,(if org-babel-lilypond-gen-pdf "--pdf" "")
- ,(if org-babel-lilypond-use-eps  "-dbackend=eps" "")
- ,(if org-babel-lilypond-gen-svg  "-dbackend=svg" "")
- "--output=test-file"
- "test-file.ly")
-   (org-babel-lilypond-compile-lilyfile "test-file.ly" t
+  (cl-letf (((symbol-function 'call-process) 'list)
+(org-babel-lilypond-gen-png nil)
+(org-babel-lilypond-gen-html nil)
+(org-babel-lilypond-use-eps nil)
+(org-babel-lilypond-gen-svg nil))
+(should (equal
+ `(,org-babel-lilypo

[nongnu] elpa/hyperdrive 9e27c5c43a: Comment: Add TODO

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 9e27c5c43a205325fbe006eee4d993a5e3d0dbf9
Author: Joseph Turner 
Commit: Joseph Turner 

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

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index a6c6519063..0070dd0d73 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -718,6 +718,11 @@ requests return, call THEN with no arguments."
   :else (lambda (err)
   (pcase (plz-response-status 
(plz-error-response err))
 ;; FIXME: If plz-error is a curl-error, 
this block will fail.
+;; TODO: How to handle entries which have 
never been known
+;; existent. From a UI perspective, the 
history buffer
+;; should display the versions at which 
the entry is known
+;; non-existent. However, we don't want to 
store loads of
+;; non-existent entries in 
`hyperdrive-version-ranges'.
 (404 nil)
 (_ (signal (car err) (cdr err
   err)



[nongnu] elpa/magit updated (27099441a0 -> ee0b557a94)

2023-09-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit.

  from  27099441a0 Offer textual range at point as next history element
  adds  ee0b557a94 Remove text properties when copying from magit buffers

No new revisions were added by this update.

Summary of changes:
 lisp/magit-section.el | 8 
 1 file changed, 8 insertions(+)



[nongnu] elpa/git-commit ee0b557a94: Remove text properties when copying from magit buffers

2023-09-06 Thread ELPA Syncer
branch: elpa/git-commit
commit ee0b557a94876cf89f9b8116ab9e9012c5d1404a
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Remove text properties when copying from magit buffers

If there is yanked text with the `magit-section' property at point,
many magit commands would believe that there indeed is a section at
point.  This may or may not result in an error, and if not, then the
resulting behavior can be very confusing.

It might have been nice to preserve the `face' property, and maybe
some others, but `remove-list-of-text-properties' does not support
prefixing LIST-OF-PROPERTIES with `not' to remove all but the named
properties.
---
 lisp/magit-section.el | 8 
 1 file changed, 8 insertions(+)

diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index e75e64eb8d..03883475bb 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -424,6 +424,8 @@ Magit-Section is documented in info node `(magit-section)'."
   #'magit-section--highlight-region)
   (setq-local redisplay-unhighlight-region-function
   #'magit-section--unhighlight-region)
+  (add-function :filter-return (local 'filter-buffer-substring-function)
+#'magit-section--remove-text-properties)
   (when (fboundp 'magit-section-context-menu)
 (add-hook 'context-menu-functions #'magit-section-context-menu 10 t))
   (when magit-section-disable-line-numbers
@@ -439,6 +441,12 @@ Magit-Section is documented in info node 
`(magit-section)'."
   (when (fboundp 'magit-preserve-section-visibility-cache)
 (add-hook 'kill-buffer-hook #'magit-preserve-section-visibility-cache)))
 
+(defun magit-section--remove-text-properties (string)
+  "Remove all text-properties from STRING.
+Most importantly `magit-section'."
+  (set-text-properties 0 (length string) nil string)
+  string)
+
 ;;; Core
 
 (defvar-local magit-root-section nil



[nongnu] elpa/magit-section updated (27099441a0 -> ee0b557a94)

2023-09-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit-section.

  from  27099441a0 Offer textual range at point as next history element
  adds  ee0b557a94 Remove text properties when copying from magit buffers

No new revisions were added by this update.

Summary of changes:
 lisp/magit-section.el | 8 
 1 file changed, 8 insertions(+)



[elpa] externals/exwm d340a6a563 08/14: Merge branch 'jollm.github.com/ignore-struts-top-bottom' into externals/exwm

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit d340a6a563ed3e3358c938c8e9a8cab41e8747f3
Merge: b100eb74c5 23f1ca740d
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Merge branch 'jollm.github.com/ignore-struts-top-bottom' into externals/exwm
---
 exwm-floating.el   |  10 +--
 exwm-manage.el |  10 +--
 exwm-systemtray.el |  25 
 exwm-workspace.el  | 181 -
 4 files changed, 113 insertions(+), 113 deletions(-)

diff --git a/exwm-floating.el b/exwm-floating.el
index 69e86a24e8..c8e433e272 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -118,13 +118,13 @@ context of the corresponding buffer."
 (defvar exwm-workspace--current)
 (defvar exwm-workspace--frame-y-offset)
 (defvar exwm-workspace--window-y-offset)
-(defvar exwm-workspace--workareas)
 (declare-function exwm-layout--hide "exwm-layout.el" (id))
 (declare-function exwm-layout--iconic-state-p "exwm-layout.el" (&optional id))
 (declare-function exwm-layout--refresh "exwm-layout.el" ())
 (declare-function exwm-layout--show "exwm-layout.el" (id &optional window))
 (declare-function exwm-workspace--position "exwm-workspace.el" (frame))
 (declare-function exwm-workspace--update-offsets "exwm-workspace.el" ())
+(declare-function exwm-workspace--workarea "exwm-workspace.el" (frame))
 
 (defun exwm-floating--set-allowed-actions (id tilling)
   "Set _NET_WM_ALLOWED_ACTIONS."
@@ -186,12 +186,8 @@ context of the corresponding buffer."
 (set-frame-parameter frame 'exwm-container frame-container)
 ;; Fix illegal parameters
 ;; FIXME: check normal hints restrictions
-(let* ((workarea (elt exwm-workspace--workareas
-  (exwm-workspace--position original-frame)))
-   (x* (aref workarea 0))
-   (y* (aref workarea 1))
-   (width* (aref workarea 2))
-   (height* (aref workarea 3)))
+(with-slots ((x* x) (y* y) (width* width) (height* height))
+(exwm-workspace--workarea original-frame)
   ;; Center floating windows
   (when (and (or (= x 0) (= x x*))
  (or (= y 0) (= y y*)))
diff --git a/exwm-manage.el b/exwm-manage.el
index 1adf66d421..a94caeeab9 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -157,7 +157,6 @@ want to match against EXWM internal variables such as 
`exwm-title',
 (defvar exwm-workspace--id-struts-alist)
 (defvar exwm-workspace--list)
 (defvar exwm-workspace--switch-history-outdated)
-(defvar exwm-workspace--workareas)
 (defvar exwm-workspace-current-index)
 (declare-function exwm--update-class "exwm.el" (id &optional force))
 (declare-function exwm--update-hints "exwm.el" (id &optional force))
@@ -178,6 +177,7 @@ want to match against EXWM internal variables such as 
`exwm-title',
 (declare-function exwm-workspace--set-fullscreen "exwm-workspace.el" (frame))
 (declare-function exwm-workspace--update-struts "exwm-workspace.el" ())
 (declare-function exwm-workspace--update-workareas "exwm-workspace.el" ())
+(declare-function exwm-workspace--workarea "exwm-workspace.el" (frame))
 
 (defun exwm-manage--update-geometry (id &optional force)
   "Update window geometry."
@@ -326,12 +326,8 @@ want to match against EXWM internal variables such as 
`exwm-title',
 (with-slots (x y width height) exwm--geometry
   ;; Center window of type _NET_WM_WINDOW_TYPE_SPLASH
   (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_SPLASH exwm-window-type)
-(let* ((workarea (elt exwm-workspace--workareas
-  (exwm-workspace--position exwm--frame)))
-   (x* (aref workarea 0))
-   (y* (aref workarea 1))
-   (width* (aref workarea 2))
-   (height* (aref workarea 3)))
+(with-slots ((x* x) (y* y) (width* width) (height* height))
+(exwm-workspace--workarea exwm--frame)
   (exwm--set-geometry id
   (+ x* (/ (- width* width) 2))
   (+ y* (/ (- height* height) 2))
diff --git a/exwm-systemtray.el b/exwm-systemtray.el
index 51d5213df9..3fcbb8a214 100644
--- a/exwm-systemtray.el
+++ b/exwm-systemtray.el
@@ -38,6 +38,8 @@
 (require 'exwm-core)
 (require 'exwm-workspace)
 
+(declare-function exwm-workspace--workarea "exwm-workspace.el" (frame))
+
 (defclass exwm-systemtray--icon ()
   ((width :initarg :width)
(height :initarg :height)
@@ -240,14 +242,13 @@ using 32-bit depth.  Using `workspace-background' 
instead.")
 (setq x (+ x (slot-value (cdr pair) 'width)
exwm-systemtray-icon-gap))
 (setq map t)))
-(let ((workarea (elt exwm-workspace--workareas
- exwm-workspace-current-index)))
+(let ((workarea (exwm-workspace--workarea exwm-workspace-current-index)))
   (xcb:+request exwm-systemtray--connection
   (make-instance 'xcb:ConfigureWindow
  :window exwm-systemtray--embedder-window
 

[elpa] externals/exwm c7d1fd45bc 12/14: Fix layout being refreshed too often on minibuffer setup

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit c7d1fd45bcf586e4b62daa94662dfe529cb04ac9
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Fix layout being refreshed too often on minibuffer setup

The guard clause was refacored incorrectly, leading to it having
no effect on the intended forms.

* exwm-layout.el (exwm-layout--on-minibuffer-setup): Guard
`exwm-layout--refresh' again.
---
 exwm-layout.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/exwm-layout.el b/exwm-layout.el
index 56668186ef..d785a71f5e 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -408,8 +408,8 @@ selected by `other-buffer'."
  (frame (window-frame mini-window)))
 (when (exwm-workspace--workspace-p frame)
   (exwm--defer 0 (lambda ()
-   (when (< 1 (window-height mini-window)))
-   (exwm-layout--refresh frame))
+   (when (< 1 (window-height mini-window))
+ (exwm-layout--refresh frame)))
 
 (defun exwm-layout--on-echo-area-change (&optional dirty)
   "Run when message arrives or in `echo-area-clear-hook' to refresh layout."



[elpa] externals/exwm updated (a417f0d45e -> 381637aa1c)

2023-09-06 Thread ELPA Syncer
elpasync pushed a change to branch externals/exwm.

  from  a417f0d45e Merge branch 'nbarrientos.github.com/post-command-hook' 
into externals/exwm
   new  cff02333e2 Don't assume that exwm--connection is non-nil
   new  7318f857f2 Observe connection status on deinitialization
   new  b100eb74c5 Merge branch 'nbarrientos.github.com/ib_exwm_conn_nil' 
into externals/exwm
   new  4970d6ad4e More selectively ignore top and bottom struts
   new  67c5b316be Convert `exwm-workspace--workareas' to a list of 
`xcb:RECTANGLE's
   new  937da86458 Convert `delta' to the size the strut occupies in the 
workarea
   new  23f1ca740d Selectively ignore left & right struts in horizontally 
aligned monitors
   new  d340a6a563 Merge branch 'jollm.github.com/ignore-struts-top-bottom' 
into externals/exwm
   new  d8fcf18db7 Declare defsubst indentation
   new  612e64bf9b Update copyright year to 2023
   new  fb73aaaf8f Convert `lsh' to `ash'
   new  c7d1fd45bc Fix layout being refreshed too often on minibuffer setup
   new  d3567a8c7f Fix bytecompiler warnings, improve docstrings
   new  381637aa1c Declare external function


Summary of changes:
 exwm-background.el |   8 +-
 exwm-cm.el |   2 +-
 exwm-config.el |   2 +-
 exwm-core.el   |  28 +++--
 exwm-floating.el   |  12 +-
 exwm-input.el  |  43 +++
 exwm-layout.el |  29 +++--
 exwm-manage.el |  65 +++
 exwm-randr.el  |   4 +-
 exwm-systemtray.el |  78 +++--
 exwm-workspace.el  | 330 +
 exwm-xim.el|  11 +-
 exwm.el| 113 +-
 13 files changed, 424 insertions(+), 301 deletions(-)



[elpa] externals/exwm 612e64bf9b 10/14: Update copyright year to 2023

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit 612e64bf9bcb45d832c60adc049523de80b0f934
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Update copyright year to 2023
---
 exwm-background.el | 2 +-
 exwm-cm.el | 2 +-
 exwm-config.el | 2 +-
 exwm-core.el   | 2 +-
 exwm-floating.el   | 2 +-
 exwm-input.el  | 2 +-
 exwm-layout.el | 2 +-
 exwm-manage.el | 2 +-
 exwm-randr.el  | 2 +-
 exwm-systemtray.el | 2 +-
 exwm-workspace.el  | 2 +-
 exwm-xim.el| 2 +-
 exwm.el| 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/exwm-background.el b/exwm-background.el
index f3e0d895c5..9c9bc5e352 100644
--- a/exwm-background.el
+++ b/exwm-background.el
@@ -1,6 +1,6 @@
 ;;; exwm-background.el --- X Background Module for EXWM  -*- lexical-binding: 
t -*-
 
-;; Copyright (C) 2022 Free Software Foundation, Inc.
+;; Copyright (C) 2022-2023 Free Software Foundation, Inc.
 
 ;; Author: Steven Allen 
 
diff --git a/exwm-cm.el b/exwm-cm.el
index 8a45010030..d2d04cbf92 100644
--- a/exwm-cm.el
+++ b/exwm-cm.el
@@ -1,6 +1,6 @@
 ;;; exwm-cm.el --- Compositing Manager for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2016-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-config.el b/exwm-config.el
index 9609f4cf3c..f3357807b5 100644
--- a/exwm-config.el
+++ b/exwm-config.el
@@ -1,6 +1,6 @@
 ;;; exwm-config.el --- Predefined configurations  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-core.el b/exwm-core.el
index bd6fcf822c..defe2f7523 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -1,6 +1,6 @@
 ;;; exwm-core.el --- Core definitions  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-floating.el b/exwm-floating.el
index c8e433e272..def7f43e53 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -1,6 +1,6 @@
 ;;; exwm-floating.el --- Floating Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-input.el b/exwm-input.el
index 7ec9a29128..c76f1c4aff 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -1,6 +1,6 @@
 ;;; exwm-input.el --- Input Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-layout.el b/exwm-layout.el
index ea186fe5a4..56668186ef 100644
--- a/exwm-layout.el
+++ b/exwm-layout.el
@@ -1,6 +1,6 @@
 ;;; exwm-layout.el --- Layout Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-manage.el b/exwm-manage.el
index a94caeeab9..a4d7dabd2b 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -1,7 +1,7 @@
 ;;; exwm-manage.el --- Window Management Module for  -*- lexical-binding: t -*-
 ;;;EXWM
 
-;; Copyright (C) 2015-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-randr.el b/exwm-randr.el
index 68bfdd70e9..e15d43f92b 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -1,6 +1,6 @@
 ;;; exwm-randr.el --- RandR Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2015-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-systemtray.el b/exwm-systemtray.el
index 3fcbb8a214..05fd3575aa 100644
--- a/exwm-systemtray.el
+++ b/exwm-systemtray.el
@@ -1,7 +1,7 @@
 ;;; exwm-systemtray.el --- System Tray Module for  -*- lexical-binding: t -*-
 ;;;EXWM
 
-;; Copyright (C) 2016-2022 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 1db91275fa..4d54f65e73 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -1,6 +1,6 @@
 ;;; exwm-workspace.el --- Workspace Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 1015-2021 Free Software Foundation, Inc.
+;; Copyright (C) 1015-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Feng 
 
diff --git a/exwm-xim.el b/exwm-xim.el
index ac530f3893..c03f476201 100644
--- a/exwm-xim.el
+++ b/exwm-xim.el
@@ -1,6 +1,6 @@
 ;;; exwm-xim.el --- XIM Module for EXWM  -*- lexical-binding: t -*-
 
-;; Copyright (C) 2019-2021 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2023 Free Software Foundation, Inc.
 
 ;; Author: Chris Fen

[elpa] externals/exwm 67c5b316be 05/14: Convert `exwm-workspace--workareas' to a list of `xcb:RECTANGLE's

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit 67c5b316be03eb639bd0cda838579af27bb577b4
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Convert `exwm-workspace--workareas' to a list of `xcb:RECTANGLE's

* exwm-workspace.el (exwm-workspace--set-fullscreen)
(exwm-workspace--resize-minibuffer-frame)
(exwm-workspace--on-ConfigureNotify):
* exwm-floating.el (exwm-floating--set-floating):
* exwm-manage.el (exwm-manage--manage-window):
* exwm-systemtray.el (exwm-systemtray--refresh)
(exwm-systemtray--on-workspace-switch)
(exwm-systemtray--refresh-all, exwm-systemtray--init):
Adjust to `xcb:RECTANGLE'
workarea.
---
 exwm-floating.el   |  10 +--
 exwm-manage.el |  10 +--
 exwm-systemtray.el |  25 +++
 exwm-workspace.el  | 187 +++--
 4 files changed, 114 insertions(+), 118 deletions(-)

diff --git a/exwm-floating.el b/exwm-floating.el
index 69e86a24e8..c8e433e272 100644
--- a/exwm-floating.el
+++ b/exwm-floating.el
@@ -118,13 +118,13 @@ context of the corresponding buffer."
 (defvar exwm-workspace--current)
 (defvar exwm-workspace--frame-y-offset)
 (defvar exwm-workspace--window-y-offset)
-(defvar exwm-workspace--workareas)
 (declare-function exwm-layout--hide "exwm-layout.el" (id))
 (declare-function exwm-layout--iconic-state-p "exwm-layout.el" (&optional id))
 (declare-function exwm-layout--refresh "exwm-layout.el" ())
 (declare-function exwm-layout--show "exwm-layout.el" (id &optional window))
 (declare-function exwm-workspace--position "exwm-workspace.el" (frame))
 (declare-function exwm-workspace--update-offsets "exwm-workspace.el" ())
+(declare-function exwm-workspace--workarea "exwm-workspace.el" (frame))
 
 (defun exwm-floating--set-allowed-actions (id tilling)
   "Set _NET_WM_ALLOWED_ACTIONS."
@@ -186,12 +186,8 @@ context of the corresponding buffer."
 (set-frame-parameter frame 'exwm-container frame-container)
 ;; Fix illegal parameters
 ;; FIXME: check normal hints restrictions
-(let* ((workarea (elt exwm-workspace--workareas
-  (exwm-workspace--position original-frame)))
-   (x* (aref workarea 0))
-   (y* (aref workarea 1))
-   (width* (aref workarea 2))
-   (height* (aref workarea 3)))
+(with-slots ((x* x) (y* y) (width* width) (height* height))
+(exwm-workspace--workarea original-frame)
   ;; Center floating windows
   (when (and (or (= x 0) (= x x*))
  (or (= y 0) (= y y*)))
diff --git a/exwm-manage.el b/exwm-manage.el
index c3d47f7225..36da1932c5 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -157,7 +157,6 @@ want to match against EXWM internal variables such as 
`exwm-title',
 (defvar exwm-workspace--id-struts-alist)
 (defvar exwm-workspace--list)
 (defvar exwm-workspace--switch-history-outdated)
-(defvar exwm-workspace--workareas)
 (defvar exwm-workspace-current-index)
 (declare-function exwm--update-class "exwm.el" (id &optional force))
 (declare-function exwm--update-hints "exwm.el" (id &optional force))
@@ -178,6 +177,7 @@ want to match against EXWM internal variables such as 
`exwm-title',
 (declare-function exwm-workspace--set-fullscreen "exwm-workspace.el" (frame))
 (declare-function exwm-workspace--update-struts "exwm-workspace.el" ())
 (declare-function exwm-workspace--update-workareas "exwm-workspace.el" ())
+(declare-function exwm-workspace--workarea "exwm-workspace.el" (frame))
 
 (defun exwm-manage--update-geometry (id &optional force)
   "Update window geometry."
@@ -326,12 +326,8 @@ want to match against EXWM internal variables such as 
`exwm-title',
 (with-slots (x y width height) exwm--geometry
   ;; Center window of type _NET_WM_WINDOW_TYPE_SPLASH
   (when (memq xcb:Atom:_NET_WM_WINDOW_TYPE_SPLASH exwm-window-type)
-(let* ((workarea (elt exwm-workspace--workareas
-  (exwm-workspace--position exwm--frame)))
-   (x* (aref workarea 0))
-   (y* (aref workarea 1))
-   (width* (aref workarea 2))
-   (height* (aref workarea 3)))
+(with-slots ((x* x) (y* y) (width* width) (height* height))
+(exwm-workspace--workarea exwm--frame)
   (exwm--set-geometry id
   (+ x* (/ (- width* width) 2))
   (+ y* (/ (- height* height) 2))
diff --git a/exwm-systemtray.el b/exwm-systemtray.el
index 0f19986624..acefd09d23 100644
--- a/exwm-systemtray.el
+++ b/exwm-systemtray.el
@@ -38,6 +38,8 @@
 (require 'exwm-core)
 (require 'exwm-workspace)
 
+(declare-function exwm-workspace--workarea "exwm-workspace.el" (frame))
+
 (defclass exwm-systemtray--icon ()
   ((width :initarg :width)
(height :initarg :height)
@@ -240,14 +242,13 @@ using 32-bit depth.  Using `workspace-background' 
instead.")
 (setq x (+ x (slot-value (cdr pair) 'width)
exwm

[elpa] externals/exwm 23f1ca740d 07/14: Selectively ignore left & right struts in horizontally aligned monitors

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit 23f1ca740d61d435a3bceadddecad8422a05d3fa
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Selectively ignore left & right struts in horizontally aligned monitors

* exwm-workspace.el (exwm-workspace--update-workareas): Simplify
cross-monitor strut conditionals and apply them to horizontally
aligned monitors.
---
 exwm-workspace.el | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/exwm-workspace.el b/exwm-workspace.el
index 490d83acc5..626d29249e 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -370,6 +370,7 @@ FRAME may be either a workspace frame or a workspace 
position."
   (`left
(setq delta (- size x))
(when (and (< 0 delta)
+  (< delta width)
   (or (not position)
   (< (max beg y)
  (min end (+ y height)
@@ -378,6 +379,7 @@ FRAME may be either a workspace frame or a workspace 
position."
   (`right
(setq delta (- size (- root-width x width)))
(when (and (< 0 delta)
+  (< delta width)
   (or (not position)
   (< (max beg y)
  (min end (+ y height)
@@ -385,22 +387,19 @@ FRAME may be either a workspace frame or a workspace 
position."
   (`top
(setq delta (- size y))
(when (and (< 0 delta)
+  (< delta height)
   (or (not position)
   (< (max beg x)
- (min end (+ x width
-  (< size (+ y height))
-  (> size y))
+ (min end (+ x width)
  (cl-decf height delta)
  (setf y size)))
   (`bottom
(setq delta (- size (- root-height y height)))
(when (and (< 0 delta)
+  (< delta height)
   (or (not position)
   (< (max beg x)
- (min end (+ x width
-  (< (- root-height size)
- (+ y height))
-  (> (- root-height size) y))
+ (min end (+ x width)
  (cl-decf height delta
 ;; Save the result.
 (setq exwm-workspace--workareas workareas)



[elpa] externals/exwm b100eb74c5 04/14: Merge branch 'nbarrientos.github.com/ib_exwm_conn_nil' into externals/exwm

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit b100eb74c520e5db1e27db475af8464a236efecb
Merge: a417f0d45e 7318f857f2
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Merge branch 'nbarrientos.github.com/ib_exwm_conn_nil' into externals/exwm
---
 exwm-background.el |  6 ++--
 exwm-input.el  | 13 +
 exwm-manage.el |  9 --
 exwm-systemtray.el | 27 +-
 exwm-workspace.el  | 81 +-
 exwm-xim.el|  6 ++--
 exwm.el| 10 +++
 7 files changed, 83 insertions(+), 69 deletions(-)

diff --git a/exwm-background.el b/exwm-background.el
index e7a0360c97..f3e0d895c5 100644
--- a/exwm-background.el
+++ b/exwm-background.el
@@ -172,19 +172,17 @@ replace it.")
 (defun exwm-background--init ()
   "Initialize background module."
   (exwm--log)
-
   (add-hook 'enable-theme-functions 'exwm-background--update)
   (add-hook 'disable-theme-functions 'exwm-background--update)
-
   (exwm-background--update))
 
 (defun exwm-background--exit ()
   "Uninitialize the background module."
   (exwm--log)
-
   (remove-hook 'enable-theme-functions 'exwm-background--update)
   (remove-hook 'disable-theme-functions 'exwm-background--update)
-  (when exwm-background--connection
+  (when (and exwm-background--connection
+ (slot-value exwm-background--connection 'connected))
 (xcb:disconnect exwm-background--connection))
   (setq exwm-background--pixmap nil
 exwm-background--connection nil
diff --git a/exwm-input.el b/exwm-input.el
index ab22d60a38..30ae89353e 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -1218,12 +1218,13 @@ One use is to access the keymap bound to KEYS (as 
prefix keys) in char-mode."
   (when exwm-input--update-focus-timer
 (cancel-timer exwm-input--update-focus-timer))
   ;; Make input focus working even without a WM.
-  (xcb:+request exwm--connection
-  (make-instance 'xcb:SetInputFocus
- :revert-to xcb:InputFocus:PointerRoot
- :focus exwm--root
- :time xcb:Time:CurrentTime))
-  (xcb:flush exwm--connection))
+  (when (slot-value exwm--connection 'connected)
+(xcb:+request exwm--connection
+(make-instance 'xcb:SetInputFocus
+   :revert-to xcb:InputFocus:PointerRoot
+   :focus exwm--root
+   :time xcb:Time:CurrentTime))
+(xcb:flush exwm--connection)))
 
 
 
diff --git a/exwm-manage.el b/exwm-manage.el
index c3d47f7225..1adf66d421 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -430,7 +430,9 @@ manager is shutting down."
   (exwm-workspace--update-workareas)
   (dolist (f exwm-workspace--list)
 (exwm-workspace--set-fullscreen f)))
-(when (buffer-live-p buffer)
+(when (and (buffer-live-p buffer)
+   ;; Invoked from `exwm-manage--exit' upon disconnection.
+   (slot-value exwm--connection 'connected))
   (with-current-buffer buffer
 ;; Unmap the X window.
 (xcb:+request exwm--connection
@@ -512,8 +514,11 @@ manager is shutting down."
 
 (defun exwm-manage--kill-buffer-query-function ()
   "Run in `kill-buffer-query-functions'."
-  (exwm--log "id=#x%x; buffer=%s" exwm--id (current-buffer))
+  (exwm--log "id=#x%x; buffer=%s" (or exwm--id 0) (current-buffer))
   (catch 'return
+(when (or (not exwm--connection)
+  (not (slot-value exwm--connection 'connected)))
+  (throw 'return t))
 (when (or (not exwm--id)
   (xcb:+request-checked+request-check exwm--connection
   (make-instance 'xcb:ChangeWindowAttributes
diff --git a/exwm-systemtray.el b/exwm-systemtray.el
index 0f19986624..51d5213df9 100644
--- a/exwm-systemtray.el
+++ b/exwm-systemtray.el
@@ -652,19 +652,20 @@ indicate how to support actual transparency."
   "Exit the systemtray module."
   (exwm--log)
   (when exwm-systemtray--connection
-;; Hide & reparent out the embedder before disconnection to prevent
-;; embedded icons from being reparented to an Emacs frame (which is the
-;; parent of the embedder).
-(xcb:+request exwm-systemtray--connection
-(make-instance 'xcb:UnmapWindow
-   :window exwm-systemtray--embedder-window))
-(xcb:+request exwm-systemtray--connection
-(make-instance 'xcb:ReparentWindow
-   :window exwm-systemtray--embedder-window
-   :parent exwm--root
-   :x 0
-   :y 0))
-(xcb:disconnect exwm-systemtray--connection)
+(when (slot-value exwm-systemtray--connection 'connected)
+  ;; Hide & reparent out the embedder before disconnection to prevent
+  ;; embedded icons from being reparented to an Emacs frame (which is the
+  ;; parent of the embedder).
+  (xcb:+request exwm-systemtray--connection
+  (make-instance 'xcb:UnmapWindow
+ :window exwm-systemtray--embedder-window))
+ 

[elpa] externals/exwm fb73aaaf8f 11/14: Convert `lsh' to `ash'

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit fb73aaaf8f67e601c41555262c46a29171ccbc6a
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Convert `lsh' to `ash'

The former is deprecated.  The behavioural difference between
those functions does not impact us here, because the numbers
returned by `x-color-values' are natural.

* exwm-core.el (exwm--color->pixel): Convert `lsh' to `ash'.
---
 exwm-core.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/exwm-core.el b/exwm-core.el
index defe2f7523..890963d17c 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -200,9 +200,9 @@ If FRAME is null, use selected frame."
   (when (and color
  (eq (x-display-visual-class) 'true-color))
 (let ((rgb (x-color-values color)))
-  (logior (lsh (lsh (pop rgb) -8) 16)
-  (lsh (lsh (pop rgb) -8) 8)
-  (lsh (pop rgb) -8)
+  (logior (ash (ash (pop rgb) -8) 16)
+  (ash (ash (pop rgb) -8) 8)
+  (ash (pop rgb) -8)
 
 (defun exwm--get-visual-depth-colormap (conn id)
   "Get visual, depth and colormap from X window ID.



[elpa] externals/exwm d3567a8c7f 13/14: Fix bytecompiler warnings, improve docstrings

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit d3567a8c7f41832617624feedc2c1c6477c4acb9
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Fix bytecompiler warnings, improve docstrings

* exwm-core.el:
* exwm-input.el:
* exwm-layout.el:
* exwm-manage.el:
* exwm-systemtray.el:
* exwm-workspace.el:
* exwm-xim.el: Improve docstrings.

* exwm-xim.el (cl-lib): Require `cl-lib' at runtime for
  `cl-position'.
* exwm-core.el (exwm-debug): Specify custom's group.
* exwm-systemtray.el (xcb:systemtray:-ClientMessage): Quote
  `:initform''s argument.
---
 exwm-core.el   | 17 +++---
 exwm-input.el  | 26 +++---
 exwm-layout.el | 23 -
 exwm-manage.el | 44 +++-
 exwm-systemtray.el | 24 -
 exwm-workspace.el  | 61 -
 exwm-xim.el|  3 +-
 exwm.el| 99 +-
 8 files changed, 198 insertions(+), 99 deletions(-)

diff --git a/exwm-core.el b/exwm-core.el
index 890963d17c..4df57e7381 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -93,10 +93,12 @@ Here are some predefined candidates:
   (frame-or-index &optional id))
 
 (define-minor-mode exwm-debug
-  "Debug-logging enabled if non-nil"
-  :global t)
+  "Debug-logging enabled if non-nil."
+  :global t
+  :group 'exwm-debug)
 
 (defmacro exwm--debug (&rest forms)
+  "Evaluate FORMS if mode `exwm-debug' is active."
   (when exwm-debug `(progn ,@forms)))
 
 (defmacro exwm--log (&optional format-string &rest objects)
@@ -161,7 +163,9 @@ Nil can be passed as placeholder."
  :x x :y y :width width :height height)))
 
 (defun exwm--intern-atom (atom &optional conn)
-  "Intern X11 ATOM."
+  "Intern X11 ATOM.
+If CONN is non-nil, use it instead of the value of the variable
+`exwm--connection'."
   (slot-value (xcb:+request-unchecked+reply (or conn exwm--connection)
   (make-instance 'xcb:InternAtom
  :only-if-exists 0
@@ -206,7 +210,10 @@ If FRAME is null, use selected frame."
 
 (defun exwm--get-visual-depth-colormap (conn id)
   "Get visual, depth and colormap from X window ID.
-Return a three element list with the respective results."
+Return a three element list with the respective results.
+
+If CONN is non-nil, use it instead of the value of the variable
+`exwm--connection'."
   (let (ret-visual ret-depth ret-colormap)
 (with-slots (visual colormap)
 (xcb:+request-unchecked+reply conn
@@ -238,7 +245,7 @@ One of `line-mode' or `char-mode'.")
 (defvar-local exwm--geometry nil)
 (defvar-local exwm-class-name nil "Class name in WM_CLASS.")
 (defvar-local exwm-instance-name nil "Instance name in WM_CLASS.")
-(defvar-local exwm-title nil "Window title (either _NET_WM_NAME or WM_NAME)")
+(defvar-local exwm-title nil "Window title (either _NET_WM_NAME or WM_NAME).")
 (defvar-local exwm--title-is-utf8 nil)
 (defvar-local exwm-transient-for nil "WM_TRANSIENT_FOR.")
 (defvar-local exwm--protocols nil)
diff --git a/exwm-input.el b/exwm-input.el
index c76f1c4aff..be3e8f465f 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -45,9 +45,9 @@
 
 (defcustom exwm-input-prefix-keys
   '(?\C-x ?\C-u ?\C-h ?\M-x ?\M-` ?\M-& ?\M-:)
-  "List of prefix keys EXWM should forward to Emacs when in line-mode.
+  "List of prefix keys EXWM should forward to Emacs when in `line-mode'.
 
-The point is to make keys like 'C-x C-f' forwarded to Emacs in line-mode.
+The point is to make keys like 'C-x C-f' forwarded to Emacs in `line-mode'.
 There is no need to add prefix keys for global/simulation keys or those
 defined in `exwm-mode-map' here."
   :type '(repeat key-sequence)
@@ -87,7 +87,7 @@ defined in `exwm-mode-map' here."
value
 
 (defcustom exwm-input-line-mode-passthrough nil
-  "Non-nil makes 'line-mode' forward all events to Emacs."
+  "Non-nil makes `line-mode' forward all events to Emacs."
   :type 'boolean)
 
 ;; Input focus update requests should be accumulated for a short time
@@ -115,13 +115,13 @@ defined in `exwm-mode-map' here."
 (defvar exwm-input--local-simulation-keys nil
   "Whether simulation keys are local.")
 
-(defvar exwm-input--simulation-keys nil "Simulation keys in line-mode.")
+(defvar exwm-input--simulation-keys nil "Simulation keys in `line-mode'.")
 
 (defvar exwm-input--skip-buffer-list-update nil
-  "Skip the upcoming 'buffer-list-update'.")
+  "Skip the upcoming `buffer-list-update'.")
 
 (defvar exwm-input--temp-line-mode nil
-  "Non-nil indicates it's in temporary line-mode for char-mode.")
+  "Non-nil indicates it's in temporary line-mode for `char-mode'.")
 
 (defvar exwm-input--timestamp-atom nil)
 
@@ -713,7 +713,7 @@ Current buffer must be an `exwm-mode' buffer."
   (xcb:flush exwm--connection
 
 (defun exwm-input--on-KeyPress-char-mode (key-press &optional _raw-data)
-  "Handle KeyPress event in char-mode."
+  "Handle KeyPres

[elpa] externals/exwm 7318f857f2 02/14: Observe connection status on deinitialization

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit 7318f857f2937c421094d66d976d4e926feacc71
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Observe connection status on deinitialization

* exwm-workspace.el (exwm-workspace--remove-frame-as-workspace):
Add optional argument quit.

* exwm-background.el (exwm-background--exit):
* exwm-input.el (exwm-input--exit):
* exwm-manage.el (exwm-manage--unmanage-window):
* exwm-systemtray.el (exwm-systemtray--exit):
* exwm-workspace.el (exwm-workspace--exit-minibuffer-frame)
(exwm-workspace--exit):
* exwm-xim.el (exwm-xim--exit): Observe connection status when
deinitializing in order to support deinitializing when the
connection breaks.
---
 exwm-background.el |  6 ++--
 exwm-input.el  |  2 +-
 exwm-manage.el |  9 --
 exwm-systemtray.el | 27 +-
 exwm-workspace.el  | 81 +-
 exwm-xim.el|  6 ++--
 exwm.el| 10 +++
 7 files changed, 77 insertions(+), 64 deletions(-)

diff --git a/exwm-background.el b/exwm-background.el
index e7a0360c97..f3e0d895c5 100644
--- a/exwm-background.el
+++ b/exwm-background.el
@@ -172,19 +172,17 @@ replace it.")
 (defun exwm-background--init ()
   "Initialize background module."
   (exwm--log)
-
   (add-hook 'enable-theme-functions 'exwm-background--update)
   (add-hook 'disable-theme-functions 'exwm-background--update)
-
   (exwm-background--update))
 
 (defun exwm-background--exit ()
   "Uninitialize the background module."
   (exwm--log)
-
   (remove-hook 'enable-theme-functions 'exwm-background--update)
   (remove-hook 'disable-theme-functions 'exwm-background--update)
-  (when exwm-background--connection
+  (when (and exwm-background--connection
+ (slot-value exwm-background--connection 'connected))
 (xcb:disconnect exwm-background--connection))
   (setq exwm-background--pixmap nil
 exwm-background--connection nil
diff --git a/exwm-input.el b/exwm-input.el
index 2c65116aa3..3f9a305012 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -1215,7 +1215,7 @@ One use is to access the keymap bound to KEYS (as prefix 
keys) in char-mode."
   (when exwm-input--update-focus-timer
 (cancel-timer exwm-input--update-focus-timer))
   ;; Make input focus working even without a WM.
-  (when exwm--connection
+  (when (slot-value exwm--connection 'connected)
 (xcb:+request exwm--connection
 (make-instance 'xcb:SetInputFocus
:revert-to xcb:InputFocus:PointerRoot
diff --git a/exwm-manage.el b/exwm-manage.el
index c3d47f7225..1adf66d421 100644
--- a/exwm-manage.el
+++ b/exwm-manage.el
@@ -430,7 +430,9 @@ manager is shutting down."
   (exwm-workspace--update-workareas)
   (dolist (f exwm-workspace--list)
 (exwm-workspace--set-fullscreen f)))
-(when (buffer-live-p buffer)
+(when (and (buffer-live-p buffer)
+   ;; Invoked from `exwm-manage--exit' upon disconnection.
+   (slot-value exwm--connection 'connected))
   (with-current-buffer buffer
 ;; Unmap the X window.
 (xcb:+request exwm--connection
@@ -512,8 +514,11 @@ manager is shutting down."
 
 (defun exwm-manage--kill-buffer-query-function ()
   "Run in `kill-buffer-query-functions'."
-  (exwm--log "id=#x%x; buffer=%s" exwm--id (current-buffer))
+  (exwm--log "id=#x%x; buffer=%s" (or exwm--id 0) (current-buffer))
   (catch 'return
+(when (or (not exwm--connection)
+  (not (slot-value exwm--connection 'connected)))
+  (throw 'return t))
 (when (or (not exwm--id)
   (xcb:+request-checked+request-check exwm--connection
   (make-instance 'xcb:ChangeWindowAttributes
diff --git a/exwm-systemtray.el b/exwm-systemtray.el
index 0f19986624..51d5213df9 100644
--- a/exwm-systemtray.el
+++ b/exwm-systemtray.el
@@ -652,19 +652,20 @@ indicate how to support actual transparency."
   "Exit the systemtray module."
   (exwm--log)
   (when exwm-systemtray--connection
-;; Hide & reparent out the embedder before disconnection to prevent
-;; embedded icons from being reparented to an Emacs frame (which is the
-;; parent of the embedder).
-(xcb:+request exwm-systemtray--connection
-(make-instance 'xcb:UnmapWindow
-   :window exwm-systemtray--embedder-window))
-(xcb:+request exwm-systemtray--connection
-(make-instance 'xcb:ReparentWindow
-   :window exwm-systemtray--embedder-window
-   :parent exwm--root
-   :x 0
-   :y 0))
-(xcb:disconnect exwm-systemtray--connection)
+(when (slot-value exwm-systemtray--connection 'connected)
+  ;; Hide & reparent out the embedder before disconnection to prevent
+  ;; embedded icons from being reparented to an Emacs frame (which is the
+  ;; parent of the embedder).
+  (xcb:+request exwm-systemtray--connection
+  

[elpa] externals/exwm cff02333e2 01/14: Don't assume that exwm--connection is non-nil

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit cff02333e282c692aa685d57cc2b7c32419fffe2
Author: Nacho Barrientos 
Commit: Adrián Medraño Calvo 

Don't assume that exwm--connection is non-nil

`exwm-input--exit` could be called (via `exwm-exit`) from `exwm-init`
in case of error when initialising EXWM. It could happen that the bit
that failed when exwm-init is executed was the call to `xcb:connect`,
hence `exwm--connection` would be nil when errors are handled (and
`exwm-exit` is called).

Without this patch, in the case above, the user will see a crash as
there's no method allowing a nil XCB connection object:

  Debugger entered--Lisp error:
  (cl-no-applicable-method xcb:-+request nil #

[elpa] externals/exwm 937da86458 06/14: Convert `delta' to the size the strut occupies in the workarea

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit 937da8645820ca5abee032c523cc2c72c6ce35e2
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Convert `delta' to the size the strut occupies in the workarea

* exwm-workspace.el (exwm-workspace--update-workareas): Repurpose
`delta' to be the positive size occupied by the strut in the
workarea.
---
 exwm-workspace.el | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/exwm-workspace.el b/exwm-workspace.el
index 1bdc7245aa..490d83acc5 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -368,40 +368,40 @@ FRAME may be either a workspace frame or a workspace 
position."
 (pcase edge
   ;; Left and top are always processed first.
   (`left
-   (setq delta (- x size))
-   (when (and (< delta 0)
+   (setq delta (- size x))
+   (when (and (< 0 delta)
   (or (not position)
   (< (max beg y)
  (min end (+ y height)
- (cl-incf width delta)
+ (cl-decf width delta)
  (setf x size)))
   (`right
-   (setq delta (- root-width x width size))
-   (when (and (< delta 0)
+   (setq delta (- size (- root-width x width)))
+   (when (and (< 0 delta)
   (or (not position)
   (< (max beg y)
  (min end (+ y height)
- (cl-incf width delta)))
+ (cl-decf width delta)))
   (`top
-   (setq delta (- y size))
-   (when (and (< delta 0)
+   (setq delta (- size y))
+   (when (and (< 0 delta)
   (or (not position)
   (< (max beg x)
  (min end (+ x width
   (< size (+ y height))
   (> size y))
- (cl-incf height delta)
+ (cl-decf height delta)
  (setf y size)))
   (`bottom
-   (setq delta (- root-height y height size))
-   (when (and (< delta 0)
+   (setq delta (- size (- root-height y height)))
+   (when (and (< 0 delta)
   (or (not position)
   (< (max beg x)
  (min end (+ x width
   (< (- root-height size)
  (+ y height))
   (> (- root-height size) y))
- (cl-incf height delta
+ (cl-decf height delta
 ;; Save the result.
 (setq exwm-workspace--workareas workareas)
 (xcb:flush exwm--connection))



[elpa] externals/exwm d8fcf18db7 09/14: Declare defsubst indentation

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit d8fcf18db77b845e1d787558f00aa21dc93310f3
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Declare defsubst indentation

* exwm-core.el (exwm--id->buffer, exwm--buffer->id, exwm--terminal-p):
* exwm-input.el (exwm-input--unread-event):
* exwm-workspace.el (exwm-workspace--position)
(exwm-workspace--workspace-p): Declare indentation.
---
 exwm-core.el  | 3 +++
 exwm-input.el | 2 ++
 exwm-workspace.el | 5 +++--
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/exwm-core.el b/exwm-core.el
index 75c7c1b17b..bd6fcf822c 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -116,10 +116,12 @@ FORMAT-STRING is a string specifying the message to 
output, as in
 
 (defsubst exwm--id->buffer (id)
   "X window ID => Emacs buffer."
+  (declare (indent defun))
   (cdr (assoc id exwm--id-buffer-alist)))
 
 (defsubst exwm--buffer->id (buffer)
   "Emacs buffer BUFFER => X window ID."
+  (declare (indent defun))
   (car (rassoc buffer exwm--id-buffer-alist)))
 
 (defun exwm--lock (&rest _args)
@@ -183,6 +185,7 @@ least SECS seconds later."
 (defsubst exwm--terminal-p (&optional frame)
   "Return t when FRAME's terminal is EXWM's terminal.
 If FRAME is null, use selected frame."
+  (declare (indent defun))
   (eq exwm--terminal (frame-terminal frame)))
 
 (defun exwm--get-client-event-mask ()
diff --git a/exwm-input.el b/exwm-input.el
index 30ae89353e..7ec9a29128 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -587,9 +587,11 @@ instead."
   (and (= emacs-major-version 26)
(< emacs-minor-version 2)))
   (defsubst exwm-input--unread-event (event)
+(declare (indent defun))
 (setq unread-command-events
   (append unread-command-events (list event
 (defsubst exwm-input--unread-event (event)
+  (declare (indent defun))
   (setq unread-command-events
 (append unread-command-events `((t . ,event)))
 
diff --git a/exwm-workspace.el b/exwm-workspace.el
index dd1f22a9a2..1db91275fa 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -150,8 +150,8 @@ Please manually run the hook 
`exwm-workspace-list-change-hook' afterwards.")
 
 (defsubst exwm-workspace--position (frame)
   "Retrieve index of given FRAME in workspace list.
-
-NIL if FRAME is not a workspace"
+NIL if FRAME is not a workspace."
+  (declare (indent defun))
   (cl-position frame exwm-workspace--list))
 
 (defsubst exwm-workspace--count ()
@@ -160,6 +160,7 @@ NIL if FRAME is not a workspace"
 
 (defsubst exwm-workspace--workspace-p (frame)
   "Return t if FRAME is a workspace."
+  (declare (indent defun))
   (memq frame exwm-workspace--list))
 
 (defsubst exwm-workspace--workarea (frame)



[elpa] externals/exwm 381637aa1c 14/14: Declare external function

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit 381637aa1c7b82671fab4cfdadebee590f7c1c45
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Declare external function

* exwm.el:
* exwm-randr.el: Declare `x-get-atom-name' function.
---
 exwm-randr.el | 2 ++
 exwm.el   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/exwm-randr.el b/exwm-randr.el
index e15d43f92b..8d1824babb 100644
--- a/exwm-randr.el
+++ b/exwm-randr.el
@@ -52,6 +52,8 @@
 (require 'exwm-core)
 (require 'exwm-workspace)
 
+(declare-function x-get-atom-name "C source code" (VALUE &optional FRAME))
+
 (defgroup exwm-randr nil
   "RandR."
   :version "25.3"
diff --git a/exwm.el b/exwm.el
index 369d9c8e58..4d6b451155 100644
--- a/exwm.el
+++ b/exwm.el
@@ -72,6 +72,8 @@
 (require 'exwm-manage)
 (require 'exwm-input)
 
+(declare-function x-get-atom-name "C source code" (VALUE &optional FRAME))
+
 (defgroup exwm nil
   "Emacs X Window Manager."
   :tag "EXWM"



[elpa] externals/exwm 4970d6ad4e 03/14: More selectively ignore top and bottom struts

2023-09-06 Thread ELPA Syncer
branch: externals/exwm
commit 4970d6ad4ef7c9cff92cbfb90a9ec379a61cd5e7
Author: Fran Ley 
Commit: Adrián Medraño Calvo 

More selectively ignore top and bottom struts

For the case of vertical columns of workareas, top and bottom struts
should only apply to workareas containing the respective edge of the
strut offset.

To simplify, imagine three monitors arranged vertically and one
workarea per display:

  +---+
  |   1   | 2000x1000 px
  +---+
  |   2   | 2000x1000 px
  +---+
  |   3   | 2000x1000 px
  +---+

In sexp form: ((0 0 2000 1000) (0 1000 2000 1000) (0 2000 2000 1000))
where each element represents a workarea as x, y, width, height

And example struts of the form (offset-type offset (x-start x-end))
a.) (top 42 (0 2000))
b.) (top 1042 (0 2000))
c.) (top 2042 (0 2000))
d.) (bottom 42 (0 2000))
e.) (bottom 1042 (0 2000))
f.) (bottom 2042 (0 2000))

Workareas adjusted for struts before this change:
a.) ((0 42 2000 958) (0 1000 2000 1000) (0 2000 2000 1000))
b.) ((0 1042 2000 -42) (0 1042 2000 958) (0 2000 2000 1000))
c.) ((0 2042 2000 -1042) (0 2042 2000 -42) (0 2042 2000 958))
d.) ((0 0 2000 1000) (0 1000 2000 1000) (0 2000 2000 902))
e.) ((0 0 2000 1000) (0 1000 2000 902) (0 2000 2000 -98))
f.) ((0 0 2000 902) (0 1000 2000 -98) (0 2000 2000 -1098))

Note that a. and d. are sensible, while b., c., e., and f. are quite
user unfriendly.

After this change, the same adjusted workareas are:
a.) no change
b.) ((0 0 2000 1000) (0 1042 2000 958) (0 2000 2000 1000))
c.) ((0 0 2000 1000) (0 1000 2000 1000) (0 2042 2000 958))
d.) no change
e.) ((0 0 2000 1000) (0 1000 2000 902) (0 2000 2000 1000))
f.) ((0 0 2000 902) (0 1000 2000 1000) (0 2000 2000 1000))

The intent is to allow dock type windows such as typical status bars
to occupy space in a workarea on any of a set of vertically arranged
displays without occluding the other workareas due to the limitations
of the X spec regarding strut offsets.

Note that this behaviour conflicts with EWMH 1.3:

> Struts MUST be specified in root window coordinates, that is,
they are *not* relative to the edges of any view port or Xinerama
monitor.

but is accepted by multiple WMs.  See:

- 
https://blog.martin-graesslin.com/blog/2016/08/panels-on-shared-screen-edges/
- https://mail.gnome.org/archives/wm-spec-list/2009-November/msg5.html
- https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/22

* exwm-workspace.el (exwm-workspace--update-workareas): Assume
vertical struts apply from the monitor boundary when they cross
them.

Copyright-paperwork-exempt: yes
---
 exwm-workspace.el | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/exwm-workspace.el b/exwm-workspace.el
index 06217a7769..1f60e80c63 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -377,7 +377,9 @@ NIL if FRAME is not a workspace"
   (or (not position)
   (< (max (aref position 0) (aref w 0))
  (min (aref position 1)
-  (+ (aref w 0) (aref w 2))
+  (+ (aref w 0) (aref w 2)
+  (< width (+ (aref w 1) (aref w 3)))
+  (> width (aref w 1)))
  (cl-incf (aref w 3) delta)
  (setf (aref w 1) width)))
   (`bottom
@@ -386,7 +388,10 @@ NIL if FRAME is not a workspace"
   (or (not position)
   (< (max (aref position 0) (aref w 0))
  (min (aref position 1)
-  (+ (aref w 0) (aref w 2))
+  (+ (aref w 0) (aref w 2)
+  (< (- root-height width)
+ (+ (aref w 1) (aref w 3)))
+  (> (- root-height width) (aref w 1)))
  (cl-incf (aref w 3) delta))
 ;; Save the result.
 (setq exwm-workspace--workareas workareas)



[nongnu] elpa/clojure-mode a6a688d7a4 3/3: Update changelog

2023-09-06 Thread ELPA Syncer
branch: elpa/clojure-mode
commit a6a688d7a4c3357798e26bd253119060e764fe4b
Author: p4v4n 
Commit: Bozhidar Batsov 

Update changelog
---
 CHANGELOG.md | 4 
 1 file changed, 4 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 50b7455c20..27aed4f369 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 ## master (unreleased)
 
+### Changes
+
+* Improve support for multiple forms in the same line by replacing 
`beginning-of-defun` fn.
+
 ## 5.16.2 (2023-08-23)
 
 ### Changes



[nongnu] elpa/clojure-mode 7e4aa06aa7 2/3: Add and modify tests for checking multiple forms on same line

2023-09-06 Thread ELPA Syncer
branch: elpa/clojure-mode
commit 7e4aa06aa74512d21e01c1540c83964b0aa6b9e7
Author: p4v4n 
Commit: Bozhidar Batsov 

Add and modify tests for checking multiple forms on same line
---
 test/clojure-mode-refactor-threading-test.el | 13 +++--
 test/clojure-mode-sexp-test.el   | 21 ++---
 2 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/test/clojure-mode-refactor-threading-test.el 
b/test/clojure-mode-refactor-threading-test.el
index 61ad59833a..efd7eb1a47 100644
--- a/test/clojure-mode-refactor-threading-test.el
+++ b/test/clojure-mode-refactor-threading-test.el
@@ -247,6 +247,16 @@
 
 (clojure-unwind '(4)))
 
+  (when-refactoring-it "should unwind correctly when multiple ->> are present 
on same line"
+"(->> 1 inc) (->> [1 2 3 4 5]
+ (filter even?)
+ (map square))"
+
+"(->> 1 inc) (->> (map square (filter even? [1 2 3 4 5])))"
+
+(clojure-unwind)
+(clojure-unwind))
+
   (when-refactoring-it "should unwind with function name"
 "(->> [1 2 3 4 5]
  sum
@@ -299,8 +309,7 @@
 
   (when-refactoring-it "should unwind some->>"
 "(some->> :b
- (find {:a 1})
- val
+ (find {:a 1}) val
  (+ 5))"
 
 "(some->> (+ 5 (val (find {:a 1} :b"
diff --git a/test/clojure-mode-sexp-test.el b/test/clojure-mode-sexp-test.el
index 1db0e708c3..aaeb798d43 100644
--- a/test/clojure-mode-sexp-test.el
+++ b/test/clojure-mode-sexp-test.el
@@ -31,30 +31,37 @@
(wrong))"
 ;; make this use the native beginning of defun since this is used to
 ;; determine whether to use the comment aware version or not.
+(expect (let ((beginning-of-defun-function nil))
+  (clojure-top-level-form-p "comment")
+  (it "should return true when multiple forms are present"
+(with-clojure-buffer-point
+"(+ 1 2) (comment
+   (wrong)
+   (rig|ht)
+   (wrong))"
 (expect (let ((beginning-of-defun-function nil))
   (clojure-top-level-form-p "comment"))
 
 (describe "clojure-beginning-of-defun-function"
   (it "should go to top level form"
 (with-clojure-buffer-point
-  "(comment
+  " (comment
   (wrong)
   (wrong)
   (rig|ht)
   (wrong))"
-  (beginning-of-defun)
+  (clojure-beginning-of-defun-function)
   (expect (looking-at-p "(comment"
 
   (it "should eval top level forms inside comment forms when 
clojure-toplevel-inside-comment-form set to true"
 (with-clojure-buffer-point
-  "(comment
-  (wrong)
+  "(+ inc 1) (comment
   (wrong)
-  (rig|ht)
+  (wrong) (rig|ht)
   (wrong))"
   (let ((clojure-toplevel-inside-comment-form t))
-   (beginning-of-defun))
-  (expect (looking-at-p "[[:space:]]*(right)"
+   (clojure-beginning-of-defun-function))
+  (expect (looking-at-p "(right)"
 
   (it "should go to beginning of previous top level form"
 (with-clojure-buffer-point



[nongnu] elpa/clojure-mode e18a1bf4b9 1/3: Replace beginning-of-defun fn

2023-09-06 Thread ELPA Syncer
branch: elpa/clojure-mode
commit e18a1bf4b931a31f857fd1a873264a04eb4b1a39
Author: p4v4n 
Commit: Bozhidar Batsov 

Replace beginning-of-defun fn
---
 clojure-mode.el | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/clojure-mode.el b/clojure-mode.el
index 8e7b362665..0d2b613e88 100644
--- a/clojure-mode.el
+++ b/clojure-mode.el
@@ -549,7 +549,7 @@ replacement for `cljr-expand-let`."
   ;; If we are now precisely at the beginning of a defun, make sure
   ;; beginning-of-defun finds that one rather than the previous one.
   (or (eobp) (forward-char 1))
-  (beginning-of-defun)
+  (beginning-of-defun-raw)
   ;; Make sure we are really inside the defun found, not after it.
   (when (and (looking-at "\\s(")
  (progn (end-of-defun)
@@ -1188,7 +1188,7 @@ Note that this means that there is no guarantee of proper 
font
 locking in def* forms that are not at top level."
   (goto-char point)
   (ignore-errors
-(beginning-of-defun))
+(beginning-of-defun-raw))
 
   (let ((beg-def (point)))
 (when (and (not (= point beg-def))
@@ -2217,7 +2217,7 @@ renaming a namespace."
 Returns a list pair, e.g. (\"defn\" \"abc\") or (\"deftest\" \"some-test\")."
   (save-excursion
 (unless (looking-at clojure-def-type-and-name-regex)
-  (beginning-of-defun))
+  (beginning-of-defun-raw))
 (when (search-forward-regexp clojure-def-type-and-name-regex nil t)
   (list (match-string-no-properties 1)
 (match-string-no-properties 2)
@@ -2274,7 +2274,7 @@ This will skip over sexps that don't represent objects, 
so that ^hints and
   "Return truthy if the first form matches FIRST-FORM."
   (condition-case nil
   (save-excursion
-(beginning-of-defun)
+(beginning-of-defun-raw)
 (forward-char 1)
 (clojure-forward-logical-sexp 1)
 (clojure-backward-logical-sexp 1)
@@ -2332,10 +2332,10 @@ many times."
 (save-match-data
   (let ((original-position (point))
 clojure-comment-end)
-(beginning-of-defun)
+(beginning-of-defun-raw)
 (end-of-defun)
 (setq clojure-comment-end (point))
-(beginning-of-defun)
+(beginning-of-defun-raw)
 (forward-char 1)  ;; skip paren so we start at 
comment
 (clojure-forward-logical-sexp) ;; skip past the comment form 
itself
 (if-let ((sexp-start (clojure-find-first (lambda (beg-pos)
@@ -2343,9 +2343,9 @@ many times."
  
(clojure-sexp-starts-until-position
   
clojure-comment-end
 (progn (goto-char sexp-start) t)
-  (beginning-of-defun n
-  (scan-error (beginning-of-defun n)))
-  (beginning-of-defun n
+  (beginning-of-defun-raw n
+  (scan-error (beginning-of-defun-raw n)))
+  (beginning-of-defun-raw n
 
 ;;
 ;;
@@ -2467,7 +2467,7 @@ With universal argument \\[universal-argument], fully 
unwind thread."
 (n) (1)))
   (save-excursion
 (let ((limit (save-excursion
-   (beginning-of-defun)
+   (beginning-of-defun-raw)
(point
   (ignore-errors
 (when (looking-at "(")
@@ -2997,7 +2997,7 @@ END marks the end of the fn expression"
 (goto-char beg))
   (if (or (looking-at-p "#(")
   (ignore-errors (forward-char 1))
-  (re-search-backward "#(" (save-excursion (beginning-of-defun) 
(point)) 'noerror))
+  (re-search-backward "#(" (save-excursion (beginning-of-defun-raw) 
(backward-char) (point)) 'noerror))
   (let* ((end (save-excursion (clojure-forward-logical-sexp) 
(point-marker)))
  (argspec (clojure--gather-fn-literal-args))
  (arity (car argspec))
@@ -3221,7 +3221,7 @@ With universal argument \\[universal-argument], act on 
the \"top-level\" form."
   "Toggle the #_ ignore reader form for the \"top-level\" form at point."
   (interactive)
   (save-excursion
-(beginning-of-defun)
+(beginning-of-defun-raw)
 (clojure--toggle-ignore-next-sexp)))
 
 



[nongnu] elpa/clojure-mode updated (81b67ecd3a -> a6a688d7a4)

2023-09-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/clojure-mode.

  from  81b67ecd3a Update clojure guides
   new  e18a1bf4b9 Replace beginning-of-defun fn
   new  7e4aa06aa7 Add and modify tests for checking multiple forms on same 
line
   new  a6a688d7a4 Update changelog


Summary of changes:
 CHANGELOG.md |  4 
 clojure-mode.el  | 24 
 test/clojure-mode-refactor-threading-test.el | 13 +++--
 test/clojure-mode-sexp-test.el   | 21 ++---
 4 files changed, 41 insertions(+), 21 deletions(-)



[nongnu] elpa/helm 6e74ef7e9b 3/3: Make code more readable with helm-aand

2023-09-06 Thread ELPA Syncer
branch: elpa/helm
commit 6e74ef7e9b9cbd7069de68dd71316dca31f09352
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Make code more readable with helm-aand
---
 helm-mode.el | 16 +---
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index a3677ea995..5ee84a36ed 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -2210,17 +2210,11 @@ When AFUN, AFIX are nil and CATEGORY is not file return 
COMPS unmodified."
  ;; completing against a quoted symbol.
  (mapcar (lambda (s)
(let ((ann (funcall afun s)))
- (if ann
- (cons
-  (concat
-   s
-   (propertize
-" " 'display
-(propertize
- ann
- 'face 'helm-completions-annotations)))
-  s)
-   s)))
+ (or (helm-aand
+  ann
+  (propertize ann 'face 'helm-completions-annotations)
+  (cons (concat s (propertize " " 'display it)) s))
+ s)))
  comps))
 (t comps)))
 



[nongnu] elpa/helm 581e5029c9 1/3: Avoid inheriting text props in spaces

2023-09-06 Thread ELPA Syncer
branch: elpa/helm
commit 581e5029c973c1e1d2cfa6206a2c6fbf8ec602f2
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Avoid inheriting text props in spaces
---
 helm-mode.el | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index b43ff41bef..fd289f0843 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1144,15 +1144,16 @@ is used."
  ;; existing function.
  (propertize comp 'face 'helm-completion-invalid))
;; Prefix.
-   (helm-aand (propertize
-   (cond ((and symbol-class group)
-  (concat "g" symbol-class))
- ((and (not (string= symbol-class ""))
-   symbol-class))
- (group "g")
- (t "i"))
-   'face 'completions-annotations)
-  (propertize " " 'display (format "%-4s" it)))
+   (helm-aand (cond ((and symbol-class group)
+ (concat "g" symbol-class))
+((and (not (string= symbol-class ""))
+  symbol-class))
+(group "g")
+(t "i"))
+  (propertize it 'face 'completions-annotations)
+  (propertize
+   ;; (format "%-4s" it) makes spaces inheriting text props.
+   " " 'display (concat it (make-string (- 4 (length it)) ? 

;; Suffix.
(if doc
(helm-aand (propertize doc 'face 'completions-annotations)



[nongnu] elpa/helm-core updated (74917bc84b -> 6e74ef7e9b)

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

  from  74917bc84b Avoid dependency on static-if by using eval-when-compile 
instead
  adds  581e5029c9 Avoid inheriting text props in spaces
  adds  d0e0999cdf Add new faces for completions-detailed
  adds  6e74ef7e9b Make code more readable with helm-aand

No new revisions were added by this update.

Summary of changes:
 helm-mode.el | 59 ---
 1 file changed, 32 insertions(+), 27 deletions(-)



[nongnu] elpa/helm d0e0999cdf 2/3: Add new faces for completions-detailed

2023-09-06 Thread ELPA Syncer
branch: elpa/helm
commit d0e0999cdf30a9d96eb1aa678cea6597d1fc0ea1
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Add new faces for completions-detailed
---
 helm-mode.el | 28 +++-
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index fd289f0843..a3677ea995 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -263,6 +263,16 @@ Not guaranteed to work with Emacs < 27."
 '((t :inherit font-lock-property-name-face))
   "Face used to highlight invalid functions."
   :group 'helm-mode)
+
+(defface helm-completions-detailed
+'((t :inherit font-lock-warning-face))
+  "Face used to highlight completion-detailed informations."
+  :group 'helm-mode)
+
+(defface helm-completions-annotations
+'((t :inherit font-lock-property-name-face))
+  "Face used to highlight annotations in completion."
+  :group 'helm-mode)
 
 (defvar helm-comp-read-map
   (let ((map (make-sparse-keymap)))
@@ -1071,11 +1081,11 @@ should be specified as a string and the category as a 
symbol.")
  "fm " 'face 'font-lock-comment-face))
(fname
 (propertize
- " f " 'face 'font-lock-property-name-face))
+ " f " 'face 'helm-completions-annotations))
(t (propertize "nf " 'face 'font-lock-doc-face
  (mode (with-current-buffer comp
  (propertize
-  (symbol-name major-mode) 'face 'font-lock-warning-face)))
+  (symbol-name major-mode) 'face 
'helm-completions-detailed)))
  (size (helm-buffer-size buf))
  (max-len helm-buffer-max-length)
  (bname (truncate-string-to-width
@@ -1150,13 +1160,13 @@ is used."
   symbol-class))
 (group "g")
 (t "i"))
-  (propertize it 'face 'completions-annotations)
+  (propertize it 'face 'helm-completions-detailed)
   (propertize
;; (format "%-4s" it) makes spaces inheriting text props.
" " 'display (concat it (make-string (- 4 (length it)) ? 

;; Suffix.
(if doc
-   (helm-aand (propertize doc 'face 'completions-annotations)
+   (helm-aand (propertize doc 'face 'helm-completions-detailed)
   (propertize " " 'display (concat sep it)))
  "")
 
@@ -1177,9 +1187,9 @@ is used."
  (if status
  (format "%s " (substring status 0 1))
"b ")
-  'face 'font-lock-property-name-face)
+  'face 'helm-completions-annotations)
 (or (helm-aand desc
-   (propertize it 'face 'font-lock-warning-face)
+   (propertize it 'face 'helm-completions-detailed)
(propertize " " 'display (concat sep it)))
 "")
 
@@ -1194,7 +1204,7 @@ is used."
   (helm--get-theme-doc-1 sym
   (list comp
 ""
-(helm-aand (propertize doc 'face 'font-lock-warning-face)
+(helm-aand (propertize doc 'face 'helm-completions-detailed)
(propertize " " 'display (concat sep it)))
 
 (defun helm--get-theme-doc-1 (sym)
@@ -1238,7 +1248,7 @@ is used."
 ? )))
   (list comp "" (helm-aand (replace-regexp-in-string "^ *" "" doc)
(replace-regexp-in-string "[\n]" "" it)
-   (propertize it 'face 'font-lock-warning-face)
+   (propertize it 'face 'helm-completions-detailed)
(propertize " " 'display (concat sep it)))
 
 (defun helm-completion-color-affixation (_comps)
@@ -2208,7 +2218,7 @@ When AFUN, AFIX are nil and CATEGORY is not file return 
COMPS unmodified."
 " " 'display
 (propertize
  ann
- 'face 'completions-annotations)))
+ 'face 'helm-completions-annotations)))
   s)
s)))
  comps))



[nongnu] elpa/helm updated (74917bc84b -> 6e74ef7e9b)

2023-09-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm.

  from  74917bc84b Avoid dependency on static-if by using eval-when-compile 
instead
   new  581e5029c9 Avoid inheriting text props in spaces
   new  d0e0999cdf Add new faces for completions-detailed
   new  6e74ef7e9b Make code more readable with helm-aand


Summary of changes:
 helm-mode.el | 59 ---
 1 file changed, 32 insertions(+), 27 deletions(-)



[nongnu] branch tail-of-shallow-coffee-mode-history created (now af81c6a820)

2023-09-06 Thread Stefan Monnier via
monnier pushed a change to branch tail-of-shallow-coffee-mode-history.

at  af81c6a820 Highlight null. closes #4

No new revisions were added by this update.



[elpa] externals/consult 0923786304: consult-outline: New prefix argument for initial narrowing level (Fix #839)

2023-09-06 Thread ELPA Syncer
branch: externals/consult
commit 0923786304d1dc51c5ae92d27a85c6d8383fbc3d
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult-outline: New prefix argument for initial narrowing level (Fix #839)
---
 CHANGELOG.org |  3 ++-
 consult.el| 19 ---
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 241b114b21..960fb2c2b2 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -4,7 +4,8 @@
 
 * Development
 
-- Add =consult-fd= based on the fast =fd/fdfind= search utility.
+- =consult-fd=: New command based on the fast =fd/fdfind= search utility.
+- =consult-outline=: New prefix argument to specify initial narrowing level.
 
 * Version 0.35 (2023-07-02)
 
diff --git a/consult.el b/consult.el
index 7c7581f415..489c628f89 100644
--- a/consult.el
+++ b/consult.el
@@ -1891,7 +1891,9 @@ to make it available for commands with narrowing."
   (define-key map (vconcat key (vector (car pair)))
   (cons (cdr pair) #'consult-narrow
   (when-let ((widen (consult--widen-key)))
-(define-key map widen (cons "All" #'consult-narrow
+(define-key map widen (cons "All" #'consult-narrow)))
+  (when-let ((init (and (memq :keys settings) (plist-get settings :initial
+(consult-narrow init)))
 
 ;; Emacs 28: hide in M-X
 (put #'consult-narrow-help 'completion-predicate #'ignore)
@@ -3091,12 +3093,14 @@ These configuration options are supported:
 (nreverse candidates)))
 
 ;;;###autoload
-(defun consult-outline ()
+(defun consult-outline (&optional level)
   "Jump to an outline heading, obtained by matching against `outline-regexp'.
 
-This command supports narrowing to a heading level and candidate preview.
-The symbol at point is added to the future history."
-  (interactive)
+This command supports narrowing to a heading level and candidate
+preview.  The initial narrowing LEVEL can be given as prefix
+argument.  The symbol at point is added to the future history."
+  (interactive
+   (list (and current-prefix-arg (prefix-numeric-value current-prefix-arg
   (let* ((candidates (consult--slow-operation
  "Collecting headings..."
(consult--outline-candidates)))
@@ -3107,7 +3111,8 @@ The symbol at point is added to the future history."
 (<= (get-text-property 0 'consult--outline-level cand)
 (+ consult--narrow min-level
  (narrow-keys (mapcar (lambda (c) (cons c (format "Level %c" c)))
-  (number-sequence ?1 ?9
+  (number-sequence ?1 ?9)))
+ (narrow-init (and level (max ?1 (min ?9 (+ level ?0))
 (consult--read
  candidates
  :prompt "Go to heading: "
@@ -3116,7 +3121,7 @@ The symbol at point is added to the future history."
  :sort nil
  :require-match t
  :lookup #'consult--line-match
- :narrow `(:predicate ,narrow-pred :keys ,narrow-keys)
+ :narrow `(:predicate ,narrow-pred :keys ,narrow-keys :initial 
,narrow-init)
  :history '(:input consult--line-history)
  :add-history (thing-at-point 'symbol)
  :state (consult--location-state candidates



[nongnu] elpa/hyperdrive ff71f006dc 02/30: Change: (-directory-sort) Use :ascending and :descending keywords

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit ff71f006dcbe3d8bc8f729764159ef8804470d37
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (-directory-sort) Use :ascending and :descending keywords

This change consolidates the definitions of sorting predicates, and
hopefully improves readability.
---
 hyperdrive-dir.el  | 33 +
 hyperdrive-lib.el  | 50 +++---
 hyperdrive-vars.el | 27 ---
 3 files changed, 52 insertions(+), 58 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 840597f83e..150b989fc3 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -120,29 +120,22 @@ arguments."
   "Return column headers as a string with PREFIX.
 Columns are suffixed with up/down arrows according to
 `hyperdrive-sort-entries'."
-  (let (name-arrow size-arrow date-arrow)
-(pcase-exhaustive hyperdrive-directory-sort
-  (`(hyperdrive-entry-name . ,predicate)
-   (setf name-arrow (pcase-exhaustive predicate
-  ('string< "▲")
-  ('string> "▼"
-  (`(hyperdrive-entry-size . ,predicate)
-   (setf size-arrow (pcase-exhaustive predicate
-  ('< "▲")
-  ('> "▼"
-  (`(hyperdrive-entry-mtime . ,predicate)
-   (setf date-arrow (pcase-exhaustive predicate
-  ('time-less-p "▲")
-  ((pred functionp) "▼")
+  (pcase-let* ((`(,accessor . ,direction) hyperdrive-directory-sort)
+   (arrow (if (eq direction :ascending) "▲" "▼"))
+   (size-header (propertize "Size" 'face 
'hyperdrive-column-header))
+   (mtime-header (propertize "Last Modified" 'face 
'hyperdrive-column-header))
+   (name-header (propertize "Name" 'face 
'hyperdrive-column-header)))
+(pcase-exhaustive accessor
+  ('hyperdrive-entry-size (cl-callf2 concat arrow size-header))
+  ('hyperdrive-entry-mtime (cl-callf2 concat arrow mtime-header))
+  ;; Put the arrow second so that the header doesn't move.
+  ('hyperdrive-entry-name (cl-callf concat name-header arrow)))
 (concat prefix "\n"
 (format "%6s  %s  %s"
-(concat size-arrow
-(propertize "Size" 'face 
'hyperdrive-column-header))
+size-header
 (format hyperdrive-timestamp-format-string
-   (concat date-arrow
-   (propertize "Last Modified" 'face 
'hyperdrive-column-header)))
-(concat (propertize "Name" 'face 'hyperdrive-column-header)
-name-arrow)
+   mtime-header)
+name-header
 
 (defun hyperdrive-dir-pp (thing)
   "Pretty-print THING.
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 211e8f1cb0..b805c79bc8 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -131,12 +131,14 @@ generated from PATH.  When ENCODE is non-nil, encode 
PATH."
 (cl-defun hyperdrive-sort-entries (entries &key (by hyperdrive-directory-sort))
   "Return ENTRIES sorted by BY.
 See `hyperdrive-directory-sort' for the type of BY."
-  (cl-sort entries (lambda (a b)
- (cond ((and a b) (funcall (cdr by) a b))
-   ;; When an entry lacks appropriate metadata
-   ;; for sorting with BY, put it at the end.
-   (a t)))
-   :key (car by)))
+  (pcase-let* ((`(,accessor . ,direction) by)
+   ((map (direction sort-function)) (alist-get accessor 
hyperdrive-dir-sort-fields)))
+(cl-sort entries (lambda (a b)
+   (cond ((and a b) (funcall sort-function a b))
+ ;; When an entry lacks appropriate metadata
+ ;; for sorting with BY, put it at the end.
+ (a t)))
+ :key accessor)))
 
  API
 
@@ -1034,27 +1036,21 @@ DEFAULT and INITIAL-INPUT are passed to `read-string' 
as-is."
 
 (defun hyperdrive-complete-sort ()
   "Return a value for `hyperdrive-directory-sort' selected with completion."
-  (pcase-let* ((fn (pcase-lambda (`(cons :tag ,tag (const :format "" ,accessor)
- (choice :tag "Direction" :value 
,_default-direction
- (const :tag "Ascending" 
,ascending-predicate)
- (const :tag "Descending" 
,descending-predicate
- (list tag accessor ascending-predicate 
descending-predicate)))
-   (columns (mapcar fn (cdr (get 'hyperdrive-directory-sort 
'custom-type
-   (read-answer-short t)
-   (choices (cl-loop for (tag . _) in columns
- for name = (substring tag 3)
- 

[nongnu] elpa/hyperdrive 53927eb0a9 25/30: Merge branch 'check-writablep'

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 53927eb0a9f7aebc2cbc6555e4efa3be99e979a1
Merge: 9e27c5c43a a39567f697
Author: Adam Porter 
Commit: Adam Porter 

Merge branch 'check-writablep'
---
 hyperdrive-lib.el | 16 +++-
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 0070dd0d73..6068b5f3db 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -77,7 +77,7 @@ Passes ARGS to `format-message'."
   "Represents a hyperdrive."
   (public-key nil :documentation "Hyperdrive's public key.")
   (seed nil :documentation "Seed (always and only present for writable 
hyperdrives).")
-  (writablep nil :documentation "Whether the drive is writable.")
+  (writablep 'unknown :documentation "Whether the drive is writable.")
   (petname nil :documentation "Petname.")
   ;; TODO: Where to invalidate old domains?
   (domains nil :documentation "List of DNSLink domains which resolve to the 
drive's public-key.")
@@ -405,12 +405,6 @@ When a writable ENTRY is not found and CREATEP is non-nil, 
create
 a new buffer for ENTRY."
   (declare (indent defun))
   ;; TODO: Add `find-file'-like interface. See 

-  ;; TODO: When possible, check whether drive is writable with a HEAD request, 
and set writablep in the
-  ;; struct. If the hyperdrive already exists in hyperdrive-hyperdrives, 
there's no need to send a HEAD
-  ;; request, since the value will never change. We only need to send a HEAD 
request when calling
-  ;; `hyperdrive-open-url' on an unknown URL. Since `hyperdrive-complete-url' 
only returns a URL, we'll
-  ;; need to parse the URL and then call `gethash' (or refactor 
`hyperdrive-complete-url').
-  ;; See: . 
(implemented)
   ;; FIXME: Some of the synchronous filling functions we've added now cause 
this to be blocking,
   ;; which is very noticeable when a file can't be loaded from the gateway and 
eventually times out.
   (let ((hyperdrive (hyperdrive-entry-hyperdrive entry)))
@@ -535,19 +529,23 @@ The following ENTRY slots are filled:
 
 The following ENTRY hyperdrive slots are filled:
 - public-key
+- writablep (when headers include Allow)
 - domains (merged with current persisted value)
 
 Returns filled ENTRY."
   (pcase-let* (((cl-struct hyperdrive-entry hyperdrive) entry)
-   ((map link content-length content-type etag last-modified) 
headers)
+   ((cl-struct hyperdrive writablep domains) hyperdrive)
+   ((map link content-length content-type etag last-modified 
allow) headers)
;; If URL hostname was a DNSLink domain, entry doesn't yet have 
a public-key slot.
(public-key (progn
  (string-match hyperdrive--public-key-re link)
  (match-string 1 link)))
(persisted-hyperdrive (gethash public-key 
hyperdrive-hyperdrives))
-   (domain (car (hyperdrive-domains hyperdrive
+   (domain (car domains)))
 (when last-modified
   (setf last-modified (encode-time (parse-time-string last-modified
+(when (and allow (eq 'unknown writablep))
+  (setf (hyperdrive-writablep hyperdrive) (string-match-p "PUT" allow)))
 (setf (hyperdrive-entry-size entry) (when content-length
   (ignore-errors
 (cl-parse-integer content-length)))



[nongnu] elpa/hyperdrive ed274229a6 18/30: Comment: Add HACK notice

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit ed274229a613a6291fcbfeb7164704a5692d1052
Author: Joseph Turner 
Commit: Joseph Turner 

Comment: Add HACK notice
---
 hyperdrive-dir.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 4a17bfe290..17010d435d 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -121,6 +121,7 @@ arguments."
 Columns are suffixed with up/down arrows according to
 `hyperdrive-sort-entries'."
   (pcase-let* ((`(,sort-column . ,direction) hyperdrive-directory-sort)
+   ;; HACK: This whole function seems overly complex.
;; TODO: Use ▲ and ▼ glyphs, but make sure that the
;; column headers are aligned correctly.
(arrow (propertize (if (eq direction :ascending) "^" "v")



[nongnu] elpa/hyperdrive 68ee5c5213 22/30: Meta: Update changelog

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 68ee5c5213d0b2acd1b58256fdc62910cdfaca99
Author: Joseph Turner 
Commit: Joseph Turner 

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

diff --git a/CHANGELOG.org b/CHANGELOG.org
index c12d07df58..99ab1f42af 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -12,7 +12,7 @@ This project adheres to 
[[https://semver.org/spec/v2.0.0.html][Semantic Versioni
 - ~info-look~ integration
 - ~view-mode~ integration
 - Org-mode link completion
-- directory view sorting by column
+- directory view sorting by column (with clickable headers)
 
 ** Changed
 



[nongnu] elpa/hyperdrive fcda78fd06 30/30: Merge branch 'dir-sort-clickable'

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit fcda78fd069adebf961a099c881c5d0110c74c3a
Merge: 53927eb0a9 eaf2e5104f
Author: Adam Porter 
Commit: Adam Porter 

Merge branch 'dir-sort-clickable'
---
 CHANGELOG.org |   2 +-
 doc/hyperdrive-manual.org |  12 +++---
 hyperdrive-dir.el | 103 --
 hyperdrive-history.el |   4 +-
 hyperdrive-lib.el |  51 ---
 hyperdrive-vars.el|  75 -
 hyperdrive.el |   2 +
 7 files changed, 147 insertions(+), 102 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index c12d07df58..99ab1f42af 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -12,7 +12,7 @@ This project adheres to 
[[https://semver.org/spec/v2.0.0.html][Semantic Versioni
 - ~info-look~ integration
 - ~view-mode~ integration
 - Org-mode link completion
-- directory view sorting by column
+- directory view sorting by column (with clickable headers)
 
 ** Changed
 
diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org
index 3140c4344f..e171c3c543 100644
--- a/doc/hyperdrive-manual.org
+++ b/doc/hyperdrive-manual.org
@@ -177,7 +177,8 @@ default:
 #+kindex: revert-buffer
 - ~g~ refreshes the directory to display potential updates
 #+kindex: hyperdrive-dir-sort
-- ~o~ sorts directory contents by column
+- ~o~ sorts directory contents by column (you can also click on the
+  column headers)
 #+kindex: hyperdrive-dir-download-file
 - ~d~ downloads the file at point to disk
 #+kindex: hyperdrive-dir-delete
@@ -474,11 +475,10 @@ customize-group RET hyperdrive RET~:
   for hyperdrive directories. Passed to ~display-buffer~, which see.
 
 #+vindex: hyperdrive-directory-sort
-- ~hyperdrive-directory-sort~ :: Column by which directory entries are
-  sorted.  Internally, a cons cell of (KEY . PREDICATE), the KEY being
-  the `hyperdrive-entry' accessor function and the PREDICATE being the
-  appropriate function (e.g. `time-less-p' for
-  `hyperdrive-entry-mtime', `<' for `hyperdrive-entry-size', etc).
+- ~hyperdrive-directory-sort~ :: Column by which directory entries are sorted.
+Internally, a cons cell of (COLUMN . DIRECTION), the COLUMn being one
+of the directory listing columns (~name~, ~size~, or ~mtime~) and
+DIRECTION being one of ~:ascending~ or ~:descending~.
 
 #+vindex: hyperdrive-history-display-buffer-action
 - ~hyperdrive-history-display-buffer-action~ :: Display buffer action
diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 840597f83e..62daa94009 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -120,29 +120,67 @@ arguments."
   "Return column headers as a string with PREFIX.
 Columns are suffixed with up/down arrows according to
 `hyperdrive-sort-entries'."
-  (let (name-arrow size-arrow date-arrow)
-(pcase-exhaustive hyperdrive-directory-sort
-  (`(hyperdrive-entry-name . ,predicate)
-   (setf name-arrow (pcase-exhaustive predicate
-  ('string< "▲")
-  ('string> "▼"
-  (`(hyperdrive-entry-size . ,predicate)
-   (setf size-arrow (pcase-exhaustive predicate
-  ('< "▲")
-  ('> "▼"
-  (`(hyperdrive-entry-mtime . ,predicate)
-   (setf date-arrow (pcase-exhaustive predicate
-  ('time-less-p "▲")
-  ((pred functionp) "▼")
-(concat prefix "\n"
-(format "%6s  %s  %s"
-(concat size-arrow
-(propertize "Size" 'face 
'hyperdrive-column-header))
-(format hyperdrive-timestamp-format-string
-   (concat date-arrow
-   (propertize "Last Modified" 'face 
'hyperdrive-column-header)))
-(concat (propertize "Name" 'face 'hyperdrive-column-header)
-name-arrow)
+  (pcase-let* ((`(,sort-column . ,direction) hyperdrive-directory-sort)
+   ;; TODO: Use "↑" and "↓" glyphs, but make sure that the
+   ;; column headers are aligned correctly.
+   (arrow (propertize (if (eq direction :ascending) "^" "v")
+  'face 'hyperdrive-header-arrow))
+   (headers))
+(pcase-dolist (`(,column . ,(map (:desc desc))) hyperdrive-dir-sort-fields)
+  (let* ((selected (eq column sort-column))
+ ;; Put the arrow after desc, since the column is left-aligned.
+ (left-aligned (eq column 'name))
+ (format-str (pcase column
+   ('size "%6s")
+   ('mtime (format "%%%ds" hyperdrive-timestamp-width))
+   ('name (format "%%-%ds" (- (window-width) 6 2 
hyperdrive-timestamp-width 2)
+ (desc (concat (and selected (not left-aligned) arrow)
+   (and (not left-aligned) " ")
+   (propertize

[nongnu] elpa/hyperdrive decf302b97 27/30: Fix: Require url

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit decf302b979f14573d400177203d4c623cdb0403
Author: Adam Porter 
Commit: Adam Porter 

Fix: Require url
---
 hyperdrive.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hyperdrive.el b/hyperdrive.el
index 8422bbf013..b784a9a998 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -710,6 +710,8 @@ Universal prefix argument \\[universal-argument] forces
 
  Configure Emacs and EWW for hyper:// URLs.
 
+(require 'url)
+
 (defun hyperdrive-url-loader (parsed-url)
   "Retrieve URL synchronously.
 PARSED-URL must be a URL-struct like the output of



[nongnu] elpa/hyperdrive 8d47207e21 21/30: Docs: Document clickable directory column headers

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 8d47207e213dad41ad53d1282f185a328836b73c
Author: Joseph Turner 
Commit: Joseph Turner 

Docs: Document clickable directory column headers
---
 doc/hyperdrive-manual.org | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org
index 3140c4344f..188ef53318 100644
--- a/doc/hyperdrive-manual.org
+++ b/doc/hyperdrive-manual.org
@@ -177,7 +177,8 @@ default:
 #+kindex: revert-buffer
 - ~g~ refreshes the directory to display potential updates
 #+kindex: hyperdrive-dir-sort
-- ~o~ sorts directory contents by column
+- ~o~ sorts directory contents by column (you can also click on the
+  column headers)
 #+kindex: hyperdrive-dir-download-file
 - ~d~ downloads the file at point to disk
 #+kindex: hyperdrive-dir-delete



[nongnu] elpa/hyperdrive f336801c0f 20/30: Change: (hyperdrive-dir-column-headers) Highlight selected header

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit f336801c0ff40e483325a19b79920e6a61849ca6
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-dir-column-headers) Highlight selected header
---
 hyperdrive-dir.el  | 4 +++-
 hyperdrive-vars.el | 4 
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 17010d435d..f41f3e33e2 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -137,7 +137,9 @@ Columns are suffixed with up/down arrows according to
('name (format "%%-%ds" (- (window-width) 6 2 
hyperdrive-timestamp-width 2)
  (desc (concat (and selected (not left-aligned) arrow)
(and (not left-aligned) " ")
-   (propertize desc 'face 'hyperdrive-column-header)
+   (propertize desc 'face (if selected
+  
'hyperdrive-selected-column-header
+'hyperdrive-column-header))
;; This extra space is necessary to prevent
;; the `hyperdrive-column-header' face from
;; extended to the end of the window.
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 22424c0eb3..ef27ad4cf9 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -192,6 +192,10 @@ an existing buffer at the same version, or make a new 
buffer."
 (defface hyperdrive-column-header '((t (:inherit underline)))
   "Column header.")
 
+(defface hyperdrive-selected-column-header '((t (:inherit underline
+  :weight bold)))
+  "Selected column header.")
+
 (defface hyperdrive-directory '((t (:inherit dired-directory)))
   "Subdirectories.")
 



[nongnu] elpa/hyperdrive bbd78c6361 23/30: Docs: Update customization option docs

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit bbd78c63619f82cef81506cd5d0a51a2d6d92ee2
Author: Joseph Turner 
Commit: Joseph Turner 

Docs: Update customization option docs
---
 doc/hyperdrive-manual.org | 9 -
 hyperdrive-vars.el| 1 -
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org
index 188ef53318..e171c3c543 100644
--- a/doc/hyperdrive-manual.org
+++ b/doc/hyperdrive-manual.org
@@ -475,11 +475,10 @@ customize-group RET hyperdrive RET~:
   for hyperdrive directories. Passed to ~display-buffer~, which see.
 
 #+vindex: hyperdrive-directory-sort
-- ~hyperdrive-directory-sort~ :: Column by which directory entries are
-  sorted.  Internally, a cons cell of (KEY . PREDICATE), the KEY being
-  the `hyperdrive-entry' accessor function and the PREDICATE being the
-  appropriate function (e.g. `time-less-p' for
-  `hyperdrive-entry-mtime', `<' for `hyperdrive-entry-size', etc).
+- ~hyperdrive-directory-sort~ :: Column by which directory entries are sorted.
+Internally, a cons cell of (COLUMN . DIRECTION), the COLUMn being one
+of the directory listing columns (~name~, ~size~, or ~mtime~) and
+DIRECTION being one of ~:ascending~ or ~:descending~.
 
 #+vindex: hyperdrive-history-display-buffer-action
 - ~hyperdrive-history-display-buffer-action~ :: Display buffer action
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index ef27ad4cf9..4007df5c4c 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -94,7 +94,6 @@ Passed to `display-buffer', which see."
  (sexp :tag "Other")))
 
 (defcustom hyperdrive-directory-sort '(name . :ascending)
-  ;; TODO(doc): Document change.
   "Column by which directory entries are sorted.
 Internally, a cons cell of (COLUMN . DIRECTION), the COLUMn being
 one of the directory listing columns (\\+`name', \\+`size', or



[nongnu] elpa/hyperdrive dc2488436d 17/30: Change: (hyperdrive-dir-column-headers) Fix column headers highlight

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit dc2488436db1bf93cd82579664b432b036f08720
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-dir-column-headers) Fix column headers highlight
---
 hyperdrive-dir.el | 49 +++--
 1 file changed, 31 insertions(+), 18 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 013ac73245..4a17bfe290 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -127,24 +127,37 @@ Columns are suffixed with up/down arrows according to
   'face 'hyperdrive-header-arrow))
(headers))
 (pcase-dolist (`(,column . ,(map (:desc desc))) hyperdrive-dir-sort-fields)
-  (let ((selected (eq column sort-column))
-;; Put the arrow after desc, since the column is left-aligned.
-(arrow-after (eq column 'name)))
-(push (propertize
-   (concat (and selected (not arrow-after) arrow)
-   (propertize desc 'face 'hyperdrive-column-header)
-   (and selected arrow-after arrow))
-   'keymap
-   (define-keymap
- "" (lambda (&optional _e)
-   (interactive "e")
-   (hyperdrive-dir-sort
-(hyperdrive-dir-toggle-sort-direction column 
hyperdrive-directory-sort
-   'mouse-face 'highlight)
-  headers)))
-(concat prefix "\n"
-(apply #'format (format "%%6s  %%%ds  %%s" 
hyperdrive-timestamp-width)
-   (nreverse headers)
+  (let* ((selected (eq column sort-column))
+ ;; Put the arrow after desc, since the column is left-aligned.
+ (left-aligned (eq column 'name))
+ (format-str (pcase column
+   ('size "%6s")
+   ('mtime (format "%%%ds" hyperdrive-timestamp-width))
+   ('name (format "%%-%ds" (- (window-width) 6 2 
hyperdrive-timestamp-width 2)
+ (desc (concat (and selected (not left-aligned) arrow)
+   (and (not left-aligned) " ")
+   (propertize desc 'face 'hyperdrive-column-header)
+   ;; This extra space is necessary to prevent
+   ;; the `hyperdrive-column-header' face from
+   ;; extended to the end of the window.
+   (and left-aligned " ")
+   (and selected left-aligned arrow
+(push (propertize (format format-str desc)
+  'keymap
+  (define-keymap
+"" (lambda (&optional _e)
+  (interactive "e")
+  (hyperdrive-dir-sort
+   
(hyperdrive-dir-toggle-sort-direction
+column 
hyperdrive-directory-sort
+  'mouse-face 'highlight)
+  headers)
+(unless (eq column 'name)
+  ;; These gap spaces are necessary to prevent display mouse-face
+  ;; from activating all contiguous strings simultaneously.
+  (push "  " headers
+(apply #'concat prefix "\n" (nreverse headers
+
 
 (defun hyperdrive-dir-complete-sort ()
   "Return a value for `hyperdrive-directory-sort' selected with completion."



[nongnu] elpa/hyperdrive 3b79b631a1 09/30: Change: (hyperdrive-dir-column-headers) Don't use glyphs

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 3b79b631a14fb338d63544a9095b2e0bcb6ff4eb
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-dir-column-headers) Don't use glyphs

The glyphs don't align well with the monospaced columns.
---
 hyperdrive-dir.el  | 18 +-
 hyperdrive-vars.el |  3 +++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 888084a6f3..2e9f44e6fb 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -121,21 +121,21 @@ arguments."
 Columns are suffixed with up/down arrows according to
 `hyperdrive-sort-entries'."
   (pcase-let* ((`(,column . ,direction) hyperdrive-directory-sort)
-   (arrow (if (eq direction :ascending) "▲" "▼"))
-   (size-header "Size")
-   (mtime-header "Last Modified")
-   (name-header "Name"))
+   (arrow (propertize (if (eq direction :ascending) "^" "v")
+  'face 'hyperdrive-header-arrow))
+   (size-header (propertize "Size" 'face 
'hyperdrive-column-header))
+   (mtime-header (propertize "Last Modified" 'face 
'hyperdrive-column-header))
+   (name-header (propertize "Name" 'face 
'hyperdrive-column-header)))
 (pcase-exhaustive column
   ('size (cl-callf2 concat arrow size-header))
   ('mtime (cl-callf2 concat arrow mtime-header))
   ;; Put the arrow second so that the header doesn't move.
   ('name (cl-callf concat name-header arrow)))
 (concat prefix "\n"
-(format "%6s  %s  %s"
-(propertize size-header 'face 'hyperdrive-column-header)
-(format hyperdrive-timestamp-format-string
-   (propertize mtime-header 'face 
'hyperdrive-column-header))
-(propertize name-header 'face 
'hyperdrive-column-header)
+(format (concat "%6s  " hyperdrive-timestamp-format-string "  %s")
+size-header
+mtime-header
+name-header
 
 (defun hyperdrive-dir-complete-sort ()
   "Return a value for `hyperdrive-directory-sort' selected with completion."
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 413431dd74..574fc45ec9 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -202,6 +202,9 @@ an existing buffer at the same version, or make a new 
buffer."
 (defface hyperdrive-timestamp '((t (:inherit default)))
   "Entry timestamp.")
 
+(defface hyperdrive-header-arrow '((t (:inherit bold)))
+  "Header arrows.")
+
 (defface hyperdrive-history-range '((t (:inherit font-lock-escape-face)))
   "Version range in `hyperdrive-history' buffers.")
 



[nongnu] elpa/hyperdrive 328635c1f9 07/30: Change: (hyperdrive-directory-sort) Use column name as alist key

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 328635c1f9349f3b6e680b463cedc0dad3825762
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-directory-sort) Use column name as alist key

This removes the need to use cl-rassoc to get the description.
---
 hyperdrive-dir.el  | 22 +++---
 hyperdrive-lib.el  | 22 ++
 hyperdrive-vars.el | 24 
 3 files changed, 33 insertions(+), 35 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 300819e861..342d6c6135 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -120,22 +120,22 @@ arguments."
   "Return column headers as a string with PREFIX.
 Columns are suffixed with up/down arrows according to
 `hyperdrive-sort-entries'."
-  (pcase-let* ((`(,accessor . ,direction) hyperdrive-directory-sort)
+  (pcase-let* ((`(,column . ,direction) hyperdrive-directory-sort)
(arrow (if (eq direction :ascending) "▲" "▼"))
-   (size-header (propertize "Size" 'face 
'hyperdrive-column-header))
-   (mtime-header (propertize "Last Modified" 'face 
'hyperdrive-column-header))
-   (name-header (propertize "Name" 'face 
'hyperdrive-column-header)))
-(pcase-exhaustive accessor
-  ('hyperdrive-entry-size (cl-callf2 concat arrow size-header))
-  ('hyperdrive-entry-mtime (cl-callf2 concat arrow mtime-header))
+   (size-header "Size")
+   (mtime-header "Last Modified")
+   (name-header "Name"))
+(pcase-exhaustive column
+  ('size (cl-callf2 concat arrow size-header))
+  ('mtime (cl-callf2 concat arrow mtime-header))
   ;; Put the arrow second so that the header doesn't move.
-  ('hyperdrive-entry-name (cl-callf concat name-header arrow)))
+  ('name (cl-callf concat name-header arrow)))
 (concat prefix "\n"
 (format "%6s  %s  %s"
-size-header
+(propertize size-header 'face 'hyperdrive-column-header)
 (format hyperdrive-timestamp-format-string
-   mtime-header)
-name-header
+   (propertize mtime-header 'face 
'hyperdrive-column-header))
+(propertize name-header 'face 
'hyperdrive-column-header)
 
 (defun hyperdrive-dir-pp (thing)
   "Pretty-print THING.
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 32a47a0618..1c689964a4 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -131,8 +131,9 @@ generated from PATH.  When ENCODE is non-nil, encode PATH."
 (cl-defun hyperdrive-sort-entries (entries &key (direction 
hyperdrive-directory-sort))
   "Return ENTRIES sorted by DIRECTION.
 See `hyperdrive-directory-sort' for the type of DIRECTION."
-  (pcase-let* ((`(,accessor . ,direction) direction)
-   ((map (direction sort-function)) (alist-get accessor 
hyperdrive-dir-sort-fields)))
+  (pcase-let* ((`(,column . ,direction) direction)
+   ((map (:accessor accessor) (direction sort-function))
+(alist-get column hyperdrive-dir-sort-fields)))
 (cl-sort entries (lambda (a b)
(cond ((and a b) (funcall sort-function a b))
  ;; When an entry lacks appropriate metadata
@@ -1037,20 +1038,17 @@ DEFAULT and INITIAL-INPUT are passed to `read-string' 
as-is."
 (defun hyperdrive-complete-sort ()
   "Return a value for `hyperdrive-directory-sort' selected with completion."
   (pcase-let* ((read-answer-short t)
-   (choices (mapcar (pcase-lambda (`(,_accessor . ,(map (:desc 
desc
-  (list desc (aref desc 0) (format "Sort by 
%s" desc)))
+   (choices (mapcar (lambda (field)
+  (let ((desc (symbol-name (car field
+(list desc (aref desc 0) (format "Sort by 
%s" desc
 hyperdrive-dir-sort-fields))
-   (desc (read-answer "Sort by column: " choices))
-   (`(,accessor . ,(map (:ascending _ascending) (:descending 
_descending)))
-(cl-rassoc desc hyperdrive-dir-sort-fields
-   :test (lambda (desc fields-properties)
-   (equal desc (map-elt fields-properties 
:desc)
-   (`(,current-accessor . ,current-direction) 
hyperdrive-directory-sort)
-   (direction (if (and (eq accessor current-accessor)
+   (column (intern (read-answer "Sort by column: " choices)))
+   (`(,current-column . ,current-direction) 
hyperdrive-directory-sort)
+   (direction (if (and (eq column current-column)
(eq current-direction :ascending))
   :descending
 :ascending)))
-(cons accessor direction)))
+(cons column direction)))
 
 (cl-defun hyperdrive-p

[nongnu] elpa/hyperdrive db30be6a57 28/30: Comment: Update TODO

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit db30be6a57305fc88b58b973813f946dc1f9a0dc
Author: Adam Porter 
Commit: Adam Porter 

Comment: Update TODO
---
 hyperdrive-dir.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 67efe54c2c..df681ed3db 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -122,7 +122,7 @@ Columns are suffixed with up/down arrows according to
 `hyperdrive-sort-entries'."
   (pcase-let* ((`(,sort-column . ,direction) hyperdrive-directory-sort)
;; HACK: This whole function seems overly complex.
-   ;; TODO: Use ▲ and ▼ glyphs, but make sure that the
+   ;; TODO: Use "↑" and "↓" glyphs, but make sure that the
;; column headers are aligned correctly.
(arrow (propertize (if (eq direction :ascending) "^" "v")
   'face 'hyperdrive-header-arrow))



[nongnu] elpa/hyperdrive dc54ccbfbf 12/30: Tidy: (hyperdrive-dir-column-headers) Reduce duplication

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit dc54ccbfbfc6c539345db3fbfc40e7ebac886066
Author: Joseph Turner 
Commit: Joseph Turner 

Tidy: (hyperdrive-dir-column-headers) Reduce duplication
---
 hyperdrive-dir.el | 29 -
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 6159f0068d..36d120dd94 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -120,24 +120,27 @@ arguments."
   "Return column headers as a string with PREFIX.
 Columns are suffixed with up/down arrows according to
 `hyperdrive-sort-entries'."
-  (pcase-let* ((`(,column . ,direction) hyperdrive-directory-sort)
+  (pcase-let* ((`(,sort-column . ,direction) hyperdrive-directory-sort)
;; TODO: Use ▲ and ▼ glyphs, but make sure that the
;; column headers are aligned correctly.
(arrow (propertize (if (eq direction :ascending) "^" "v")
   'face 'hyperdrive-header-arrow))
-   (size-header (propertize "Size" 'face 
'hyperdrive-column-header))
-   (mtime-header (propertize "Last Modified" 'face 
'hyperdrive-column-header))
-   (name-header (propertize "Name" 'face 
'hyperdrive-column-header)))
-(pcase-exhaustive column
-  ('size (cl-callf2 concat arrow size-header))
-  ('mtime (cl-callf2 concat arrow mtime-header))
-  ;; Put the arrow second so that the header doesn't move.
-  ('name (cl-callf concat name-header arrow)))
+   (headers))
+(pcase-dolist (`(,column . ,(map (:desc desc))) hyperdrive-dir-sort-fields)
+  (push (concat (and (eq column sort-column)
+ ;; For right-aligned columns, put the arrow before 
desc.
+ (or (eq column 'size)
+ (eq column 'mtime))
+ arrow)
+(propertize desc 'face 'hyperdrive-column-header)
+(and (eq column sort-column)
+ ;; For left-aligned columns, put the arrow after desc.
+ (eq column 'name)
+ arrow))
+headers))
 (concat prefix "\n"
-(format (concat "%6s  " hyperdrive-timestamp-format-string "  %s")
-size-header
-mtime-header
-name-header
+(apply #'format (concat "%6s  " hyperdrive-timestamp-format-string 
"  %s")
+   (nreverse headers)
 
 (defun hyperdrive-dir-complete-sort ()
   "Return a value for `hyperdrive-directory-sort' selected with completion."



[nongnu] elpa/hyperdrive 80d68a0378 16/30: Change: Replace -timestamp-width with -timestamp-format-string

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 80d68a03785a9d3b57f93a4f9237ef1cb5f914a2
Author: Joseph Turner 
Commit: Joseph Turner 

Change: Replace -timestamp-width with -timestamp-format-string

Also, use display space property to fill gaps.
---
 hyperdrive-dir.el |  6 --
 hyperdrive-history.el |  6 --
 hyperdrive-vars.el| 15 +++
 3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index d4e889327c..013ac73245 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -143,7 +143,7 @@ Columns are suffixed with up/down arrows according to
'mouse-face 'highlight)
   headers)))
 (concat prefix "\n"
-(apply #'format (concat "%6s  " hyperdrive-timestamp-format-string 
"  %s")
+(apply #'format (format "%%6s  %%%ds  %%s" 
hyperdrive-timestamp-width)
(nreverse headers)
 
 (defun hyperdrive-dir-complete-sort ()
@@ -184,7 +184,9 @@ To be used as the pretty-printer for `ewoc-create'."
'default))
(timestamp (if mtime
   (format-time-string hyperdrive-timestamp-format 
mtime)
-(format hyperdrive-timestamp-format-string " "
+(propertize " "
+'display
+'(space :width 
hyperdrive-timestamp-width)
 (format "%6s  %s  %s"
 (propertize (or size "")
 'face 'hyperdrive-size)
diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 27a04e2d38..74a08a5e2a 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -60,7 +60,9 @@ and whose cdr is a hyperdrive entry."
(file-size-human-readable size)))
(timestamp (if mtime
   (format-time-string hyperdrive-timestamp-format 
mtime)
-(format hyperdrive-timestamp-format-string " "
+(propertize " "
+'display
+'(space :width 
hyperdrive-timestamp-width)
 ;; FIXME: Use dynamic width of range column equal to 2N+1, where N
 ;; is the width of the hyperdrive's latest version
 (format "%7s  %13s  %6s  %s"
@@ -179,7 +181,7 @@ Universal prefix argument \\[universal-argument] forces
(propertize "Exists?" 'face 
'hyperdrive-column-header)
(propertize "Version Range" 'face 
'hyperdrive-column-header)
(propertize "Size" 'face 
'hyperdrive-column-header)
-   (format 
hyperdrive-timestamp-format-string
+   (format (format "%%%ds" 
hyperdrive-timestamp-width)
(propertize "Last Modified" 
'face 'hyperdrive-column-header)
(queue) (ewoc))
 (with-current-buffer (get-buffer-create
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 3dd5e29173..f60aac7732 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -70,20 +70,19 @@
 Defaults to `eww-download-directory'."
   :type '(file :must-match t))
 
-(defvar hyperdrive-timestamp-format-string)
+(defvar hyperdrive-timestamp-width)
 (defcustom hyperdrive-timestamp-format "%x %X"
   "Format string used for timestamps.
 Passed to `format-time-string', which see."
   :type 'string
   :set (lambda (option value)
  (set-default option value)
- (setf hyperdrive-timestamp-format-string
-   (format "%%%ds"
-   ;; FIXME: This value varies based on current
-   ;;time. (format-time-string "%-I") will
-   ;;be one or two characters long
-   ;;depending on the time of day
-   (string-width (format-time-string value))
+ (setf hyperdrive-timestamp-width
+   ;; FIXME: This value varies based on current
+   ;;time. (format-time-string "%-I") will
+   ;;be one or two characters long
+   ;;depending on the time of day
+   (string-width (format-time-string value)
 
 (defcustom hyperdrive-directory-display-buffer-action
   '(display-buffer-same-window)



[nongnu] elpa/hyperdrive bfbdac1319 08/30: Add: (-dir-toggle-sort-direction) Move sort toggle into own function

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit bfbdac1319fcc742711ee20d2faac5140d5482dd
Author: Joseph Turner 
Commit: Joseph Turner 

Add: (-dir-toggle-sort-direction) Move sort toggle into own function
---
 hyperdrive-dir.el | 23 ++-
 hyperdrive-lib.el | 15 ---
 2 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 342d6c6135..888084a6f3 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -137,6 +137,27 @@ Columns are suffixed with up/down arrows according to
(propertize mtime-header 'face 
'hyperdrive-column-header))
 (propertize name-header 'face 
'hyperdrive-column-header)
 
+(defun hyperdrive-dir-complete-sort ()
+  "Return a value for `hyperdrive-directory-sort' selected with completion."
+  (pcase-let* ((read-answer-short t)
+   (choices (mapcar (lambda (field)
+  (let ((desc (symbol-name (car field
+(list desc (aref desc 0) (format "Sort by 
%s" desc
+hyperdrive-dir-sort-fields))
+   (column (intern (read-answer "Sort by column: " choices
+(hyperdrive-dir-toggle-sort-direction column hyperdrive-directory-sort)))
+
+(defun hyperdrive-dir-toggle-sort-direction (column sort)
+  "Return `hyperdrive-directory-sort' cons cell for COLUMN.
+If SORT is already sorted using COLUMN, toggle direction.
+Otherwise, set direction to \\+`:descending'."
+  (pcase-let* ((`(,current-column . ,current-direction) sort)
+   (direction (if (and (eq column current-column)
+   (eq current-direction :ascending))
+  :descending
+:ascending)))
+(cons column direction)))
+
 (defun hyperdrive-dir-pp (thing)
   "Pretty-print THING.
 To be used as the pretty-printer for `ewoc-create'."
@@ -286,7 +307,7 @@ Interactively, opens file or directory at point in
   "Sort current `hyperdrive-dir' buffer by DIRECTORY-SORT.
 DIRECTORY-SORT should be a valid value of
 `hyperdrive-directory-sort'."
-  (interactive (list (hyperdrive-complete-sort)))
+  (interactive (list (hyperdrive-dir-complete-sort)))
   (setq-local hyperdrive-directory-sort directory-sort)
   (with-silent-modifications
 (let ((entries (ewoc-collect hyperdrive-ewoc #'hyperdrive-entry-p)))
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 1c689964a4..907fcdc28c 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1035,21 +1035,6 @@ Prompts with PROMPT and DEFAULT, according to 
`format-prompt'.
 DEFAULT and INITIAL-INPUT are passed to `read-string' as-is."
   (read-string (format-prompt prompt default) initial-input 
'hyperdrive--name-history default))
 
-(defun hyperdrive-complete-sort ()
-  "Return a value for `hyperdrive-directory-sort' selected with completion."
-  (pcase-let* ((read-answer-short t)
-   (choices (mapcar (lambda (field)
-  (let ((desc (symbol-name (car field
-(list desc (aref desc 0) (format "Sort by 
%s" desc
-hyperdrive-dir-sort-fields))
-   (column (intern (read-answer "Sort by column: " choices)))
-   (`(,current-column . ,current-direction) 
hyperdrive-directory-sort)
-   (direction (if (and (eq column current-column)
-   (eq current-direction :ascending))
-  :descending
-:ascending)))
-(cons column direction)))
-
 (cl-defun hyperdrive-put-metadata (hyperdrive &key then)
   "Put HYPERDRIVE's metadata into the appropriate file, then call THEN."
   (declare (indent defun))



[nongnu] elpa/hyperdrive eaf2e5104f 29/30: Comment: Remove TODOs

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit eaf2e5104fcf773ebab2963fe815e1f68e65031e
Author: Adam Porter 
Commit: Adam Porter 

Comment: Remove TODOs
---
 hyperdrive-dir.el  | 1 -
 hyperdrive-vars.el | 1 -
 2 files changed, 2 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index df681ed3db..62daa94009 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -121,7 +121,6 @@ arguments."
 Columns are suffixed with up/down arrows according to
 `hyperdrive-sort-entries'."
   (pcase-let* ((`(,sort-column . ,direction) hyperdrive-directory-sort)
-   ;; HACK: This whole function seems overly complex.
;; TODO: Use "↑" and "↓" glyphs, but make sure that the
;; column headers are aligned correctly.
(arrow (propertize (if (eq direction :ascending) "^" "v")
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index cd945c98d6..4cf376c1ef 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -99,7 +99,6 @@ Internally, a cons cell of (COLUMN . DIRECTION), the COLUMN 
being
 one of the directory listing columns (\\+`name', \\+`size', or
 \\+`mtime') and DIRECTION being one of \\+`:ascending' or
 \\+`:descending'."
-  ;; TODO: Consolidate type
   :type '(radio (cons :tag "By name" (const :format "" name)
   (choice :tag "Direction" :value :ascending
   (const :tag "Ascending" :ascending)



[nongnu] elpa/hyperdrive dbbe0ecd43 05/30: Add: (hyperdrive-time-greater-p) Inverse of time-less-p

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit dbbe0ecd4390a70f3afbb08c9bf14aa6c9a33a67
Author: Adam Porter 
Commit: Joseph Turner 

Add: (hyperdrive-time-greater-p) Inverse of time-less-p
---
 hyperdrive-lib.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 4aca04c2a8..32a47a0618 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -1304,6 +1304,12 @@ When BASE is non-nil, PATH will be expanded against BASE 
instead."
 (url-default-expander urlobj defobj)
 (url-recreate-url urlobj)))
 
+ Utilities
+
+(defun hyperdrive-time-greater-p (a b)
+  "Return non-nil if time value A is greater than B."
+  (not (time-less-p a b)))
+
 (defun hyperdrive--clean-buffer (&optional buffer)
   "Remove all local variables, overlays, and text properties in BUFFER.
  When BUFFER is nil, act on current buffer."



[nongnu] elpa/hyperdrive 2f4e5408d4 10/30: Comment: Add TODO

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 2f4e5408d411a3b5b1fa72037a70dbf302ba8409
Author: Joseph Turner 
Commit: Joseph Turner 

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

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 2e9f44e6fb..6159f0068d 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -121,6 +121,8 @@ arguments."
 Columns are suffixed with up/down arrows according to
 `hyperdrive-sort-entries'."
   (pcase-let* ((`(,column . ,direction) hyperdrive-directory-sort)
+   ;; TODO: Use ▲ and ▼ glyphs, but make sure that the
+   ;; column headers are aligned correctly.
(arrow (propertize (if (eq direction :ascending) "^" "v")
   'face 'hyperdrive-header-arrow))
(size-header (propertize "Size" 'face 
'hyperdrive-column-header))



[nongnu] elpa/hyperdrive 9e8cf738ba 26/30: Tidy

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 9e8cf738ba9564dbeb649f5ee362e49f72993822
Author: Adam Porter 
Commit: Adam Porter 

Tidy
---
 hyperdrive-dir.el | 4 +---
 hyperdrive-history.el | 4 +---
 hyperdrive-vars.el| 6 +++---
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index f41f3e33e2..67efe54c2c 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -200,9 +200,7 @@ To be used as the pretty-printer for `ewoc-create'."
'default))
(timestamp (if mtime
   (format-time-string hyperdrive-timestamp-format 
mtime)
-(propertize " "
-'display
-'(space :width 
hyperdrive-timestamp-width)
+(propertize " " 'display '(space :width 
hyperdrive-timestamp-width)
 (format "%6s  %s  %s"
 (propertize (or size "")
 'face 'hyperdrive-size)
diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 74a08a5e2a..f814710664 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -60,9 +60,7 @@ and whose cdr is a hyperdrive entry."
(file-size-human-readable size)))
(timestamp (if mtime
   (format-time-string hyperdrive-timestamp-format 
mtime)
-(propertize " "
-'display
-'(space :width 
hyperdrive-timestamp-width)
+(propertize " " 'display '(space :width 
hyperdrive-timestamp-width)
 ;; FIXME: Use dynamic width of range column equal to 2N+1, where N
 ;; is the width of the hyperdrive's latest version
 (format "%7s  %13s  %6s  %s"
diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 4007df5c4c..cd945c98d6 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -95,7 +95,7 @@ Passed to `display-buffer', which see."
 
 (defcustom hyperdrive-directory-sort '(name . :ascending)
   "Column by which directory entries are sorted.
-Internally, a cons cell of (COLUMN . DIRECTION), the COLUMn being
+Internally, a cons cell of (COLUMN . DIRECTION), the COLUMN being
 one of the directory listing columns (\\+`name', \\+`size', or
 \\+`mtime') and DIRECTION being one of \\+`:ascending' or
 \\+`:descending'."
@@ -191,8 +191,8 @@ an existing buffer at the same version, or make a new 
buffer."
 (defface hyperdrive-column-header '((t (:inherit underline)))
   "Column header.")
 
-(defface hyperdrive-selected-column-header '((t (:inherit underline
-  :weight bold)))
+(defface hyperdrive-selected-column-header '((t ( :inherit underline
+  :weight bold)))
   "Selected column header.")
 
 (defface hyperdrive-directory '((t (:inherit dired-directory)))



[nongnu] elpa/hyperdrive 5f1d617ae1 11/30: Change: (hyperdrive-dir-sort-fields) Add description

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 5f1d617ae17619dd270ccae77356e825fc7cfccf
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-dir-sort-fields) Add description
---
 hyperdrive-vars.el | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 574fc45ec9..3dd5e29173 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -295,9 +295,18 @@ values are alists mapping version range starts to plists 
with
 Keys are regexps matched against MIME types.")
 
 (defvar hyperdrive-dir-sort-fields
-  '((name  :accessor hyperdrive-entry-name  :ascending string< :descending 
string>)
-(size  :accessor hyperdrive-entry-size  :ascending <   :descending 
>)
-(mtime :accessor hyperdrive-entry-mtime :ascending time-less-p :descending 
hyperdrive-time-greater-p))
+  '((size  :accessor hyperdrive-entry-size
+   :ascending <
+   :descending >
+   :desc "Size")
+(mtime :accessor hyperdrive-entry-mtime
+   :ascending time-less-p
+   :descending hyperdrive-time-greater-p
+   :desc "Last Modified")
+(name  :accessor hyperdrive-entry-name
+   :ascending string<
+   :descending string>
+   :desc "Name"))
   "Fields for sorting hyperdrive directory buffer columns.")
 
  Footer



[nongnu] elpa/hyperdrive a39567f697 24/30: Change: (hyperdrive--fill) Use string-match-p

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit a39567f697671f25c393e9b11f3d32074c0d1061
Author: Adam Porter 
Commit: Adam Porter 

Change: (hyperdrive--fill) Use string-match-p
---
 hyperdrive-lib.el | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 1243277a2d..68f94ba651 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -542,11 +542,7 @@ Returns filled ENTRY."
 (when last-modified
   (setf last-modified (encode-time (parse-time-string last-modified
 (when (and allow (eq 'unknown writablep))
-  (setf (hyperdrive-writablep hyperdrive) (pcase-exhaustive allow
-;; TODO: The Allow header 
array is
-;; serialized. Why isn't it an 
alist?
-("HEAD,GET,PUT,DELETE" t)
-("HEAD,GET" nil
+  (setf (hyperdrive-writablep hyperdrive) (string-match-p "PUT" allow)))
 (setf (hyperdrive-entry-size entry) (when content-length
   (ignore-errors
 (cl-parse-integer content-length)))



[nongnu] elpa/hyperdrive 447994e8b2 13/30: Change: (hyperdrive-dir-column-headers) Clickable column headers

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 447994e8b25bd7ed72aab745b618cd16514c63b7
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-dir-column-headers) Clickable column headers
---
 hyperdrive-dir.el | 27 +--
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 36d120dd94..2cf84ed072 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -127,16 +127,23 @@ Columns are suffixed with up/down arrows according to
   'face 'hyperdrive-header-arrow))
(headers))
 (pcase-dolist (`(,column . ,(map (:desc desc))) hyperdrive-dir-sort-fields)
-  (push (concat (and (eq column sort-column)
- ;; For right-aligned columns, put the arrow before 
desc.
- (or (eq column 'size)
- (eq column 'mtime))
- arrow)
-(propertize desc 'face 'hyperdrive-column-header)
-(and (eq column sort-column)
- ;; For left-aligned columns, put the arrow after desc.
- (eq column 'name)
- arrow))
+  (push (propertize
+ (concat (and (eq column sort-column)
+  ;; For right-aligned columns, put the arrow before 
desc.
+  (or (eq column 'size)
+  (eq column 'mtime))
+  arrow)
+ (propertize desc 'face 'hyperdrive-column-header)
+ (and (eq column sort-column)
+  ;; For left-aligned columns, put the arrow after 
desc.
+  (eq column 'name)
+  arrow))
+ 'keymap
+ (define-keymap
+   "" (lambda (&optional _e)
+ (interactive "e")
+ (hyperdrive-dir-sort
+  (hyperdrive-dir-toggle-sort-direction column 
hyperdrive-directory-sort)
 headers))
 (concat prefix "\n"
 (apply #'format (concat "%6s  " hyperdrive-timestamp-format-string 
"  %s")



[nongnu] elpa/hyperdrive updated (9e27c5c43a -> fcda78fd06)

2023-09-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  9e27c5c43a Comment: Add TODO
   new  736f2e9d03 Change: (hyperdrive--fill) Check writability based on 
Allow header
   new  a39567f697 Change: (hyperdrive--fill) Use string-match-p
   new  53927eb0a9 Merge branch 'check-writablep'
   new  ff71f006dc Change: (-directory-sort) Use :ascending and :descending 
keywords
   new  838b34927c Change: (hyperdrive-sort-entries) Rename BY argument to 
DIRECTION
   new  6d41b67aab Comment: Add TODO
   new  dbbe0ecd43 Add: (hyperdrive-time-greater-p) Inverse of time-less-p
   new  2d40411cc3 Change/Fix: (hyperdrive-dir-sort) Leave 
buffer-modified-p nil
   new  328635c1f9 Change: (hyperdrive-directory-sort) Use column name as 
alist key
   new  bfbdac1319 Add: (-dir-toggle-sort-direction) Move sort toggle into 
own function
   new  3b79b631a1 Change: (hyperdrive-dir-column-headers) Don't use glyphs
   new  2f4e5408d4 Comment: Add TODO
   new  5f1d617ae1 Change: (hyperdrive-dir-sort-fields) Add description
   new  dc54ccbfbf Tidy: (hyperdrive-dir-column-headers) Reduce duplication
   new  447994e8b2 Change: (hyperdrive-dir-column-headers) Clickable column 
headers
   new  09e4dba5b2 Tidy: (hyperdrive-dir-column-headers) let-bind 
selected/arrow-after
   new  57d02e33f4 Change: (hyperdrive-dir-column-headers) Add mouse-face
   new  80d68a0378 Change: Replace -timestamp-width with 
-timestamp-format-string
   new  dc2488436d Change: (hyperdrive-dir-column-headers) Fix column 
headers highlight
   new  ed274229a6 Comment: Add HACK notice
   new  303109d76e Fix: Typo
   new  f336801c0f Change: (hyperdrive-dir-column-headers) Highlight 
selected header
   new  8d47207e21 Docs: Document clickable directory column headers
   new  68ee5c5213 Meta: Update changelog
   new  bbd78c6361 Docs: Update customization option docs
   new  9e8cf738ba Tidy
   new  decf302b97 Fix: Require url
   new  db30be6a57 Comment: Update TODO
   new  eaf2e5104f Comment: Remove TODOs
   new  fcda78fd06 Merge branch 'dir-sort-clickable'


Summary of changes:
 CHANGELOG.org |   2 +-
 doc/hyperdrive-manual.org |  12 +++---
 hyperdrive-dir.el | 103 --
 hyperdrive-history.el |   4 +-
 hyperdrive-lib.el |  67 +++---
 hyperdrive-vars.el|  75 -
 hyperdrive.el |   2 +
 7 files changed, 154 insertions(+), 111 deletions(-)



[nongnu] elpa/hyperdrive 303109d76e 19/30: Fix: Typo

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 303109d76e5aeafaaabfc58c38e0e809edc6aa29
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: Typo
---
 hyperdrive-vars.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index f60aac7732..22424c0eb3 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -190,7 +190,7 @@ an existing buffer at the same version, or make a new 
buffer."
   "Directory path.")
 
 (defface hyperdrive-column-header '((t (:inherit underline)))
-  "Directory path.")
+  "Column header.")
 
 (defface hyperdrive-directory '((t (:inherit dired-directory)))
   "Subdirectories.")



[nongnu] elpa/hyperdrive 2d40411cc3 06/30: Change/Fix: (hyperdrive-dir-sort) Leave buffer-modified-p nil

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 2d40411cc3f0b15f7e68f48b8dbd260e6c41f048
Author: Joseph Turner 
Commit: Joseph Turner 

Change/Fix: (hyperdrive-dir-sort) Leave buffer-modified-p nil
---
 hyperdrive-dir.el | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 150b989fc3..300819e861 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -288,13 +288,14 @@ DIRECTORY-SORT should be a valid value of
 `hyperdrive-directory-sort'."
   (interactive (list (hyperdrive-complete-sort)))
   (setq-local hyperdrive-directory-sort directory-sort)
-  (let ((entries (ewoc-collect hyperdrive-ewoc #'hyperdrive-entry-p)))
-(ewoc-filter hyperdrive-ewoc #'ignore)
-(dolist (entry (hyperdrive-sort-entries entries))
-  (ewoc-enter-last hyperdrive-ewoc entry))
-(ewoc-set-hf hyperdrive-ewoc
- (hyperdrive-dir-column-headers (hyperdrive-entry-description 
hyperdrive-current-entry))
- "")))
+  (with-silent-modifications
+(let ((entries (ewoc-collect hyperdrive-ewoc #'hyperdrive-entry-p)))
+  (ewoc-filter hyperdrive-ewoc #'ignore)
+  (dolist (entry (hyperdrive-sort-entries entries))
+(ewoc-enter-last hyperdrive-ewoc entry))
+  (ewoc-set-hf hyperdrive-ewoc
+   (hyperdrive-dir-column-headers 
(hyperdrive-entry-description hyperdrive-current-entry))
+   ""
 
  Imenu support
 



[nongnu] elpa/hyperdrive 57d02e33f4 15/30: Change: (hyperdrive-dir-column-headers) Add mouse-face

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 57d02e33f4a1ca95ea78c41c911bef9f260a2204
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-dir-column-headers) Add mouse-face
---
 hyperdrive-dir.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 123ebb7dd0..d4e889327c 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -139,7 +139,8 @@ Columns are suffixed with up/down arrows according to
  "" (lambda (&optional _e)
(interactive "e")
(hyperdrive-dir-sort
-(hyperdrive-dir-toggle-sort-direction column 
hyperdrive-directory-sort)
+(hyperdrive-dir-toggle-sort-direction column 
hyperdrive-directory-sort
+   'mouse-face 'highlight)
   headers)))
 (concat prefix "\n"
 (apply #'format (concat "%6s  " hyperdrive-timestamp-format-string 
"  %s")



[nongnu] elpa/hyperdrive 736f2e9d03 01/30: Change: (hyperdrive--fill) Check writability based on Allow header

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 736f2e9d0303686b06a820568113fcc56766bf23
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive--fill) Check writability based on Allow header

This change involves setting the default value of the hyperdrive
writablep slot to unknown, a breaking change which may require that
users clear their persisted value for hyperdrive-hyperdrives.
---
 hyperdrive-lib.el | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 211e8f1cb0..1243277a2d 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -77,7 +77,7 @@ Passes ARGS to `format-message'."
   "Represents a hyperdrive."
   (public-key nil :documentation "Hyperdrive's public key.")
   (seed nil :documentation "Seed (always and only present for writable 
hyperdrives).")
-  (writablep nil :documentation "Whether the drive is writable.")
+  (writablep 'unknown :documentation "Whether the drive is writable.")
   (petname nil :documentation "Petname.")
   ;; TODO: Where to invalidate old domains?
   (domains nil :documentation "List of DNSLink domains which resolve to the 
drive's public-key.")
@@ -402,12 +402,6 @@ When a writable ENTRY is not found and CREATEP is non-nil, 
create
 a new buffer for ENTRY."
   (declare (indent defun))
   ;; TODO: Add `find-file'-like interface. See 

-  ;; TODO: When possible, check whether drive is writable with a HEAD request, 
and set writablep in the
-  ;; struct. If the hyperdrive already exists in hyperdrive-hyperdrives, 
there's no need to send a HEAD
-  ;; request, since the value will never change. We only need to send a HEAD 
request when calling
-  ;; `hyperdrive-open-url' on an unknown URL. Since `hyperdrive-complete-url' 
only returns a URL, we'll
-  ;; need to parse the URL and then call `gethash' (or refactor 
`hyperdrive-complete-url').
-  ;; See: . 
(implemented)
   ;; FIXME: Some of the synchronous filling functions we've added now cause 
this to be blocking,
   ;; which is very noticeable when a file can't be loaded from the gateway and 
eventually times out.
   (let ((hyperdrive (hyperdrive-entry-hyperdrive entry)))
@@ -532,19 +526,27 @@ The following ENTRY slots are filled:
 
 The following ENTRY hyperdrive slots are filled:
 - public-key
+- writablep (when headers include Allow)
 - domains (merged with current persisted value)
 
 Returns filled ENTRY."
   (pcase-let* (((cl-struct hyperdrive-entry hyperdrive) entry)
-   ((map link content-length content-type etag last-modified) 
headers)
+   ((cl-struct hyperdrive writablep domains) hyperdrive)
+   ((map link content-length content-type etag last-modified 
allow) headers)
;; If URL hostname was a DNSLink domain, entry doesn't yet have 
a public-key slot.
(public-key (progn
  (string-match hyperdrive--public-key-re link)
  (match-string 1 link)))
(persisted-hyperdrive (gethash public-key 
hyperdrive-hyperdrives))
-   (domain (car (hyperdrive-domains hyperdrive
+   (domain (car domains)))
 (when last-modified
   (setf last-modified (encode-time (parse-time-string last-modified
+(when (and allow (eq 'unknown writablep))
+  (setf (hyperdrive-writablep hyperdrive) (pcase-exhaustive allow
+;; TODO: The Allow header 
array is
+;; serialized. Why isn't it an 
alist?
+("HEAD,GET,PUT,DELETE" t)
+("HEAD,GET" nil
 (setf (hyperdrive-entry-size entry) (when content-length
   (ignore-errors
 (cl-parse-integer content-length)))



[nongnu] elpa/hyperdrive 6d41b67aab 04/30: Comment: Add TODO

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 6d41b67aabbac1ab5d552ba50debec17f3a15734
Author: Joseph Turner 
Commit: Joseph Turner 

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

diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el
index 23256b4f12..a10170d548 100644
--- a/hyperdrive-vars.el
+++ b/hyperdrive-vars.el
@@ -101,6 +101,7 @@ Internally, a cons cell of (KEY . PREDICATE), the KEY being 
the
 appropriate function (e.g. `time-less-p' for
 `hyperdrive-entry-mtime', `<' for `hyperdrive-entry-size',
 etc)."
+  ;; TODO: Consolidate type
   :type '(radio (cons :tag "By name" (const :format "" hyperdrive-entry-name)
   (choice :tag "Direction" :value :ascending
   (const :tag "Ascending" :ascending)



[nongnu] elpa/hyperdrive 09e4dba5b2 14/30: Tidy: (hyperdrive-dir-column-headers) let-bind selected/arrow-after

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 09e4dba5b2cea492c0f3f995e2303d3fcd9685be
Author: Joseph Turner 
Commit: Joseph Turner 

Tidy: (hyperdrive-dir-column-headers) let-bind selected/arrow-after
---
 hyperdrive-dir.el | 32 ++--
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 2cf84ed072..123ebb7dd0 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -127,24 +127,20 @@ Columns are suffixed with up/down arrows according to
   'face 'hyperdrive-header-arrow))
(headers))
 (pcase-dolist (`(,column . ,(map (:desc desc))) hyperdrive-dir-sort-fields)
-  (push (propertize
- (concat (and (eq column sort-column)
-  ;; For right-aligned columns, put the arrow before 
desc.
-  (or (eq column 'size)
-  (eq column 'mtime))
-  arrow)
- (propertize desc 'face 'hyperdrive-column-header)
- (and (eq column sort-column)
-  ;; For left-aligned columns, put the arrow after 
desc.
-  (eq column 'name)
-  arrow))
- 'keymap
- (define-keymap
-   "" (lambda (&optional _e)
- (interactive "e")
- (hyperdrive-dir-sort
-  (hyperdrive-dir-toggle-sort-direction column 
hyperdrive-directory-sort)
-headers))
+  (let ((selected (eq column sort-column))
+;; Put the arrow after desc, since the column is left-aligned.
+(arrow-after (eq column 'name)))
+(push (propertize
+   (concat (and selected (not arrow-after) arrow)
+   (propertize desc 'face 'hyperdrive-column-header)
+   (and selected arrow-after arrow))
+   'keymap
+   (define-keymap
+ "" (lambda (&optional _e)
+   (interactive "e")
+   (hyperdrive-dir-sort
+(hyperdrive-dir-toggle-sort-direction column 
hyperdrive-directory-sort)
+  headers)))
 (concat prefix "\n"
 (apply #'format (concat "%6s  " hyperdrive-timestamp-format-string 
"  %s")
(nreverse headers)



[nongnu] elpa/hyperdrive 838b34927c 03/30: Change: (hyperdrive-sort-entries) Rename BY argument to DIRECTION

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 838b34927cc02f6b621057e64c52efc5e2a58e25
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-sort-entries) Rename BY argument to DIRECTION
---
 hyperdrive-lib.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index b805c79bc8..4aca04c2a8 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -128,15 +128,15 @@ generated from PATH.  When ENCODE is non-nil, encode 
PATH."
:version version
:etc etc))
 
-(cl-defun hyperdrive-sort-entries (entries &key (by hyperdrive-directory-sort))
-  "Return ENTRIES sorted by BY.
-See `hyperdrive-directory-sort' for the type of BY."
-  (pcase-let* ((`(,accessor . ,direction) by)
+(cl-defun hyperdrive-sort-entries (entries &key (direction 
hyperdrive-directory-sort))
+  "Return ENTRIES sorted by DIRECTION.
+See `hyperdrive-directory-sort' for the type of DIRECTION."
+  (pcase-let* ((`(,accessor . ,direction) direction)
((map (direction sort-function)) (alist-get accessor 
hyperdrive-dir-sort-fields)))
 (cl-sort entries (lambda (a b)
(cond ((and a b) (funcall sort-function a b))
  ;; When an entry lacks appropriate metadata
- ;; for sorting with BY, put it at the end.
+ ;; for sorting by DIRECTION, put it at the end.
  (a t)))
  :key accessor)))
 



[elpa] externals/ement 9da7b8e085: Meta: Add bug report template

2023-09-06 Thread ELPA Syncer
branch: externals/ement
commit 9da7b8e08565f5d4661673b3ddcdf3a2ceda0b50
Author: Adam Porter 
Commit: Adam Porter 

Meta: Add bug report template
---
 .github/ISSUE_TEMPLATE/bug_report.yml | 71 +++
 .github/ISSUE_TEMPLATE/config.yml |  1 +
 2 files changed, 72 insertions(+)

diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml 
b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 00..f9d9462444
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,71 @@
+name: Bug Report
+description: File a bug report
+labels: ["bug"]
+assignees:
+  - alphapapa
+body:
+  - type: markdown
+attributes:
+  value: |
+Thanks for taking the time to fill out this bug report!
+  - type: input
+id: os-platform
+attributes:
+  label: OS/platform
+  description: What operating system or platform are you running Emacs on?
+validations:
+  required: true
+  - type: textarea
+id: emacs-provenance
+attributes:
+  label: Emacs version and provenance
+  description: What version of Emacs are you using, where did you acquire 
it, and how did you install it?
+validations:
+  required: true
+  - type: input
+id: emacs-command
+attributes:
+  label: Emacs command
+  description: By what method did you run Emacs?  (i.e. what command did 
you run?)
+validations:
+  required: true
+  - type: input
+id: emacs-frame
+attributes:
+  label: Emacs frame type
+  description: Did the problem happen on a GUI or tty Emacs frame?
+validations:
+  required: true
+  - type: textarea
+id: actions
+attributes:
+  label: Actions taken
+  description: What actions did you take, step-by-step, in order, before 
the problem was noticed?
+validations:
+  required: true
+  - type: textarea
+id: results
+attributes:
+  label: Results
+  description: What behavior did you observe that seemed wrong?
+validations:
+  required: true
+  - type: textarea
+id: expected
+attributes:
+  label: Expected results
+  description: What behavior did you expect to observe?
+validations:
+  required: true
+  - type: textarea
+id: backtrace
+attributes:
+  label: Backtrace
+  description: If an error was signaled, please use `M-x 
toggle-debug-on-error RET` and cause the error to happen again, then paste the 
contents of the `*Backtrace*` buffer here.
+  render: elisp
+  - type: textarea
+id: etc
+attributes:
+  label: Etc.
+  description: Any other information that seems relevant
+
diff --git a/.github/ISSUE_TEMPLATE/config.yml 
b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 00..0086358db1
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1 @@
+blank_issues_enabled: true



[nongnu] elpa/hyperdrive e88112f2d2: Fix: (hyperdrive-org-link-follow) Add "hyper:" prefix

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit e88112f2d2e44b7450450679bff183f33ba9519a
Author: Adam Porter 
Commit: Adam Porter 

Fix: (hyperdrive-org-link-follow) Add "hyper:" prefix
---
 hyperdrive-org.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-org.el b/hyperdrive-org.el
index 49eee8f88d..f7d4efafba 100644
--- a/hyperdrive-org.el
+++ b/hyperdrive-org.el
@@ -106,7 +106,9 @@ raw URL, not an Org link."
 (defun hyperdrive-org-link-follow (url &optional _prefix)
   ;; TODO: Do we need to do anything if prefix is used?
   "Follow hyperdrive URL."
-  (hyperdrive-open (hyperdrive-url-entry url)))
+  ;; Add "hyper:" prefix because Org strips the prefix for links that
+  ;; have been configured with `org-link-set-parameters'.
+  (hyperdrive-open (hyperdrive-url-entry (concat "hyper:" url
 
 (defun hyperdrive--org-link-goto (target)
   "Go to TARGET in current Org buffer.



[nongnu] elpa/hyperdrive efcf96425e 1/4: Change: (hyperdrive-url-entry) Use textsec.el to check DNS domains

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit efcf96425e218004ffd97e6fb3f7438d105c91ea
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-url-entry) Use textsec.el to check DNS domains
---
 hyperdrive-lib.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 86c72105ac..5934efc0d1 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -250,6 +250,12 @@ empty public-key slot."
(hyperdrive (pcase host
  ;; FIXME: Duplicate hyperdrive (one has domain 
and nothing else)
  ((rx ".") ; Assume host is a DNSLink domain. See 
code for .
+  (when (textsec-suspicious-p host 'domain)
+;; Check DNSLink domains for suspicious 
characters; don't bother
+;; checking public keys since they're not 
recognizable anyway.
+(unless (y-or-n-p
+(format "Suspicious domain: %s; 
continue anyway?" host))
+  (user-error "Suspicious domain %s" host)))
   (hyperdrive-create :domains (list host)))
  (_  ;; Assume host is a public-key
   (or (gethash host hyperdrive-hyperdrives)



[nongnu] elpa/hyperdrive 07728f7d81 4/4: Meta: Update changelog

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 07728f7d81bc86e1789f27a06adf6b860e32b6c1
Author: Joseph Turner 
Commit: Joseph Turner 

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

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 99ab1f42af..9ff90b4b82 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -29,6 +29,10 @@ This project adheres to 
[[https://semver.org/spec/v2.0.0.html][Semantic Versioni
 - Prevent accidental loss of unsaved hyperdrive files
 - Improved error handling
 
+** Security
+
+- Check DNSLink domains for suspicious characters
+
 * 0.1 [2023-08-12 Sat]
 
 - Initial release



[nongnu] elpa/hyperdrive updated (e88112f2d2 -> 07728f7d81)

2023-09-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  e88112f2d2 Fix: (hyperdrive-org-link-follow) Add "hyper:" prefix
   new  efcf96425e Change: (hyperdrive-url-entry) Use textsec.el to check 
DNS domains
   new  daee669989 Fix: (hyperdrive-url-entry) Check that 
textsec-suspicious-p is bound
   new  bfc606443a Docs: Document textsec-suspicious-p check
   new  07728f7d81 Meta: Update changelog


Summary of changes:
 CHANGELOG.org | 4 
 doc/hyperdrive-manual.org | 3 +++
 hyperdrive-lib.el | 7 +++
 3 files changed, 14 insertions(+)



[nongnu] elpa/hyperdrive daee669989 2/4: Fix: (hyperdrive-url-entry) Check that textsec-suspicious-p is bound

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit daee6699895b19367c1cc9af63a3451b69d69c74
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: (hyperdrive-url-entry) Check that textsec-suspicious-p is bound
---
 hyperdrive-lib.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index 5934efc0d1..318ceeb650 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -250,7 +250,8 @@ empty public-key slot."
(hyperdrive (pcase host
  ;; FIXME: Duplicate hyperdrive (one has domain 
and nothing else)
  ((rx ".") ; Assume host is a DNSLink domain. See 
code for .
-  (when (textsec-suspicious-p host 'domain)
+  (when (and (fboundp #'textsec-suspicious-p)
+ (textsec-suspicious-p host 'domain))
 ;; Check DNSLink domains for suspicious 
characters; don't bother
 ;; checking public keys since they're not 
recognizable anyway.
 (unless (y-or-n-p



[nongnu] elpa/hyperdrive bfc606443a 3/4: Docs: Document textsec-suspicious-p check

2023-09-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit bfc606443abdf7041578006f5d44f18c132ed9c2
Author: Joseph Turner 
Commit: Joseph Turner 

Docs: Document textsec-suspicious-p check
---
 doc/hyperdrive-manual.org | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org
index e171c3c543..37fdd8616f 100644
--- a/doc/hyperdrive-manual.org
+++ b/doc/hyperdrive-manual.org
@@ -753,6 +753,9 @@ this issue by remembering which public key the DNS record 
resolved to,
 so that peers can use the stored public key itself for subsequent
 connections.
 
+DNS domains are checked for suspicious characters (see
+[[info:elisp#Suspicious Text]]).
+
 * Known limitations
 
 ** Files and folders can have the same name