From caac8501047ef6997cbc4fe7d7cdb8a2505e9d6c Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Fri, 29 May 2020 23:49:59 +0800 Subject: [PATCH] instead of saved-reports only, dump in-menu? reports alphabetically @derekatkins request --- gnucash/report/report-core.scm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gnucash/report/report-core.scm b/gnucash/report/report-core.scm index 1014f62b61..fdc1faa0b0 100644 --- a/gnucash/report/report-core.scm +++ b/gnucash/report/report-core.scm @@ -817,12 +817,19 @@ not found."))) (cond ((not template) - (stderr-log "Cannot find report ~s. Valid reports are:\n" report) + (stderr-log "Cannot find ~s. Valid reports:\n" report) (for-each - (lambda (template) - (stderr-log "* ~a\n" (gnc:report-template-name (cdr template)))) - (gnc:custom-report-templates-list)) - #f) + (lambda (pair) + (when (gnc:report-template-in-menu? (cdr pair)) + (stderr-log "* ~a ~a\n" + (if (gnc:report-template-parent-type (cdr pair)) "C" " ") + (gnc:report-template-name (cdr pair))))) + (sort (hash-map->list cons *gnc:_report-templates_*) + (lambda (a b) + (string