At Fri, 21 Mar 2008 14:43:14 +0000,
Jim Burton wrote:
>
> ... My non-existent
> elisp skills are holding me back (which I intend to do something about
> some time soon!).
>
After typing that I thought I should just get on with it so have had a
go at my first elisp functions. It doesn't seem to work though -- there are
lots of files selected
which shouldn't be there (they are older than 7 days). But if I supply
a file name to jb:mod-time-lt it gives the right answer...any other
comments (i.e. conventions to follow, are there built-ins that do this etc) are
very welcome, unless that's OT.
(defun jb:secs-as-days (s)
(/ (/ (/ s 60) 60) 24))
(defun jb:mod-time (attr)
(car (cdr (cdr (cdr (cdr (cdr attr)))))))
(defun jb:mod-time-lt (d f)
(> d (jb:secs-as-days (- (float-time)
(float-time (jb:mod-time (file-attributes f)))))))
(defun jb:track-name (track)
(cdr (car (cdr (cdr track)))))
(emms-browser-make-filter "recently-added"
(lambda (track)
(jb:mod-time-lt 7 (jb:track-name track))))
> Thanks,
>
> Jim
>
>
> _______________________________________________
> Emms-help mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/emms-help
_______________________________________________
Emms-help mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emms-help