(handler-case
    (with-open-file (s "/home/user/memex/projects/passepartout/skills/org-skill-config-manager.org")
      (loop for line = (read-line s nil)
            while line
            do (when (search "#+begin_src lisp" line)
                 (let ((block ""))
                   (loop for l = (read-line s nil)
                         while (and l (not (search "#+end_src" l)))
                         do (setf block (concatenate 'string block l (string #\Newline))))
                   (handler-case
                       (with-input-from-string (in block)
                         (loop for form = (read in nil :eof)
                               until (eq form :eof)))
                     (error (c)
                       (format t "Error in block beginning with ~a: ~a~%" 
                               (subseq block 0 (min 30 (length block)))
                               c)))))))
  (error (c) (format t "General error: ~a~%" c)))
