[elpa] externals/org f6fc385ed0: ob-lilypond.el: Fix docstring typos
branch: externals/org commit f6fc385ed0e072375579183c7c386a89d204c3d6 Author: Nicholas Vollmer Commit: Ihor Radchenko ob-lilypond.el: Fix docstring typos --- lisp/ob-lilypond.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index b6ee91f58c..ca4005d711 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -145,7 +145,7 @@ blocks.") body)) (defun org-babel-execute:lilypond (body params) - "Execute lilypond src blcok according to arragne mode. + "Execute LilyPond src block according to arrange mode. See `org-babel-execute-src-block' for BODY and PARAMS. When in arrange mode, tangle all blocks and process the result. Otherwise, execute block according to header settings."
[nongnu] elpa/dracula-theme 8e73c67581 2/2: Bump version
branch: elpa/dracula-theme commit 8e73c675816faadcf4d052b1ba09dc1b00aa1509 Author: Étienne Deparis Commit: Étienne Deparis Bump version Also fix missing 1.8.0 docstring... --- dracula-theme.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracula-theme.el b/dracula-theme.el index 15e1d30f93..5ee3d35781 100644 --- a/dracula-theme.el +++ b/dracula-theme.el @@ -6,7 +6,7 @@ ;; Maintainer: Étienne Deparis ;; Author: film42 -;; Version: 1.7.0 +;; Version: 1.8.1 ;; Package-Requires: ((emacs "24.3")) ;; URL: https://github.com/dracula/emacs
[nongnu] elpa/dracula-theme 4b5ab49bb6 1/2: Fix a docstring embedded code
branch: elpa/dracula-theme commit 4b5ab49bb684243f899d6f14815183bf6f71d6e6 Author: Étienne Deparis Commit: Étienne Deparis Fix a docstring embedded code --- dracula-theme.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracula-theme.el b/dracula-theme.el index 982c3bd2c3..15e1d30f93 100644 --- a/dracula-theme.el +++ b/dracula-theme.el @@ -69,7 +69,7 @@ following lines in their config file after having load the Dracula theme: (unless (display-graphic-p) - (set-face-background 'default \"black\" nil)) + (set-face-background \\='default \"black\" nil)) There is a lot of discussion behind the 256 colors theme (see URL `https://github.com/dracula/emacs/pull/57'). Please take time to
[nongnu] elpa/dracula-theme updated (12d2d0aa6e -> 8e73c67581)
elpasync pushed a change to branch elpa/dracula-theme. from 12d2d0aa6e Merge pull request #99 from dracula/imgbot new 4b5ab49bb6 Fix a docstring embedded code new 8e73c67581 Bump version Summary of changes: dracula-theme.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[nongnu] elpa/clojure-ts-mode b8c860d26a: Use treesit-thing-at-point to id nodes as s-expressions
branch: elpa/clojure-ts-mode commit b8c860d26a7e6794ce8e4af6063017d8ed02f0fd Author: Danny Freeman Commit: Danny Freeman Use treesit-thing-at-point to id nodes as s-expressions This lets us not treat smaller sub-nodes like sym_name and sym_ns as s-expressions, which allows for proper transposition as described in issue #17 Thanks to casouri and sogaiu for their help on this. --- CHANGELOG.md | 2 ++ clojure-ts-mode.el | 23 --- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8283f0b5f8..5d532bc032 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## main (unreleased) +- Re-enable treesit-transpose-sexps on Emacs 30 after fixes released by @casouri. + ## 0.1.5 - Disable treesit-transpose-sexps on Emacs 30 in favor of the default implementation (#17) [623c98292f9207a95169cdeae6f8595c016c6320](https://github.com/clojure-emacs/clojure-ts-mode/commit/623c98292f9207a95169cdeae6f8595c016c6320) diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el index a6142243cc..658894bd6e 100644 --- a/clojure-ts-mode.el +++ b/clojure-ts-mode.el @@ -567,6 +567,23 @@ See `clojure-ts--standard-definition-node-name' for the implementation used.") ((parent-is "list_lit") parent 1) ((parent-is "set_lit") parent 2 +(defvar clojure-ts--sexp-nodes + '("#_" ;; transpose-sexp near a discard macro moves it around. +"num_lit" "sym_lit" "kwd_lit" "nil_lit" "bool_lit" +"regex_lit" "str_lit" "char_lit" +"list_lit" "map_lit" "vec_lit" "set_lit" "ns_map_lit" +"anon_fn_lit" "read_cond_lit" +"var_quoting_lit" "sym_val_lit" "evaling_lit" +"tagged_or_ctor_lit" "splicing_read_cond_lit" +"derefing_lit" "quoting_lit" "syn_quoting_lit" +"unquote_splicing_lit" "unquoting_lit") + "A regular expression that matches nodes that can be treated as s-expressions.") + +(defvar clojure-ts--thing-settings + `((clojure + ((sexp ,(regexp-opt clojure-ts--sexp-nodes)) + (text ,(regexp-opt '("comment"))) + (defvar clojure-ts-mode-map (let ((map (make-sparse-keymap))) ;(set-keymap-parent map clojure-mode-map) @@ -619,13 +636,13 @@ See `clojure-ts--standard-definition-node-name' for the implementation used.") '((comment string char number) (keyword constant symbol bracket builtin) (deref quote metadata definition variable type doc regex tagged-literals))) +(when (boundp 'treesit-thing-settings) ;; Emacs 30+ + (setq-local treesit-thing-settings clojure-ts--thing-settings)) (when clojure-ts--debug (setq-local treesit--indent-verbose t treesit--font-lock-verbose t) (treesit-inspect-mode)) -(treesit-major-mode-setup) -(when (fboundp 'transpose-sexps-default-function) - (setq-local transpose-sexps-function #'transpose-sexps-default-function +(treesit-major-mode-setup))) ;;;###autoload (define-derived-mode clojurescript-ts-mode clojure-ts-mode "ClojureScript[TS]"
[nongnu] elpa/git-commit 5f588cc63d 1/2: magit-no-confirm: Mention magit-stash-apply
branch: elpa/git-commit commit 5f588cc63d2cfd4c3b09cc5ab6538cd80cf92c98 Author: Jonas Bernoulli Commit: Jonas Bernoulli magit-no-confirm: Mention magit-stash-apply Make a terse summary even more terse, but also mention the place where a less terse description can be found. --- docs/magit.org | 10 -- docs/magit.texi| 10 -- lisp/magit-base.el | 10 -- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/docs/magit.org b/docs/magit.org index e16223ca2f..41a40bad10 100644 --- a/docs/magit.org +++ b/docs/magit.org @@ -1525,12 +1525,10 @@ telling Magit to ask fewer questions. - Various: -- ~stash-apply-3way~ When a stash cannot be applied using - ~git stash apply~, then Magit uses ~git apply~ instead. - If doing so is safe, then it uses ~--3way~, when it is not - because doing so requires that some files are first staged, - then by default it prompts the user whether to use ~--3way~ - or ~--reject~. Add this symbol to always use ~--3way~. +- ~stash-apply-3way~ When a stash cannot be applied using ~git stash + apply~, then Magit uses ~git apply~ instead, possibly using the + ~--3way~ argument, which isn't always perfectly safe. See also + ~magit-stash-apply~. - ~kill-process~ There seldom is a reason to kill a process. diff --git a/docs/magit.texi b/docs/magit.texi index 4fcf527fc5..9af3b5c02f 100644 --- a/docs/magit.texi +++ b/docs/magit.texi @@ -2022,12 +2022,10 @@ Various: @itemize @item -@code{stash-apply-3way} When a stash cannot be applied using -@code{git stash apply}, then Magit uses @code{git apply} instead. -If doing so is safe, then it uses @code{--3way}, when it is not -because doing so requires that some files are first staged, -then by default it prompts the user whether to use @code{--3way} -or @code{--reject}. Add this symbol to always use @code{--3way}. +@code{stash-apply-3way} When a stash cannot be applied using @code{git stash + apply}, then Magit uses @code{git apply} instead, possibly using the +@code{--3way} argument, which isn't always perfectly safe. See also +@code{magit-stash-apply}. @item @code{kill-process} There seldom is a reason to kill a process. diff --git a/lisp/magit-base.el b/lisp/magit-base.el index 9d04853adb..9d13e781f9 100644 --- a/lisp/magit-base.el +++ b/lisp/magit-base.el @@ -318,12 +318,10 @@ Removing modules: Various: - `stash-apply-3way' When a stash cannot be applied using - \"git stash apply\", then Magit uses \"git apply\" instead. - If doing so is safe, then it uses \"--3way\", when it is not - because doing so requires that some files are first staged, - then by default it prompts the user whether to use \"--3way\" - or \"--reject\". Add this symbol to always use \"--3way\". + `stash-apply-3way' When a stash cannot be applied using \"git + stash apply\", then Magit uses \"git apply\" instead, possibly + using the \"--3way\" argument, which isn't always perfectly + safe. See also `magit-stash-apply'. `kill-process' There seldom is a reason to kill a process.
[nongnu] elpa/git-commit a3b9b00702 2/2: magit-confirm-files: Strip properties from file-name in prompt
branch: elpa/git-commit commit a3b9b007025572548a909b0cf5edc144c98fcb2f Author: Jonas Bernoulli Commit: Jonas Bernoulli magit-confirm-files: Strip properties from file-name in prompt --- lisp/magit-base.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/magit-base.el b/lisp/magit-base.el index 9d13e781f9..0293167bf0 100644 --- a/lisp/magit-base.el +++ b/lisp/magit-base.el @@ -819,7 +819,7 @@ ACTION is a member of option `magit-slow-confirm'." (unless prompt (setq prompt (magit-confirm-make-prompt action))) (magit-confirm action - (concat prompt " %S") + (concat prompt " \"%s\"") (concat prompt " %d files") noabort files prompt-suffix)))
[nongnu] elpa/git-commit updated (ace5ca4401 -> a3b9b00702)
elpasync pushed a change to branch elpa/git-commit. from ace5ca4401 magit--imenu-goto-function: New function new 5f588cc63d magit-no-confirm: Mention magit-stash-apply new a3b9b00702 magit-confirm-files: Strip properties from file-name in prompt Summary of changes: docs/magit.org | 10 -- docs/magit.texi| 10 -- lisp/magit-base.el | 12 +--- 3 files changed, 13 insertions(+), 19 deletions(-)
[nongnu] elpa/magit updated (ace5ca4401 -> a3b9b00702)
elpasync pushed a change to branch elpa/magit. from ace5ca4401 magit--imenu-goto-function: New function adds 5f588cc63d magit-no-confirm: Mention magit-stash-apply adds a3b9b00702 magit-confirm-files: Strip properties from file-name in prompt No new revisions were added by this update. Summary of changes: docs/magit.org | 10 -- docs/magit.texi| 10 -- lisp/magit-base.el | 12 +--- 3 files changed, 13 insertions(+), 19 deletions(-)
[nongnu] elpa/magit-section updated (ace5ca4401 -> a3b9b00702)
elpasync pushed a change to branch elpa/magit-section. from ace5ca4401 magit--imenu-goto-function: New function adds 5f588cc63d magit-no-confirm: Mention magit-stash-apply adds a3b9b00702 magit-confirm-files: Strip properties from file-name in prompt No new revisions were added by this update. Summary of changes: docs/magit.org | 10 -- docs/magit.texi| 10 -- lisp/magit-base.el | 12 +--- 3 files changed, 13 insertions(+), 19 deletions(-)
[elpa] externals/seq 9d9f51b0e3: Sync seq.el with Emacs master and bump version to 2.24
branch: externals/seq commit 9d9f51b0e3ca59e0a488801064512f4878ac910b Author: Stefan Kangas Commit: Stefan Kangas Sync seq.el with Emacs master and bump version to 2.24 --- seq-24.el | 2 +- seq-25.el | 268 -- seq.el| 15 +++- 3 files changed, 205 insertions(+), 80 deletions(-) diff --git a/seq-24.el b/seq-24.el index 3ca0964a49..51c3e36c24 100644 --- a/seq-24.el +++ b/seq-24.el @@ -1,6 +1,6 @@ ;;; seq-24.el --- seq.el implementation for Emacs 24.x -*- lexical-binding: t -*- -;; Copyright (C) 2014-2020 Free Software Foundation, Inc. +;; Copyright (C) 2014-2023 Free Software Foundation, Inc. ;; Author: Nicolas Petton ;; Keywords: sequences diff --git a/seq-25.el b/seq-25.el index 30379ca044..55c78b49a7 100644 --- a/seq-25.el +++ b/seq-25.el @@ -1,6 +1,6 @@ ;;; seq-25.el --- seq.el implementation for Emacs 25.x -*- lexical-binding: t -*- -;; Copyright (C) 2014-2021 Free Software Foundation, Inc. +;; Copyright (C) 2014-2023 Free Software Foundation, Inc. ;; Author: Nicolas Petton ;; Keywords: sequences @@ -58,17 +58,29 @@ (when (version<= "25" emacs-version) `(progn ,@body))) +(defalias 'seq--take + (if (>= emacs-major-version 29) + 'take +(lambda (n list); copied here from the `compat' package + "Return the first N elements of LIST. +If N is zero or negative, return nil. +If N is greater or equal to the length of LIST, return LIST (or a copy)." + (let (copy) +(while (and (< 0 n) list) + (push (pop list) copy) + (setq n (1- n))) +(nreverse copy) + (seq--when-emacs-25-p (eval-when-compile (require 'cl-generic)) - + ;; We used to use some sequence functions from cl-lib, but this -;; dependency was swapped around so that it will be easier to make -;; seq.el preloaded in the future. See also Bug#39761#26. +;; dependency was swapped around so that it's easier to make seq.el +;; preloaded. See also Bug#39761#26. (defmacro seq-doseq (spec &rest body) - "Loop over a sequence. -Evaluate BODY with VAR bound to each element of SEQUENCE, in turn. + "Loop over a SEQUENCE, evaluating BODY with VAR bound to each of its elements. Similar to `dolist' but can be applied to lists, strings, and vectors. @@ -99,7 +111,7 @@ name to be bound to the rest of SEQUENCE." ,@body)) (defmacro seq-setq (args sequence) - "Assign to the variables in ARGS the elements of SEQUENCE. + "Assign the elements of SEQUENCE to the variables in ARGS. ARGS can also include the `&rest' marker followed by a variable name to be bound to the rest of SEQUENCE." @@ -109,7 +121,7 @@ name to be bound to the rest of SEQUENCE." ;;; Basic seq functions that have to be implemented by new sequence types (cl-defgeneric seq-elt (sequence n) - "Return Nth element of SEQUENCE." + "Return the Nth element of SEQUENCE." (elt sequence n)) ;; Default gv setters for `seq-elt'. @@ -122,7 +134,7 @@ name to be bound to the rest of SEQUENCE." (setcar (nthcdr n sequence) store)) (cl-defgeneric seq-length (sequence) - "Return the number of elements of SEQUENCE." + "Return the number of elements in SEQUENCE." (length sequence)) (defun seq-first (sequence) @@ -130,11 +142,12 @@ name to be bound to the rest of SEQUENCE." (seq-elt sequence 0)) (defun seq-rest (sequence) - "Return a sequence of the elements of SEQUENCE except the first one." + "Return SEQUENCE with its first element removed." (seq-drop sequence 1)) (cl-defgeneric seq-do (function sequence) - "Apply FUNCTION to each element of SEQUENCE, presumably for side effects. + "Apply FUNCTION to each element of SEQUENCE. +Presumably, FUNCTION has useful side effects. Return SEQUENCE." (mapc function sequence)) @@ -159,6 +172,7 @@ the sequence, and its index within the sequence." "Return a shallow copy of SEQUENCE." (copy-sequence sequence)) +;;;###autoload (cl-defgeneric seq-subseq (sequence start &optional end) "Return the sequence of elements of SEQUENCE from START to END. END is exclusive. @@ -171,21 +185,25 @@ if positive or too small if negative)." ((or (stringp sequence) (vectorp sequence)) (substring sequence start end)) ((listp sequence) (let (len - (errtext (format "Bad bounding indices: %s, %s" start end))) + (orig-start start) + (orig-end end)) (and end (< end 0) (setq end (+ end (setq len (length sequence) (if (< start 0) (setq start (+ start (or len (setq len (length sequence)) (unless (>= start 0) -(error "%s" errtext)) +(error "Start index out of bounds: %s" orig-start)) (when (> start 0) (setq sequence (nthcdr (1- start) sequence)) -(or sequence (error "%s" errtext)) +(unless sequence + (error "Start index out of bounds: %s" orig-start)) (setq sequence (cdr sequence))) (if end - (let ((res nil)) -
[elpa] externals/debbugs c1934c0296: New option to prefer Magit over VC
branch: externals/debbugs commit c1934c0296817f8953cfbc3a4299ffb22d77d4f0 Author: Stefan Kangas Commit: Stefan Kangas New option to prefer Magit over VC * debbugs-gnu.el (debbugs-gnu-apply-patch-prefers-magit): New defcustom and helper function with the same name. (debbugs-gnu-apply-patch): Prefer Magit to VC when above new defcustom is non-nil. --- debbugs-gnu.el | 59 ++ 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/debbugs-gnu.el b/debbugs-gnu.el index 85f0c807d2..f366fba11d 100644 --- a/debbugs-gnu.el +++ b/debbugs-gnu.el @@ -215,6 +215,8 @@ (declare-function log-view-current-entry "log-view" (&optional pos move)) (declare-function log-view-current-tag "log-view" (&optional pos)) +(declare-function magit-status-setup-buffer "magit" (&optional directory)) +(declare-function magit-refresh "magit" ()) (defvar compilation-in-progress) (defvar diff-file-header-re) @@ -2488,11 +2490,17 @@ or bug ranges, with default to `debbugs-gnu-default-bug-number-list'." :type 'directory :version "30.1") +(defcustom debbugs-gnu-apply-patch-prefers-magit nil + "Non-nil means prefer using Magit instead of VC. +If Magit is not available, fall back to VC." + :type 'boolean + :version "30.1") + (defvar debbugs-gnu-current-directory nil "The current source tree directory.") (defun debbugs-gnu-init-current-directory (&optional branch) -"Initialize `debbugs-gnu-current-directory'." + "Initialize `debbugs-gnu-current-directory'." (setq debbugs-gnu-current-directory (if branch debbugs-gnu-branch-directory @@ -2503,6 +2511,10 @@ or bug ranges, with default to `debbugs-gnu-default-bug-number-list'." "Emacs repository location: " debbugs-gnu-current-directory nil t nil #'file-directory-p +(defun debbugs-gnu-apply-patch-prefers-magit () + (and debbugs-gnu-apply-patch-prefers-magit + (require 'magit nil t))) + (defun debbugs-gnu-apply-patch (&optional branch selectively) "Apply the patch from the current message. If given a prefix, patch in the branch directory instead. @@ -2581,25 +2593,32 @@ If SELECTIVELY, query the user before applying the patch." (format "cd %s; %s" debbugs-gnu-current-directory debbugs-gnu-compile-command)) -(vc-dir debbugs-gnu-current-directory) -(vc-dir-hide-up-to-date) -(goto-char (point-min)) -(sit-for 1) -(vc-diff) -;; All these commands are asynchronous, so just wait a bit. This -;; should be done properly a different way. -(sit-for 2) -;; We've now done everything, so arrange the windows we need to see. -(delete-other-windows) -(switch-to-buffer output-buffer) -(split-window) -(split-window) -(other-window 1) -(switch-to-buffer "*compilation*") -(goto-char (point-max)) -(other-window 1) -(switch-to-buffer "*vc-diff*") -(goto-char (point-min +(let (buf) + (if (debbugs-gnu-apply-patch-prefers-magit) + (progn +(magit-status-setup-buffer debbugs-gnu-current-directory) +(sit-for 1) +(magit-refresh)) +(vc-dir debbugs-gnu-current-directory) +(vc-dir-hide-up-to-date) +(goto-char (point-min)) +(sit-for 1) +(vc-diff)) + ;; All these commands are asynchronous, so just wait a bit. This + ;; should be done properly a different way. + (sit-for 2) + (setq buf (current-buffer)) + ;; We've now done everything, so arrange the windows we need to see. + (delete-other-windows) + (switch-to-buffer output-buffer) + (split-window) + (split-window) + (other-window 1) + (switch-to-buffer "*compilation*") + (goto-char (point-max)) + (other-window 1) + (switch-to-buffer buf) + (goto-char (point-min) (defun debbugs-gnu-diff-hunk-target-name (dir) (let ((names nil))
[elpa] externals/vertico e130a94588 1/2: vertico-buffer: Do not attempt to delete non-live window
branch: externals/vertico commit e130a945888439897630be3c945a0ecc0f8a868d Author: Daniel Mendler Commit: Daniel Mendler vertico-buffer: Do not attempt to delete non-live window --- extensions/vertico-buffer.el | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/vertico-buffer.el b/extensions/vertico-buffer.el index b9dcfe4ea2..df01933a9b 100644 --- a/extensions/vertico-buffer.el +++ b/extensions/vertico-buffer.el @@ -134,12 +134,14 @@ (fset sym (lambda () (when (= depth (recursion-depth)) (with-selected-window (active-minibuffer-window) -(if (not (and (window-live-p win) (buffer-live-p old-buf))) -(delete-window win) +(cond + ((and (window-live-p win) (buffer-live-p old-buf)) (set-window-parameter win 'no-other-window now) (set-window-parameter win 'no-delete-other-windows ndow) (set-window-dedicated-p win nil) (set-window-buffer win old-buf)) + ((window-live-p win) + (delete-window win))) (when vertico-buffer-hide-prompt (set-window-vscroll nil 0)) (remove-hook 'minibuffer-exit-hook sym)
[elpa] externals/vertico updated (e01c1d2f4c -> 5780fac84f)
elpasync pushed a change to branch externals/vertico. from e01c1d2f4c README update new e130a94588 vertico-buffer: Do not attempt to delete non-live window new 5780fac84f vertico-buffer: Use hashed symbol Summary of changes: extensions/vertico-buffer.el | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-)
[elpa] externals/vertico 5780fac84f 2/2: vertico-buffer: Use hashed symbol
branch: externals/vertico commit 5780fac84f67c19cd6906077ecd636bac3c0c7ad Author: Daniel Mendler Commit: Daniel Mendler vertico-buffer: Use hashed symbol --- extensions/vertico-buffer.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vertico-buffer.el b/extensions/vertico-buffer.el index df01933a9b..0029eab4c8 100644 --- a/extensions/vertico-buffer.el +++ b/extensions/vertico-buffer.el @@ -112,7 +112,7 @@ (cl-defmethod vertico--resize-window (_height &context (vertico-buffer-mode (eql t (cl-defmethod vertico--setup :after (&context (vertico-buffer-mode (eql t))) - (add-hook 'pre-redisplay-functions 'vertico-buffer--redisplay nil 'local) + (add-hook 'pre-redisplay-functions #'vertico-buffer--redisplay nil 'local) (let* ((action vertico-buffer-display-action) tmp win old-buf (_ (unwind-protect (progn
[elpa] externals/consult 40607fb11c: README: Update, move auxillary packages to wiki page
branch: externals/consult commit 40607fb11ceaaa4d2d1c19673295923fd9cfa0e2 Author: Daniel Mendler Commit: Daniel Mendler README: Update, move auxillary packages to wiki page --- README.org | 89 +- 1 file changed, 18 insertions(+), 71 deletions(-) diff --git a/README.org b/README.org index 0ced128ec4..b6453e016c 100644 --- a/README.org +++ b/README.org @@ -397,15 +397,15 @@ their descriptions. #'completion--in-region) args))) #+end_src - Instead of =consult-completion-in-region=, you may prefer to see the - completions directly in the buffer as a small popup. In that case, I recommend - either the [[https://github.com/minad/corfu][Corfu]] or the [[https://github.com/company-mode/company-mode][Company]] package. There is a technical limitation of - =consult-completion-in-region= in combination with Lsp-mode or Eglot. The Lsp - server relies on the input at point, in order to generate refined candidate - strings. Since the completion is transferred from the original buffer to the - minibuffer, the server does not receive the updated input. LSP completion - works with Corfu or Company though, which perform the completion directly in - the original buffer. + Instead of =consult-completion-in-region=, you may prefer to see the completions + directly in the buffer as a small popup. In that case, I recommend the [[https://github.com/minad/corfu][Corfu]] + package. There is a technical limitation of =consult-completion-in-region= in + combination with the Lsp modes. The Lsp server relies on the input at point, + in order to generate refined candidate strings. Since the completion is + transferred from the original buffer to the minibuffer, the server does not + receive the updated input. In contrast, in-buffer Lsp completion for example + via Corfu works properly since the completion takes place directly in the + original buffer. * Special features :properties: @@ -1041,7 +1041,7 @@ There exist multiple fine completion UIs beside Vertico, which are supported by Consult. Give them a try and find out which interaction model fits best for you. - The builtin completion UI, which pops up the =*Completions*= buffer. -- The builtin =icomplete-vertical-mode= in Emacs 28. +- The builtin =icomplete-vertical-mode= in Emacs 28 or newer. - [[https://git.sr.ht/~protesilaos/mct][mct by Protesilaos Stavrou]]: Minibuffer and Completions in Tandem, which builds on the default completion UI. @@ -1053,48 +1053,9 @@ annotations. I highly recommend the Embark package, but in order to familiarize yourself with the other components, you can first start without it - or you could use with Embark right away and add the other components later on. -* Auxiliary packages -:properties: -:description: Integrations with the wider ecosystem -:end: - -You can integrate Consult with special programs or with other packages in the -wider Emacs ecosystem. You may want to install some of theses packages depending -on your preferences and requirements. - -- [[https://github.com/yadex205/consult-ag][consult-ag]]: Support for the [[https://github.com/ggreer/the_silver_searcher][Silver Searcher]] in the style of =consult-grep=. -- [[https://github.com/youngker/consult-codesearch.el][consult-codesearch]]: Integration with [[https://github.com/google/codesearch][Code Search]]. -- [[https://github.com/mohkale/consult-company][consult-company]]: Completion at point using the [[https://github.com/company-mode/company-mode][Company]] backends. -- [[https://github.com/mohkale/consult-compile-multi][consult-compile-multi]]: Integration with [[https://github.com/mohkale/compile-multi][compile-multi]]. -- [[https://github.com/karthink/consult-dir][consult-dir]]: Directory jumper using Consult multi sources. -- [[https://codeberg.org/ravi/consult-dash][consult-dash]]: Consult interface to [[https://github.com/dash-docs-el/dash-docs][Dash documentation]] -- [[https://github.com/mohkale/consult-eglot][consult-eglot]]: Integration with Eglot (LSP client). -- [[https://github.com/minad/consult-flycheck][consult-flycheck]]: Additional Flycheck integration. -- [[https://gitlab.com/OlMon/consult-flyspell][consult-flyspell]]: Additional Flyspell integration. -- [[https://github.com/ghosty141/consult-git-log-grep][consult-git-log-grep]]: Consult interface to git log. -- [[https://github.com/Nyoho/consult-hatena-bookmark][consult-hatena-bookmark]]: Access Hatena bookmarks. -- [[https://github.com/rcj/consult-ls-git][consult-ls-git]]: List files from git via Consult. -- [[https://github.com/gagbo/consult-lsp][consult-lsp]]: Integration with Lsp-mode (LSP client). -- [[https://codeberg.org/jao/consult-notmuch][consult-notmuch]]: Access the [[https://notmuchmail.org/][Notmuch]] email system using Consult. -- [[https://github.com/mclear-tools/consult-notes][consult-notes]]: Searching notes with Consult. -- [[htt
[nongnu] elpa/hyperdrive 0478d21827 04/32: WIP
branch: elpa/hyperdrive commit 0478d218275b78801c091a6a29fc6cc75bc9d5b6 Author: Adam Porter Commit: Adam Porter WIP --- hyperdrive-vars.el | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el index 6f48943512..08e4f09159 100644 --- a/hyperdrive-vars.el +++ b/hyperdrive-vars.el @@ -102,9 +102,16 @@ Internally, a cons cell of (KEY . PREDICATE), the KEY being the appropriate function (e.g. `time-less-p' for `hyperdrive-entry-modified', `<' for `hyperdrive-entry-size', etc)." - :type '(choice (const :tag "By name" (hyperdrive-entry-name . string<)) - (const :tag "By size" (hyperdrive-entry-size . <)) - (const :tag "By date" (hyperdrive-entry-modified . time-less-p))) + :type '(choice (cons :tag "By name" (const hyperdrive-entry-name) + (choice (const :tag "Ascending" string<) + (const :tag "Descending" string>))) + (cons :tag "By size" (const hyperdrive-entry-size) + (choice (const :tag "Ascending" <) + (const :tag "Descending" >))) + (cons :tag "By date" (const hyperdrive-entry-modified) + (choice (const :tag "Ascending" time-less-p) + (const :tag "Descending" (lambda (a b) + (not (time-less-p a b))) :group 'hyperdrive) (defcustom hyperdrive-history-display-buffer-action
[nongnu] elpa/hyperdrive 7d20ba30ad 19/32: Fix/Change: Use hyperdrive-queue-size everywhere
branch: elpa/hyperdrive commit 7d20ba30adc6134b1f524343028b90294d4a4ab9 Author: Joseph Turner Commit: Adam Porter Fix/Change: Use hyperdrive-queue-size everywhere --- hyperdrive-diff.el | 2 +- hyperdrive-handlers.el | 2 +- hyperdrive-history.el | 2 +- hyperdrive-lib.el | 2 +- hyperdrive-mirror.el | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hyperdrive-diff.el b/hyperdrive-diff.el index 18fc16e6ff..fe0161efbd 100644 --- a/hyperdrive-diff.el +++ b/hyperdrive-diff.el @@ -66,7 +66,7 @@ This function is intended to diff files, not directories." (let* (old-response new-response (queue (make-plz-queue - :limit 2 + :limit hyperdrive-queue-size :finally (lambda () (unless (or old-response new-response) (hyperdrive-error "Files non-existent")) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 5a2cc3f7f7..a9b7140609 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -146,7 +146,7 @@ arguments." metadata-queue (make-plz-queue ;; Experimentation seems to show that a ;; queue size of about 20 performs best. -:limit 20 +:limit hyperdrive-queue-size :finally (lambda () (with-current-buffer (ewoc-buffer ewoc) (ewoc-set-hf ewoc header "") diff --git a/hyperdrive-history.el b/hyperdrive-history.el index 0d23ffeddb..c376f13cb5 100644 --- a/hyperdrive-history.el +++ b/hyperdrive-history.el @@ -201,7 +201,7 @@ Universal prefix argument \\[universal-argument] forces range-entries)) ;; TODO: Display files in pop-up window, like magit-diff buffers appear when selected from magit-log (display-buffer (current-buffer) hyperdrive-history-display-buffer-action) - (setf queue (make-plz-queue :limit 8 + (setf queue (make-plz-queue :limit hyperdrive-queue-size :finally (lambda () ;; NOTE: Ensure that the buffer's window is selected, ;; if it has one. (Workaround a possible bug in EWOC.) diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index 19fb382f20..dc0781282d 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -605,7 +605,7 @@ requests return, call THEN with no arguments." (if ranges-to-fill (progn ;; TODO: When `plz' lets us handle errors in the queue finalizer, add that here. - (setf queue (make-plz-queue :limit 8 :finally then)) + (setf queue (make-plz-queue :limit hyperdrive-queue-size :finally then)) (cl-labels ((fill-recursively (unknown-entry) ;; NOTE: `fill-recursively' is recursive logically but ;; not technically, because each call is in the async callback. diff --git a/hyperdrive-mirror.el b/hyperdrive-mirror.el index 27113c5052..3a0c46b2d0 100644 --- a/hyperdrive-mirror.el +++ b/hyperdrive-mirror.el @@ -51,7 +51,7 @@ uploading files, open PARENT-ENTRY." (progress-reporter (make-progress-reporter (format "Uploading %s files: " (length files-and-urls)) 0 (length files-and-urls))) (queue (make-plz-queue - :limit 2 + :limit hyperdrive-queue-size :finally (lambda () (progress-reporter-done progress-reporter) (hyperdrive-open parent-entry)
[nongnu] elpa/hyperdrive updated (daaed0257d -> 27c1a81a51)
elpasync pushed a change to branch elpa/hyperdrive. from daaed0257d Tidy: Whitespace new 0334ccfa0d WIP new 9d9b5c3826 WIP new 46eac0a67d WIP new 0478d21827 WIP new de8a963986 WIP new d75559667b WIP new c2af53e72d Add: (hyperdrive-dir-sort, hyperdrive-complete-sort) new 29c70adbf9 Fix new 994b782630 Comment: Add TODO new aa969e7bf5 Add: Progress report in footer new beb1f180fa Tidy: (hyperdrive-dir-sort) Nest to avoid setf new 126f767a46 Comment: Add TODO new b7bba05ca5 Fix: (hyperdrive-entry-create) Docstring new c56644f9ea Tidy: Whitespace new 2b1ab2ba8e Comment: (hyperdrive-sort-entries) Explain sorting behavior new 77c36c870c Tidy: (hyperdrive-complete-sort) Use list new 383c1c606e Docs: Document hyperdrive-dir-sort new 45802e59cc Fix: (hyperdrive-handler-directory) Ensure buffer-modified-p nil new 7d20ba30ad Fix/Change: Use hyperdrive-queue-size everywhere new 32b319d850 Meta: Update changelog new 369ec34f4f Comment: Remove TODO new f70d3276fc Comment: Remove TODO new 899202254b Comment: Remove TODO new d3084390ea Comment: Update TODO new fb915a005c Comment: Add TODO new f670ac3cf7 Change: (-handler-directory) with-silent-modifications in finally new bd440b6465 Remove: (hyperdrive-column-headers) new bf955d34d3 Add/Change: (hyperdrive-column-headers) new 9100b1e748 Fix: (hyperdrive-column-headers) new 55ee45a7f0 Change: (hyperdrive-dir-sort) new 79c4bdf2ec Comment: Remove TODO new 27c1a81a51 Merge branch 'wip/dir-sort' Summary of changes: CHANGELOG.org | 1 + doc/hyperdrive-manual.org | 11 +++- hyperdrive-diff.el| 2 +- hyperdrive-dir.el | 22 +-- hyperdrive-ewoc.el| 10 ++- hyperdrive-handlers.el| 162 +++--- hyperdrive-history.el | 21 +++--- hyperdrive-lib.el | 36 ++- hyperdrive-mirror.el | 2 +- hyperdrive-vars.el| 26 ++-- 10 files changed, 194 insertions(+), 99 deletions(-)
[nongnu] elpa/hyperdrive b7bba05ca5 13/32: Fix: (hyperdrive-entry-create) Docstring
branch: elpa/hyperdrive commit b7bba05ca5e293eed7247356db3de0827e621a7b Author: Joseph Turner Commit: Adam Porter Fix: (hyperdrive-entry-create) Docstring --- hyperdrive-lib.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index 3a678a8368..2f452a1e67 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -120,8 +120,8 @@ generated from PATH. When ENCODE is non-nil, encode PATH." :etc etc)) (cl-defun hyperdrive-sort-entries (entries &key (by hyperdrive-directory-sort)) - ;; FIXME: Docstring. Sorry. :) - "Return ENTRIES sorted by BY." + "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)) (a t)))
[nongnu] elpa/hyperdrive 27c1a81a51 32/32: Merge branch 'wip/dir-sort'
branch: elpa/hyperdrive commit 27c1a81a51386e18023a17701ce68a189176d02f Merge: daaed0257d 79c4bdf2ec Author: Adam Porter Commit: Adam Porter Merge branch 'wip/dir-sort' --- CHANGELOG.org | 1 + doc/hyperdrive-manual.org | 11 +++- hyperdrive-diff.el| 2 +- hyperdrive-dir.el | 22 +-- hyperdrive-ewoc.el| 10 ++- hyperdrive-handlers.el| 162 +++--- hyperdrive-history.el | 21 +++--- hyperdrive-lib.el | 36 ++- hyperdrive-mirror.el | 2 +- hyperdrive-vars.el| 26 ++-- 10 files changed, 194 insertions(+), 99 deletions(-) diff --git a/CHANGELOG.org b/CHANGELOG.org index 2c8d3b2edc..1aa7066a01 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -11,6 +11,7 @@ This project adheres to [[https://semver.org/spec/v2.0.0.html][Semantic Versioni - ~save-some-buffers~ integration - ~info-look~ integration - Org-mode link completion +- directory view sorting by column ** Changed diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org index 20ceb051a7..9681756586 100644 --- a/doc/hyperdrive-manual.org +++ b/doc/hyperdrive-manual.org @@ -171,6 +171,8 @@ default: - ~^~ goes up to the parent directory #+kindex: revert-buffer - ~g~ refreshes the directory to display potential updates +#+kindex: hyperdrive-dir-sort +- ~o~ sorts directory contents by column #+kindex: hyperdrive-dir-download-file - ~d~ downloads the file at point to disk #+kindex: hyperdrive-dir-delete @@ -464,9 +466,12 @@ customize-group RET hyperdrive RET~: - ~hyperdrive-directory-display-buffer-action~ :: Display buffer action for hyperdrive directories. Passed to ~display-buffer~, which see. -#+vindex: hyperdrive-column-headers -- ~hyperdrive-column-headers~ :: Display column headers in - ~hyperdrive-dir~ and ~hyperdrive-history~ buffers. Defaults to ~t~. +#+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-modified', `<' for `hyperdrive-entry-size', etc). #+vindex: hyperdrive-history-display-buffer-action - ~hyperdrive-history-display-buffer-action~ :: Display buffer action diff --git a/hyperdrive-diff.el b/hyperdrive-diff.el index 18fc16e6ff..fe0161efbd 100644 --- a/hyperdrive-diff.el +++ b/hyperdrive-diff.el @@ -66,7 +66,7 @@ This function is intended to diff files, not directories." (let* (old-response new-response (queue (make-plz-queue - :limit 2 + :limit hyperdrive-queue-size :finally (lambda () (unless (or old-response new-response) (hyperdrive-error "Files non-existent")) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index adf6a51c6b..81de96d1d4 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -70,8 +70,7 @@ With point on header, returns directory entry." (cond ((= 1 current-line) ;; Point on header: return directory's entry. hyperdrive-current-entry) - ((or (> current-line last-line) - (and hyperdrive-column-headers (= 2 current-line))) + ((or (> current-line last-line) (= 2 current-line)) ;; Point is below the last entry or on column headers: signal error. (hyperdrive-user-error "No file on this line")) (t @@ -95,6 +94,7 @@ With point on header, returns directory entry." "^" #'hyperdrive-up "D" #'hyperdrive-dir-delete "H" #'hyperdrive-dir-history + "o" #'hyperdrive-dir-sort "?" #'hyperdrive-describe-hyperdrive) ;; TODO: Get rid of this? @@ -113,8 +113,6 @@ With point on header, returns directory entry." Commands -;; TODO: Implement sorting by size, type, etc. - (declare-function hyperdrive-open "hyperdrive") (defun hyperdrive-dir-find-file (entry) @@ -173,6 +171,22 @@ Interactively, visit file or directory at point in (interactive (list (hyperdrive-dir--entry-at-point))) (hyperdrive-history entry)) +;; TODO: Sort by clicking on column headers, and display up/down arrow in sorted column. + +(defun hyperdrive-dir-sort (directory-sort) + "Sort current `hyperdrive-dir' buffer by DIRECTORY-SORT. +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-column-headers (hyperdrive-entry-description hyperdrive-current-entry)) +
[nongnu] elpa/hyperdrive 994b782630 09/32: Comment: Add TODO
branch: elpa/hyperdrive commit 994b782630db49f3d2029099d603786d5ed5599c Author: Adam Porter Commit: Adam Porter Comment: Add TODO --- hyperdrive-dir.el | 1 + 1 file changed, 1 insertion(+) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index f2bd3ae6d5..8ef9f4913f 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -175,6 +175,7 @@ Interactively, visit file or directory at point in (hyperdrive-history entry)) (defun hyperdrive-dir-sort (directory-sort) + ;; TODO(doc): hyperdrive-dir-sort. "Sort current `hyperdrive-dir' buffer by DIRECTORY-SORT. DIRECTORY-SORT should be a valid value of `hyperdrive-directory-sort'."
[nongnu] elpa/hyperdrive c56644f9ea 14/32: Tidy: Whitespace
branch: elpa/hyperdrive commit c56644f9ea1db803f42a1c819561c7ef2d3314de Author: Joseph Turner Commit: Adam Porter Tidy: Whitespace --- hyperdrive-handlers.el | 2 +- hyperdrive-vars.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 34be7eeea8..efd7278c76 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -165,7 +165,7 @@ arguments." prev-entry (when-let ((node (ewoc-locate hyperdrive-ewoc))) (ewoc-data node)) prev-point (point)) - (ewoc-filter hyperdrive-ewoc #'ignore) + (ewoc-filter hyperdrive-ewoc #'ignore) (update-footer num-filled num-entries) (dolist (entry entries) ;; TODO: Update header with progress. diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el index 9c819293b1..0fb0595b7f 100644 --- a/hyperdrive-vars.el +++ b/hyperdrive-vars.el @@ -102,7 +102,7 @@ Internally, a cons cell of (KEY . PREDICATE), the KEY being the appropriate function (e.g. `time-less-p' for `hyperdrive-entry-modified', `<' for `hyperdrive-entry-size', etc)." - :type '(radio (cons :tag "By name" (const :format "" hyperdrive-entry-name ) + :type '(radio (cons :tag "By name" (const :format "" hyperdrive-entry-name) (choice :tag "Direction" :value string< (const :tag "Ascending" string<) (const :tag "Descending" string>)))
[nongnu] elpa/hyperdrive 45802e59cc 18/32: Fix: (hyperdrive-handler-directory) Ensure buffer-modified-p nil
branch: elpa/hyperdrive commit 45802e59cc5966312d640427ee23a832d5f81437 Author: Joseph Turner Commit: Adam Porter Fix: (hyperdrive-handler-directory) Ensure buffer-modified-p nil with-silent-modifications doesn't correctly restore buffer-modified-p status after ewoc-filter runs. --- hyperdrive-handlers.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index efd7278c76..5a2cc3f7f7 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -155,7 +155,8 @@ arguments." (ewoc-enter-last ewoc entry)) (or (when prev-entry (goto-entry prev-entry ewoc)) - (goto-char prev-point))) + (goto-char prev-point)) + (set-buffer-modified-p nil)) ;; TODO: Remove this and the commented out `debug-start-time' ;; binding when we're done experimenting. ;; (message "Elapsed: %s"
[nongnu] elpa/hyperdrive 55ee45a7f0 30/32: Change: (hyperdrive-dir-sort)
branch: elpa/hyperdrive commit 55ee45a7f017f4853cf951184ebb88782726ed36 Author: Adam Porter Commit: Adam Porter Change: (hyperdrive-dir-sort) --- hyperdrive-dir.el | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index 5e0639971f..3407f0352e 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -183,7 +183,10 @@ DIRECTORY-SORT should be a valid value of (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-enter-last hyperdrive-ewoc entry)) +(ewoc-set-hf hyperdrive-ewoc + (hyperdrive-column-headers (hyperdrive-entry-description hyperdrive-current-entry)) + ""))) Imenu support
[nongnu] elpa/hyperdrive 77c36c870c 16/32: Tidy: (hyperdrive-complete-sort) Use list
branch: elpa/hyperdrive commit 77c36c870c527bf7179334bd1ab6234c4d1196c2 Author: Joseph Turner Commit: Adam Porter Tidy: (hyperdrive-complete-sort) Use list --- hyperdrive-lib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index 7012e71092..19fb382f20 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -948,7 +948,7 @@ DEFAULT and INITIAL-INPUT are passed to `read-string' as-is." (choice :tag "Direction" :value ,_default-direction (const :tag "Ascending" ,ascending-predicate) (const :tag "Descending" ,descending-predicate - (cons tag (list accessor ascending-predicate 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
[nongnu] elpa/hyperdrive 899202254b 23/32: Comment: Remove TODO
branch: elpa/hyperdrive commit 899202254bc4b19ca0dd54dffd1b70ac839acb7c Author: Joseph Turner Commit: Adam Porter Comment: Remove TODO --- hyperdrive-handlers.el | 1 - 1 file changed, 1 deletion(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index cfae7abba4..dbde3c7fce 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -170,7 +170,6 @@ arguments." (update-footer num-filled num-entries) (dolist (entry entries) (hyperdrive-fill entry :queue metadata-queue - ;; TODO: Mention in `hyperdrive-fill' docstring that THEN is called with an argument. :then (lambda (&rest _) (update-footer (cl-incf num-filled) num-entries (plz-run metadata-queue)
[nongnu] elpa/hyperdrive 0334ccfa0d 01/32: WIP
branch: elpa/hyperdrive commit 0334ccfa0dd294704eab3e219eef18cb73cab000 Author: Adam Porter Commit: Adam Porter WIP --- hyperdrive-handlers.el | 135 +++-- hyperdrive-lib.el | 5 ++ hyperdrive-vars.el | 12 + 3 files changed, 79 insertions(+), 73 deletions(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 86febe5fcc..6b5b390a0b 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -99,79 +99,68 @@ arguments." ;; TODO: Set a timer and say "Opening URL..." if entry doesn't load ;; in a couple of seconds (same in hyperdrive-handler-default) ;; (like new with-delayed-message ?) - (pcase-let* (((cl-struct hyperdrive-entry hyperdrive path version) -directory-entry) - (url (hyperdrive-entry-url directory-entry)) - ((cl-struct plz-response headers body) -;; SOMEDAY: Consider updating plz to optionally not stringify the body. -(hyperdrive-api 'get url :as 'response :noquery t)) - (entry-names (json-read-from-string body)) - (entries -(mapcar (lambda (entry-name) - (hyperdrive-entry-create - :hyperdrive hyperdrive - :path (concat (url-unhex-string path) entry-name) - :version version - :encode t)) -entry-names)) - (parent-entry (hyperdrive-parent directory-entry)) - (main-header (hyperdrive-entry-description directory-entry)) - (header -(if hyperdrive-column-headers -(concat main-header "\n" -(format "%6s %s %s" -(propertize "Size" 'face 'hyperdrive-column-header) -(format hyperdrive-timestamp-format-string -(propertize "Last Modified" 'face 'hyperdrive-column-header)) -(propertize "Name" 'face 'hyperdrive-column-header))) - main-header)) - (ewoc) (prev-node) (prev-point)) -(when parent-entry - (setf (alist-get 'display-name (hyperdrive-entry-etc parent-entry)) "..") - (push parent-entry entries)) -(setf directory-entry (hyperdrive--fill directory-entry headers)) -(hyperdrive-fill-metadata hyperdrive) -(with-current-buffer (hyperdrive--get-buffer-create directory-entry) - (with-silent-modifications -(if hyperdrive-ewoc -(progn - ;; Store `prev-node' so we can jump to it later. - (setf prev-node (ewoc-locate hyperdrive-ewoc)) - (setf prev-point (point)) - ;; Then clear existing ewoc. - (ewoc-filter hyperdrive-ewoc #'ignore)) - ;; Or make a new one. - (setf hyperdrive-ewoc (ewoc-create #'hyperdrive-dir-pp))) -(setf ewoc hyperdrive-ewoc) ; Bind this for the hyperdrive-fill lambda. -(erase-buffer) -(ewoc-set-hf hyperdrive-ewoc header "") -(mapc (lambda (entry) -(ewoc-enter-last hyperdrive-ewoc entry)) - entries) -(when prev-node - ;; Put point back where it was. - (goto-char - (if-let ((new-node (hyperdrive-ewoc-find-node ewoc (ewoc-data prev-node) -:predicate (lambda (a b) - ;; TODO: This doesn't work. - (equal (hyperdrive-entry-path a) -(hyperdrive-entry-path b)) - (ewoc-location new-node) - prev-point))) -(display-buffer (current-buffer) hyperdrive-directory-display-buffer-action) -(mapc (lambda (entry) -(hyperdrive-fill entry - :then (lambda (_response) - (with-current-buffer (ewoc-buffer ewoc) -;; TODO: Add queue back for sorting -;; FIXME: Refreshing the buffer rapidly signals an error here -(with-silent-modifications - (ewoc-invalidate ewoc (hyperdrive-ewoc-find-node ewoc entry) - ;; TODO: Handle failures? - :else (lambda (_error) (message "ERROR" - entries) -(when then - (funcall then)) + (cl-labels ((goto-entry (entry ewoc) +(when-let ((node (hyperdrive-ewoc-find-node ewoc entry + :predicate #'hyperdrive-entry-equal))) + (goto-char (ewoc-location node) +(pcase-let* (((cl-struct hyperdrive-entry hyperdrive path version) directory-entry) + (url (hyperdrive-entry-ur
[nongnu] elpa/hyperdrive d75559667b 06/32: WIP
branch: elpa/hyperdrive commit d75559667b02f9d341df05f16baebc09d52a6cfa Author: Adam Porter Commit: Adam Porter WIP --- hyperdrive-vars.el | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el index 08e4f09159..9c819293b1 100644 --- a/hyperdrive-vars.el +++ b/hyperdrive-vars.el @@ -102,16 +102,19 @@ Internally, a cons cell of (KEY . PREDICATE), the KEY being the appropriate function (e.g. `time-less-p' for `hyperdrive-entry-modified', `<' for `hyperdrive-entry-size', etc)." - :type '(choice (cons :tag "By name" (const hyperdrive-entry-name) - (choice (const :tag "Ascending" string<) - (const :tag "Descending" string>))) - (cons :tag "By size" (const hyperdrive-entry-size) - (choice (const :tag "Ascending" <) - (const :tag "Descending" >))) - (cons :tag "By date" (const hyperdrive-entry-modified) - (choice (const :tag "Ascending" time-less-p) - (const :tag "Descending" (lambda (a b) - (not (time-less-p a b))) + :type '(radio (cons :tag "By name" (const :format "" hyperdrive-entry-name ) + (choice :tag "Direction" :value string< + (const :tag "Ascending" string<) + (const :tag "Descending" string>))) +(cons :tag "By size" (const :format "" hyperdrive-entry-size) + (choice :tag "Direction" :value < + (const :tag "Ascending" <) + (const :tag "Descending" >))) +(cons :tag "By date" (const :format "" hyperdrive-entry-modified) + (choice :tag "Direction" :value time-less-p + (const :tag "Ascending" time-less-p) + (const :tag "Descending" (lambda (a b) + (not (time-less-p a b))) :group 'hyperdrive) (defcustom hyperdrive-history-display-buffer-action
[nongnu] elpa/hyperdrive 9100b1e748 29/32: Fix: (hyperdrive-column-headers)
branch: elpa/hyperdrive commit 9100b1e7480d5e23c5a15d9aa843c803c06b3daa Author: Adam Porter Commit: Adam Porter Fix: (hyperdrive-column-headers) --- hyperdrive-handlers.el | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 9e75000aa7..6657ee6bc8 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -177,7 +177,7 @@ 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 "")) + (let (name-arrow size-arrow date-arrow) (pcase-exhaustive hyperdrive-directory-sort (`(hyperdrive-entry-name . ,predicate) (setf name-arrow (pcase-exhaustive predicate @@ -187,19 +187,19 @@ Columns are suffixed with up/down arrows according to (setf size-arrow (pcase-exhaustive predicate ('< "▲") ('> "▼" - (`(hyperdrive-entry-date . ,predicate) + (`(hyperdrive-entry-modified . ,predicate) (setf date-arrow (pcase-exhaustive predicate - ('time-less-p< "▲") + ('time-less-p "▲") ((pred functionp) "▼") (concat prefix "\n" -(format "%6s%s %s%s %s%s" -(propertize "Size" 'face 'hyperdrive-column-header) -size-arrow +(format "%6s %s %s" +(concat size-arrow +(propertize "Size" 'face 'hyperdrive-column-header)) (format hyperdrive-timestamp-format-string -(propertize "Last Modified" 'face 'hyperdrive-column-header)) -date-arrow -(propertize "Name" 'face 'hyperdrive-column-header) -name-arrow + (concat date-arrow + (propertize "Last Modified" 'face 'hyperdrive-column-header))) +(concat (propertize "Name" 'face 'hyperdrive-column-header) +name-arrow) (cl-defun hyperdrive-handler-streamable (entry &key _then) ;; TODO: Is there any reason to not pass THEN through?
[nongnu] elpa/hyperdrive 46eac0a67d 03/32: WIP
branch: elpa/hyperdrive commit 46eac0a67d95a100d874244c405ffd8f60e98899 Author: Adam Porter Commit: Adam Porter WIP --- hyperdrive-handlers.el | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 33e9742c26..50b72e0902 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -134,7 +134,7 @@ arguments." (push parent-entry entries)) (with-current-buffer (hyperdrive--get-buffer-create directory-entry) (with-silent-modifications - (setf ewoc (or hyperdrive-ewoc ; Bind this for lambdas. + (setf ewoc (or hyperdrive-ewoc ; Bind this for lambdas. (setf hyperdrive-ewoc (ewoc-create #'hyperdrive-dir-pp))) metadata-queue (make-plz-queue :limit 20 @@ -146,8 +146,9 @@ arguments." (ewoc-enter-last ewoc entry)) (or (when prev-entry (goto-entry prev-entry ewoc)) - (goto-char prev-point)) - (setf prev-entry (ewoc-data (ewoc-locate hyperdrive-ewoc)) + (goto-char prev-point) +prev-entry (when-let ((node (ewoc-locate hyperdrive-ewoc))) + (ewoc-data node)) prev-point (point)) (ewoc-filter hyperdrive-ewoc #'ignore) (ewoc-set-hf ewoc header "Loading...")
[nongnu] elpa/hyperdrive 9d9b5c3826 02/32: WIP
branch: elpa/hyperdrive commit 9d9b5c3826d10e801693d31ffd4dc6ca3a9e692d Author: Adam Porter Commit: Adam Porter WIP --- hyperdrive-handlers.el | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 6b5b390a0b..33e9742c26 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -134,13 +134,8 @@ arguments." (push parent-entry entries)) (with-current-buffer (hyperdrive--get-buffer-create directory-entry) (with-silent-modifications - (if hyperdrive-ewoc - (progn -(setf prev-entry (ewoc-data (ewoc-locate hyperdrive-ewoc)) - prev-point (point)) -(ewoc-filter hyperdrive-ewoc #'ignore)) -(setf hyperdrive-ewoc (ewoc-create #'hyperdrive-dir-pp))) - (setf ewoc hyperdrive-ewoc; Bind this for lambdas. + (setf ewoc (or hyperdrive-ewoc ; Bind this for lambdas. + (setf hyperdrive-ewoc (ewoc-create #'hyperdrive-dir-pp))) metadata-queue (make-plz-queue :limit 20 :finally (lambda () @@ -151,11 +146,15 @@ arguments." (ewoc-enter-last ewoc entry)) (or (when prev-entry (goto-entry prev-entry ewoc)) - (goto-char prev-point)) + (goto-char prev-point)) + (setf prev-entry (ewoc-data (ewoc-locate hyperdrive-ewoc)) +prev-point (point)) + (ewoc-filter hyperdrive-ewoc #'ignore) (ewoc-set-hf ewoc header "Loading...") (dolist (entry entries) ;; TODO: Update header with progress. -(hyperdrive-fill entry :queue metadata-queue)) +(hyperdrive-fill entry :queue metadata-queue + :then #'ignore)) (plz-run metadata-queue) (display-buffer (current-buffer) hyperdrive-directory-display-buffer-action) ;; TODO: Should we display the buffer before or after calling THEN?
[nongnu] elpa/hyperdrive c2af53e72d 07/32: Add: (hyperdrive-dir-sort, hyperdrive-complete-sort)
branch: elpa/hyperdrive commit c2af53e72de8efae4d39bf89e05e7ab60ac67cd6 Author: Adam Porter Commit: Adam Porter Add: (hyperdrive-dir-sort, hyperdrive-complete-sort) --- hyperdrive-dir.el | 13 + hyperdrive-lib.el | 24 2 files changed, 37 insertions(+) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index adf6a51c6b..f2bd3ae6d5 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -95,6 +95,7 @@ With point on header, returns directory entry." "^" #'hyperdrive-up "D" #'hyperdrive-dir-delete "H" #'hyperdrive-dir-history + "o" #'hyperdrive-dir-sort "?" #'hyperdrive-describe-hyperdrive) ;; TODO: Get rid of this? @@ -173,6 +174,18 @@ Interactively, visit file or directory at point in (interactive (list (hyperdrive-dir--entry-at-point))) (hyperdrive-history entry)) +(defun hyperdrive-dir-sort (directory-sort) + "Sort current `hyperdrive-dir' buffer by DIRECTORY-SORT. +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))) +(setf entries (hyperdrive-sort-entries entries)) +(ewoc-filter hyperdrive-ewoc #'ignore) +(dolist (entry entries) + (ewoc-enter-last hyperdrive-ewoc entry + Imenu support (defun hyperdrive-dir--imenu-create-index-function () diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index fa44f07f65..7551330ba1 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -940,6 +940,30 @@ 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* ((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 + (cons tag (list 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) + for key = (aref name 0) + collect (cons name (list key tag + (column-choice (read-answer "Sort by column: " choices)) + (`(,accessor ,ascending-predicate ,descending-predicate) +(map-elt columns (concat "By " column-choice))) + (direction-choice (read-answer "Sort in direction: " + (list (cons "ascending" (list ?a "Ascending")) +(cons "descending" (list ?d "Descending") + (predicate (pcase direction-choice +("ascending" ascending-predicate) +("descending" descending-predicate +(list accessor predicate))) + (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 bd440b6465 27/32: Remove: (hyperdrive-column-headers)
branch: elpa/hyperdrive commit bd440b6465ab43455d4cb536751192d35b91ffa1 Author: Adam Porter Commit: Adam Porter Remove: (hyperdrive-column-headers) This effectively enables the option by default now. --- doc/hyperdrive-manual.org | 4 hyperdrive-dir.el | 3 +-- hyperdrive-ewoc.el| 10 -- hyperdrive-handlers.el| 14 ++ hyperdrive-history.el | 19 --- hyperdrive-vars.el| 4 6 files changed, 19 insertions(+), 35 deletions(-) diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org index 29aa212d38..9681756586 100644 --- a/doc/hyperdrive-manual.org +++ b/doc/hyperdrive-manual.org @@ -473,10 +473,6 @@ customize-group RET hyperdrive RET~: appropriate function (e.g. `time-less-p' for `hyperdrive-entry-modified', `<' for `hyperdrive-entry-size', etc). -#+vindex: hyperdrive-column-headers -- ~hyperdrive-column-headers~ :: Display column headers in - ~hyperdrive-dir~ and ~hyperdrive-history~ buffers. Defaults to ~t~. - #+vindex: hyperdrive-history-display-buffer-action - ~hyperdrive-history-display-buffer-action~ :: Display buffer action for hyperdrive history buffers. Passed to ~display-buffer~, which see. diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index f2967579f3..5e0639971f 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -70,8 +70,7 @@ With point on header, returns directory entry." (cond ((= 1 current-line) ;; Point on header: return directory's entry. hyperdrive-current-entry) - ((or (> current-line last-line) - (and hyperdrive-column-headers (= 2 current-line))) + ((or (> current-line last-line) (= 2 current-line)) ;; Point is below the last entry or on column headers: signal error. (hyperdrive-user-error "No file on this line")) (t diff --git a/hyperdrive-ewoc.el b/hyperdrive-ewoc.el index 30cb482bdf..470c7b134c 100644 --- a/hyperdrive-ewoc.el +++ b/hyperdrive-ewoc.el @@ -72,15 +72,14 @@ last node." (cl-defun hyperdrive-ewoc-next (&optional (n 1)) "Move forward N entries. When on header line, moves point to first entry, skipping over -column headers when `hyperdrive-column-headers' is non-nil." +column headers." (declare (modes hyperdrive-ewoc-mode)) (interactive "p") ;; TODO: Try using the intangible text property on headers to ;; automatically skip over them without conditional code. Setting ;; `cursor-intangible' on the column header causes `hl-line-mode' to ;; highlight the wrong line when crossing over the headers. - (let ((lines-below-header (- (line-number-at-pos) - (if hyperdrive-column-headers 2 1 + (let ((lines-below-header (- (line-number-at-pos) 2))) (if (cl-plusp lines-below-header) (hyperdrive-ewoc-move n) ;; Point on first line or column header: jump to first ewoc entry and then maybe move. @@ -90,11 +89,10 @@ column headers when `hyperdrive-column-headers' is non-nil." (cl-defun hyperdrive-ewoc-previous (&optional (n 1)) "Move backward N entries. When on first entry, moves point to header line, skipping over -column headers when `hyperdrive-column-headers' is non-nil." +column headers." (declare (modes hyperdrive-ewoc-mode)) (interactive "p") - (let ((lines-below-header (- (line-number-at-pos) - (if hyperdrive-column-headers 2 1 + (let ((lines-below-header (- (line-number-at-pos) 2))) (if (and (cl-plusp lines-below-header) (< n lines-below-header)) (hyperdrive-ewoc-move (- n)) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 4f3608aa49..7825566f9e 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -114,14 +114,12 @@ arguments." entry-names)) (parent-entry (hyperdrive-parent directory-entry)) (main-header (hyperdrive-entry-description directory-entry)) - (header (if hyperdrive-column-headers - (concat main-header "\n" - (format "%6s %s %s" - (propertize "Size" 'face 'hyperdrive-column-header) - (format hyperdrive-timestamp-format-string - (propertize "Last Modified" 'face 'hyperdrive-column-header)) - (propertize "Name" 'face 'hyperdrive-column-header))) - main-header)) + (header (concat main-header "\n" + (format "%6s %s %s" + (propertize "Size" 'face 'hyperdrive-column-header) + (format hyperdrive-timestamp-format-string + (propertize "Last Modified" 'face 'hyperdri
[nongnu] elpa/hyperdrive 2b1ab2ba8e 15/32: Comment: (hyperdrive-sort-entries) Explain sorting behavior
branch: elpa/hyperdrive commit 2b1ab2ba8ee6fc7b69cc3cc71fc93f7d79dd4803 Author: Joseph Turner Commit: Adam Porter Comment: (hyperdrive-sort-entries) Explain sorting behavior --- hyperdrive-lib.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index 2f452a1e67..7012e71092 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -124,6 +124,8 @@ generated from PATH. When ENCODE is non-nil, encode PATH." 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)))
[nongnu] elpa/hyperdrive 79c4bdf2ec 31/32: Comment: Remove TODO
branch: elpa/hyperdrive commit 79c4bdf2eceb1f53e3e609ec70a86e478cdd2d0f Author: Adam Porter Commit: Adam Porter Comment: Remove TODO --- hyperdrive-dir.el | 1 - 1 file changed, 1 deletion(-) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index 3407f0352e..81de96d1d4 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -179,7 +179,6 @@ DIRECTORY-SORT should be a valid value of `hyperdrive-directory-sort'." (interactive (list (hyperdrive-complete-sort))) (setq-local hyperdrive-directory-sort directory-sort) - ;; TODO: Pass `always' as predicate instead of `hyperdrive-entry-p'? (let ((entries (ewoc-collect hyperdrive-ewoc #'hyperdrive-entry-p))) (ewoc-filter hyperdrive-ewoc #'ignore) (dolist (entry (hyperdrive-sort-entries entries))
[nongnu] elpa/hyperdrive 29c70adbf9 08/32: Fix
branch: elpa/hyperdrive commit 29c70adbf9d63be6b626eb5fe0d9451ba57b4179 Author: Adam Porter Commit: Adam Porter Fix --- hyperdrive-lib.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index 7551330ba1..3a678a8368 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -955,14 +955,14 @@ DEFAULT and INITIAL-INPUT are passed to `read-string' as-is." collect (cons name (list key tag (column-choice (read-answer "Sort by column: " choices)) (`(,accessor ,ascending-predicate ,descending-predicate) -(map-elt columns (concat "By " column-choice))) +(alist-get (concat "By " column-choice) columns nil nil #'equal)) (direction-choice (read-answer "Sort in direction: " (list (cons "ascending" (list ?a "Ascending")) (cons "descending" (list ?d "Descending") (predicate (pcase direction-choice ("ascending" ascending-predicate) ("descending" descending-predicate -(list accessor predicate))) +(cons accessor predicate))) (cl-defun hyperdrive-put-metadata (hyperdrive &key then) "Put HYPERDRIVE's metadata into the appropriate file, then call THEN."
[nongnu] elpa/hyperdrive fb915a005c 25/32: Comment: Add TODO
branch: elpa/hyperdrive commit fb915a005ce714dd29e35dc507b52132c7abb49f Author: Adam Porter Commit: Adam Porter Comment: Add TODO --- hyperdrive-dir.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index d2b242ad00..f2967579f3 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -172,6 +172,8 @@ Interactively, visit file or directory at point in (interactive (list (hyperdrive-dir--entry-at-point))) (hyperdrive-history entry)) +;; TODO: Sort by clicking on column headers, and display up/down arrow in sorted column. + (defun hyperdrive-dir-sort (directory-sort) "Sort current `hyperdrive-dir' buffer by DIRECTORY-SORT. DIRECTORY-SORT should be a valid value of
[nongnu] elpa/hyperdrive beb1f180fa 11/32: Tidy: (hyperdrive-dir-sort) Nest to avoid setf
branch: elpa/hyperdrive commit beb1f180fadf303ae341c367a29e265d6c1ae3f1 Author: Joseph Turner Commit: Adam Porter Tidy: (hyperdrive-dir-sort) Nest to avoid setf --- hyperdrive-dir.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index 8ef9f4913f..b2fecc3054 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -182,9 +182,8 @@ DIRECTORY-SORT should be a valid value of (interactive (list (hyperdrive-complete-sort))) (setq-local hyperdrive-directory-sort directory-sort) (let ((entries (ewoc-collect hyperdrive-ewoc #'hyperdrive-entry-p))) -(setf entries (hyperdrive-sort-entries entries)) (ewoc-filter hyperdrive-ewoc #'ignore) -(dolist (entry entries) +(dolist (entry (hyperdrive-sort-entries entries)) (ewoc-enter-last hyperdrive-ewoc entry Imenu support
[nongnu] elpa/hyperdrive 369ec34f4f 21/32: Comment: Remove TODO
branch: elpa/hyperdrive commit 369ec34f4fb71ada1a0b0710ef819e37b20df7fe Author: Joseph Turner Commit: Adam Porter Comment: Remove TODO Progress is tracked in the footer. --- hyperdrive-handlers.el | 1 - 1 file changed, 1 deletion(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index a9b7140609..cfae7abba4 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -169,7 +169,6 @@ arguments." (ewoc-filter hyperdrive-ewoc #'ignore) (update-footer num-filled num-entries) (dolist (entry entries) -;; TODO: Update header with progress. (hyperdrive-fill entry :queue metadata-queue ;; TODO: Mention in `hyperdrive-fill' docstring that THEN is called with an argument. :then (lambda (&rest _)
[nongnu] elpa/hyperdrive f70d3276fc 22/32: Comment: Remove TODO
branch: elpa/hyperdrive commit f70d3276fcc7f444b5f83b30a516272af93c8901 Author: Joseph Turner Commit: Adam Porter Comment: Remove TODO --- hyperdrive-dir.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index 25813dff41..d2b242ad00 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -114,8 +114,6 @@ With point on header, returns directory entry." Commands -;; TODO: Implement sorting by size, type, etc. - (declare-function hyperdrive-open "hyperdrive") (defun hyperdrive-dir-find-file (entry)
[nongnu] elpa/hyperdrive 383c1c606e 17/32: Docs: Document hyperdrive-dir-sort
branch: elpa/hyperdrive commit 383c1c606efb0ac6ddac17015079b2c70e5bf751 Author: Joseph Turner Commit: Adam Porter Docs: Document hyperdrive-dir-sort --- doc/hyperdrive-manual.org | 9 + hyperdrive-dir.el | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/hyperdrive-manual.org b/doc/hyperdrive-manual.org index 20ceb051a7..29aa212d38 100644 --- a/doc/hyperdrive-manual.org +++ b/doc/hyperdrive-manual.org @@ -171,6 +171,8 @@ default: - ~^~ goes up to the parent directory #+kindex: revert-buffer - ~g~ refreshes the directory to display potential updates +#+kindex: hyperdrive-dir-sort +- ~o~ sorts directory contents by column #+kindex: hyperdrive-dir-download-file - ~d~ downloads the file at point to disk #+kindex: hyperdrive-dir-delete @@ -464,6 +466,13 @@ customize-group RET hyperdrive RET~: - ~hyperdrive-directory-display-buffer-action~ :: Display buffer action 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-modified', `<' for `hyperdrive-entry-size', etc). + #+vindex: hyperdrive-column-headers - ~hyperdrive-column-headers~ :: Display column headers in ~hyperdrive-dir~ and ~hyperdrive-history~ buffers. Defaults to ~t~. diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index 61cce7e146..25813dff41 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -175,7 +175,6 @@ Interactively, visit file or directory at point in (hyperdrive-history entry)) (defun hyperdrive-dir-sort (directory-sort) - ;; TODO(doc): hyperdrive-dir-sort. "Sort current `hyperdrive-dir' buffer by DIRECTORY-SORT. DIRECTORY-SORT should be a valid value of `hyperdrive-directory-sort'."
[nongnu] elpa/hyperdrive aa969e7bf5 10/32: Add: Progress report in footer
branch: elpa/hyperdrive commit aa969e7bf53fdb3d39f96e35482ffb68fc146ec2 Author: Adam Porter Commit: Adam Porter Add: Progress report in footer --- hyperdrive-handlers.el | 79 ++ 1 file changed, 48 insertions(+), 31 deletions(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 50b72e0902..34be7eeea8 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -99,34 +99,41 @@ arguments." ;; TODO: Set a timer and say "Opening URL..." if entry doesn't load ;; in a couple of seconds (same in hyperdrive-handler-default) ;; (like new with-delayed-message ?) - (cl-labels ((goto-entry (entry ewoc) -(when-let ((node (hyperdrive-ewoc-find-node ewoc entry - :predicate #'hyperdrive-entry-equal))) - (goto-char (ewoc-location node) -(pcase-let* (((cl-struct hyperdrive-entry hyperdrive path version) directory-entry) - (url (hyperdrive-entry-url directory-entry)) - ((cl-struct plz-response headers body) - ;; SOMEDAY: Consider updating plz to optionally not stringify the body. - (hyperdrive-api 'get url :as 'response :noquery t)) - (entry-names (json-read-from-string body)) - (entries (mapcar (lambda (entry-name) -(hyperdrive-entry-create - :hyperdrive hyperdrive - :path (concat (url-unhex-string path) entry-name) - :version version - :encode t)) - entry-names)) - (parent-entry (hyperdrive-parent directory-entry)) - (main-header (hyperdrive-entry-description directory-entry)) - (header (if hyperdrive-column-headers - (concat main-header "\n" - (format "%6s %s %s" - (propertize "Size" 'face 'hyperdrive-column-header) - (format hyperdrive-timestamp-format-string - (propertize "Last Modified" 'face 'hyperdrive-column-header)) - (propertize "Name" 'face 'hyperdrive-column-header))) - main-header)) - (metadata-queue) (ewoc) (prev-entry) (prev-point)) + (pcase-let* (((cl-struct hyperdrive-entry hyperdrive path version) directory-entry) + (url (hyperdrive-entry-url directory-entry)) + ((cl-struct plz-response headers body) +;; SOMEDAY: Consider updating plz to optionally not stringify the body. +(hyperdrive-api 'get url :as 'response :noquery t)) + (entry-names (json-read-from-string body)) + (entries (mapcar (lambda (entry-name) + (hyperdrive-entry-create + :hyperdrive hyperdrive + :path (concat (url-unhex-string path) entry-name) + :version version + :encode t)) +entry-names)) + (parent-entry (hyperdrive-parent directory-entry)) + (main-header (hyperdrive-entry-description directory-entry)) + (header (if hyperdrive-column-headers + (concat main-header "\n" + (format "%6s %s %s" + (propertize "Size" 'face 'hyperdrive-column-header) + (format hyperdrive-timestamp-format-string + (propertize "Last Modified" 'face 'hyperdrive-column-header)) + (propertize "Name" 'face 'hyperdrive-column-header))) + main-header)) + (num-entries (length entries)) (num-filled 0) + ;; (debug-start-time (current-time)) + (metadata-queue) (ewoc) (prev-entry) (prev-point)) +(cl-labels ((goto-entry (entry ewoc) + (when-let ((node (hyperdrive-ewoc-find-node ewoc entry + :predicate #'hyperdrive-entry-equal))) +(goto-char (ewoc-location node +(update-footer (num-filled num-of) + (when (zerop (mod num-filled 5)) +(ewoc-set-hf ewoc header + (propertize (format "Loading (%s/%s)..." num-filled num-of) +'face 'font-lock-comment-face) (hyperdrive-fill-metadata hyperdrive) (setf directory-entry (hyperd
[nongnu] elpa/hyperdrive f670ac3cf7 26/32: Change: (-handler-directory) with-silent-modifications in finally
branch: elpa/hyperdrive commit f670ac3cf7d4401986fdd4bc38cd6e0b74a79f21 Author: Joseph Turner Commit: Adam Porter Change: (-handler-directory) with-silent-modifications in finally --- hyperdrive-handlers.el | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 35667cd9b1..4f3608aa49 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -149,13 +149,16 @@ arguments." :limit hyperdrive-queue-size :finally (lambda () (with-current-buffer (ewoc-buffer ewoc) - (ewoc-set-hf ewoc header "") - (setf entries (hyperdrive-sort-entries entries)) - (dolist (entry entries) - (ewoc-enter-last ewoc entry)) - (or (when prev-entry - (goto-entry prev-entry ewoc)) - (goto-char prev-point)) + (with-silent-modifications + ;; `with-silent-modifications' increases performance, + ;; but we still need `set-buffer-modified-p' below. + (ewoc-set-hf ewoc header "") + (setf entries (hyperdrive-sort-entries entries)) + (dolist (entry entries) + (ewoc-enter-last ewoc entry)) + (or (when prev-entry + (goto-entry prev-entry ewoc)) + (goto-char prev-point))) (set-buffer-modified-p nil)) ;; TODO: Remove this and the commented out `debug-start-time' ;; binding when we're done experimenting.
[nongnu] elpa/hyperdrive d3084390ea 24/32: Comment: Update TODO
branch: elpa/hyperdrive commit d3084390ea7c8667d779657a27b333a6937078d9 Author: Joseph Turner Commit: Adam Porter Comment: Update TODO --- hyperdrive-handlers.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index dbde3c7fce..35667cd9b1 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -174,7 +174,7 @@ arguments." (update-footer (cl-incf num-filled) num-entries (plz-run metadata-queue) (display-buffer (current-buffer) hyperdrive-directory-display-buffer-action) - ;; TODO: Should we display the buffer before or after calling THEN? + ;; TODO: Should we display the buffer before or after calling THEN? (test with yank-media handler) (when then (funcall then)))
[nongnu] elpa/hyperdrive de8a963986 05/32: WIP
branch: elpa/hyperdrive commit de8a96398682012b23094856d76b1c773cd20544 Author: Adam Porter Commit: Adam Porter WIP --- hyperdrive-lib.el | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index ea13c37a27..fa44f07f65 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -122,7 +122,10 @@ generated from PATH. When ENCODE is non-nil, encode PATH." (cl-defun hyperdrive-sort-entries (entries &key (by hyperdrive-directory-sort)) ;; FIXME: Docstring. Sorry. :) "Return ENTRIES sorted by BY." - (cl-sort entries (cdr by) :key (car by))) + (cl-sort entries (lambda (a b) + (cond ((and a b) (funcall (cdr by) a b)) + (a t))) + :key (car by))) API
[nongnu] elpa/hyperdrive bf955d34d3 28/32: Add/Change: (hyperdrive-column-headers)
branch: elpa/hyperdrive commit bf955d34d32d7e384696be0a5dbe4bb3e8840d6a Author: Adam Porter Commit: Adam Porter Add/Change: (hyperdrive-column-headers) --- hyperdrive-handlers.el | 36 +--- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/hyperdrive-handlers.el b/hyperdrive-handlers.el index 7825566f9e..9e75000aa7 100644 --- a/hyperdrive-handlers.el +++ b/hyperdrive-handlers.el @@ -113,13 +113,7 @@ arguments." :encode t)) entry-names)) (parent-entry (hyperdrive-parent directory-entry)) - (main-header (hyperdrive-entry-description directory-entry)) - (header (concat main-header "\n" - (format "%6s %s %s" - (propertize "Size" 'face 'hyperdrive-column-header) - (format hyperdrive-timestamp-format-string - (propertize "Last Modified" 'face 'hyperdrive-column-header)) - (propertize "Name" 'face 'hyperdrive-column-header + (header (hyperdrive-column-headers (hyperdrive-entry-description directory-entry))) (num-entries (length entries)) (num-filled 0) ;; (debug-start-time (current-time)) (metadata-queue) (ewoc) (prev-entry) (prev-point)) @@ -179,6 +173,34 @@ arguments." (when then (funcall then))) +(defun hyperdrive-column-headers (prefix) + "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-date . ,predicate) + (setf date-arrow (pcase-exhaustive predicate + ('time-less-p< "▲") + ((pred functionp) "▼") +(concat prefix "\n" +(format "%6s%s %s%s %s%s" +(propertize "Size" 'face 'hyperdrive-column-header) +size-arrow +(format hyperdrive-timestamp-format-string +(propertize "Last Modified" 'face 'hyperdrive-column-header)) +date-arrow +(propertize "Name" 'face 'hyperdrive-column-header) +name-arrow + (cl-defun hyperdrive-handler-streamable (entry &key _then) ;; TODO: Is there any reason to not pass THEN through? ;; FIXME: Opening a streamable entry from a hyperdrive-dir buffer
[nongnu] elpa/hyperdrive 126f767a46 12/32: Comment: Add TODO
branch: elpa/hyperdrive commit 126f767a46a20c80f4fccb4f524ef6aa14484a51 Author: Joseph Turner Commit: Adam Porter Comment: Add TODO --- hyperdrive-dir.el | 1 + 1 file changed, 1 insertion(+) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index b2fecc3054..61cce7e146 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -181,6 +181,7 @@ DIRECTORY-SORT should be a valid value of `hyperdrive-directory-sort'." (interactive (list (hyperdrive-complete-sort))) (setq-local hyperdrive-directory-sort directory-sort) + ;; TODO: Pass `always' as predicate instead of `hyperdrive-entry-p'? (let ((entries (ewoc-collect hyperdrive-ewoc #'hyperdrive-entry-p))) (ewoc-filter hyperdrive-ewoc #'ignore) (dolist (entry (hyperdrive-sort-entries entries))
[nongnu] elpa/hyperdrive 32b319d850 20/32: Meta: Update changelog
branch: elpa/hyperdrive commit 32b319d850440d03a3c6f3ed6779f25bd624c427 Author: Joseph Turner Commit: Adam Porter Meta: Update changelog --- CHANGELOG.org | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.org b/CHANGELOG.org index 2c8d3b2edc..1aa7066a01 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -11,6 +11,7 @@ This project adheres to [[https://semver.org/spec/v2.0.0.html][Semantic Versioni - ~save-some-buffers~ integration - ~info-look~ integration - Org-mode link completion +- directory view sorting by column ** Changed
[nongnu] elpa/hyperdrive f36d500ae3 1/5: Comment: Update TODO
branch: elpa/hyperdrive commit f36d500ae3fb9c57f4bee3a80a8e63cd4ba45754 Author: Adam Porter Commit: Adam Porter Comment: Update TODO --- hyperdrive.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperdrive.el b/hyperdrive.el index ad7e2a1442..ca9c9f7a74 100644 --- a/hyperdrive.el +++ b/hyperdrive.el @@ -318,7 +318,7 @@ 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: Add to `kill-buffer-query-functions' to + ;; 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
[nongnu] elpa/hyperdrive 0fab283108 5/5: Change: (hyperdrive-queue-size) Increase default queue size to 20
branch: elpa/hyperdrive commit 0fab2831089d853671c77b6f706c8e50aef2d3bc Author: Joseph Turner Commit: Joseph Turner Change: (hyperdrive-queue-size) Increase default queue size to 20 --- hyperdrive-vars.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el index 0ebbabe82f..59f1b39ed6 100644 --- a/hyperdrive-vars.el +++ b/hyperdrive-vars.el @@ -150,7 +150,7 @@ through a shell)." (const :tag "VLC" "vlc %s") (string :tag "Other command"))) -(defcustom hyperdrive-queue-size 2 +(defcustom hyperdrive-queue-size 20 "Default size of request queues." ;; TODO: Consider a separate option for metadata queue size (e.g. used in the dir handler). ;; TODO: Consider a separate option for upload queue size, etc.
[nongnu] elpa/hyperdrive 485222fff4 4/5: Comment: Update TODOs
branch: elpa/hyperdrive commit 485222fff4b5bcaeedae0a96d8fc621c1639c42e Author: Adam Porter Commit: Adam Porter Comment: Update TODOs --- hyperdrive-vars.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hyperdrive-vars.el b/hyperdrive-vars.el index 48c16942d3..0ebbabe82f 100644 --- a/hyperdrive-vars.el +++ b/hyperdrive-vars.el @@ -152,7 +152,8 @@ through a shell)." (defcustom hyperdrive-queue-size 2 "Default size of request queues." - ;; TODO: Use this elsewhere also. + ;; TODO: Consider a separate option for metadata queue size (e.g. used in the dir handler). + ;; TODO: Consider a separate option for upload queue size, etc. :type 'natnum) (defcustom hyperdrive-render-html t
[nongnu] elpa/hyperdrive updated (27c1a81a51 -> 0fab283108)
elpasync pushed a change to branch elpa/hyperdrive. from 27c1a81a51 Merge branch 'wip/dir-sort' new f36d500ae3 Comment: Update TODO new 6a441a67d6 Refactor: Disperse hyperdrive-handlers.el into other files new dbb213e307 Add/Change: Define hyperdrive-error signal new 485222fff4 Comment: Update TODOs new 0fab283108 Change: (hyperdrive-queue-size) Increase default queue size to 20 Summary of changes: hyperdrive-dir.el | 115 +++- hyperdrive-handlers.el | 290 - hyperdrive-lib.el | 106 +- hyperdrive-vars.el | 16 ++- hyperdrive.el | 37 ++- 5 files changed, 265 insertions(+), 299 deletions(-) delete mode 100644 hyperdrive-handlers.el
[nongnu] elpa/hyperdrive 6a441a67d6 2/5: Refactor: Disperse hyperdrive-handlers.el into other files
branch: elpa/hyperdrive commit 6a441a67d6d59429588a4ae301705d1dcd7accc5 Author: Adam Porter Commit: Adam Porter Refactor: Disperse hyperdrive-handlers.el into other files --- hyperdrive-dir.el | 115 +++- hyperdrive-handlers.el | 290 - hyperdrive-lib.el | 93 hyperdrive-vars.el | 11 ++ hyperdrive.el | 35 ++ 5 files changed, 252 insertions(+), 292 deletions(-) diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el index 81de96d1d4..7d4d3370e8 100644 --- a/hyperdrive-dir.el +++ b/hyperdrive-dir.el @@ -33,6 +33,117 @@ Functions +;;;###autoload +(cl-defun hyperdrive-dir-handler (directory-entry &key then) + "Show DIRECTORY-ENTRY. +If THEN, then call THEN in the directory buffer with no +arguments." + ;; NOTE: ENTRY is not necessarily "filled" yet. + ;; TODO: Set a timer and say "Opening URL..." if entry doesn't load + ;; in a couple of seconds (same in hyperdrive-handler-default) + ;; (like new with-delayed-message ?) + (pcase-let* (((cl-struct hyperdrive-entry hyperdrive path version) directory-entry) + (url (hyperdrive-entry-url directory-entry)) + ((cl-struct plz-response headers body) +;; SOMEDAY: Consider updating plz to optionally not stringify the body. +(hyperdrive-api 'get url :as 'response :noquery t)) + (entry-names (json-read-from-string body)) + (entries (mapcar (lambda (entry-name) + (hyperdrive-entry-create + :hyperdrive hyperdrive + :path (concat (url-unhex-string path) entry-name) + :version version + :encode t)) +entry-names)) + (parent-entry (hyperdrive-parent directory-entry)) + (header (hyperdrive-dir-column-headers (hyperdrive-entry-description directory-entry))) + (num-entries (length entries)) (num-filled 0) + ;; (debug-start-time (current-time)) + (metadata-queue) (ewoc) (prev-entry) (prev-point)) +(cl-labels ((goto-entry (entry ewoc) + (when-let ((node (hyperdrive-ewoc-find-node ewoc entry + :predicate #'hyperdrive-entry-equal))) +(goto-char (ewoc-location node +(update-footer (num-filled num-of) + (when (zerop (mod num-filled 5)) +(ewoc-set-hf ewoc header + (propertize (format "Loading (%s/%s)..." num-filled num-of) +'face 'font-lock-comment-face) + (hyperdrive-fill-metadata hyperdrive) + (setf directory-entry (hyperdrive--fill directory-entry headers)) + (when parent-entry +(setf (alist-get 'display-name (hyperdrive-entry-etc parent-entry)) "..") +(push parent-entry entries)) + (with-current-buffer (hyperdrive--get-buffer-create directory-entry) +(with-silent-modifications + (setf ewoc (or hyperdrive-ewoc ; Bind this for lambdas. + (setf hyperdrive-ewoc (ewoc-create #'hyperdrive-dir-pp))) +metadata-queue (make-plz-queue + ;; Experimentation seems to show that a + ;; queue size of about 20 performs best. +:limit hyperdrive-queue-size +:finally (lambda () + (with-current-buffer (ewoc-buffer ewoc) + (with-silent-modifications + ;; `with-silent-modifications' increases performance, + ;; but we still need `set-buffer-modified-p' below. + (ewoc-set-hf ewoc header "") + (setf entries (hyperdrive-sort-entries entries)) + (dolist (entry entries) + (ewoc-enter-last ewoc entry)) + (or (when prev-entry + (goto-entry prev-entry ewoc)) + (goto-char prev-point))) + (set-buffer-modified-p nil)) + ;; TODO: Remove this and the commented out `debug-start-time' + ;; binding when we're done experimenting. + ;; (message "Elapsed: %s" + ;; (float-time (time-subtrac
[nongnu] elpa/hyperdrive dbb213e307 3/5: Add/Change: Define hyperdrive-error signal
branch: elpa/hyperdrive commit dbb213e307b8c015c66d9b5accaa867a4f588e71 Author: Adam Porter Commit: Adam Porter Add/Change: Define hyperdrive-error signal --- hyperdrive-lib.el | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el index 2fcb2434d6..c9278c7b44 100644 --- a/hyperdrive-lib.el +++ b/hyperdrive-lib.el @@ -44,6 +44,15 @@ (declare-function hyperdrive-mode "hyperdrive") (declare-function hyperdrive-dir-mode "hyperdrive-dir") + Errors + +(define-error 'hyperdrive-error "hyperdrive error") + +(defun hyperdrive-error (&rest args) + "Like `error', but signals `hyperdrive-error'. +Passes ARGS to `format-message'." + (signal 'hyperdrive-error (list (apply #'format-message args + Structs (cl-defstruct (hyperdrive-entry (:constructor hyperdrive-entry--create) @@ -1163,10 +1172,6 @@ Affected by option `hyperdrive-reuse-buffers', which see." "Call `message' with MESSAGE and ARGS, prefixing MESSAGE with \"Hyperdrive:\"." (apply #'message (concat "Hyperdrive: " message) args)) -(defun hyperdrive-error (string &rest args) - "Call `error' with STRING and ARGS, prefixing STRING with \"Hyperdrive:\"." - (apply #'error (concat "Hyperdrive: " string) args)) - (defun hyperdrive-user-error (format &rest args) "Call `user-error' with FORMAT and ARGS, prefixing FORMAT with \"Hyperdrive:\"." (apply #'user-error (concat "Hyperdrive: " format) args))
[elpa] externals/tmr 8e6a0e7537: Makefile: Update makel's URL
branch: externals/tmr commit 8e6a0e7537ccddbbc443fd03dc65bf23c88c1e9e Author: Damien Cassou Commit: Protesilaos Stavrou Makefile: Update makel's URL --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b4ed44e0fd..4233a66b96 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ makel.mk: curl \ --fail --silent --show-error --insecure --location \ --retry 9 --retry-delay 9 \ - -O https://gitlab.petton.fr/DamienCassou/makel/raw/v0.8.0/makel.mk; \ + -O https://github.com/DamienCassou/makel/raw/v0.8.0/makel.mk; \ fi # Include makel.mk if present