Put the rest of the unsolicited messages behind projectile-verbose - #2140
Merged
Conversation
An audit of all 60 message call sites. The option gated nine of them, and the line it was drawing was the right one - Projectile stays quiet about what it does off its own bat, and still answers for what you asked it to do - but five sites had been missed: - caching a file the find-file hook just picked up, which fires for every newly cached file you open - a search path entry that no longer exists, which the once-a-session automatic scan would otherwise report on every startup - an indexing command that exited non-zero but produced usable output, in both the sync and async runners, whose own comment already said to mention it quietly - a session file from an older format version, which projectile-session-restore-all can meet a whole directory of Two of those are also commands in their own right, so they follow the existing pattern and still speak when invoked interactively. Deliberately left alone: the 'initializing cache' notice, which is the only warning that synchronous native indexing is about to take a while, and every message that is a command answering for itself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An audit of all 60
messagecall sites inprojectile.el.The good news is that the line
projectile-verbosewas drawing is the rightone - Projectile stays quiet about what it does off its own bat, and still
answers for what you asked it to do. It just wasn't drawn consistently: it
gated nine sites and missed five that belong on the same side of it.
find-filehook picked up. Fires for every newlycached file you open, which is the most frequent of the lot.
session, so a stale entry announces itself on every startup.
both the sync and async runners. The code's own comment already said to
"mention it quietly"; the detail is in
*projectile-files-errors*either way.projectile-session-restore-allcan walk a directory full of these at startup.
Two of those are also commands in their own right, so they use the pattern
already established in
projectile-discard-command-cache: quiet from a hook,still speaking when you invoke them. There are specs for both sides of that.
Deliberately left alone:
Projectile is initializing cache for ...- it looks like noise in a test log,but it is the only warning that synchronous
nativeindexing is about to takea while. The async path has a progress reporter; native has this.
projectile-invalidate-cachesaying nothing would leave you wondering whether it ran, and there is a spec
pinning that it still speaks.
The option's docstring and the manual now describe what it actually covers,
rather than "echo messages that are not errors".