[PATCH 0/5] lib: make folder: prefix literal

2014-02-05 Thread Tomi Ollila
On Wed, Feb 05 2014, Tomi Ollila  wrote:

> On Tue, Feb 04 2014, Austin Clements  wrote:
>
>
> In zsh:
>
> $ echo whatever:/**
> whatever:/**

Except (retested after seeing related IRC msg from Austin):

$ unsetopt no_nomatch
$ echo whatever:/**
zsh: no matches found: whatever:/**

We can maybe document this (and bash nullglob) for users to decide
how they want their shells to behave...

Tomi


> Quick check with:
> ksh-20100621-12.el6.x86_64,
> dash-0.5.5.1-3.1.el6.x86_64
> busybox-1.15.1-20.el6.x86_64 (busybox sh & busybox ash)
> and
> http://sourceforge.net/projects/heirloom/files/heirloom-sh/050706/heirloom-sh-050706.tar.bz2/download
>
> all do the same (non-)expansion.
>
>
> I vaguely remember some shells did puke some error when expansion yielded
> no results... maybe some shell option does it. Definitely not mainstream
> feature.

... or maybe it is after all ;/

>
> Tomi



[PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring

2014-02-05 Thread Tomi Ollila
On Wed, Feb 05 2014, Tomi Ollila  wrote:

> I have some comments on the new look -- which is pretty nice btw.
>
> now every other thread is background-colored (girly) pink (fef?)
> and every other light blue (eff). for me the light blue is not
> visible (there are no body background color set?)
>
> ... hmm, i added 'body { background-color: #FFF; }' to the page and
> still light blue is not visible on my screen (checked w/ #f0f that
> the above line actually has some effect)... #DFF for the light-blue
> works better for me.
>
> I think rounded corners are nice but IMHO the round radius is too big
> -- using 0.5mm for the radius would IMHO be better.

Forgot to mention that the <, >, &  etc. characters could also be encoded
in this patch series (to , ,  etc.)

>
> Tomi

Tomi


[PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring

2014-02-05 Thread Tomi Ollila
On Tue, Feb 04 2014, Tomi Ollila  wrote:

> On Tue, Feb 04 2014, "W. Trevor King"  wrote:
>
>
> $ PYTHONPATH=$PWD/bindings/python/ ./devel/nmbug/nmbug-status
> ...
> Traceback (most recent call last):
>   File "devel/nmbug/nmbug-status", line 318, in 
> page.write(database=db, views=config['views'])
>   File "devel/nmbug/nmbug-status", line 94, in write
> self._write_view(database=database, view=view, stream=stream)
>   File "devel/nmbug/nmbug-status", line 113, in _write_view
> self._write_threads(threads=threads, stream=stream)
>   File "devel/nmbug/nmbug-status", line 215, in _write_threads
> ).format(**message_display_data))
>   File "/usr/lib64/python2.6/codecs.py", line 351, in write
> data, consumed = self.encode(object, self.errors)
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u017b' in
> position 176: ordinal not in range(128)
>
>
> I'll dig deeper tomorrow.

PEBKAC. I (actually) used wrapper to run nmbug-status -- to run right
notmuch binary. While it mostly sets environment to be right it internally
uses LC_ALL=C for consistency -- and the wrapper forgot to restore
LC_ALL before running nmbug-status.

(that also confirms that the suggestion you made I used cron was somewhat
accurate ;)

After I fixed the wrapper the program works fine on python 2.6.6.

I have some comments on the new look -- which is pretty nice btw.

now every other thread is background-colored (girly) pink (fef?)
and every other light blue (eff). for me the light blue is not
visible (there are no body background color set?)

... hmm, i added 'body { background-color: #FFF; }' to the page and
still light blue is not visible on my screen (checked w/ #f0f that
the above line actually has some effect)... #DFF for the light-blue
works better for me.

I think rounded corners are nice but IMHO the round radius is too big
-- using 0.5mm for the radius would IMHO be better.

>
> Tomi

Tomi


[PATCH 0/5] lib: make folder: prefix literal

2014-02-05 Thread Tomi Ollila
On Tue, Feb 04 2014, Austin Clements  wrote:

> Quoth Jani Nikula on Feb 01 at  4:54 pm:
>
>> I kind of like the "/**" suffix for recursive, but there's two small
>> wrinkles: 1) it needs quoting on the command line (unlike my original
>> suggestion of just "/" suffix), and 2) what should the top level
>> recursive search be? path:"**" or path:"/**" or path:"./**"? I guess the
>> first one is most obvious?
>
> The shell quoting is annoying, but depending on the shell, it should
> at least give an error (zsh) or Just Work (apparently bash and sh pass
> the unexpanded glob through if it doesn't match anything?).


In zsh:

$ echo whatever:/**
whatever:/**

Quick check with:
ksh-20100621-12.el6.x86_64,
dash-0.5.5.1-3.1.el6.x86_64
busybox-1.15.1-20.el6.x86_64 (busybox sh & busybox ash)
and
http://sourceforge.net/projects/heirloom/files/heirloom-sh/050706/heirloom-sh-050706.tar.bz2/download

all do the same (non-)expansion.


I vaguely remember some shells did puke some error when expansion yielded
no results... maybe some shell option does it. Definitely not mainstream
feature.

Tomi


[PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring

2014-02-05 Thread W. Trevor King
On Wed, Feb 05, 2014 at 05:24:56PM +0200, Tomi Ollila wrote:
> Forgot to mention that the <, >, & etc. characters could also be
> encoded in this patch series (to , ,  etc.)

Good point.  I'll xml.sax.saxutils.escape the message-id, from, and
subject at the end of HtmlPage._message_display_data, and squash that
into the Page / HtmlPage commit.

Thanks,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-- 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/20140205/57d96514/attachment.pgp>


[PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring

2014-02-05 Thread W. Trevor King
On Wed, Feb 05, 2014 at 05:00:45PM +0200, Tomi Ollila wrote:
> After I fixed the wrapper the program works fine on python 2.6.6.

:)

> now every other thread is background-colored (girly) pink (fef?)
> and every other light blue (eff). for me the light blue is not
> visible (there are no body background color set?)

#EFF is visible to me, but it is light.

> #DFF for the light-blue works better for me.

I'm fine with that.  As I said in my cover letter, I'm happy to have
alternative color schemes suggested.  Does anyone else want to chime
in on better defaults?  This should probably also be configurable via
status-config.json.  Maybe:

   { "style": {"html": {"thread-colors": ["#DFF", "#FEF"]}}}

?

> I think rounded corners are nice but IMHO the round radius is too
> big -- using 0.5mm for the radius would IMHO be better.

No problem.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-- 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/20140205/75e4b37b/attachment.pgp>


Re: [PATCH 0/5] lib: make folder: prefix literal

2014-02-05 Thread Tomi Ollila
On Tue, Feb 04 2014, Austin Clements amdra...@mit.edu wrote:

 Quoth Jani Nikula on Feb 01 at  4:54 pm:

 I kind of like the /** suffix for recursive, but there's two small
 wrinkles: 1) it needs quoting on the command line (unlike my original
 suggestion of just / suffix), and 2) what should the top level
 recursive search be? path:** or path:/** or path:./**? I guess the
 first one is most obvious?

 The shell quoting is annoying, but depending on the shell, it should
 at least give an error (zsh) or Just Work (apparently bash and sh pass
 the unexpanded glob through if it doesn't match anything?).


In zsh:

$ echo whatever:/**
whatever:/**

Quick check with:
ksh-20100621-12.el6.x86_64,
dash-0.5.5.1-3.1.el6.x86_64
busybox-1.15.1-20.el6.x86_64 (busybox sh  busybox ash)
and
http://sourceforge.net/projects/heirloom/files/heirloom-sh/050706/heirloom-sh-050706.tar.bz2/download

all do the same (non-)expansion.


I vaguely remember some shells did puke some error when expansion yielded
no results... maybe some shell option does it. Definitely not mainstream
feature.

Tomi
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring

2014-02-05 Thread Tomi Ollila
On Tue, Feb 04 2014, Tomi Ollila tomi.oll...@iki.fi wrote:

 On Tue, Feb 04 2014, W. Trevor King wk...@tremily.us wrote:


 $ PYTHONPATH=$PWD/bindings/python/ ./devel/nmbug/nmbug-status
 ...
 Traceback (most recent call last):
   File devel/nmbug/nmbug-status, line 318, in module
 page.write(database=db, views=config['views'])
   File devel/nmbug/nmbug-status, line 94, in write
 self._write_view(database=database, view=view, stream=stream)
   File devel/nmbug/nmbug-status, line 113, in _write_view
 self._write_threads(threads=threads, stream=stream)
   File devel/nmbug/nmbug-status, line 215, in _write_threads
 ).format(**message_display_data))
   File /usr/lib64/python2.6/codecs.py, line 351, in write
 data, consumed = self.encode(object, self.errors)
 UnicodeEncodeError: 'ascii' codec can't encode character u'\u017b' in
 position 176: ordinal not in range(128)


 I'll dig deeper tomorrow.

PEBKAC. I (actually) used wrapper to run nmbug-status -- to run right
notmuch binary. While it mostly sets environment to be right it internally
uses LC_ALL=C for consistency -- and the wrapper forgot to restore
LC_ALL before running nmbug-status.

(that also confirms that the suggestion you made I used cron was somewhat
accurate ;)

After I fixed the wrapper the program works fine on python 2.6.6.

I have some comments on the new look -- which is pretty nice btw.

now every other thread is background-colored (girly) pink (fef?)
and every other light blue (eff). for me the light blue is not
visible (there are no body background color set?)

... hmm, i added 'body { background-color: #FFF; }' to the page and
still light blue is not visible on my screen (checked w/ #f0f that
the above line actually has some effect)... #DFF for the light-blue
works better for me.

I think rounded corners are nice but IMHO the round radius is too big
-- using 0.5mm for the radius would IMHO be better.


 Tomi

Tomi
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring

2014-02-05 Thread Tomi Ollila
On Wed, Feb 05 2014, Tomi Ollila tomi.oll...@iki.fi wrote:

 I have some comments on the new look -- which is pretty nice btw.

 now every other thread is background-colored (girly) pink (fef?)
 and every other light blue (eff). for me the light blue is not
 visible (there are no body background color set?)

 ... hmm, i added 'body { background-color: #FFF; }' to the page and
 still light blue is not visible on my screen (checked w/ #f0f that
 the above line actually has some effect)... #DFF for the light-blue
 works better for me.

 I think rounded corners are nice but IMHO the round radius is too big
 -- using 0.5mm for the radius would IMHO be better.

Forgot to mention that the , ,   etc. characters could also be encoded
in this patch series (to lt;, gt;, amp; etc.)


 Tomi

Tomi
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring

2014-02-05 Thread W. Trevor King
On Wed, Feb 05, 2014 at 05:00:45PM +0200, Tomi Ollila wrote:
 After I fixed the wrapper the program works fine on python 2.6.6.

:)

 now every other thread is background-colored (girly) pink (fef?)
 and every other light blue (eff). for me the light blue is not
 visible (there are no body background color set?)

#EFF is visible to me, but it is light.

 #DFF for the light-blue works better for me.

I'm fine with that.  As I said in my cover letter, I'm happy to have
alternative color schemes suggested.  Does anyone else want to chime
in on better defaults?  This should probably also be configurable via
status-config.json.  Maybe:

   { style: {html: {thread-colors: [#DFF, #FEF]}}}

?

 I think rounded corners are nice but IMHO the round radius is too
 big -- using 0.5mm for the radius would IMHO be better.

No problem.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy


signature.asc
Description: OpenPGP digital signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring

2014-02-05 Thread W. Trevor King
On Wed, Feb 05, 2014 at 05:24:56PM +0200, Tomi Ollila wrote:
 Forgot to mention that the , ,  etc. characters could also be
 encoded in this patch series (to lt;, gt;, amp; etc.)

Good point.  I'll xml.sax.saxutils.escape the message-id, from, and
subject at the end of HtmlPage._message_display_data, and squash that
into the Page / HtmlPage commit.

Thanks,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy


signature.asc
Description: OpenPGP digital signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 0/5] lib: make folder: prefix literal

2014-02-05 Thread Tomi Ollila
On Wed, Feb 05 2014, Tomi Ollila tomi.oll...@iki.fi wrote:

 On Tue, Feb 04 2014, Austin Clements amdra...@mit.edu wrote:


 In zsh:

 $ echo whatever:/**
 whatever:/**

Except (retested after seeing related IRC msg from Austin):

$ unsetopt no_nomatch
$ echo whatever:/**
zsh: no matches found: whatever:/**

We can maybe document this (and bash nullglob) for users to decide
how they want their shells to behave...

Tomi


 Quick check with:
 ksh-20100621-12.el6.x86_64,
 dash-0.5.5.1-3.1.el6.x86_64
 busybox-1.15.1-20.el6.x86_64 (busybox sh  busybox ash)
 and
 http://sourceforge.net/projects/heirloom/files/heirloom-sh/050706/heirloom-sh-050706.tar.bz2/download

 all do the same (non-)expansion.


 I vaguely remember some shells did puke some error when expansion yielded
 no results... maybe some shell option does it. Definitely not mainstream
 feature.

... or maybe it is after all ;/


 Tomi

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 0/7] emacs: show tag changes in buffer

2014-02-05 Thread Tomi Ollila
On Sun, Jan 19 2014, Mark Walters markwalters1...@gmail.com wrote:

 This is a reworked and expanded version of the single patch
 id:1387065197-15776-4-git-send-email-markwalters1...@gmail.com

 This shows any tags changed in the show buffer since it was loaded or
 refreshed. By default a removed tag is displayed with strike-through
 in red (if strike-through is not available, eg on a terminal, inverse
 video is used instead) and an added tag is displayed underlined in
 green. This version works in all three views show, search and tree.


tl;dr ... ;D -- well, maybe someone reads it through ;)

Anyway, this patch series looks good to me (one commit message
tl;dr but I guess it is useful for anyone who actually reads it).
I don't see anything it may break and I started using this in 
my notmuch setup from now on.

Tomi
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring

2014-02-05 Thread Tomi Ollila
On Wed, Feb 05 2014, W. Trevor King wk...@tremily.us wrote:

 On Wed, Feb 05, 2014 at 05:00:45PM +0200, Tomi Ollila wrote:
 After I fixed the wrapper the program works fine on python 2.6.6.

 :)

 now every other thread is background-colored (girly) pink (fef?)
 and every other light blue (eff). for me the light blue is not
 visible (there are no body background color set?)

 #EFF is visible to me, but it is light.

 #DFF for the light-blue works better for me.

 I'm fine with that.  As I said in my cover letter, I'm happy to have
 alternative color schemes suggested.  Does anyone else want to chime
 in on better defaults?  This should probably also be configurable via
 status-config.json.  Maybe:

{ style: {html: {thread-colors: [#DFF, #FEF]}}}

Maybe we can persuade David to test-run new notmuch-status in
his production server before it is pushed to notmuch master, and
bikeshed the style in http://nmbug.tethera.net/status/

 ?

probably no-one is interested to configure those later (if we even
get bikeshed comments... ;)

Tomi

 I think rounded corners are nice but IMHO the round radius is too
 big -- using 0.5mm for the radius would IMHO be better.

 No problem.

 Cheers,
 Trevor
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH v4] build: write VERSION file containing $(VERSION) string

2014-02-05 Thread Tomi Ollila
This version file will be as prerequisite to the target files
that use the version info for some purpose, like printing
it to the user to examine. The contents of the VERSION file
is seldom read by the build system itself as the $(VERSION)
variable has the same information.
---

ctested also with:
   mv .git .x
   make
   cat VERSION version
   mv .x .git
   make
   cat VERSION version

 Makefile.local | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index 174506c..65c91cb 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -21,7 +21,13 @@ endif
 VERSION:=$(shell cat ${srcdir}/version)
 ifeq ($(filter release release-message pre-release 
update-versions,$(MAKECMDGOALS)),)
 ifeq ($(IS_GIT),yes)
-VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e 
s/-/~/)
+# Also write VERSION file in case its contents differ from $(VERSION)
+VERSION:=$(shell\
+   gv=`git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/`;\
+   test -f VERSION || touch VERSION;\
+   read fv  VERSION;\
+   test x$$fv = x$$gv || echo $$gv  VERSION;\
+   echo $$gv)
 endif
 endif
 
@@ -69,6 +75,11 @@ ifeq ($(shell cat .first-build-message 2/dev/null),)
 endif
 endif
 
+# Depend (also) on 'version' file. In case of ifeq ($(IS_GIT),yes)
+# this file may already have been updated.
+VERSION: version
+   echo $(VERSION)  $@
+
 $(TAR_FILE):
if git tag -v $(VERSION) /dev/null 21; then \
ref=$(VERSION); \
@@ -280,6 +291,8 @@ notmuch_client_srcs =   \
 
 notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
 
+notmuch.o: VERSION
+
 notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libutil.a 
parse-time-string/libparse-time-string.a
$(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
 
@@ -318,7 +331,7 @@ install-desktop:
desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) 
notmuch.desktop
 
 SRCS  := $(SRCS) $(notmuch_client_srcs)
-CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc
+CLEAN := $(CLEAN) VERSION notmuch notmuch-shared $(notmuch_client_modules)
 
 DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config
 
-- 
1.8.4.2

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch