From: Luciano Passuello <lucianop@litemind.com>
To: Nick Dokos <ndokos@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Lint multiple files at once
Date: Thu, 12 Oct 2017 18:00:53 -0300 [thread overview]
Message-ID: <CACqKfLcdOpHRE1PpgK383GQ-SXy1igSLno88TmF_ZP19wBJBPQ@mail.gmail.com> (raw)
In-Reply-To: <87shep9lv8.fsf@alphaville.usersys.redhat.com>
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 <ndokos@gmail.com> wrote:
> Luciano Passuello <lucianop@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
>
>
prev parent reply other threads:[~2017-10-12 21:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 22:12 Lint multiple files at once Luciano Passuello
2017-10-12 1:48 ` Nick Dokos
2017-10-12 21:00 ` Luciano Passuello [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACqKfLcdOpHRE1PpgK383GQ-SXy1igSLno88TmF_ZP19wBJBPQ@mail.gmail.com \
--to=lucianop@litemind.com \
--cc=emacs-orgmode@gnu.org \
--cc=ndokos@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.