GNU bug report logs -
#58660
[PATCH 0/4] Minor tweaks of etc/teams.scm
Previous Next
Reported by: zimoun <zimon.toutoune <at> gmail.com>
Date: Thu, 20 Oct 2022 13:23:02 UTC
Severity: normal
Tags: moreinfo, patch
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 58660 <at> debbugs.gnu.org (full text, mbox):
* etc/teams.scm.in (list-teams): Add id number for easing 'recutils' use.
---
etc/teams.scm.in | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/etc/teams.scm.in b/etc/teams.scm.in
index 3d4c7319c2..790eb17131 100644
--- a/etc/teams.scm.in
+++ b/etc/teams.scm.in
@@ -556,15 +556,16 @@ (define (list-teams)
"Print all teams, their scope and their members."
(define port* (current-output-port))
(define width* (%text-width))
- (for-each
- (lambda (team)
+ (fold
+ (lambda (team id-number)
(format port*
"\
-id: ~a
+id: (~d) ~a
name: ~a
description: ~a
~amembers:
"
+ id-number
(team-id team)
(team-name team)
(or (and=> (team-description team)
@@ -583,7 +584,9 @@ (define width* (%text-width))
scope)
string<=?)))))
(list-members team port* "+ ")
- (newline))
+ (newline)
+ (1+ id-number))
+ 0
(sort
(hash-map->list (lambda (key value) value) %teams)
(lambda (team1 team2)
--
2.36.0
This bug report was last modified 1 year and 349 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.