Re: [PATCH v2 14/20] nmbug-status: Encode output using the user's locale

2014-02-13 Thread David Bremner
"W. Trevor King" writes: > > Folks on Microsoft OSes might prefer UTF-16 [1], which is a valid > preference. > I see your wikipedia reference and raise you http://www.utf8everywhere.org/ ;). > Should I rebase this to the end of the remaining series and resubmit? > Then this patch can cook

Re: [PATCH] emacs: update alist for mail-archive.com API change

2014-02-13 Thread David Bremner
Jed Brown writes: > -("Mail Archive, The" . "http://mail-archive.com/search?l=mid&q=";) > +("Mail Archive, The" . "http://mid.mail-archive.com/";) the change looks reasonable, but it breaks one of the tests. Please update the corresponding test at the same time. d _

Re: doc: notmuch_result_move_to_next -> notmuch_tags_move_to_next

2014-02-13 Thread David Bremner
Gaute Hope writes: > Greetings, > > another small typo in the docs. Patch attached. > > Cheers, Gaute > pushed, thanks. For future reference: - patches via git send-email are much less work to deal with - We usually want at least one more line in the commit message beyond the "subject"

[PATCH] emacs: update alist for mail-archive.com API change

2014-02-13 Thread Jed Brown
Searching by Message-Id no longer works via the old mail-archive.com API, though I have contacted them in hopes that they restore it to prevent dead links. Anyway, the new API is cleaner. Acked-by: Austin Clements --- Fixed the test. Thanks, David. emacs/notmuch-show.el | 2 +- test/T310-emac

[PATCH v3 0/8] nmbug-status: Python-3-compatibility and general refactoring

