Mark Walters <markwalters1009@gmail.com> writes: > Split out the json parser into a utility function. > --- > > Most of this patch is code movement: but I don't see how to arrange the > patch to show that. Hi! This looks like a straightforward patch and if it will make notmuch-pick more efficient, I'm in favor. I tagged this patch moreinfo because David Bremner's suggestions that you expand on the docstrings for notmuch-json-parser and notmuch-json-state are good ideas. I'd also propose that you split this patch into two patches -- one that pulls out the variables and performs the renames, and the other which breaks out the code into its own function. This should make the code movement more obvious. I haven't started full-time work yet so if you would like me to do this, I can ;) Based on David Bremner's feedback that it might be a good idea to have a commit message that explains exactly what is code movement and isn't, here's my proposal for a commit message. Split out the json parser into a utility function. This patch breaks out a chunk of notmuch-search-process-filter, with the following changes: - notmuch-search-json-parser becomes notmuch-json-parser. - notmuch-search-parser-state becomes notmuch-json-state. We also rearrange the json-error case but are careful to always call error-function in the results buffer. Ethan