-
-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show progress when evaluating files using cider-load-all-files
#3714
Show progress when evaluating files using cider-load-all-files
#3714
Conversation
Yeah, that's not a big problem - after all most people will get some error buffers anyways. Just add a changelog entry and we're good to go here. |
(directory-files-recursively directory "\\.clj[cs]?$"))) | ||
(interactive "DRecursively load files in directory: \nP") | ||
(let* ((files (directory-files-recursively directory "\\.clj[cs]?$")) | ||
(reporter (make-progress-reporter "Loading files" 0 (length files)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should mention the directory name in the message as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, in every reporter message, there is already a name for the loaded file (the file
argument of (progress-reporter-update reporter (1+ idx) file)
), so I think there is no need to change anything.
(interactive "DRecursively load files in directory: \nP") | ||
(let* ((files (directory-files-recursively directory "\\.clj[cs]?$")) | ||
(reporter (make-progress-reporter "Loading files" 0 (length files)))) | ||
(seq-do-indexed (lambda (file idx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have probably used a dolist
here, but I'm old-school. :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's a chore to manually manipulate the counter, and I couldn't pass up such a sweet function!
I've updated the changelog. |
Thanks! |
Show progress in echo area while recursively evaluating files in directory using
cider-load-all-files
.As I've noticed that messages from evaluations keep popping up, so it's very hard to see progress message, I've used
inhibit-message
aroundcider-load-file
. One possible downside of this is that error messages are not displayed as well (though it will be really hard to notice some error message while messages pop up one after the other).Also, I've tweaked the prompt of
cider-load-all-files
because it might not be clear how files are loaded as the word "beneath" is ambiguous (it may mean one level of depth which is not the case).Closes #3615