Hi Nick,

Thank you very much, it works!
Being an elips newbie, it helped me a lot reading and understanding
your code snippet.
Next step is beautify the output, and send it to a buffer/file. I'll
try to do that myself as a learning exercise.

Regards




On Wed, Oct 11, 2017 at 10:48 PM, Nick Dokos <ndo...@gmail.com> wrote:
> Luciano Passuello <lucia...@litemind.com> writes:
>
>> Hello all,
>>
>> I love org-lint, but I couldn't find an easy way to get a report on
>> multiple files.
>> I'd like to analyze all files in a folder, getting all problems found
>> using a single command.
>>
>> Any suggestions?
>>
>
> Here's one way:
>
> --8<---------------cut here---------------start------------->8---
> (defun org-lint-dir (directory)
>   (let* ((files (directory-files directory t ".*\\.org$")))
>     (org-lint-list files)))
>
> (defun org-lint-list (files)
>   (cond (files
>          (org-lint-file (car files))
>          (org-lint-list (cdr files)))))
>
> (defun org-lint-file (file)
>   (let ((buf)
>         (lint))
>     (setq buf (find-file-noselect file))
>     (with-current-buffer buf (if (setq lint (org-lint)) (print (list file 
> lint))))))
>
> (org-lint-dir "/home/nick/lib/org")
> --8<---------------cut here---------------end--------------->8---
>
> --
> Nick
>
>

Reply via email to