[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/1] Split fields by comma and whitespace for summary
From: |
Antoine Kalmbach |
Subject: |
[PATCH 1/1] Split fields by comma and whitespace for summary |
Date: |
Sat, 7 Nov 2020 16:50:01 +0200 |
* etc/rec-mode.el (rec-summary-fields): split by comma and space
(rec-cmd-show-summary): split minibuffer input
---
ChangeLog | 5 +++++
etc/rec-mode.el | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e918935..c0253e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2020-11-07 Antoine Kalmbach <ane@iki.fi>
+
+ * etc/rec-mode.el (rec-summary-fields): split by comma and space
+ (rec-cmd-show-summary): split minibuffer input
+
2020-11-06 John Soo <jsoo1@asu.edu>
* doc/recutils.texi: Fix long option name for -j/--join.
diff --git a/etc/rec-mode.el b/etc/rec-mode.el
index b354800..b91c91f 100644
--- a/etc/rec-mode.el
+++ b/etc/rec-mode.el
@@ -912,7 +912,7 @@ current record set."
(when descriptor
(let ((fields-str (rec-record-assoc rec-keyword-summary descriptor)))
(when fields-str
- (split-string (car fields-str)))))))
+ (split-string (car fields-str) "[ ,]"))))))
(defun rec-mandatory-fields ()
"Return a list with the names of the mandatory fields in the
@@ -2077,7 +2077,7 @@ the user is prompted."
(unless summary-fields
(setq summary-fields (list (rec-key)))
(unless (car summary-fields)
- (setq summary-fields (list (read-from-minibuffer "Fields to use in
the summary: ")))))
+ (setq summary-fields (split-string (read-from-minibuffer "Fields
to use in the summary: ") "[ ,]"))))
(if (car summary-fields)
(let* ((query (rec-query :fex (rec-join-string summary-fields
",")))
(summary-list (mapcar (lambda (rec)
--
2.24.3 (Apple Git-128)