[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/activities c31498588e 36/50: improve custom activities-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/activities c31498588e 36/50: improve custom activities-sort-function -> activities-sort-by |
Date: |
Wed, 25 Dec 2024 03:57:20 -0500 (EST) |
branch: externals/activities
commit c31498588ecbae222bf4ff14868c09c1692bfa9e
Author: J.D. Smith <jdtsmith@gmail.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
improve custom activities-sort-function -> activities-sort-by
---
activities.el | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/activities.el b/activities.el
index 7d07def195..43ddf09cf6 100644
--- a/activities.el
+++ b/activities.el
@@ -332,15 +332,17 @@ Kills buffers that have only been shown in that activity's
frame/tab."
:type 'boolean)
-(defcustom activities-sort-function #'activities-sort-by-active-age
- "A function to use to sort by when prompting for activities.
-If nil, no sorting will be applied. The function should take two
-arguments, both activity names (strings). It should return
-non-nil if the first activity should sort before the second. By
+(defcustom activities-sort-by #'activities-sort-by-active-age
+ "How to sort activities during selection.
+Function used to sort by when prompting for activities. By
default, a function is used which sorts active activities first,
-and then by age since modification."
- :type '(choice (const :tag "No sorting" nil)
- (function :tag "A specific function")))
+and then by age since modification. If nil, no sorting will be
+applied. A custom predicate function may also be set. It should
+take two arguments, both activity names (strings), and return
+non-nil if the first activity should sort before the second."
+ :type `(choice (const :tag "No sorting" nil)
+ (const :tag "Active state and age"
,#'activities-sort-by-active-age)
+ (function :tag "Custom predicate")))
(defcustom activities-annotation-colors '("blue" "red" 0.65)
"Colors to use for annotating activity age.
@@ -983,8 +985,8 @@ which see, with DEFAULT."
(table (lambda (str pred action)
(if (eq action 'metadata)
`(metadata (annotation-function . ,annotation-function)
- ,@(when activities-sort-function
- `(,(cons 'display-sort-function
activities-sort-function))))
+ ,@(when activities-sort-by
+ `(,(cons 'display-sort-function
activities-sort-by))))
(complete-with-action action names str pred))))
(prompt (format-prompt prompt default))
(name (completing-read prompt table nil t nil
'activities-completing-read-history default)))
- [elpa] externals/activities 00787671f8 14/50: README: add information about the annotations, (continued)
- [elpa] externals/activities 00787671f8 14/50: README: add information about the annotations, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 597bccdbd9 17/50: annotate: indicate active and modified using final flag char, ELPA Syncer, 2024/12/25
- [elpa] externals/activities ea95275d88 19/50: Handle plurals correctly in annotation bufs/files, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 9e46784287 23/50: Remove debug message, ELPA Syncer, 2024/12/25
- [elpa] externals/activities bcf09497de 26/50: README: improve annotation/sorting docs, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 0e7151b6bd 28/50: buffer-and-files-differ: improve docstring, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 8c5efa1855 29/50: buffers-and-files: better var name, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 93e1fbbad0 30/50: map-window-state-leafs -> mapcar-window-state-leafs, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 3dd100d0e0 31/50: cl-labels file-or-buffer: improve docstring, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 29e89be859 34/50: buffers-and-files: fix docstring typo, ELPA Syncer, 2024/12/25
- [elpa] externals/activities c31498588e 36/50: improve custom activities-sort-function -> activities-sort-by,
ELPA Syncer <=
- [elpa] externals/activities fad6543d48 39/50: age: mention related bug report and magit--age in comment, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 310f6d11ff 40/50: sort-by-active-age: reformulate using pcase, ELPA Syncer, 2024/12/25
- [elpa] externals/activities d4b0ae717f 45/50: sort-by: use function-item for custom, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 793c50cbba 47/50: sort-by-active-age: fix sort logic, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 31ec5154dd 50/50: Merge: Completion annotations, ELPA Syncer, 2024/12/25
- [elpa] externals/activities e131d560d9 48/50: README: mention new completion interface in Changelog, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 1f9f578860 41/50: activities-completing-read: use cl-labels for clarity, ELPA Syncer, 2024/12/25
- [elpa] externals/activities c59ab9e9d7 38/50: activities--buffers-and-files-differ-p: rename args for clarity, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 2beae7a329 46/50: completing-read: make sort-by always set to a sort function, ELPA Syncer, 2024/12/25
- [elpa] externals/activities 61d13b3a0f 49/50: Docs: (README.org) Tidy, ELPA Syncer, 2024/12/25