"W. Trevor King" <wk...@tremily.us> writes: >> > I think that making nmbug and nmbug-status generally applicable for >> > other projects is a good target. I don't see any need to pull them >> > out into a stand-alone project to do that though. >> >> For what it's worth, I don't disagree. > > Does that mean your patches are aimed upstream at the notmuch > repository?
I didn't really intend them that way. What I meant was that I'd be happy to switch to a script within the notmuch repository if it did what I wanted, (which is basically just "create an HTML file from a notmuch query"). > (or their shell's approriate environment variable syntax), and I'd > version the config file in the same repo as the associated tags. I > don't see the point of keeping the config file somewhere else, when > you'll already need a repository to store the tags. Ah, then you've missed something different about my usage. I don't have any repository storing tags. My tags exist only in my notmuch database. The tool I want here is a simpler one, (think, "allow HTML export from HTML"). Heck, what I want could almost be nothing more than: notmuch search --format=html Other than that I want the other bits like multiple defined "views" with their own queries and descriptions. I see the part that has a repository holding tags as totally orthogonal functionality. That orthogonal functionality is "tag synchronization" or "tag collaboration" and is independent from HTML export to my way of thinking. So it makes sense to me that the HTML export just talks to the notmuch database and doesn't need to assume anything else. > * d456390 Add a comment describing the program > > I like the idea, but I'd prefer a docstring just after the leading > comment. Then we could reuse the docstring as the description for the > ArgumentParser. Sure. That's better. > * 336411f Add "notmuch search" to the advertised queries. > > Folks can already copy-paste the terms into Emacs etc. You only need > the 'notmuch search' prefix if you're pasting into a shell, in which > case you'll also want to escape shell-sensitive characters like > parenthesis. I'm fine without this one. This is more about advertising notmuch to people not familiar with it. It's more important for something like "mesa stable queue" than it is for the notmuch bug list, of course. > * 396869c Add support for a --query option (along with a default > configuration) > > I don't have an opinion about this one ;). The default config doesn't > look very useful (especially with it's dummy metadata settings), but > I'd only be using the in-Git-config approach, and I don't mind if > others want something like this. This is about making this script self-documenting. When I first tried nmbug-status I got just a stack trace[*], not even a usage message. Even after running "nmbug-status --help" I wasn't any closer to knowing how to run the thing. It wasn't obvious that --config was the option I needed to get things to work, (from the stack trace, clearly this script wants some git repository somewhere), and even if I had know that --config was what I wanted, I had no idea how to construct a config file. I tried the documentation for nmbug which had a "git clone" command in it, but even then I couldn't get nmbug-status to work, (I tried to replicate this bug just now, but couldn't---it does seem to be working after the documented "git clone"). But even then, all I had was a bare repository and no clear indication that I needed a config file nor where to find it. By the time I had read the code and understood it well enough to know where to find the config file, I also knew enough to fix the script to be self-documenting as far as configuration. So that's what I did. If you run "notmuch-to-html" with no arguments it will naturally walk you through everything you need. It will give you functional sample output before you've even constructed a configuration file. And then it will give you the exact syntax for that example configuration file. I can't see how these changes could be anything other than an improvement. -Carl [*] Here it is, for reference: (master)$ ./nmbug-status fatal: Not a git repository: '/home/cworth/.nmbug' fatal: Not a git repository: '/home/cworth/.nmbug' Traceback (most recent call last): File "./nmbug-status", line 254, in <module> config = read_config(path=args.config) File "./nmbug-status", line 73, in read_config return json.load(fp) File "/usr/lib/python2.7/json/__init__.py", line 290, in load **kw) File "/usr/lib/python2.7/json/__init__.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded
pgpPcVgTDlY6t.pgp
Description: PGP signature
_______________________________________________ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch