emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Lint multiple files at once


From: Luciano Passuello
Subject: Re: [O] Lint multiple files at once
Date: Thu, 12 Oct 2017 18:00:53 -0300

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 <address@hidden> wrote:
> Luciano Passuello <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]