branch: externals/rec-mode
commit a89b7c2842ed125c1c597bfb89081d2a18a6695b
Author: Antoine Kalmbach <[email protected]>
Commit: Antoine Kalmbach <[email protected]>
rec-mode: split fields by comma and whitespace for summary
2020-11-07 Antoine Kalmbach <[email protected]>
* etc/rec-mode.el (rec-summary-fields): split by comma and space
(rec-cmd-show-summary): split minibuffer input
---
etc/rec-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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)