* mu-guile: make the examples work after mu:initialize api changes

This commit is contained in:
djcb
2012-01-07 18:42:19 +02:00
parent 41abf944c2
commit 261e9dff28
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ exec guile -e main -s $0 $@
(use-modules (ice-9 getopt-long)) (use-modules (ice-9 getopt-long))
(use-modules (srfi srfi-1)) (use-modules (srfi srfi-1))
(use-modules (mu) (mu contact)) (use-modules (mu) (mu message) (mu contact))
(define (sort-by-freq c1 c2) (define (sort-by-freq c1 c2)
(< (frequency c1) (frequency c2))) (< (frequency c1) (frequency c2)))
@ -66,7 +66,7 @@ exec guile -e main -s $0 $@
(display msg) (display msg)
(exit 0)) (exit 0))
(begin (begin
(mu:initialize muhome) (mu:initialize #t muhome)
(let* ((sort-func (let* ((sort-func
(cond (cond
((string= sort-by "frequency") sort-by-freq) ((string= sort-by "frequency") sort-by-freq)

View File

@ -21,7 +21,7 @@ exec guile -e main -s $0 $@
;; Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ;; Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
(use-modules (ice-9 getopt-long) (ice-9 optargs) (ice-9 popen) (ice-9 format)) (use-modules (ice-9 getopt-long) (ice-9 optargs) (ice-9 popen) (ice-9 format))
(use-modules (mu) (mu message)) (use-modules (mu) (mu message) (mu stats))
(define* (per-weekday #:optional (EXPR "")) (define* (per-weekday #:optional (EXPR ""))
"Count the total number of messages for each weekday (0-6 for "Count the total number of messages for each weekday (0-6 for
@ -168,7 +168,7 @@ then be used in, e.g., R and gnuplot."
(begin (begin
(display msg) (display msg)
(exit (if help 0 1)))) (exit (if help 0 1))))
(mu:initialize muhome) (mu:initialize #t muhome)
(cond (cond
((string= period "hour") (mu:plot:per-hour expr)) ((string= period "hour") (mu:plot:per-hour expr))
((string= period "day") (mu:plot:per-weekday expr)) ((string= period "day") (mu:plot:per-weekday expr))