2014-02-13 Thread W. Trevor King
The only changes since v2 [1] are related to our discussion of locale-based encodings vs. hardcoded UTF-8 [2,3,and descendants]. This iteration addresses those concerns by rebasing the controversial commit (nmbug-status: Encode output using the user's locale) to the end of the series. In order to

[PATCH v3 1/8] nmbug-status: Anchor with h3 ids instead of a names

2014-02-13 Thread W. Trevor King
HTML 5 allows id attributes on all HTML elements [1], but restricts names to particular cases [2]. Attaching the id attribute to the h3 element allows us to drop the anchor a element altogether. [1]: http://www.w3.org/TR/html5/dom.html#the-id-attribute [2]: http://www.w3.org/TR/html5/index.html#a

[PATCH v3 8/8] nmbug-status: Hardcode UTF-8 instead of using the user's locale

2014-02-13 Thread W. Trevor King
David [1] and Tomi [2] both feel that the user's choice of LANG is not explicit enough to have such a strong effect on nmbug-status. For example, cron jobs usually default to LANG=C, and that is going to give you ASCII output: $ LANG=C python -c 'import locale; print(locale.getpreferredencoding

[PATCH v3 2/8] nmbug-status: Slug the title when using it as an id

2014-02-13 Thread W. Trevor King
Also allow manual id overrides from the JSON config. Sluggin avoids errors like: Bad value '#Possible bugs' for attribute href on element a: Whitespace in fragment component. Use %20 in place of spaces. from http://validator.w3.org. I tried just quoting the titles (e.g. 'Possible%20bugs')

[PATCH v3 3/8] nmbug-status: Use and markup where appropriate

2014-02-13 Thread W. Trevor King
* Wrap free text in tags. * Convert to for query strings. * Wrap message-id-term (id:"...") in . The tags get nicer default markup (smaller monospace font) for notmuch query terms [1]. The tags don't have much effect without attached CSS, but bare text (phrasing content [2]) in (which expec

[PATCH v3 4/8] nmbug-status: Color threads in HTML output

2014-02-13 Thread W. Trevor King
Add tbody sections so we don't have to color every row. Multiple tbody sections are allowed [1]. Use CSS 3's nth-child to handle even/odd coloring (skipping the spacer rows) [2], which is supported on the major browsers [3]. border-spacing is from CCS 2.1 [4,5]. I'm using it to avoid whitespace

[PATCH v3 5/8] nmbug-status: Escape &, <, and > in HTML display data

2014-02-13 Thread W. Trevor King
'message-id' and 'from' now have sensitive characters escaped using xml.sax.saxutils.escape [1]. The 'subject' data was already being converted to a link into Gmane; I've escape()d that too, so it doesn't need to be handled ain the same block as 'message-id' and 'from'. This prevents broken HTML

[PATCH v3 6/8] nmbug-status: Add inter-message padding

2014-02-13 Thread W. Trevor King
We already had the tbody with a blank row separating threads (which is not colored); this commit adds a bit of spacing to separate messages within a thread. It will also add a bit of colored padding above the first message and below the final message, but the main goal is to add padding *between*

[PATCH v3 7/8] nmbug-status: Encode output using the user's locale

2014-02-13 Thread W. Trevor King
Instead of always writing UTF-8, allow the user to configure the output encoding using their locale. This is useful for previewing output in the terminal, for poor souls that don't use UTF-8 locales ;). --- devel/nmbug/nmbug-status | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

Re: [PATCH v3 0/8] nmbug-status: Python-3-compatibility and general refactoring

2014-02-13 Thread Tomi Ollila
On Thu, Feb 13 2014, "W. Trevor King" wrote: > The only changes since v2 [1] are related to our discussion of > locale-based encodings vs. hardcoded UTF-8 [2,3,and descendants]. > This iteration addresses those concerns by rebasing the controversial > commit (nmbug-status: Encode output using the

Re: [PATCH v3 7/8] nmbug-status: Encode output using the user's locale

2014-02-13 Thread W. Trevor King
On Thu, Feb 13, 2014 at 08:47:22AM -0800, W. Trevor King wrote: > '''.format(date=datetime.datetime.utcnow().date(), > + encoding=_ENCODING), > inter_message_padding='0.25em', > border_radius='0.5em'), Oops, that should be: encoding=_ENCODING, not: encodin

Re: [PATCH] ruby bindings message: docstring typo

2014-02-13 Thread David Bremner
Gaute Hope writes: Any objections Felipe? > > diff --git a/bindings/ruby/message.c b/bindings/ruby/message.c > index eed4b31..4ff6097 100644 > --- a/bindings/ruby/message.c > +++ b/bindings/ruby/message.c > @@ -111,7 +111,7 @@ notmuch_rb_message_get_filename (VALUE self) > } > > /* > - * cal

Re: [PATCH v3 4/8] nmbug-status: Color threads in HTML output

2014-02-13 Thread David Bremner
"W. Trevor King" writes: > + > + looks like a bad rebase there. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH v3 4/8] nmbug-status: Color threads in HTML output

2014-02-13 Thread W. Trevor King
On Thu, Feb 13, 2014 at 09:58:43PM -0400, David Bremner wrote: > W. Trevor King writes: > > + > > + > /> > > looks like a bad rebase there. Oops. Fixed in my branch and queued for v4. Thanks, Trevor -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more infor

Re: [PATCH v3 6/8] nmbug-status: Add inter-message padding

2014-02-13 Thread David Bremner
"W. Trevor King" writes: > We already had the tbody with a blank row separating threads (which is > not colored); this commit adds a bit of spacing to separate messages > within a thread. It will also add a bit of colored padding above the > first message and below the final message, but the mai

Re: [PATCH v3 6/8] nmbug-status: Add inter-message padding

2014-02-13 Thread W. Trevor King
On Thu, Feb 13, 2014 at 10:13:42PM -0400, David Bremner wrote: > I tested patches 1-6, but my fix for patch 4 broke patch 7. > > So maybe it's best if you regenerate the series. The concept of the last > two patches seems OK. Sure. Sorry I botched v3 :/. Do you want to nibble off patches one t

[PATCH v2] new: Detect dirent.d_type support at configure time

2014-02-13 Thread Austin Clements
Support for dirent.d_type is OS-specific. Previously, we used _DIRENT_HAVE_D_TYPE to detect support for this, but this is apparently a glic-ism (FreeBSD, for example, supports d_type, but does not define this). Since there's no cross-platform way to detect support for dirent.d_type, detect it usi

[PATCH v2] new: Detect dirent.d_type support at configure time

2014-02-13 Thread Tomi Ollila
On Thu, Feb 13 2014, Austin Clements wrote: > Support for dirent.d_type is OS-specific. Previously, we used > _DIRENT_HAVE_D_TYPE to detect support for this, but this is apparently > a glic-ism (FreeBSD, for example, supports d_type, but does not define > this). Since there's no cross-platform

[PATCH 1/1] emacs: always write emacs/.eldeps when the target is remade

2014-02-13 Thread Austin Clements
Quoth Tomi Ollila on Jan 25 at 12:21 pm: > So that the target is newer than its prerequisites. > --- > emacs/Makefile.local | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/emacs/Makefile.local b/emacs/Makefile.local > index 42bfbd9..d5d402e 100644 > --- a/emacs/Makefile

[PATCH] emacs: update alist for mail-archive.com API change

2014-02-13 Thread Austin Clements
On Wed, 12 Feb 2014, Jed Brown wrote: > Searching by Message-Id no longer works via the old mail-archive.com > API, though I have contacted them in hopes that they restore it to > prevent dead links. Anyway, the new API is cleaner. > --- > emacs/notmuch-show.el | 2 +- > 1 file changed, 1 insert

[PATCH 1/1] emacs: always write emacs/.eldeps when the target is remade

2014-02-13 Thread Tomi Ollila
On Thu, Feb 13 2014, Austin Clements wrote: > Quoth Tomi Ollila on Jan 25 at 12:21 pm: >> So that the target is newer than its prerequisites. >> --- >> emacs/Makefile.local | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/emacs/Makefile.local b/emacs/Makefile.local

[PATCH v2 13/20] nmbug-status: Convert from XHTML 1.0 to HTML 5

2014-02-13 Thread Tomi Ollila
On Thu, Feb 13 2014, "W. Trevor King" wrote: > On Wed, Feb 12, 2014 at 07:35:19PM -0400, David Bremner wrote: >> W. Trevor King writes: >> > HTML 5 for the win :). I also de-namespaced the language; the HTML 5 >> > spec allows a vestigial xml:lang attribute, but it's a no-op [1], so I >> > strip

[PATCH 1/1] emacs: always write emacs/.eldeps when the target is remade

2014-02-13 Thread Austin Clements
Quoth Tomi Ollila on Feb 13 at 9:26 am: > On Thu, Feb 13 2014, Austin Clements wrote: > > > Quoth Tomi Ollila on Jan 25 at 12:21 pm: > >> So that the target is newer than its prerequisites. > >> --- > >> emacs/Makefile.local | 3 +-- > >> 1 file changed, 1 insertion(+), 2 deletions(-) > >> > >

[PATCH v2 14/20] nmbug-status: Encode output using the user's locale

2014-02-13 Thread David Bremner
"W. Trevor King" writes: > > Folks on Microsoft OSes might prefer UTF-16 [1], which is a valid > preference. > I see your wikipedia reference and raise you http://www.utf8everywhere.org/ ;). > Should I rebase this to the end of the remaining series and resubmit? > Then this patch can cook

[PATCH] emacs: update alist for mail-archive.com API change

2014-02-13 Thread David Bremner
Jed Brown writes: > -("Mail Archive, The" . "http://mail-archive.com/search?l=mid&q=";) > +("Mail Archive, The" . "http://mid.mail-archive.com/";) the change looks reasonable, but it breaks one of the tests. Please update the corresponding test at the same time. d

doc: notmuch_result_move_to_next -> notmuch_tags_move_to_next

2014-02-13 Thread David Bremner
Gaute Hope writes: > Greetings, > > another small typo in the docs. Patch attached. > > Cheers, Gaute > pushed, thanks. For future reference: - patches via git send-email are much less work to deal with - We usually want at least one more line in the commit message beyond the "subject"

[PATCH] emacs: update alist for mail-archive.com API change

2014-02-13 Thread Jed Brown
Searching by Message-Id no longer works via the old mail-archive.com API, though I have contacted them in hopes that they restore it to prevent dead links. Anyway, the new API is cleaner. Acked-by: Austin Clements --- Fixed the test. Thanks, David. emacs/notmuch-show.el | 2 +- test/T310-emac

[PATCH v3 1/8] nmbug-status: Anchor with h3 ids instead of a names

2014-02-13 Thread W. Trevor King
HTML 5 allows id attributes on all HTML elements [1], but restricts names to particular cases [2]. Attaching the id attribute to the h3 element allows us to drop the anchor a element altogether. [1]: http://www.w3.org/TR/html5/dom.html#the-id-attribute [2]: http://www.w3.org/TR/html5/index.html#a

[PATCH v3 0/8] nmbug-status: Python-3-compatibility and general refactoring

2014-02-13 Thread W. Trevor King
The only changes since v2 [1] are related to our discussion of locale-based encodings vs. hardcoded UTF-8 [2,3,and descendants]. This iteration addresses those concerns by rebasing the controversial commit (nmbug-status: Encode output using the user's locale) to the end of the series. In order to

[PATCH v3 8/8] nmbug-status: Hardcode UTF-8 instead of using the user's locale

2014-02-13 Thread W. Trevor King
David [1] and Tomi [2] both feel that the user's choice of LANG is not explicit enough to have such a strong effect on nmbug-status. For example, cron jobs usually default to LANG=C, and that is going to give you ASCII output: $ LANG=C python -c 'import locale; print(locale.getpreferredencoding

[PATCH v3 2/8] nmbug-status: Slug the title when using it as an id

2014-02-13 Thread W. Trevor King
Also allow manual id overrides from the JSON config. Sluggin avoids errors like: Bad value '#Possible bugs' for attribute href on element a: Whitespace in fragment component. Use %20 in place of spaces. from http://validator.w3.org. I tried just quoting the titles (e.g. 'Possible%20bugs')

[PATCH v3 3/8] nmbug-status: Use and markup where appropriate

2014-02-13 Thread W. Trevor King
* Wrap free text in tags. * Convert to for query strings. * Wrap message-id-term (id:"...") in . The tags get nicer default markup (smaller monospace font) for notmuch query terms [1]. The tags don't have much effect without attached CSS, but bare text (phrasing content [2]) in (which expec

[PATCH v3 4/8] nmbug-status: Color threads in HTML output

2014-02-13 Thread W. Trevor King
Add tbody sections so we don't have to color every row. Multiple tbody sections are allowed [1]. Use CSS 3's nth-child to handle even/odd coloring (skipping the spacer rows) [2], which is supported on the major browsers [3]. border-spacing is from CCS 2.1 [4,5]. I'm using it to avoid whitespace

[PATCH v3 6/8] nmbug-status: Add inter-message padding

2014-02-13 Thread W. Trevor King
We already had the tbody with a blank row separating threads (which is not colored); this commit adds a bit of spacing to separate messages within a thread. It will also add a bit of colored padding above the first message and below the final message, but the main goal is to add padding *between*

[PATCH v3 5/8] nmbug-status: Escape &, <, and > in HTML display data

2014-02-13 Thread W. Trevor King
'message-id' and 'from' now have sensitive characters escaped using xml.sax.saxutils.escape [1]. The 'subject' data was already being converted to a link into Gmane; I've escape()d that too, so it doesn't need to be handled ain the same block as 'message-id' and 'from'. This prevents broken HTML

[PATCH v3 7/8] nmbug-status: Encode output using the user's locale

2014-02-13 Thread W. Trevor King
Instead of always writing UTF-8, allow the user to configure the output encoding using their locale. This is useful for previewing output in the terminal, for poor souls that don't use UTF-8 locales ;). --- devel/nmbug/nmbug-status | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

[PATCH v3 0/8] nmbug-status: Python-3-compatibility and general refactoring

2014-02-13 Thread Tomi Ollila
On Thu, Feb 13 2014, "W. Trevor King" wrote: > The only changes since v2 [1] are related to our discussion of > locale-based encodings vs. hardcoded UTF-8 [2,3,and descendants]. > This iteration addresses those concerns by rebasing the controversial > commit (nmbug-status: Encode output using the

[PATCH v3 7/8] nmbug-status: Encode output using the user's locale

2014-02-13 Thread W. Trevor King
lication/pgp-signature Size: 836 bytes Desc: OpenPGP digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140213/a24e6f1c/attachment.pgp>

[PATCH] ruby bindings message: docstring typo

2014-02-13 Thread David Bremner
Gaute Hope writes: Any objections Felipe? > > diff --git a/bindings/ruby/message.c b/bindings/ruby/message.c > index eed4b31..4ff6097 100644 > --- a/bindings/ruby/message.c > +++ b/bindings/ruby/message.c > @@ -111,7 +111,7 @@ notmuch_rb_message_get_filename (VALUE self) > } > > /* > - * cal

[PATCH v3 4/8] nmbug-status: Color threads in HTML output

2014-02-13 Thread David Bremner
"W. Trevor King" writes: > + > + looks like a bad rebase there. d

[PATCH v3 4/8] nmbug-status: Color threads in HTML output

2014-02-13 Thread W. Trevor King
/pipermail/notmuch/attachments/20140213/7f4a6519/attachment.pgp>

[PATCH v3 6/8] nmbug-status: Add inter-message padding

2014-02-13 Thread David Bremner
"W. Trevor King" writes: > We already had the tbody with a blank row separating threads (which is > not colored); this commit adds a bit of spacing to separate messages > within a thread. It will also add a bit of colored padding above the > first message and below the final message, but the mai

[PATCH v3 6/8] nmbug-status: Add inter-message padding

2014-02-13 Thread W. Trevor King
next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: OpenPGP digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140213/9b724cb6/attachment.pgp>