[PATCH 3/3] test: add emacs test for hiding a message following an HTML part

2011-12-16 Thread Dmitry Kurochkin
Hi Tom.

On Thu, 15 Dec 2011 10:27:33 -0700, Tom Prince  
wrote:
> On Thu, 15 Dec 2011 08:14:08 -0400, David Bremner  
> wrote:
> > On Mon,  4 Jul 2011 05:59:03 +0400, Dmitry Kurochkin  > gmail.com> wrote:
> > > Result: nothing happens except for "No URL at point" message
> > > 
> > > Expected result: the second message is shown/hidden
> > 
> > Unfortunately this patch is unreliable, reporting BROKEN for some
> > environments and FIXED for others; I think you mentioned it depends
> > on whether w3m-el is installed? I have reverted it for now to reduce the
> > noise in the test logs.
> 
> Would a proper fix for this be to explicitly select which html renderer
> is used, and then test it with each renderer in turn? If it is the
> renderer that is causing the BROKEN/FIXED distinction, this would
> trigger all possbile behaviors.
> 

I know that the issue affects w3m-el renderer and does not affect
w3m-standalone.  Though it may affect other renderers as well.  So we
could explicitly set the renderer to w3m-el for the test.  But we need
to make sure we skip the test if w3m-el is not available.

The bug itself is related to keymap property that is set for the
rendered HTML.  It is set for the final newline as well.  And it is
rear-sticky.  I am not sure about how to better fix this.

I do not plan to work on this issue in the near future, so I do not want
to spend time on fixing this test case now.  If you feel like working on
it, you are welcome.

Regards,
  Dmitry

>   Tom


[PATCH v3 4/4] emacs: add notmuch-hello-hook

2011-12-16 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 21:49:00 +0400, Dmitry Kurochkin  wrote:
> On Tue, 13 Dec 2011 18:32:12 +0100, Thomas Jost  
> wrote:
> > This hook is called every time the notmuch-hello buffer is updated.
> > ---
> >  emacs/notmuch-hello.el |9 -
> >  1 files changed, 8 insertions(+), 1 deletions(-)
> > 
> > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> > index 0fe9c1d..112b40b 100644
> > --- a/emacs/notmuch-hello.el
> > +++ b/emacs/notmuch-hello.el
> > @@ -131,6 +131,11 @@ So:
> >   (integer :tag "Number of characters")
> >   (float :tag "Fraction of window")))
> >  
> > +(defcustom notmuch-hello-hook nil
> > +  "Functions called after populating a `notmuch-hello' buffer."
> > +  :type 'hook
> > +  :group 'notmuch)
> > +
> >  (defcustom notmuch-thousands-separator ","
> >"The string used as a thousands separator.
> >  
> > @@ -579,7 +584,9 @@ Complete list of currently available key bindings:
> >   (widget-forward 1)))
> >  
> >(unless (widget-at)
> > -   (notmuch-hello-goto-search)
> > +   (notmuch-hello-goto-search))
> > +
> > +  (run-hooks 'notmuch-hello-hook
> >  
> 
> I spent some time finding out why run-hooks are not on the top level.
> Turns out it is inside two let statements.  Can we move to the top level
> of `notmuch-hello' to make it clear that it is always run (i.e. there
> are no ifs or whens)?
> 

In addition to the above comment: I think we should rename
notmuch-hello-hook to notmuch-hello-refresh-hook.  That would make it
clear that the hook runs on each notmuch-hello buffer update.  And would
avoid confusion with notmuch-hello-mode-hook if we add it later.

Regards,
  Dmitry

> BTW this would replace one of the oldest custom patches which I have in
> my master branch :)
> 
> Regards,
>   Dmitry
> 
> >  (defun notmuch-folder ()
> >"Deprecated function for invoking notmuch---calling `notmuch' is 
> > preferred now."
> > -- 
> > 1.7.8
> > 
> > ___
> > notmuch mailing list
> > notmuch at notmuchmail.org
> > http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH v3 1/4] emacs: Let the user choose where to compose new mails

2011-12-16 Thread David Bremner
On Fri, 16 Dec 2011 15:45:26 -0800, Jameson Graef Rollins  wrote:

> Hey, David.  What exactly is the problem here?  These seems like it's
> actually reasonable behavior when you're using emacs in daemon mode,
> yes?  I don't actually use notmuch with emacs daemon/client, so I'm not
> sure what behavior is expected.

The frame started by "emacsclient -c" is no different than a frame
started with "emacs". It closes when you type C-x C-c. In particular
killing an emacs window should not kill the frame.  With this patch, and
notmuch-mua-compose-in set to new-window, notmuch does this.

> If this is an emacsclient issue, should that prevent the patch from
> going through?

It is pretty disruptive to have a frame closed unexpectedly, and I think
enough people use 'emacsclient -c' that this is not a use case we can
dismiss.

In any event, I just checked with 'emacs -q', no emacsclient, and the
behaviour of 'new-window is strange there too, since it buries the
notmuch window, and leaves the window containing the sent message
displayed.

d



More ideas about logging.

2011-12-16 Thread Michael Hudson-Doyle
On Thu, 15 Dec 2011 22:09:08 -0400, David Bremner  wrote:
> Various discussions (mostly on IRC) from my jlog proposal, and a from
> Thomas's mtime
> (id:"1323796305-28789-1-git-send-email-schnouki at schnouki.net") proposal
> got me thinking.  So let me know what you think about the following.
>
> The goal here is to log tag adds and deletes (including those implicit
> in message deletion) to facilitate tag synchonization.

It's a tangent, but would this sort of thing allow a "undo last tagging
operation" command in emacs?

Cheers,
mwh


[PATCH v3 1/4] emacs: Let the user choose where to compose new mails

2011-12-16 Thread Jameson Graef Rollins
On Fri, 16 Dec 2011 21:19:37 -0400, David Bremner  wrote:
> The frame started by "emacsclient -c" is no different than a frame
> started with "emacs". It closes when you type C-x C-c. In particular
> killing an emacs window should not kill the frame.  With this patch, and
> notmuch-mua-compose-in set to new-window, notmuch does this.

I'm worried that this is because the behavior emacs' "dedicated" windows
is a little flaky.  I've experimented with it before and noticed some
weirdnesses.

It's been working for me perfectly in this context, though.  I would
hate to see this patch not go through, cause I'm totally addicted to
this behavior at this point.

What if we just added a warning to the help message for the
customization variable that says the behavior with emacsclient might be
a little flaky?  Obviously people don't have to use this functionality,
so in that sense it doesn't hurt anyone to have it there if they just
don't use it, right?

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20111216/a745bd65/attachment.pgp>


notmuch-emacs won't display correctly quoted-printable iso-8859-1 mails

2011-12-16 Thread Olivier Berger
Hi.

Here's a copy of a bug report I've just filed in Debian's bugtracker [0].

If some of you have an idea of whether there's a fix/workaround ?

Many thanks in advance.

Best regards,

P.S.: sent with Gnus to avoid messing with the encodings too much ;)

[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652359

Olivier Berger  writes:

> Package: notmuch-emacs
> Version: 0.10.1-1
> Severity: normal
>
> Hi.
>
> I experience problems with communication with other people in french, when 
> sending/responding to emails with notmuch.
>
> The following is the source of a mail sent with notmuch :
>
> MIME-Version: 1.0
> Content-Type: text/plain; charset=iso-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> Du texte accentu=E9 pour =E7a ...
>
> =E0 la bonne heure !
> --=20
>
> Which is rendered as :
>
>
> Du texte accentu?? pour ??a ...
>
> ?? la bonne heure !
> [ 6-line signature. Click/Enter to hide. ]

-- 
Olivier BERGER 
http://www-public.it-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8
Ingenieur Recherche - Dept INF
Institut TELECOM, SudParis (http://www.it-sudparis.eu/), Evry (France)


GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Austin Clements
Quoth Nathan Edson on Dec 16 at  1:26 pm:
> On 12/16/11, Austin Clements wrote:
> > Quoth Nathan Edson on Dec 16 at  1:12 pm:
> > > > Since you're now building notmuch from source, could you build it with
> > > > make clean && make CFLAGS=-g and run it under gdb again to get a
> > > > backtrace?  I don't understand why strace didn't show it opening any
> > > > mail, but with debug symbols the backtrace should hopefully tell us
> > > > that.
> > > 
> > > First, thanks for your help!  Perhaps I am making progress...
> > > 
> > > Here is what I get:
> > > 
> > > yabai at newb:~$ gdb --args notmuch new
> > > GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
> > > Copyright (C) 2010 Free Software Foundation, Inc.
> > > License GPLv3+: GNU GPL version 3 or later 
> > > 
> > > This is free software: you are free to change and redistribute it.
> > > There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> > > and "show warranty" for details.
> > > This GDB was configured as "i686-linux-gnu".
> > > For bug reporting instructions, please see:
> > > ...
> > > Reading symbols from /usr/local/bin/notmuch...done.
> > > (gdb) run
> > > Starting program: /usr/local/bin/notmuch new
> > > [Thread debugging using libthread_db enabled]
> > > 
> > > GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
> > > allocate 2147483648 bytes
> > > aborting...
> > > 
> > > Program received signal SIGABRT, Aborted.
> > > 0xb7fe1424 in __kernel_vsyscall ()
> > > (gdb) bt
> > > #0  0xb7fe1424 in __kernel_vsyscall ()
> > > #1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
> > > #2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
> > > #3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > > #4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > > #5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > > #6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > > #7  0xb7e50d5d in g_array_append_vals () from 
> > > /lib/i386-linux-gnu/libglib-2.0.so.0
> > > #8  0xb7e520c0 in g_byte_array_append () from 
> > > /lib/i386-linux-gnu/libglib-2.0.so.0
> > > #9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
> > > #10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
> > > #11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
> > > #12 0xb7f829ea in g_mime_parser_construct_message () from 
> > > /usr/lib/libgmime-2.4.so.2
> > > #13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
> > > filename=0x80d0600 "/home/yabai/Mail/old.mail") at lib/index.cc:437
> > > #14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
> > > filename=0x80d0600 "/home/yabai/Mail/old.mail", 
> > > message_ret=0xb414) at lib/database.cc:1734
> > 
> > Ah!  It did show up in the strace.  /home/yabai/Mail/old.mail appears
> > to be the offending file.  What's in it?
> 
> This is my file full of old mail.  I believe it is in mbox format. It 
> contains approximately 40K emails...could the format of this file affect 
> things?  Orginally, this mail was exported from Apple Mail.

notmuch doesn't support mbox files, but an mbox file looks enough like
a maildir message that notmuch will *try* to index it (but as a
single, gigantic message).  This is certainly the cause of the
failure.  The immediate solution is to move this file out of the tree
you're indexing with notmuch.

Still, notmuch should fail more gracefully and you are probably
hitting a real gmime bug (given that it's trying to allocate
(unsigned)-1 bytes of memory).  How big is old.mail?


[PATCH v3 3/4] emacs: rename notmuch-decimal-separator to notmuch-thousands-separator

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 08:29:00 -0400, David Bremner  wrote:
> On Fri, 16 Dec 2011 04:59:22 +0400, Dmitry Kurochkin  gmail.com> wrote:
> > 
> > What do perople think about making the thousands separator a space by
> > default?
> > 
> 
> Is that really good for a majority of users? I had never heard of it
> until now. I know this is hardly scientific, but still...
> 

Well, to me "1 000 000 000" looks better than "1,000,000,000".  But I do
not know about the others.  That is why I was asking :)

Regards,
  Dmitry

> d


[PATCH v2 2/2] emacs: Test for thread-outlining

2011-12-16 Thread Jameson Graef Rollins
fyi this patch applied, but I got the following warning from git:

Applying: emacs: Test for thread-outlining
/home/jrollins/src/notmuch/git/.git/rebase-apply/patch:16: space before tab in 
indent.
   (switch-to-buffer notmuch-show-outline-buffer)
warning: 1 line adds whitespace errors.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20111216/9c6f4201/attachment.pgp>


[PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom

2011-12-16 Thread Dmitry Kurochkin
On Fri, 23 Sep 2011 22:03:42 +0300, Jani Nikula  wrote:
> The :options keyword is not meaningful for function type. Also, it was not
> possible to enter nil value, contrary to the notmuch-mua-user-agent
> defcustom documentation. Specify the alternatives using choice type, taking
> nil into account.
> 

I know little about the customize interface.  But the patch makes sense
to me.

Perhaps I would give mode detailed description for the options, but
before the change there was none at all, so this is definitely an
improvement.

Regards,
  Dmitry

> Signed-off-by: Jani Nikula 
> ---
>  emacs/notmuch-mua.el |   10 ++
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index 8824b08..8b95bd4 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -35,10 +35,12 @@
>"Function used to generate a `User-Agent:' string. If this is
>  `nil' then no `User-Agent:' will be generated."
>:group 'notmuch
> -  :type 'function
> -  :options '(notmuch-mua-user-agent-full
> -  notmuch-mua-user-agent-notmuch
> -  notmuch-mua-user-agent-emacs))
> +  :type '(choice (const :tag "No user agent string" nil)
> +  (const :tag "Full" notmuch-mua-user-agent-full)
> +  (const :tag "Notmuch" notmuch-mua-user-agent-notmuch)
> +  (const :tag "Emacs" notmuch-mua-user-agent-emacs)
> +  (function :tag "Custom user agent function"
> +:value notmuch-mua-user-agent-full)))
>  
>  (defcustom notmuch-mua-hidden-headers '("^User-Agent:")
>"Headers that are added to the `message-mode' hidden headers
> -- 
> 1.7.4.1
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 16:22:07 +0400, Dmitry Kurochkin  wrote:
> Hi Jani.
> 
> On Fri, 23 Sep 2011 22:03:41 +0300, Jani Nikula  wrote:
> > It was not possible to define custom filters or filter functions because
> > the types were const. Remove const to allow editing.
> > 
> 
> How about making "Unread messages" query configurable as well?
> 

Oh, we have "Custom filter" option for that.

Should the "Custom filter" have a default value of "tag:unread"?  That
would be consistent with custom function options having a default value.

Regards,
  Dmitry

> Regards,
>   Dmitry
> 
> > Signed-off-by: Jani Nikula 
> > ---
> >  emacs/notmuch-hello.el |4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> > index 65fde75..ad1a13f 100644
> > --- a/emacs/notmuch-hello.el
> > +++ b/emacs/notmuch-hello.el
> > @@ -66,8 +66,8 @@ Finally this can be a function that will be called for 
> > each tag and
> >  should return a filter for that tag, or nil to hide the tag."
> >:type '(choice (const :tag "All messages" nil)
> >  (const :tag "Unread messages" "tag:unread")
> > -(const :tag "Custom filter" string)
> > -(const :tag "Custom filter function" function))
> > +(string :tag "Custom filter")
> > +(function :tag "Custom filter function"))
> >:group 'notmuch)
> >  
> >  (defcustom notmuch-hello-hide-tags nil
> > -- 
> > 1.7.4.1
> > 
> > ___
> > notmuch mailing list
> > notmuch at notmuchmail.org
> > http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom

2011-12-16 Thread Dmitry Kurochkin
Hi Jani.

On Fri, 23 Sep 2011 22:03:41 +0300, Jani Nikula  wrote:
> It was not possible to define custom filters or filter functions because
> the types were const. Remove const to allow editing.
> 

How about making "Unread messages" query configurable as well?

Regards,
  Dmitry

> Signed-off-by: Jani Nikula 
> ---
>  emacs/notmuch-hello.el |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> index 65fde75..ad1a13f 100644
> --- a/emacs/notmuch-hello.el
> +++ b/emacs/notmuch-hello.el
> @@ -66,8 +66,8 @@ Finally this can be a function that will be called for each 
> tag and
>  should return a filter for that tag, or nil to hide the tag."
>:type '(choice (const :tag "All messages" nil)
>(const :tag "Unread messages" "tag:unread")
> -  (const :tag "Custom filter" string)
> -  (const :tag "Custom filter function" function))
> +  (string :tag "Custom filter")
> +  (function :tag "Custom filter function"))
>:group 'notmuch)
>  
>  (defcustom notmuch-hello-hide-tags nil
> -- 
> 1.7.4.1
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


ANNOUNCE: nottoomuch-addresses.pl version 1.4

2011-12-16 Thread Tomi Ollila
On Fri, 16 Dec 2011 14:01:26 +0100, Philipp ?berbacher  
wrote:
> Quoting Tomi Ollila (2011-12-14 21:10:28)
> 
> Hi Tomi,
> can this be used to automatically populate abook?
> I wonder because alot uses abook for addresses, and this could be handy.

Converter from 'flat list of email-addresses' in
$HOME/.config/nottoomuch/addresses to abook format is probably pretty
trivial (unless it is binary which lessens triviality...)... But there
could be (updating) issues.

Alternative would be to run something like

  notmuch search --sort=newest-first --output=files '*' | 
  while read file; do abook --add-email "$file"; done

initially. then register current date using date=`$date +%s`

and, in following rounds run

  notmuch search --sort=newest-first --output=files $(($date - 604800)).. | 
  while read file; do abook --add-email "$file"; done

(604800 == 86400 * 7 -- 7 days -- just analogous what nottoomuch-addresses.sh
does)

Note that this is just untested example (read abook.1 a bit)


An alternative would be to make 'abook' run nottoomuch-addresses.sh for
address completion (then get it's output order for matches (email addresses
from recent messages first)) -- or even just run

  grep -aiF "$string" "${XDG_CONFIG_HOME:-$HOME/.config}/nottoomuch/addresses"

(this is what nottoomuch-addresses.sh does when finding matches for given
search string. One can imagine how fast this approach is...)

> Regards,
> Philipp

Tomi


GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Austin Clements
Quoth Nathan Edson on Dec 16 at  1:12 pm:
> > Since you're now building notmuch from source, could you build it with
> > make clean && make CFLAGS=-g and run it under gdb again to get a
> > backtrace?  I don't understand why strace didn't show it opening any
> > mail, but with debug symbols the backtrace should hopefully tell us
> > that.
> 
> First, thanks for your help!  Perhaps I am making progress...
> 
> Here is what I get:
> 
> yabai at newb:~$ gdb --args notmuch new
> GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later 
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-linux-gnu".
> For bug reporting instructions, please see:
> ...
> Reading symbols from /usr/local/bin/notmuch...done.
> (gdb) run
> Starting program: /usr/local/bin/notmuch new
> [Thread debugging using libthread_db enabled]
> 
> GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
> allocate 2147483648 bytes
> aborting...
> 
> Program received signal SIGABRT, Aborted.
> 0xb7fe1424 in __kernel_vsyscall ()
> (gdb) bt
> #0  0xb7fe1424 in __kernel_vsyscall ()
> #1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
> #2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
> #3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
> #4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
> #5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
> #6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
> #7  0xb7e50d5d in g_array_append_vals () from 
> /lib/i386-linux-gnu/libglib-2.0.so.0
> #8  0xb7e520c0 in g_byte_array_append () from 
> /lib/i386-linux-gnu/libglib-2.0.so.0
> #9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
> #10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
> #11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
> #12 0xb7f829ea in g_mime_parser_construct_message () from 
> /usr/lib/libgmime-2.4.so.2
> #13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
> filename=0x80d0600 "/home/yabai/Mail/old.mail") at lib/index.cc:437
> #14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
> filename=0x80d0600 "/home/yabai/Mail/old.mail", message_ret=0xb414) 
> at lib/database.cc:1734

Ah!  It did show up in the strace.  /home/yabai/Mail/old.mail appears
to be the offending file.  What's in it?

> #15 0x0804fd0a in add_files_recursive (notmuch=0x806cd40, path=0x806cb58 
> "/home/yabai/Mail", 
> state=0xb634) at notmuch-new.c:459
> #16 0x08050273 in add_files (notmuch=0x806cd40, path=0x806cb58 
> "/home/yabai/Mail", state=0xb634)
> at notmuch-new.c:635
> #17 0x08050ba0 in notmuch_new_command (ctx=0x80620e8, argc=0, 
> argv=0xb7bc) at notmuch-new.c:897
> #18 0x0804d59a in main (argc=2, argv=0xb7b4) at notmuch.c:669
> (gdb) quit


have "notmuch help" call man?

2011-12-16 Thread Kazuo Teramoto
On 2011-12-16T14:01:42, David Bremner wrote:
>Also, there is the question of common text like search-terms, which
>could be included in every page, or maybe contained in man notmuch.
>

What about continuing the git-foo analogy and creating a notmuch search
terms page. Like how git-log page reference gitrevisions(7) for a
complete description of giving references.

And leave the notmuch page as a table of contents for the others
commands and definitions.



[PATCH v2 0/3] emacs: Document notmuch-show-get-message-properties

2011-12-16 Thread Jameson Graef Rollins
On Fri, 16 Dec 2011 09:01:21 -0400, David Bremner  wrote:
> The others are (not too surprisingly) stale and need rebasing. I'm also
> not clear on whether we have concensus on whether the patches are
> suitable for inclusion, so feedback from others would be welcome
> (perhaps before Daniel goes to the trouble of rebasing).

I definitely like the idea of thread outlining, but this isn't quite the
implementation that I would personally like to see.  What I would like
requires a bunch of changes to notmuch show, though.  This looks like it
could be kind of interesting to me in the interim, though, and it's not
particular invasive, so if Daniel want's to rebase it I see no problem.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20111216/2245a928/attachment.pgp>


GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Austin Clements
Quoth Nathan Edson on Dec 16 at 12:07 pm:
> Hello,
> I posted yesterday detailing this issue I am having:
> 
> yabai at newb:~$ notmuch new
> Processed 1 files (0 files/sec.).
> GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
> allocate 2147483648 bytes
> aborting...
> Aborted
> 
> I thought that I might have better success compiling notmuch from the latest 
> source.  I did this, and am still getting the same error.  I am running 
> Ubuntu 11.04.
> 
> Any tips or recommendations appreciated.  I have Googled like crazy, but am 
> coming up empty.
> 
> Nathan

Since you're now building notmuch from source, could you build it with
make clean && make CFLAGS=-g and run it under gdb again to get a
backtrace?  I don't understand why strace didn't show it opening any
mail, but with debug symbols the backtrace should hopefully tell us
that.


[PATCH v3 1/4] emacs: Let the user choose where to compose new mails

2011-12-16 Thread Jameson Graef Rollins
On Thu, 15 Dec 2011 19:50:36 -0400, David Bremner  wrote:
> I think the problem is related to emacsclient.
> 
> With 'm' I have the following behaviour:
> 
> emacs -q --daemon
> M-x notmuch (to load variable definitions)
> M-x customize-variable notmuch-mua-compose-in
> (select compose in new window, save for current session)
> M-x notmuch
> m   ;; new window is opened as it should be
> C-c C-c ;; frame is closed.

Hey, David.  What exactly is the problem here?  These seems like it's
actually reasonable behavior when you're using emacs in daemon mode,
yes?  I don't actually use notmuch with emacs daemon/client, so I'm not
sure what behavior is expected.

If this is an emacsclient issue, should that prevent the patch from
going through?

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20111216/48c10a24/attachment-0001.pgp>


[PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 06:16:45 -0500, Aaron Ecay  wrote:
> From the emacs changelog:
> 
>   ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
>   passes it to the mail user agent function.  This argument specifies an
>   action for returning to the caller after finishing with the mail.
>   This is currently used by Rmail to delete a mail window.
> 
> Under Emacs 24, notmuch breaks when this argument is passed to it by a
> function in another part of Emacs.  One example of a functon that does
> this is report-emacs-bug -- so notmuch users cannot file emacs bug
> reports!
> 
> This patch also adds a  argument to the arg-list of this function,
> to future-proof against such changes.  This is adapted from the approach
> taken by message-mail, a similar function built into emacs.
> 
> This patch was originally submitted by richardmurri at gmail.com on Aug. 1:
> id:"877h6x6oor.fsf at veracitynetworks.com"
> ---
> 
> The previous version of this patch would break older emacsen.  Not
> passing the return-action argument through to message-mail isn't nice,
> but the alternative is to conditionally pass it based on the emacs
> version, which is less nice.
> 

Actually, we can pass return-action (and any future arguments) to
message-mail and still be compatible with Emacs 23.  See
id:"87ty50sqto.fsf at gmail.com".

Regards,
  Dmitry

> Thanks for the review Dmitry and Tomi.
> 
>  emacs/notmuch-mua.el |3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index 8824b08..da31fdd 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -125,7 +125,8 @@ list."
>(message-goto-to))
>  
>  (defun notmuch-mua-mail ( to subject other-headers continue
> -switch-function yank-action send-actions)
> +switch-function yank-action send-actions
> +return-action  ignored)
>"Invoke the notmuch mail composition window."
>(interactive)
>  
> -- 
> 1.7.8
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 13:06:21 +0200, Tomi Ollila  wrote:
> On Fri, 16 Dec 2011 05:30:39 -0500, Aaron Ecay  wrote:
> > >From the emacs changelog:
> > 
> >   ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
> >   passes it to the mail user agent function.  This argument specifies an
> >   action for returning to the caller after finishing with the mail.
> >   This is currently used by Rmail to delete a mail window.
> > 
> > Under Emacs 24, notmuch breaks when this argument is passed to it by a
> > function in another part of Emacs.  One example of a functon that does
> > this is report-emacs-bug -- so notmuch users cannot file emacs bug
> > reports!
> > 
> > This patch also adds a  argument to the arg-list of this function,
> > to future-proof against such changes.  This is adapted from the approach
> > taken by message-mail, a similar function built into emacs.
> > 
> > This patch was originally submitted by richardmurri at gmail.com on Aug. 1:
> > id:"877h6x6oor.fsf at veracitynetworks.com"
> > Signed-off-by: Aaron Ecay 
> > ---
> 
> Emacs 23.3 message-mail is defined as follows:
> 
> --8<8<8<8<8<8<8<8<8<8<8<--
> (defun message-mail ( to subject
>other-headers continue switch-function
>yank-action send-actions)
> ...
> --8<8<8<8<8<8<8<8<8<8<8<--
> 
> If I'd apply your patch would that break it on Emacs 23 ?
> 

Good point! It seems like it would.

Perhaps we can change `notmuch-mua-mail' to accept ( to subject
other-headers  rest) and pass it all to `message-mail'.  That
should be compatible with both Emacs 23 and 24, and is future-proof.

Regards,
  Dmitry

> 
> Tomi
> 
> >  emacs/notmuch-mua.el |6 --
> >  1 files changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> > index 8824b08..23552ad 100644
> > --- a/emacs/notmuch-mua.el
> > +++ b/emacs/notmuch-mua.el
> > @@ -125,7 +125,8 @@ list."
> >(message-goto-to))
> >  
> >  (defun notmuch-mua-mail ( to subject other-headers continue
> > -  switch-function yank-action send-actions)
> > +  switch-function yank-action send-actions
> > +  return-action  ignored)
> >"Invoke the notmuch mail composition window."
> >(interactive)
> >  
> > @@ -139,7 +140,8 @@ list."
> > (notmuch-user-name) " <" (notmuch-user-primary-email) 
> > ">")) other-headers))
> >  
> >(message-mail to subject other-headers continue
> > -   switch-function yank-action send-actions)
> > +   switch-function yank-action send-actions
> > +   return-action)
> >(message-sort-headers)
> >(message-hide-headers)
> >(set-buffer-modified-p nil)
> > -- 
> > 1.7.8
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 05:30:39 -0500, Aaron Ecay  wrote:
> From the emacs changelog:
> 
>   ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
>   passes it to the mail user agent function.  This argument specifies an
>   action for returning to the caller after finishing with the mail.
>   This is currently used by Rmail to delete a mail window.
> 
> Under Emacs 24, notmuch breaks when this argument is passed to it by a
> function in another part of Emacs.  One example of a functon that does
> this is report-emacs-bug -- so notmuch users cannot file emacs bug
> reports!
> 
> This patch also adds a  argument to the arg-list of this function,
> to future-proof against such changes.  This is adapted from the approach
> taken by message-mail, a similar function built into emacs.
> 
> This patch was originally submitted by richardmurri at gmail.com on Aug. 1:
> id:"877h6x6oor.fsf at veracitynetworks.com"
> Signed-off-by: Aaron Ecay 
> ---

Looks good.  And thanks for the good preamble.

Regards,
  Dmitry

>  emacs/notmuch-mua.el |6 --
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index 8824b08..23552ad 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -125,7 +125,8 @@ list."
>(message-goto-to))
>  
>  (defun notmuch-mua-mail ( to subject other-headers continue
> -switch-function yank-action send-actions)
> +switch-function yank-action send-actions
> +return-action  ignored)
>"Invoke the notmuch mail composition window."
>(interactive)
>  
> @@ -139,7 +140,8 @@ list."
>   (notmuch-user-name) " <" (notmuch-user-primary-email) 
> ">")) other-headers))
>  
>(message-mail to subject other-headers continue
> - switch-function yank-action send-actions)
> + switch-function yank-action send-actions
> + return-action)
>(message-sort-headers)
>(message-hide-headers)
>(set-buffer-modified-p nil)
> -- 
> 1.7.8
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
On 12/16/11, Austin Clements wrote:
> Quoth Nathan Edson on Dec 16 at  1:26 pm:
> > On 12/16/11, Austin Clements wrote:
> > > Quoth Nathan Edson on Dec 16 at  1:12 pm:
> > > > > Since you're now building notmuch from source, could you build it with
> > > > > make clean && make CFLAGS=-g and run it under gdb again to get a
> > > > > backtrace?  I don't understand why strace didn't show it opening any
> > > > > mail, but with debug symbols the backtrace should hopefully tell us
> > > > > that.
> > > > 
> > > > First, thanks for your help!  Perhaps I am making progress...
> > > > 
> > > > Here is what I get:
> > > > 
> > > > yabai at newb:~$ gdb --args notmuch new
> > > > GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
> > > > Copyright (C) 2010 Free Software Foundation, Inc.
> > > > License GPLv3+: GNU GPL version 3 or later 
> > > > 
> > > > This is free software: you are free to change and redistribute it.
> > > > There is NO WARRANTY, to the extent permitted by law.  Type "show 
> > > > copying"
> > > > and "show warranty" for details.
> > > > This GDB was configured as "i686-linux-gnu".
> > > > For bug reporting instructions, please see:
> > > > ...
> > > > Reading symbols from /usr/local/bin/notmuch...done.
> > > > (gdb) run
> > > > Starting program: /usr/local/bin/notmuch new
> > > > [Thread debugging using libthread_db enabled]
> > > > 
> > > > GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed 
> > > > to allocate 2147483648 bytes
> > > > aborting...
> > > > 
> > > > Program received signal SIGABRT, Aborted.
> > > > 0xb7fe1424 in __kernel_vsyscall ()
> > > > (gdb) bt
> > > > #0  0xb7fe1424 in __kernel_vsyscall ()
> > > > #1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
> > > > #2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
> > > > #3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > > > #4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > > > #5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > > > #6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > > > #7  0xb7e50d5d in g_array_append_vals () from 
> > > > /lib/i386-linux-gnu/libglib-2.0.so.0
> > > > #8  0xb7e520c0 in g_byte_array_append () from 
> > > > /lib/i386-linux-gnu/libglib-2.0.so.0
> > > > #9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
> > > > #10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
> > > > #11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
> > > > #12 0xb7f829ea in g_mime_parser_construct_message () from 
> > > > /usr/lib/libgmime-2.4.so.2
> > > > #13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
> > > > filename=0x80d0600 "/home/yabai/Mail/old.mail") at lib/index.cc:437
> > > > #14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
> > > > filename=0x80d0600 "/home/yabai/Mail/old.mail", 
> > > > message_ret=0xb414) at lib/database.cc:1734
> > > 
> > > Ah!  It did show up in the strace.  /home/yabai/Mail/old.mail appears
> > > to be the offending file.  What's in it?
> > 
> > This is my file full of old mail.  I believe it is in mbox format. It 
> > contains approximately 40K emails...could the format of this file affect 
> > things?  Orginally, this mail was exported from Apple Mail.
> 
> notmuch doesn't support mbox files, but an mbox file looks enough like
> a maildir message that notmuch will *try* to index it (but as a
> single, gigantic message).  This is certainly the cause of the
> failure.  The immediate solution is to move this file out of the tree
> you're indexing with notmuch.
> 
> Still, notmuch should fail more gracefully and you are probably
> hitting a real gmime bug (given that it's trying to allocate
> (unsigned)-1 bytes of memory).  How big is old.mail?

old.mail is about 5gb.  I guess the file type is the problem...forgive me, I 
thought notmuch supported mbox.


have "notmuch help" call man?

2011-12-16 Thread Jameson Graef Rollins
On Fri, 16 Dec 2011 12:01:42 -0400, David Bremner  wrote:
> Currently help strings are compiled into the notmuch binary. This is a
> bit a of pain, since we have the same help text in two places.
> What do you think about having "notmuch help foo" invoke "man
> notmuch-foo" and create appropriate man pages (or links).

Hey, David.  I am absolutely in favor of this idea.  I'm a fan of the
git help interface, so the more we can emulate that, and make it so we
only have to maintain documentation in one place, then that's a huge win
in my mind.

jamie.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20111216/6a3a66bd/attachment-0001.pgp>


GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
On 12/16/11, Austin Clements wrote:
> Quoth Nathan Edson on Dec 16 at  1:12 pm:
> > > Since you're now building notmuch from source, could you build it with
> > > make clean && make CFLAGS=-g and run it under gdb again to get a
> > > backtrace?  I don't understand why strace didn't show it opening any
> > > mail, but with debug symbols the backtrace should hopefully tell us
> > > that.
> > 
> > First, thanks for your help!  Perhaps I am making progress...
> > 
> > Here is what I get:
> > 
> > yabai at newb:~$ gdb --args notmuch new
> > GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
> > Copyright (C) 2010 Free Software Foundation, Inc.
> > License GPLv3+: GNU GPL version 3 or later 
> > 
> > This is free software: you are free to change and redistribute it.
> > There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> > and "show warranty" for details.
> > This GDB was configured as "i686-linux-gnu".
> > For bug reporting instructions, please see:
> > ...
> > Reading symbols from /usr/local/bin/notmuch...done.
> > (gdb) run
> > Starting program: /usr/local/bin/notmuch new
> > [Thread debugging using libthread_db enabled]
> > 
> > GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
> > allocate 2147483648 bytes
> > aborting...
> > 
> > Program received signal SIGABRT, Aborted.
> > 0xb7fe1424 in __kernel_vsyscall ()
> > (gdb) bt
> > #0  0xb7fe1424 in __kernel_vsyscall ()
> > #1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
> > #2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
> > #3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > #4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > #5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > #6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
> > #7  0xb7e50d5d in g_array_append_vals () from 
> > /lib/i386-linux-gnu/libglib-2.0.so.0
> > #8  0xb7e520c0 in g_byte_array_append () from 
> > /lib/i386-linux-gnu/libglib-2.0.so.0
> > #9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
> > #10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
> > #11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
> > #12 0xb7f829ea in g_mime_parser_construct_message () from 
> > /usr/lib/libgmime-2.4.so.2
> > #13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
> > filename=0x80d0600 "/home/yabai/Mail/old.mail") at lib/index.cc:437
> > #14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
> > filename=0x80d0600 "/home/yabai/Mail/old.mail", message_ret=0xb414) 
> > at lib/database.cc:1734
> 
> Ah!  It did show up in the strace.  /home/yabai/Mail/old.mail appears
> to be the offending file.  What's in it?

This is my file full of old mail.  I believe it is in mbox format. It contains 
approximately 40K emails...could the format of this file affect things?  
Orginally, this mail was exported from Apple Mail.

Thanks again for the help.


GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
> Since you're now building notmuch from source, could you build it with
> make clean && make CFLAGS=-g and run it under gdb again to get a
> backtrace?  I don't understand why strace didn't show it opening any
> mail, but with debug symbols the backtrace should hopefully tell us
> that.

Perhaps this will help:

yabai at newb:~$ strace -eopen notmuch new
open("/etc/ld.so.cache", O_RDONLY)  = 3
open("/usr/local/lib/libnotmuch.so.2", O_RDONLY) = 3
open("/usr/lib/libgmime-2.4.so.2", O_RDONLY) = 3
open("/usr/lib/i386-linux-gnu/libgobject-2.0.so.0", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libglib-2.0.so.0", O_RDONLY) = 3
open("/usr/lib/libtalloc.so.2", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libpthread.so.0", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY) = 3
open("/usr/lib/sse2/libxapian.so.22", O_RDONLY) = 3
open("/usr/lib/i386-linux-gnu/libstdc++.so.6", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libgcc_s.so.1", O_RDONLY) = 3
open("/usr/lib/i386-linux-gnu/libgmodule-2.0.so.0", O_RDONLY) = 3
open("/usr/lib/i386-linux-gnu/libgthread-2.0.so.0", O_RDONLY) = 3
open("/lib/i386-linux-gnu/librt.so.1", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libz.so.1", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libnsl.so.1", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libpcre.so.3", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libuuid.so.1", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libm.so.6", O_RDONLY) = 3
open("/lib/i386-linux-gnu/libdl.so.2", O_RDONLY) = 3
open("/usr/lib/i386-linux-gnu/charset.alias", O_RDONLY|O_LARGEFILE) = -1 ENOENT 
(No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_LARGEFILE) = 3
open("/home/yabai/.notmuch-config", O_RDONLY|O_LARGEFILE) = 3
open("/home/yabai/Mail/.notmuch/xapian/flintlock", 
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
open("/home/yabai/Mail/.notmuch/xapian/iamchert", O_RDONLY|O_LARGEFILE) = 3
open("/home/yabai/Mail/.notmuch/xapian/record.DB", O_RDWR|O_LARGEFILE) = 3
open("/home/yabai/Mail/.notmuch/xapian/record.baseA", O_RDONLY|O_LARGEFILE) = 5
open("/home/yabai/Mail/.notmuch/xapian/record.baseB", O_RDONLY|O_LARGEFILE) = 5
open("/home/yabai/Mail/.notmuch/xapian/spelling.DB", O_RDWR|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open("/home/yabai/Mail/.notmuch/xapian/synonym.DB", O_RDWR|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open("/home/yabai/Mail/.notmuch/xapian/termlist.DB", O_RDWR|O_LARGEFILE) = 5
open("/home/yabai/Mail/.notmuch/xapian/termlist.baseA", O_RDONLY|O_LARGEFILE) = 
-1 ENOENT (No such file or directory)
open("/home/yabai/Mail/.notmuch/xapian/termlist.baseB", O_RDONLY|O_LARGEFILE) = 
6
open("/home/yabai/Mail/.notmuch/xapian/position.DB", O_RDWR|O_LARGEFILE) = 6
open("/home/yabai/Mail/.notmuch/xapian/position.baseA", O_RDONLY|O_LARGEFILE) = 
7
open("/home/yabai/Mail/.notmuch/xapian/position.baseB", O_RDONLY|O_LARGEFILE) = 
-1 ENOENT (No such file or directory)
open("/home/yabai/Mail/.notmuch/xapian/postlist.DB", O_RDWR|O_LARGEFILE) = 7
open("/home/yabai/Mail/.notmuch/xapian/postlist.baseA", O_RDONLY|O_LARGEFILE) = 
8
open("/home/yabai/Mail/.notmuch/xapian/postlist.baseB", O_RDONLY|O_LARGEFILE) = 
8
open("/home/yabai/Mail", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) 
= 8
open("/home/yabai/Mail/Sent", O_RDONLY|O_LARGEFILE) = 8
open("/etc/localtime", O_RDONLY)= 9
open("/home/yabai/Mail/Sent", O_RDONLY|O_LARGEFILE) = 9
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
open("/home/yabai/Mail/old.mail", O_RDONLY|O_LARGEFILE) = 8
--- SIGALRM (Alarm clock) @ 0 (0) ---
open("/home/yabai/Mail/old.mail", O_RDONLY|O_LARGEFILE) = 9
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
open("/usr/lib/i386-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT 
(No such file or directory)
open("/usr/lib/i386-linux-gnu/gconv/gconv-modules", O_RDONLY) = 10

GLib-ERROR **: 

GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
> Since you're now building notmuch from source, could you build it with
> make clean && make CFLAGS=-g and run it under gdb again to get a
> backtrace?  I don't understand why strace didn't show it opening any
> mail, but with debug symbols the backtrace should hopefully tell us
> that.

First, thanks for your help!  Perhaps I am making progress...

Here is what I get:

yabai at newb:~$ gdb --args notmuch new
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/local/bin/notmuch...done.
(gdb) run
Starting program: /usr/local/bin/notmuch new
[Thread debugging using libthread_db enabled]

GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
allocate 2147483648 bytes
aborting...

Program received signal SIGABRT, Aborted.
0xb7fe1424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fe1424 in __kernel_vsyscall ()
#1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb7e50d5d in g_array_append_vals () from 
/lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb7e520c0 in g_byte_array_append () from 
/lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
#10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
#11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
#12 0xb7f829ea in g_mime_parser_construct_message () from 
/usr/lib/libgmime-2.4.so.2
#13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
filename=0x80d0600 "/home/yabai/Mail/old.mail") at lib/index.cc:437
#14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
filename=0x80d0600 "/home/yabai/Mail/old.mail", message_ret=0xb414) at 
lib/database.cc:1734
#15 0x0804fd0a in add_files_recursive (notmuch=0x806cd40, path=0x806cb58 
"/home/yabai/Mail", 
state=0xb634) at notmuch-new.c:459
#16 0x08050273 in add_files (notmuch=0x806cd40, path=0x806cb58 
"/home/yabai/Mail", state=0xb634)
at notmuch-new.c:635
#17 0x08050ba0 in notmuch_new_command (ctx=0x80620e8, argc=0, argv=0xb7bc) 
at notmuch-new.c:897
#18 0x0804d59a in main (argc=2, argv=0xb7b4) at notmuch.c:669
(gdb) quit



[alot] on Arch Linux

2011-12-16 Thread Patrick Totzke
Quoting Kazuo Teramoto (2011-12-16 12:37:37)
>On 2011-12-16T08:28:37, Patrick Totzke wrote:
>>
>>Hmm.. Is anybody using Arch willing to look into this?  Or can anybody
>>suggest a painless and quick way for me to set up an Arch installation
>>in a Virtualbox or so to be able to reproduce this?
>>
>
>I'm using Arch and I have debugging log. I'm using the 'testing' (a
>place where packages is put before entering the official repo).

Justus just confirmed that this logging issue also occurs on debian wheezy.
https://github.com/pazz/alot/issues/156#issuecomment-3176618
I'm running ubuntu 11.04 (and see debug logs).

>But neither python2 or twisted is on it, so I have the usual packages.
I don't understand what you mean here.

>Patrick if you need help on installing Arch on a VM poke me on irc. I
>can create a virtualbox image for you.
Thanks. I will come back to this if i need to actually run Arch for debugging.
much appreciated.

/p



[alot] on Arch Linux

2011-12-16 Thread Philipp Ãœberbacher
Quoting Patrick Totzke (2011-12-16 11:28:37)
>Quoting Mark Foxwell (2011-12-16 10:05:12)
>>Quoting Patrick Totzke (2011-12-16 09:06:44)
>>>Regarding your bug reports: Can anybody else running Arch confirm the 
>>>problems Philipp has?
>>>In particular that logging doesn't work and this issue:
>>>https://github.com/pazz/alot/issues/156 ? 
>>>Because I don't know how to reproduce this and having no log makes debugging 
>>>difficult..
>>
>>I can confirm that I don't get any debug logging - have write perms and
>>space but no file created. 
>
>Hmm.. Is anybody using Arch willing to look into this?
>Or can anybody suggest a painless and quick way for me to set up an Arch 
>installation in a Virtualbox or so to be able to reproduce this?
>/p

Maybe the easiest way is a live-CD, a normal Arch installation may take
a little if you do it the first time.
Live-CD versions for Arch come and go, so it's not that easy to find 
them, however, I dug some up:
http://archbang.org/
https://godane.wordpress.com/ ?

I hope you can just run the iso in some virtual machine. It's likely not
as up-to-date as the average arch users system, but I guess you could
update it.





[PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Tomi Ollila
On Fri, 16 Dec 2011 05:30:39 -0500, Aaron Ecay  wrote:
> >From the emacs changelog:
> 
>   ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
>   passes it to the mail user agent function.  This argument specifies an
>   action for returning to the caller after finishing with the mail.
>   This is currently used by Rmail to delete a mail window.
> 
> Under Emacs 24, notmuch breaks when this argument is passed to it by a
> function in another part of Emacs.  One example of a functon that does
> this is report-emacs-bug -- so notmuch users cannot file emacs bug
> reports!
> 
> This patch also adds a  argument to the arg-list of this function,
> to future-proof against such changes.  This is adapted from the approach
> taken by message-mail, a similar function built into emacs.
> 
> This patch was originally submitted by richardmurri at gmail.com on Aug. 1:
> id:"877h6x6oor.fsf at veracitynetworks.com"
> Signed-off-by: Aaron Ecay 
> ---

Emacs 23.3 message-mail is defined as follows:

--8<8<8<8<8<8<8<8<8<8<8<--
(defun message-mail ( to subject
   other-headers continue switch-function
   yank-action send-actions)
...
--8<8<8<8<8<8<8<8<8<8<8<--

If I'd apply your patch would that break it on Emacs 23 ?


Tomi

>  emacs/notmuch-mua.el |6 --
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
> index 8824b08..23552ad 100644
> --- a/emacs/notmuch-mua.el
> +++ b/emacs/notmuch-mua.el
> @@ -125,7 +125,8 @@ list."
>(message-goto-to))
>  
>  (defun notmuch-mua-mail ( to subject other-headers continue
> -switch-function yank-action send-actions)
> +switch-function yank-action send-actions
> +return-action  ignored)
>"Invoke the notmuch mail composition window."
>(interactive)
>  
> @@ -139,7 +140,8 @@ list."
>   (notmuch-user-name) " <" (notmuch-user-primary-email) 
> ">")) other-headers))
>  
>(message-mail to subject other-headers continue
> - switch-function yank-action send-actions)
> + switch-function yank-action send-actions
> + return-action)
>(message-sort-headers)
>(message-hide-headers)
>(set-buffer-modified-p nil)
> -- 
> 1.7.8



GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
Hello,
I posted yesterday detailing this issue I am having:

yabai at newb:~$ notmuch new
Processed 1 files (0 files/sec.).
GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
allocate 2147483648 bytes
aborting...
Aborted

I thought that I might have better success compiling notmuch from the latest 
source.  I did this, and am still getting the same error.  I am running Ubuntu 
11.04.

Any tips or recommendations appreciated.  I have Googled like crazy, but am 
coming up empty.

Nathan


have "notmuch help" call man?

2011-12-16 Thread David Bremner

Hi All;

Currently help strings are compiled into the notmuch binary. This is a
bit a of pain, since we have the same help text in two places.
What do you think about having "notmuch help foo" invoke "man
notmuch-foo" and create appropriate man pages (or links).

There are other ways around the maintenance dilemma, including
generating man pages and online help from some common source (e.g. in
the style of id:"1288804736-5173-3-git-send-email-david at tethera.net").

For downsides, it might complicate things slightly for people who
install notmuch in "odd" places. On the other hand, it is no worse than
setting LD_LIBRARY_PATH. Also, there is the question of common text like
search-terms, which could be included in every page, or maybe contained
in man notmuch.

David


[alot] on Arch Linux

2011-12-16 Thread Kazuo Teramoto
On 2011-12-16T08:28:37, Patrick Totzke wrote:
>
>Hmm.. Is anybody using Arch willing to look into this?  Or can anybody
>suggest a painless and quick way for me to set up an Arch installation
>in a Virtualbox or so to be able to reproduce this?
>

I'm using Arch and I have debugging log. I'm using the 'testing' (a
place where packages is put before entering the official repo).

But neither python2 or twisted is on it, so I have the usual packages.

Patrick if you need help on installing Arch on a VM poke me on irc. I
can create a virtualbox image for you.



[alot] on Arch Linux

2011-12-16 Thread Patrick Totzke
Quoting Mark Foxwell (2011-12-16 10:05:12)
>Quoting Patrick Totzke (2011-12-16 09:06:44)
>>Regarding your bug reports: Can anybody else running Arch confirm the 
>>problems Philipp has?
>>In particular that logging doesn't work and this issue:
>>https://github.com/pazz/alot/issues/156 ? 
>>Because I don't know how to reproduce this and having no log makes debugging 
>>difficult..
>
>I can confirm that I don't get any debug logging - have write perms and
>space but no file created. 

Hmm.. Is anybody using Arch willing to look into this?
Or can anybody suggest a painless and quick way for me to set up an Arch 
installation in a Virtualbox or so to be able to reproduce this?
/p



[alot] on Arch Linux

2011-12-16 Thread Mark Foxwell
Quoting Patrick Totzke (2011-12-16 09:06:44)
>Regarding your bug reports: Can anybody else running Arch confirm the problems 
>Philipp has?
>In particular that logging doesn't work and this issue:
>https://github.com/pazz/alot/issues/156 ? 
>Because I don't know how to reproduce this and having no log makes debugging 
>difficult..

I can confirm that I don't get any debug logging - have write perms and
space but no file created. 

However, I don't get any error messages when exiting.

My slight difference is that I'm running parabola (completely libre arch
linux) so my python2 package comes from parabola rather than arch. I
will investigate what the differences are.

>I'm totally surprised by Arch not shipping a default mailcap at all..

A default arch installation doesn't contain X let alone any programs for
viewing images, pdf etc. So shipping a default mailcap would not make
any sense nor could ever be workable. Arch isn't really a distro for
people who want things to 'just work' but more for tinkerers and those
that know what they want and how to do it. 

--
Mark



have "notmuch help" call man?

2011-12-16 Thread Adam Wolfe Gordon
On Fri, Dec 16, 2011 at 09:01, David Bremner  wrote:
> Currently help strings are compiled into the notmuch binary. This is a
> bit a of pain, since we have the same help text in two places.
> What do you think about having "notmuch help foo" invoke "man
> notmuch-foo" and create appropriate man pages (or links).

I really like this git-style idea.  An additional plus is that long
help (e.g. notmuch help show) would be automatically paged, avoiding a
lot of !!|less.

-- 
Adam Wolfe Gordon


[alot] on Arch Linux

2011-12-16 Thread Patrick Totzke
Hi Philipp,

Quoting Philipp ?berbacher (2011-12-14 22:30:22)
>I run Arch Linux. Here's some information for fellow Archers:
>PKGBUILD for alot-git: https://aur.archlinux.org/packages.php?ID=54955
>Should work just fine. If you want to help debug alot, change
>_gitname=master to the name of the branch, build and install as usual.

Great! Thanks for this.
Regarding your bug reports: Can anybody else running Arch confirm the problems 
Philipp has?
In particular that logging doesn't work and this issue:
https://github.com/pazz/alot/issues/156 ? 
Because I don't know how to reproduce this and having no log makes debugging 
difficult..

>Another little trap:
>Arch doesn't supply a mailcap file, alot needs it for all those funky
>html mails. As a solution until alot handles those mails better:

Well, it also makes sense to define some handlers for pdf/images and so on to 
be able to
easily open attachments. I consider mailcap the right way to do this (until 
someone comes
and shows me a better solution), so I don't plan on removing the necessity of 
the user
defining his mailcap. One would have to have one even for mutt. I'm
totally surprised by Arch not shipping a default mailcap at all..
I will add some info on mailcap to the FAQ.

Best,
/p



[PATCH v2 0/3] emacs: Document notmuch-show-get-message-properties

2011-12-16 Thread David Bremner
On Fri,  8 Jul 2011 20:46:54 +0200, Daniel Schoepe  wrote:
> This version fixes the issues mentioned by Austin and highlights the currently
> displayed message in the outline buffer. My previous issues with 
> 'point-entered
> and 'point-left were caused by linum-mode, so don't enable it for 
> notmuch-show buffers.

I have pushed the first (documentation) patch in the series.

The others are (not too surprisingly) stale and need rebasing. I'm also
not clear on whether we have concensus on whether the patches are
suitable for inclusion, so feedback from others would be welcome
(perhaps before Daniel goes to the trouble of rebasing).

d


[PATCH v3 3/4] emacs: rename notmuch-decimal-separator to notmuch-thousands-separator

2011-12-16 Thread David Bremner
On Fri, 16 Dec 2011 04:59:22 +0400, Dmitry Kurochkin  wrote:
> 
> What do perople think about making the thousands separator a space by
> default?
> 

Is that really good for a majority of users? I had never heard of it
until now. I know this is hardly scientific, but still...

d


More ideas about logging.

2011-12-16 Thread David Bremner
On Fri, 16 Dec 2011 20:16:51 +1300, Michael Hudson-Doyle  wrote:
> 
> It's a tangent, but would this sort of thing allow a "undo last tagging
> operation" command in emacs?
> 

It seems like it would be much simpler to track that information in a
data structure in emacs? Undo info is a frequently updated stack while
logs are naturally a queue. Also, implmenting a list of tagging
operations in emacs sounds way easier than anything we talked about
here.

d


More ideas about logging.

2011-12-16 Thread David Bremner
On Thu, 15 Dec 2011 23:07:22 -0500, Austin Clements  wrote:

> Quoth David Bremner on Dec 15 at 10:09 pm:
>
> you could come back with Xapian saying you have 500 log entries when
> your logfile comes back with only 20.  The only way I know of to fix
> this is to fsync after the logfile write, which would obviously have
> performance issues.  But maybe there are cleverer ways?

This might be why jlog uses journalling to write log entries. I'm not
familiar with the details though.

d


[PATCH] Fix build with binutils-2.22

2011-12-16 Thread Tomi Ollila
On Thu, 15 Dec 2011 20:41:58 +0100, Thomas Jost  
wrote:
> binutils-2.22 changes the behaviour of ld by defaulting to
> --no-copy-dt-needed-entries, which means that required objects/libs are not
> "indirectly" linked through intermediate objects/libs anymore. As a 
> consequence,
> when using binutils-2.22, building symbol-test fails with the following error:
> 
> /usr/bin/ld: test/symbol-test.o: undefined reference to symbol
> 'std::basic_string >::~basic_string()@@GLIBCXX_3.4'
> 
> /usr/bin/ld: note: 'std::basic_string std::allocator >::~basic_string()@@GLIBCXX_3.4' is defined in DSO
> /usr/lib/libstdc++.so.6 so try adding it to the linker command line
> 
> /usr/lib/libstdc++.so.6: could not read symbols: Invalid operation
> 
> An easy fix is to link using CXX instead of CC.
> ---

+1 -- LGTM, Works for me (hits also on Fedora 15). Interesting that gcc
does not fully default to g++ behaviour when source file is symbol-test.cc

Tomi

> Hi there,
> 
> This build issue happens on Arch Linux. For more details, the relevant 
> binutils
> changelog is here: http://ur1.ca/6px8j, and more explanations are available on
> the Fedora wiki: https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
> (People who read the arch-general ML may want to read the thread starting at
> id:"1323458274-sup-9064 at eris".)
> 
> Best regards,
> Thomas
> 
>  test/Makefile.local |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/test/Makefile.local b/test/Makefile.local
> index 6cb6c82..fa2df73 100644
> --- a/test/Makefile.local
> +++ b/test/Makefile.local
> @@ -17,7 +17,7 @@ $(dir)/smtp-dummy: $(smtp_dummy_modules)
>   $(call quiet,CC) $^ -o $@
>  
>  $(dir)/symbol-test: $(dir)/symbol-test.o
> - $(call quiet,CC) $^ -o $@ -Llib -lnotmuch -lxapian
> + $(call quiet,CXX) $^ -o $@ -Llib -lnotmuch -lxapian
>  
>  .PHONY: test check
>  
> -- 
> 1.7.8
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
> 


[PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Aaron Ecay
>From the emacs changelog:

  ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
  passes it to the mail user agent function.  This argument specifies an
  action for returning to the caller after finishing with the mail.
  This is currently used by Rmail to delete a mail window.

Under Emacs 24, notmuch breaks when this argument is passed to it by a
function in another part of Emacs.  One example of a functon that does
this is report-emacs-bug -- so notmuch users cannot file emacs bug
reports!

This patch also adds a  argument to the arg-list of this function,
to future-proof against such changes.  This is adapted from the approach
taken by message-mail, a similar function built into emacs.

This patch was originally submitted by richardmurri at gmail.com on Aug. 1:
id:"877h6x6oor.fsf at veracitynetworks.com"
---

The previous version of this patch would break older emacsen.  Not
passing the return-action argument through to message-mail isn't nice,
but the alternative is to conditionally pass it based on the emacs
version, which is less nice.

Thanks for the review Dmitry and Tomi.

 emacs/notmuch-mua.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 8824b08..da31fdd 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -125,7 +125,8 @@ list."
   (message-goto-to))

 (defun notmuch-mua-mail ( to subject other-headers continue
-  switch-function yank-action send-actions)
+  switch-function yank-action send-actions
+  return-action  ignored)
   "Invoke the notmuch mail composition window."
   (interactive)

-- 
1.7.8



[PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Aaron Ecay
>From the emacs changelog:

  ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
  passes it to the mail user agent function.  This argument specifies an
  action for returning to the caller after finishing with the mail.
  This is currently used by Rmail to delete a mail window.

Under Emacs 24, notmuch breaks when this argument is passed to it by a
function in another part of Emacs.  One example of a functon that does
this is report-emacs-bug -- so notmuch users cannot file emacs bug
reports!

This patch also adds a  argument to the arg-list of this function,
to future-proof against such changes.  This is adapted from the approach
taken by message-mail, a similar function built into emacs.

This patch was originally submitted by richardmurri at gmail.com on Aug. 1:
id:"877h6x6oor.fsf at veracitynetworks.com"
Signed-off-by: Aaron Ecay 
---
 emacs/notmuch-mua.el |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 8824b08..23552ad 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -125,7 +125,8 @@ list."
   (message-goto-to))

 (defun notmuch-mua-mail ( to subject other-headers continue
-  switch-function yank-action send-actions)
+  switch-function yank-action send-actions
+  return-action  ignored)
   "Invoke the notmuch mail composition window."
   (interactive)

@@ -139,7 +140,8 @@ list."
(notmuch-user-name) " <" (notmuch-user-primary-email) 
">")) other-headers))

   (message-mail to subject other-headers continue
-   switch-function yank-action send-actions)
+   switch-function yank-action send-actions
+   return-action)
   (message-sort-headers)
   (message-hide-headers)
   (set-buffer-modified-p nil)
-- 
1.7.8



[PATCH v3 3/4] emacs: rename notmuch-decimal-separator to notmuch-thousands-separator

2011-12-16 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 18:32:11 +0100, Thomas Jost  
wrote:
> In 123,456.78, "." is the decimal separator, but "," is the thousands 
> separator.
> 
> This commit also mentions the space being used as thousands separator in 
> several
> European countries.
> ---

What do perople think about making the thousands separator a space by
default?

>  emacs/notmuch-hello.el |8 
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
> index 0582cae..0fe9c1d 100644
> --- a/emacs/notmuch-hello.el
> +++ b/emacs/notmuch-hello.el
> @@ -131,10 +131,10 @@ So:
> (integer :tag "Number of characters")
> (float :tag "Fraction of window")))
>  
> -(defcustom notmuch-decimal-separator ","
> -  "The string used as a decimal separator.
> +(defcustom notmuch-thousands-separator ","
> +  "The string used as a thousands separator.

I suggest renaming this to notmuch-hello-thousands-separator.

Looks good otherwise.

Regards,
  Dmitry

>  
> -Typically \",\" in the US and UK and \".\" in Europe."
> +Typically \",\" in the US and UK and \".\" or \" \" in Europe."
>:group 'notmuch
>:type 'string)
>  
> @@ -159,7 +159,7 @@ Typically \",\" in the US and UK and \".\" in Europe."
>  (apply #'concat
>   (number-to-string (car result))
>   (mapcar (lambda (elem)
> -   (format "%s%03d" notmuch-decimal-separator elem))
> +   (format "%s%03d" notmuch-thousands-separator elem))
>(cdr result)
>  
>  (defun notmuch-hello-trim (search)
> -- 
> 1.7.8
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH v3 2/4] emacs: Add a face for crypto parts headers

2011-12-16 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 18:32:10 +0100, Thomas Jost  
wrote:
> Commit cb841878 introduced new parts handlers for crypto parts, but also
> hardcoded values for their headers face. This replaces these hardcoded values
> with a customizable face.
> ---

Looks good to me.

Regards,
  Dmitry

>  emacs/notmuch-crypto.el |5 +
>  emacs/notmuch-show.el   |4 ++--
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el
> index 44fccae..67c26af 100644
> --- a/emacs/notmuch-crypto.el
> +++ b/emacs/notmuch-crypto.el
> @@ -37,6 +37,11 @@ mode."
>:group 'notmuch
>:type 'boolean)
>  
> +(defface notmuch-crypto-part-header
> +  '((t (:foreground "blue")))
> +  "Face used for crypto parts headers."
> +  :group 'notmuch)
> +
>  (defface notmuch-crypto-signature-good
>'((t (:background "green" :foreground "black")))
>"Face used for good signatures."
> diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
> index 33ee3d8..ec9c52c 100644
> --- a/emacs/notmuch-show.el
> +++ b/emacs/notmuch-show.el
> @@ -457,7 +457,7 @@ current buffer, if possible."
>  
>  (defun notmuch-show-insert-part-multipart/signed (msg part content-type nth 
> depth declared-type)
>(let ((button (notmuch-show-insert-part-header nth declared-type 
> content-type nil)))
> -(button-put button 'face '(:foreground "blue"))
> +(button-put button 'face 'notmuch-crypto-part-header)
>  ;; add signature status button if sigstatus provided
>  (if (plist-member part :sigstatus)
>   (let* ((from (notmuch-show-get-header :From msg))
> @@ -479,7 +479,7 @@ current buffer, if possible."
>  
>  (defun notmuch-show-insert-part-multipart/encrypted (msg part content-type 
> nth depth declared-type)
>(let ((button (notmuch-show-insert-part-header nth declared-type 
> content-type nil)))
> -(button-put button 'face '(:foreground "blue"))
> +(button-put button 'face 'notmuch-crypto-part-header)
>  ;; add encryption status button if encstatus specified
>  (if (plist-member part :encstatus)
>   (let ((encstatus (car (plist-get part :encstatus
> -- 
> 1.7.8
> 
> ___
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


Re: [alot] on Arch Linux

2011-12-16 Thread Patrick Totzke
Hi Philipp,

Quoting Philipp Ãœberbacher (2011-12-14 22:30:22)
I run Arch Linux. Here's some information for fellow Archers:
PKGBUILD for alot-git: https://aur.archlinux.org/packages.php?ID=54955
Should work just fine. If you want to help debug alot, change
_gitname=master to the name of the branch, build and install as usual.

Great! Thanks for this.
Regarding your bug reports: Can anybody else running Arch confirm the problems 
Philipp has?
In particular that logging doesn't work and this issue:
https://github.com/pazz/alot/issues/156 ? 
Because I don't know how to reproduce this and having no log makes debugging 
difficult..

Another little trap:
Arch doesn't supply a mailcap file, alot needs it for all those funky
html mails. As a solution until alot handles those mails better:

Well, it also makes sense to define some handlers for pdf/images and so on to 
be able to
easily open attachments. I consider mailcap the right way to do this (until 
someone comes
and shows me a better solution), so I don't plan on removing the necessity of 
the user
defining his mailcap. One would have to have one even for mutt. I'm
totally surprised by Arch not shipping a default mailcap at all..
I will add some info on mailcap to the FAQ.

Best,
/p

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


Re: [alot] on Arch Linux

2011-12-16 Thread Mark Foxwell
Quoting Patrick Totzke (2011-12-16 09:06:44)
Regarding your bug reports: Can anybody else running Arch confirm the problems 
Philipp has?
In particular that logging doesn't work and this issue:
https://github.com/pazz/alot/issues/156 ? 
Because I don't know how to reproduce this and having no log makes debugging 
difficult..

I can confirm that I don't get any debug logging - have write perms and
space but no file created. 

However, I don't get any error messages when exiting.

My slight difference is that I'm running parabola (completely libre arch
linux) so my python2 package comes from parabola rather than arch. I
will investigate what the differences are.

I'm totally surprised by Arch not shipping a default mailcap at all..

A default arch installation doesn't contain X let alone any programs for
viewing images, pdf etc. So shipping a default mailcap would not make
any sense nor could ever be workable. Arch isn't really a distro for
people who want things to 'just work' but more for tinkerers and those
that know what they want and how to do it. 

--
Mark

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


Re: [alot] on Arch Linux

2011-12-16 Thread Patrick Totzke
Quoting Mark Foxwell (2011-12-16 10:05:12)
Quoting Patrick Totzke (2011-12-16 09:06:44)
Regarding your bug reports: Can anybody else running Arch confirm the 
problems Philipp has?
In particular that logging doesn't work and this issue:
https://github.com/pazz/alot/issues/156 ? 
Because I don't know how to reproduce this and having no log makes debugging 
difficult..

I can confirm that I don't get any debug logging - have write perms and
space but no file created. 

Hmm.. Is anybody using Arch willing to look into this?
Or can anybody suggest a painless and quick way for me to set up an Arch 
installation in a Virtualbox or so to be able to reproduce this?
/p

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


[PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Aaron Ecay
From the emacs changelog:

  ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
  passes it to the mail user agent function.  This argument specifies an
  action for returning to the caller after finishing with the mail.
  This is currently used by Rmail to delete a mail window.

Under Emacs 24, notmuch breaks when this argument is passed to it by a
function in another part of Emacs.  One example of a functon that does
this is report-emacs-bug -- so notmuch users cannot file emacs bug
reports!

This patch also adds a rest argument to the arg-list of this function,
to future-proof against such changes.  This is adapted from the approach
taken by message-mail, a similar function built into emacs.

This patch was originally submitted by richardmu...@gmail.com on Aug. 1:
id:877h6x6oor@veracitynetworks.com
Signed-off-by: Aaron Ecay aarone...@gmail.com
---
 emacs/notmuch-mua.el |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 8824b08..23552ad 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -125,7 +125,8 @@ list.
   (message-goto-to))
 
 (defun notmuch-mua-mail (optional to subject other-headers continue
-  switch-function yank-action send-actions)
+  switch-function yank-action send-actions
+  return-action rest ignored)
   Invoke the notmuch mail composition window.
   (interactive)
 
@@ -139,7 +140,8 @@ list.
(notmuch-user-name)   (notmuch-user-primary-email) 
)) other-headers))
 
   (message-mail to subject other-headers continue
-   switch-function yank-action send-actions)
+   switch-function yank-action send-actions
+   return-action)
   (message-sort-headers)
   (message-hide-headers)
   (set-buffer-modified-p nil)
-- 
1.7.8

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


Re: [PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 05:30:39 -0500, Aaron Ecay aarone...@gmail.com wrote:
 From the emacs changelog:
 
   ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
   passes it to the mail user agent function.  This argument specifies an
   action for returning to the caller after finishing with the mail.
   This is currently used by Rmail to delete a mail window.
 
 Under Emacs 24, notmuch breaks when this argument is passed to it by a
 function in another part of Emacs.  One example of a functon that does
 this is report-emacs-bug -- so notmuch users cannot file emacs bug
 reports!
 
 This patch also adds a rest argument to the arg-list of this function,
 to future-proof against such changes.  This is adapted from the approach
 taken by message-mail, a similar function built into emacs.
 
 This patch was originally submitted by richardmu...@gmail.com on Aug. 1:
 id:877h6x6oor@veracitynetworks.com
 Signed-off-by: Aaron Ecay aarone...@gmail.com
 ---

Looks good.  And thanks for the good preamble.

Regards,
  Dmitry

  emacs/notmuch-mua.el |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
 index 8824b08..23552ad 100644
 --- a/emacs/notmuch-mua.el
 +++ b/emacs/notmuch-mua.el
 @@ -125,7 +125,8 @@ list.
(message-goto-to))
  
  (defun notmuch-mua-mail (optional to subject other-headers continue
 -switch-function yank-action send-actions)
 +switch-function yank-action send-actions
 +return-action rest ignored)
Invoke the notmuch mail composition window.
(interactive)
  
 @@ -139,7 +140,8 @@ list.
   (notmuch-user-name)   (notmuch-user-primary-email) 
 )) other-headers))
  
(message-mail to subject other-headers continue
 - switch-function yank-action send-actions)
 + switch-function yank-action send-actions
 + return-action)
(message-sort-headers)
(message-hide-headers)
(set-buffer-modified-p nil)
 -- 
 1.7.8
 
 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Tomi Ollila
On Fri, 16 Dec 2011 05:30:39 -0500, Aaron Ecay aarone...@gmail.com wrote:
 From the emacs changelog:
 
   ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
   passes it to the mail user agent function.  This argument specifies an
   action for returning to the caller after finishing with the mail.
   This is currently used by Rmail to delete a mail window.
 
 Under Emacs 24, notmuch breaks when this argument is passed to it by a
 function in another part of Emacs.  One example of a functon that does
 this is report-emacs-bug -- so notmuch users cannot file emacs bug
 reports!
 
 This patch also adds a rest argument to the arg-list of this function,
 to future-proof against such changes.  This is adapted from the approach
 taken by message-mail, a similar function built into emacs.
 
 This patch was originally submitted by richardmu...@gmail.com on Aug. 1:
 id:877h6x6oor@veracitynetworks.com
 Signed-off-by: Aaron Ecay aarone...@gmail.com
 ---

Emacs 23.3 message-mail is defined as follows:

--88888888888--
(defun message-mail (optional to subject
   other-headers continue switch-function
   yank-action send-actions)
...
--88888888888--

If I'd apply your patch would that break it on Emacs 23 ?


Tomi

  emacs/notmuch-mua.el |6 --
  1 files changed, 4 insertions(+), 2 deletions(-)
 
 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
 index 8824b08..23552ad 100644
 --- a/emacs/notmuch-mua.el
 +++ b/emacs/notmuch-mua.el
 @@ -125,7 +125,8 @@ list.
(message-goto-to))
  
  (defun notmuch-mua-mail (optional to subject other-headers continue
 -switch-function yank-action send-actions)
 +switch-function yank-action send-actions
 +return-action rest ignored)
Invoke the notmuch mail composition window.
(interactive)
  
 @@ -139,7 +140,8 @@ list.
   (notmuch-user-name)   (notmuch-user-primary-email) 
 )) other-headers))
  
(message-mail to subject other-headers continue
 - switch-function yank-action send-actions)
 + switch-function yank-action send-actions
 + return-action)
(message-sort-headers)
(message-hide-headers)
(set-buffer-modified-p nil)
 -- 
 1.7.8

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


[PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Aaron Ecay
From the emacs changelog:

  ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
  passes it to the mail user agent function.  This argument specifies an
  action for returning to the caller after finishing with the mail.
  This is currently used by Rmail to delete a mail window.

Under Emacs 24, notmuch breaks when this argument is passed to it by a
function in another part of Emacs.  One example of a functon that does
this is report-emacs-bug -- so notmuch users cannot file emacs bug
reports!

This patch also adds a rest argument to the arg-list of this function,
to future-proof against such changes.  This is adapted from the approach
taken by message-mail, a similar function built into emacs.

This patch was originally submitted by richardmu...@gmail.com on Aug. 1:
id:877h6x6oor@veracitynetworks.com
---

The previous version of this patch would break older emacsen.  Not
passing the return-action argument through to message-mail isn't nice,
but the alternative is to conditionally pass it based on the emacs
version, which is less nice.

Thanks for the review Dmitry and Tomi.

 emacs/notmuch-mua.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 8824b08..da31fdd 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -125,7 +125,8 @@ list.
   (message-goto-to))
 
 (defun notmuch-mua-mail (optional to subject other-headers continue
-  switch-function yank-action send-actions)
+  switch-function yank-action send-actions
+  return-action rest ignored)
   Invoke the notmuch mail composition window.
   (interactive)
 
-- 
1.7.8

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


Re: [PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 13:06:21 +0200, Tomi Ollila tomi.oll...@iki.fi wrote:
 On Fri, 16 Dec 2011 05:30:39 -0500, Aaron Ecay aarone...@gmail.com wrote:
  From the emacs changelog:
  
** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
passes it to the mail user agent function.  This argument specifies an
action for returning to the caller after finishing with the mail.
This is currently used by Rmail to delete a mail window.
  
  Under Emacs 24, notmuch breaks when this argument is passed to it by a
  function in another part of Emacs.  One example of a functon that does
  this is report-emacs-bug -- so notmuch users cannot file emacs bug
  reports!
  
  This patch also adds a rest argument to the arg-list of this function,
  to future-proof against such changes.  This is adapted from the approach
  taken by message-mail, a similar function built into emacs.
  
  This patch was originally submitted by richardmu...@gmail.com on Aug. 1:
  id:877h6x6oor@veracitynetworks.com
  Signed-off-by: Aaron Ecay aarone...@gmail.com
  ---
 
 Emacs 23.3 message-mail is defined as follows:
 
 --88888888888--
 (defun message-mail (optional to subject
other-headers continue switch-function
yank-action send-actions)
 ...
 --88888888888--
 
 If I'd apply your patch would that break it on Emacs 23 ?
 

Good point! It seems like it would.

Perhaps we can change `notmuch-mua-mail' to accept (optional to subject
other-headers rest rest) and pass it all to `message-mail'.  That
should be compatible with both Emacs 23 and 24, and is future-proof.

Regards,
  Dmitry

 
 Tomi
 
   emacs/notmuch-mua.el |6 --
   1 files changed, 4 insertions(+), 2 deletions(-)
  
  diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
  index 8824b08..23552ad 100644
  --- a/emacs/notmuch-mua.el
  +++ b/emacs/notmuch-mua.el
  @@ -125,7 +125,8 @@ list.
 (message-goto-to))
   
   (defun notmuch-mua-mail (optional to subject other-headers continue
  -  switch-function yank-action send-actions)
  +  switch-function yank-action send-actions
  +  return-action rest ignored)
 Invoke the notmuch mail composition window.
 (interactive)
   
  @@ -139,7 +140,8 @@ list.
  (notmuch-user-name)   (notmuch-user-primary-email) 
  )) other-headers))
   
 (message-mail to subject other-headers continue
  -   switch-function yank-action send-actions)
  +   switch-function yank-action send-actions
  +   return-action)
 (message-sort-headers)
 (message-hide-headers)
 (set-buffer-modified-p nil)
  -- 
  1.7.8
 
 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH] [emacs] Add an argument to notmuch-mua-mail

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 06:16:45 -0500, Aaron Ecay aarone...@gmail.com wrote:
 From the emacs changelog:
 
   ** `compose-mail' now accepts an optional 8th arg, RETURN-ACTION, and
   passes it to the mail user agent function.  This argument specifies an
   action for returning to the caller after finishing with the mail.
   This is currently used by Rmail to delete a mail window.
 
 Under Emacs 24, notmuch breaks when this argument is passed to it by a
 function in another part of Emacs.  One example of a functon that does
 this is report-emacs-bug -- so notmuch users cannot file emacs bug
 reports!
 
 This patch also adds a rest argument to the arg-list of this function,
 to future-proof against such changes.  This is adapted from the approach
 taken by message-mail, a similar function built into emacs.
 
 This patch was originally submitted by richardmu...@gmail.com on Aug. 1:
 id:877h6x6oor@veracitynetworks.com
 ---
 
 The previous version of this patch would break older emacsen.  Not
 passing the return-action argument through to message-mail isn't nice,
 but the alternative is to conditionally pass it based on the emacs
 version, which is less nice.
 

Actually, we can pass return-action (and any future arguments) to
message-mail and still be compatible with Emacs 23.  See
id:87ty50sqto@gmail.com.

Regards,
  Dmitry

 Thanks for the review Dmitry and Tomi.
 
  emacs/notmuch-mua.el |3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
 
 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
 index 8824b08..da31fdd 100644
 --- a/emacs/notmuch-mua.el
 +++ b/emacs/notmuch-mua.el
 @@ -125,7 +125,8 @@ list.
(message-goto-to))
  
  (defun notmuch-mua-mail (optional to subject other-headers continue
 -switch-function yank-action send-actions)
 +switch-function yank-action send-actions
 +return-action rest ignored)
Invoke the notmuch mail composition window.
(interactive)
  
 -- 
 1.7.8
 
 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: More ideas about logging.

2011-12-16 Thread David Bremner
On Thu, 15 Dec 2011 23:07:22 -0500, Austin Clements amdra...@mit.edu wrote:

 Quoth David Bremner on Dec 15 at 10:09 pm:

 you could come back with Xapian saying you have 500 log entries when
 your logfile comes back with only 20.  The only way I know of to fix
 this is to fsync after the logfile write, which would obviously have
 performance issues.  But maybe there are cleverer ways?

This might be why jlog uses journalling to write log entries. I'm not
familiar with the details though.

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


Re: [alot] on Arch Linux

2011-12-16 Thread Philipp Ãœberbacher
Quoting Patrick Totzke (2011-12-16 11:28:37)
Quoting Mark Foxwell (2011-12-16 10:05:12)
Quoting Patrick Totzke (2011-12-16 09:06:44)
Regarding your bug reports: Can anybody else running Arch confirm the 
problems Philipp has?
In particular that logging doesn't work and this issue:
https://github.com/pazz/alot/issues/156 ? 
Because I don't know how to reproduce this and having no log makes debugging 
difficult..

I can confirm that I don't get any debug logging - have write perms and
space but no file created. 

Hmm.. Is anybody using Arch willing to look into this?
Or can anybody suggest a painless and quick way for me to set up an Arch 
installation in a Virtualbox or so to be able to reproduce this?
/p

Maybe the easiest way is a live-CD, a normal Arch installation may take
a little if you do it the first time.
Live-CD versions for Arch come and go, so it's not that easy to find 
them, however, I dug some up:
http://archbang.org/
https://godane.wordpress.com/ ?

I hope you can just run the iso in some virtual machine. It's likely not
as up-to-date as the average arch users system, but I guess you could
update it.



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


Re: [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom

2011-12-16 Thread Dmitry Kurochkin
Hi Jani.

On Fri, 23 Sep 2011 22:03:41 +0300, Jani Nikula j...@nikula.org wrote:
 It was not possible to define custom filters or filter functions because
 the types were const. Remove const to allow editing.
 

How about making Unread messages query configurable as well?

Regards,
  Dmitry

 Signed-off-by: Jani Nikula j...@nikula.org
 ---
  emacs/notmuch-hello.el |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
 index 65fde75..ad1a13f 100644
 --- a/emacs/notmuch-hello.el
 +++ b/emacs/notmuch-hello.el
 @@ -66,8 +66,8 @@ Finally this can be a function that will be called for each 
 tag and
  should return a filter for that tag, or nil to hide the tag.
:type '(choice (const :tag All messages nil)
(const :tag Unread messages tag:unread)
 -  (const :tag Custom filter string)
 -  (const :tag Custom filter function function))
 +  (string :tag Custom filter)
 +  (function :tag Custom filter function))
:group 'notmuch)
  
  (defcustom notmuch-hello-hide-tags nil
 -- 
 1.7.4.1
 
 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v3 3/4] emacs: rename notmuch-decimal-separator to notmuch-thousands-separator

2011-12-16 Thread David Bremner
On Fri, 16 Dec 2011 04:59:22 +0400, Dmitry Kurochkin 
dmitry.kuroch...@gmail.com wrote:
 
 What do perople think about making the thousands separator a space by
 default?
 

Is that really good for a majority of users? I had never heard of it
until now. I know this is hardly scientific, but still...

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


Re: [PATCH 1/2] emacs: Fix notmuch-hello-tag-list-make-query defcustom

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 16:22:07 +0400, Dmitry Kurochkin 
dmitry.kuroch...@gmail.com wrote:
 Hi Jani.
 
 On Fri, 23 Sep 2011 22:03:41 +0300, Jani Nikula j...@nikula.org wrote:
  It was not possible to define custom filters or filter functions because
  the types were const. Remove const to allow editing.
  
 
 How about making Unread messages query configurable as well?
 

Oh, we have Custom filter option for that.

Should the Custom filter have a default value of tag:unread?  That
would be consistent with custom function options having a default value.

Regards,
  Dmitry

 Regards,
   Dmitry
 
  Signed-off-by: Jani Nikula j...@nikula.org
  ---
   emacs/notmuch-hello.el |4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)
  
  diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
  index 65fde75..ad1a13f 100644
  --- a/emacs/notmuch-hello.el
  +++ b/emacs/notmuch-hello.el
  @@ -66,8 +66,8 @@ Finally this can be a function that will be called for 
  each tag and
   should return a filter for that tag, or nil to hide the tag.
 :type '(choice (const :tag All messages nil)
   (const :tag Unread messages tag:unread)
  -(const :tag Custom filter string)
  -(const :tag Custom filter function function))
  +(string :tag Custom filter)
  +(function :tag Custom filter function))
 :group 'notmuch)
   
   (defcustom notmuch-hello-hide-tags nil
  -- 
  1.7.4.1
  
  ___
  notmuch mailing list
  notmuch@notmuchmail.org
  http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH 2/2] emacs: Fix notmuch-mua-user-agent defcustom

2011-12-16 Thread Dmitry Kurochkin
On Fri, 23 Sep 2011 22:03:42 +0300, Jani Nikula j...@nikula.org wrote:
 The :options keyword is not meaningful for function type. Also, it was not
 possible to enter nil value, contrary to the notmuch-mua-user-agent
 defcustom documentation. Specify the alternatives using choice type, taking
 nil into account.
 

I know little about the customize interface.  But the patch makes sense
to me.

Perhaps I would give mode detailed description for the options, but
before the change there was none at all, so this is definitely an
improvement.

Regards,
  Dmitry

 Signed-off-by: Jani Nikula j...@nikula.org
 ---
  emacs/notmuch-mua.el |   10 ++
  1 files changed, 6 insertions(+), 4 deletions(-)
 
 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
 index 8824b08..8b95bd4 100644
 --- a/emacs/notmuch-mua.el
 +++ b/emacs/notmuch-mua.el
 @@ -35,10 +35,12 @@
Function used to generate a `User-Agent:' string. If this is
  `nil' then no `User-Agent:' will be generated.
:group 'notmuch
 -  :type 'function
 -  :options '(notmuch-mua-user-agent-full
 -  notmuch-mua-user-agent-notmuch
 -  notmuch-mua-user-agent-emacs))
 +  :type '(choice (const :tag No user agent string nil)
 +  (const :tag Full notmuch-mua-user-agent-full)
 +  (const :tag Notmuch notmuch-mua-user-agent-notmuch)
 +  (const :tag Emacs notmuch-mua-user-agent-emacs)
 +  (function :tag Custom user agent function
 +:value notmuch-mua-user-agent-full)))
  
  (defcustom notmuch-mua-hidden-headers '(^User-Agent:)
Headers that are added to the `message-mode' hidden headers
 -- 
 1.7.4.1
 
 ___
 notmuch mailing list
 notmuch@notmuchmail.org
 http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v3 3/4] emacs: rename notmuch-decimal-separator to notmuch-thousands-separator

2011-12-16 Thread Dmitry Kurochkin
On Fri, 16 Dec 2011 08:29:00 -0400, David Bremner da...@tethera.net wrote:
 On Fri, 16 Dec 2011 04:59:22 +0400, Dmitry Kurochkin 
 dmitry.kuroch...@gmail.com wrote:
  
  What do perople think about making the thousands separator a space by
  default?
  
 
 Is that really good for a majority of users? I had never heard of it
 until now. I know this is hardly scientific, but still...
 

Well, to me 1 000 000 000 looks better than 1,000,000,000.  But I do
not know about the others.  That is why I was asking :)

Regards,
  Dmitry

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


Re: [alot] on Arch Linux

2011-12-16 Thread Kazuo Teramoto
On 2011-12-16T08:28:37, Patrick Totzke wrote:

Hmm.. Is anybody using Arch willing to look into this?  Or can anybody
suggest a painless and quick way for me to set up an Arch installation
in a Virtualbox or so to be able to reproduce this?


I'm using Arch and I have debugging log. I'm using the 'testing' (a
place where packages is put before entering the official repo).

But neither python2 or twisted is on it, so I have the usual packages.

Patrick if you need help on installing Arch on a VM poke me on irc. I
can create a virtualbox image for you.

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


Re: [PATCH v2 0/3] emacs: Document notmuch-show-get-message-properties

2011-12-16 Thread David Bremner
On Fri,  8 Jul 2011 20:46:54 +0200, Daniel Schoepe 
daniel.scho...@googlemail.com wrote:
 This version fixes the issues mentioned by Austin and highlights the currently
 displayed message in the outline buffer. My previous issues with 
 'point-entered
 and 'point-left were caused by linum-mode, so don't enable it for 
 notmuch-show buffers.

I have pushed the first (documentation) patch in the series.

The others are (not too surprisingly) stale and need rebasing. I'm also
not clear on whether we have concensus on whether the patches are
suitable for inclusion, so feedback from others would be welcome
(perhaps before Daniel goes to the trouble of rebasing).

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


Re: [alot] on Arch Linux

2011-12-16 Thread Patrick Totzke
Quoting Kazuo Teramoto (2011-12-16 12:37:37)
On 2011-12-16T08:28:37, Patrick Totzke wrote:

Hmm.. Is anybody using Arch willing to look into this?  Or can anybody
suggest a painless and quick way for me to set up an Arch installation
in a Virtualbox or so to be able to reproduce this?


I'm using Arch and I have debugging log. I'm using the 'testing' (a
place where packages is put before entering the official repo).

Justus just confirmed that this logging issue also occurs on debian wheezy.
https://github.com/pazz/alot/issues/156#issuecomment-3176618
I'm running ubuntu 11.04 (and see debug logs).

But neither python2 or twisted is on it, so I have the usual packages.
I don't understand what you mean here.

Patrick if you need help on installing Arch on a VM poke me on irc. I
can create a virtualbox image for you.
Thanks. I will come back to this if i need to actually run Arch for debugging.
much appreciated.

/p

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


Re: ANNOUNCE: nottoomuch-addresses.pl version 1.4

2011-12-16 Thread Tomi Ollila
On Fri, 16 Dec 2011 14:01:26 +0100, Philipp Ãœberbacher mu...@lavabit.com 
wrote:
 Quoting Tomi Ollila (2011-12-14 21:10:28)
 
 Hi Tomi,
 can this be used to automatically populate abook?
 I wonder because alot uses abook for addresses, and this could be handy.

Converter from 'flat list of email-addresses' in
$HOME/.config/nottoomuch/addresses to abook format is probably pretty
trivial (unless it is binary which lessens triviality...)... But there
could be (updating) issues.

Alternative would be to run something like

  notmuch search --sort=newest-first --output=files '*' | 
  while read file; do abook --add-email $file; done

initially. then register current date using date=`$date +%s`

and, in following rounds run

  notmuch search --sort=newest-first --output=files $(($date - 604800)).. | 
  while read file; do abook --add-email $file; done

(604800 == 86400 * 7 -- 7 days -- just analogous what nottoomuch-addresses.sh
does)

Note that this is just untested example (read abook.1 a bit)


An alternative would be to make 'abook' run nottoomuch-addresses.sh for
address completion (then get it's output order for matches (email addresses
from recent messages first)) -- or even just run

  grep -aiF $string ${XDG_CONFIG_HOME:-$HOME/.config}/nottoomuch/addresses

(this is what nottoomuch-addresses.sh does when finding matches for given
search string. One can imagine how fast this approach is...)

 Regards,
 Philipp

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


have notmuch help call man?

2011-12-16 Thread David Bremner

Hi All;

Currently help strings are compiled into the notmuch binary. This is a
bit a of pain, since we have the same help text in two places.
What do you think about having notmuch help foo invoke man
notmuch-foo and create appropriate man pages (or links).

There are other ways around the maintenance dilemma, including
generating man pages and online help from some common source (e.g. in
the style of id:1288804736-5173-3-git-send-email-da...@tethera.net).

For downsides, it might complicate things slightly for people who
install notmuch in odd places. On the other hand, it is no worse than
setting LD_LIBRARY_PATH. Also, there is the question of common text like
search-terms, which could be included in every page, or maybe contained
in man notmuch.

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


Re: have notmuch help call man?

2011-12-16 Thread Kazuo Teramoto
On 2011-12-16T14:01:42, David Bremner wrote:
Also, there is the question of common text like search-terms, which
could be included in every page, or maybe contained in man notmuch.


What about continuing the git-foo analogy and creating a notmuch search
terms page. Like how git-log page reference gitrevisions(7) for a
complete description of giving references.

And leave the notmuch page as a table of contents for the others
commands and definitions.

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


Re: [PATCH 3/3] test: add emacs test for hiding a message following an HTML part

2011-12-16 Thread Tom Prince
On Thu, 15 Dec 2011 08:14:08 -0400, David Bremner da...@tethera.net wrote:
 On Mon,  4 Jul 2011 05:59:03 +0400, Dmitry Kurochkin 
 dmitry.kuroch...@gmail.com wrote:
  Result: nothing happens except for No URL at point message
  
  Expected result: the second message is shown/hidden
 
 Unfortunately this patch is unreliable, reporting BROKEN for some
 environments and FIXED for others; I think you mentioned it depends
 on whether w3m-el is installed? I have reverted it for now to reduce the
 noise in the test logs.

Would a proper fix for this be to explicitly select which html renderer
is used, and then test it with each renderer in turn? If it is the
renderer that is causing the BROKEN/FIXED distinction, this would
trigger all possbile behaviors.

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


Re: [PATCH v3 4/4] emacs: add notmuch-hello-hook

2011-12-16 Thread Dmitry Kurochkin
On Tue, 13 Dec 2011 21:49:00 +0400, Dmitry Kurochkin 
dmitry.kuroch...@gmail.com wrote:
 On Tue, 13 Dec 2011 18:32:12 +0100, Thomas Jost schno...@schnouki.net wrote:
  This hook is called every time the notmuch-hello buffer is updated.
  ---
   emacs/notmuch-hello.el |9 -
   1 files changed, 8 insertions(+), 1 deletions(-)
  
  diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
  index 0fe9c1d..112b40b 100644
  --- a/emacs/notmuch-hello.el
  +++ b/emacs/notmuch-hello.el
  @@ -131,6 +131,11 @@ So:
(integer :tag Number of characters)
(float :tag Fraction of window)))
   
  +(defcustom notmuch-hello-hook nil
  +  Functions called after populating a `notmuch-hello' buffer.
  +  :type 'hook
  +  :group 'notmuch)
  +
   (defcustom notmuch-thousands-separator ,
 The string used as a thousands separator.
   
  @@ -579,7 +584,9 @@ Complete list of currently available key bindings:
(widget-forward 1)))
   
 (unless (widget-at)
  -   (notmuch-hello-goto-search)
  +   (notmuch-hello-goto-search))
  +
  +  (run-hooks 'notmuch-hello-hook
   
 
 I spent some time finding out why run-hooks are not on the top level.
 Turns out it is inside two let statements.  Can we move to the top level
 of `notmuch-hello' to make it clear that it is always run (i.e. there
 are no ifs or whens)?
 

In addition to the above comment: I think we should rename
notmuch-hello-hook to notmuch-hello-refresh-hook.  That would make it
clear that the hook runs on each notmuch-hello buffer update.  And would
avoid confusion with notmuch-hello-mode-hook if we add it later.

Regards,
  Dmitry

 BTW this would replace one of the oldest custom patches which I have in
 my master branch :)
 
 Regards,
   Dmitry
 
   (defun notmuch-folder ()
 Deprecated function for invoking notmuch---calling `notmuch' is 
  preferred now.
  -- 
  1.7.8
  
  ___
  notmuch mailing list
  notmuch@notmuchmail.org
  http://notmuchmail.org/mailman/listinfo/notmuch
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
Hello,
I posted yesterday detailing this issue I am having:

yabai@newb:~$ notmuch new
Processed 1 files (0 files/sec.).
GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
allocate 2147483648 bytes
aborting...
Aborted

I thought that I might have better success compiling notmuch from the latest 
source.  I did this, and am still getting the same error.  I am running Ubuntu 
11.04.

Any tips or recommendations appreciated.  I have Googled like crazy, but am 
coming up empty.

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


Re: GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Austin Clements
Quoth Nathan Edson on Dec 16 at 12:07 pm:
 Hello,
 I posted yesterday detailing this issue I am having:
 
 yabai@newb:~$ notmuch new
 Processed 1 files (0 files/sec.).
 GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
 allocate 2147483648 bytes
 aborting...
 Aborted
 
 I thought that I might have better success compiling notmuch from the latest 
 source.  I did this, and am still getting the same error.  I am running 
 Ubuntu 11.04.
 
 Any tips or recommendations appreciated.  I have Googled like crazy, but am 
 coming up empty.
 
 Nathan

Since you're now building notmuch from source, could you build it with
make clean  make CFLAGS=-g and run it under gdb again to get a
backtrace?  I don't understand why strace didn't show it opening any
mail, but with debug symbols the backtrace should hopefully tell us
that.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Austin Clements
Quoth Nathan Edson on Dec 16 at  1:12 pm:
  Since you're now building notmuch from source, could you build it with
  make clean  make CFLAGS=-g and run it under gdb again to get a
  backtrace?  I don't understand why strace didn't show it opening any
  mail, but with debug symbols the backtrace should hopefully tell us
  that.
 
 First, thanks for your help!  Perhaps I am making progress...
 
 Here is what I get:
 
 yabai@newb:~$ gdb --args notmuch new
 GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
 Copyright (C) 2010 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type show copying
 and show warranty for details.
 This GDB was configured as i686-linux-gnu.
 For bug reporting instructions, please see:
 http://www.gnu.org/software/gdb/bugs/...
 Reading symbols from /usr/local/bin/notmuch...done.
 (gdb) run
 Starting program: /usr/local/bin/notmuch new
 [Thread debugging using libthread_db enabled]
 
 GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
 allocate 2147483648 bytes
 aborting...
 
 Program received signal SIGABRT, Aborted.
 0xb7fe1424 in __kernel_vsyscall ()
 (gdb) bt
 #0  0xb7fe1424 in __kernel_vsyscall ()
 #1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
 #2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
 #3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
 #4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
 #5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
 #6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
 #7  0xb7e50d5d in g_array_append_vals () from 
 /lib/i386-linux-gnu/libglib-2.0.so.0
 #8  0xb7e520c0 in g_byte_array_append () from 
 /lib/i386-linux-gnu/libglib-2.0.so.0
 #9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
 #10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
 #11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
 #12 0xb7f829ea in g_mime_parser_construct_message () from 
 /usr/lib/libgmime-2.4.so.2
 #13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
 filename=0x80d0600 /home/yabai/Mail/old.mail) at lib/index.cc:437
 #14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
 filename=0x80d0600 /home/yabai/Mail/old.mail, message_ret=0xb414) 
 at lib/database.cc:1734

Ah!  It did show up in the strace.  /home/yabai/Mail/old.mail appears
to be the offending file.  What's in it?

 #15 0x0804fd0a in add_files_recursive (notmuch=0x806cd40, path=0x806cb58 
 /home/yabai/Mail, 
 state=0xb634) at notmuch-new.c:459
 #16 0x08050273 in add_files (notmuch=0x806cd40, path=0x806cb58 
 /home/yabai/Mail, state=0xb634)
 at notmuch-new.c:635
 #17 0x08050ba0 in notmuch_new_command (ctx=0x80620e8, argc=0, 
 argv=0xb7bc) at notmuch-new.c:897
 #18 0x0804d59a in main (argc=2, argv=0xb7b4) at notmuch.c:669
 (gdb) quit
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
 Since you're now building notmuch from source, could you build it with
 make clean  make CFLAGS=-g and run it under gdb again to get a
 backtrace?  I don't understand why strace didn't show it opening any
 mail, but with debug symbols the backtrace should hopefully tell us
 that.

Perhaps this will help:

yabai@newb:~$ strace -eopen notmuch new
open(/etc/ld.so.cache, O_RDONLY)  = 3
open(/usr/local/lib/libnotmuch.so.2, O_RDONLY) = 3
open(/usr/lib/libgmime-2.4.so.2, O_RDONLY) = 3
open(/usr/lib/i386-linux-gnu/libgobject-2.0.so.0, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libglib-2.0.so.0, O_RDONLY) = 3
open(/usr/lib/libtalloc.so.2, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libpthread.so.0, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libc.so.6, O_RDONLY) = 3
open(/usr/lib/sse2/libxapian.so.22, O_RDONLY) = 3
open(/usr/lib/i386-linux-gnu/libstdc++.so.6, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libgcc_s.so.1, O_RDONLY) = 3
open(/usr/lib/i386-linux-gnu/libgmodule-2.0.so.0, O_RDONLY) = 3
open(/usr/lib/i386-linux-gnu/libgthread-2.0.so.0, O_RDONLY) = 3
open(/lib/i386-linux-gnu/librt.so.1, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libz.so.1, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libnsl.so.1, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libpcre.so.3, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libuuid.so.1, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libm.so.6, O_RDONLY) = 3
open(/lib/i386-linux-gnu/libdl.so.2, O_RDONLY) = 3
open(/usr/lib/i386-linux-gnu/charset.alias, O_RDONLY|O_LARGEFILE) = -1 ENOENT 
(No such file or directory)
open(/usr/share/locale/locale.alias, O_RDONLY|O_LARGEFILE) = 3
open(/home/yabai/.notmuch-config, O_RDONLY|O_LARGEFILE) = 3
open(/home/yabai/Mail/.notmuch/xapian/flintlock, 
O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
open(/home/yabai/Mail/.notmuch/xapian/iamchert, O_RDONLY|O_LARGEFILE) = 3
open(/home/yabai/Mail/.notmuch/xapian/record.DB, O_RDWR|O_LARGEFILE) = 3
open(/home/yabai/Mail/.notmuch/xapian/record.baseA, O_RDONLY|O_LARGEFILE) = 5
open(/home/yabai/Mail/.notmuch/xapian/record.baseB, O_RDONLY|O_LARGEFILE) = 5
open(/home/yabai/Mail/.notmuch/xapian/spelling.DB, O_RDWR|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/home/yabai/Mail/.notmuch/xapian/synonym.DB, O_RDWR|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/home/yabai/Mail/.notmuch/xapian/termlist.DB, O_RDWR|O_LARGEFILE) = 5
open(/home/yabai/Mail/.notmuch/xapian/termlist.baseA, O_RDONLY|O_LARGEFILE) = 
-1 ENOENT (No such file or directory)
open(/home/yabai/Mail/.notmuch/xapian/termlist.baseB, O_RDONLY|O_LARGEFILE) = 
6
open(/home/yabai/Mail/.notmuch/xapian/position.DB, O_RDWR|O_LARGEFILE) = 6
open(/home/yabai/Mail/.notmuch/xapian/position.baseA, O_RDONLY|O_LARGEFILE) = 
7
open(/home/yabai/Mail/.notmuch/xapian/position.baseB, O_RDONLY|O_LARGEFILE) = 
-1 ENOENT (No such file or directory)
open(/home/yabai/Mail/.notmuch/xapian/postlist.DB, O_RDWR|O_LARGEFILE) = 7
open(/home/yabai/Mail/.notmuch/xapian/postlist.baseA, O_RDONLY|O_LARGEFILE) = 
8
open(/home/yabai/Mail/.notmuch/xapian/postlist.baseB, O_RDONLY|O_LARGEFILE) = 
8
open(/home/yabai/Mail, O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) 
= 8
open(/home/yabai/Mail/Sent, O_RDONLY|O_LARGEFILE) = 8
open(/etc/localtime, O_RDONLY)= 9
open(/home/yabai/Mail/Sent, O_RDONLY|O_LARGEFILE) = 9
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
open(/home/yabai/Mail/old.mail, O_RDONLY|O_LARGEFILE) = 8
--- SIGALRM (Alarm clock) @ 0 (0) ---
open(/home/yabai/Mail/old.mail, O_RDONLY|O_LARGEFILE) = 9
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
open(/usr/lib/i386-linux-gnu/gconv/gconv-modules.cache, O_RDONLY) = -1 ENOENT 
(No such file or directory)
open(/usr/lib/i386-linux-gnu/gconv/gconv-modules, O_RDONLY) = 10

GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
allocate 2147483648 bytes
aborting...
--- SIGABRT (Aborted) @ 0 

Re: GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
 Since you're now building notmuch from source, could you build it with
 make clean  make CFLAGS=-g and run it under gdb again to get a
 backtrace?  I don't understand why strace didn't show it opening any
 mail, but with debug symbols the backtrace should hopefully tell us
 that.

First, thanks for your help!  Perhaps I am making progress...

Here is what I get:

yabai@newb:~$ gdb --args notmuch new
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i686-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/local/bin/notmuch...done.
(gdb) run
Starting program: /usr/local/bin/notmuch new
[Thread debugging using libthread_db enabled]

GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
allocate 2147483648 bytes
aborting...

Program received signal SIGABRT, Aborted.
0xb7fe1424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fe1424 in __kernel_vsyscall ()
#1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb7e50d5d in g_array_append_vals () from 
/lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb7e520c0 in g_byte_array_append () from 
/lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
#10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
#11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
#12 0xb7f829ea in g_mime_parser_construct_message () from 
/usr/lib/libgmime-2.4.so.2
#13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
filename=0x80d0600 /home/yabai/Mail/old.mail) at lib/index.cc:437
#14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
filename=0x80d0600 /home/yabai/Mail/old.mail, message_ret=0xb414) at 
lib/database.cc:1734
#15 0x0804fd0a in add_files_recursive (notmuch=0x806cd40, path=0x806cb58 
/home/yabai/Mail, 
state=0xb634) at notmuch-new.c:459
#16 0x08050273 in add_files (notmuch=0x806cd40, path=0x806cb58 
/home/yabai/Mail, state=0xb634)
at notmuch-new.c:635
#17 0x08050ba0 in notmuch_new_command (ctx=0x80620e8, argc=0, argv=0xb7bc) 
at notmuch-new.c:897
#18 0x0804d59a in main (argc=2, argv=0xb7b4) at notmuch.c:669
(gdb) quit

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


Re: have notmuch help call man?

2011-12-16 Thread Jameson Graef Rollins
On Fri, 16 Dec 2011 12:01:42 -0400, David Bremner brem...@unb.ca wrote:
 Currently help strings are compiled into the notmuch binary. This is a
 bit a of pain, since we have the same help text in two places.
 What do you think about having notmuch help foo invoke man
 notmuch-foo and create appropriate man pages (or links).

Hey, David.  I am absolutely in favor of this idea.  I'm a fan of the
git help interface, so the more we can emulate that, and make it so we
only have to maintain documentation in one place, then that's a huge win
in my mind.

jamie.


pgpdYD9w7eIkh.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Austin Clements
Quoth Nathan Edson on Dec 16 at  1:26 pm:
 On 12/16/11, Austin Clements wrote:
  Quoth Nathan Edson on Dec 16 at  1:12 pm:
Since you're now building notmuch from source, could you build it with
make clean  make CFLAGS=-g and run it under gdb again to get a
backtrace?  I don't understand why strace didn't show it opening any
mail, but with debug symbols the backtrace should hopefully tell us
that.
   
   First, thanks for your help!  Perhaps I am making progress...
   
   Here is what I get:
   
   yabai@newb:~$ gdb --args notmuch new
   GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
   Copyright (C) 2010 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later 
   http://gnu.org/licenses/gpl.html
   This is free software: you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.  Type show copying
   and show warranty for details.
   This GDB was configured as i686-linux-gnu.
   For bug reporting instructions, please see:
   http://www.gnu.org/software/gdb/bugs/...
   Reading symbols from /usr/local/bin/notmuch...done.
   (gdb) run
   Starting program: /usr/local/bin/notmuch new
   [Thread debugging using libthread_db enabled]
   
   GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
   allocate 2147483648 bytes
   aborting...
   
   Program received signal SIGABRT, Aborted.
   0xb7fe1424 in __kernel_vsyscall ()
   (gdb) bt
   #0  0xb7fe1424 in __kernel_vsyscall ()
   #1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
   #2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
   #3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
   #4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
   #5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
   #6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
   #7  0xb7e50d5d in g_array_append_vals () from 
   /lib/i386-linux-gnu/libglib-2.0.so.0
   #8  0xb7e520c0 in g_byte_array_append () from 
   /lib/i386-linux-gnu/libglib-2.0.so.0
   #9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
   #10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
   #11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
   #12 0xb7f829ea in g_mime_parser_construct_message () from 
   /usr/lib/libgmime-2.4.so.2
   #13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
   filename=0x80d0600 /home/yabai/Mail/old.mail) at lib/index.cc:437
   #14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
   filename=0x80d0600 /home/yabai/Mail/old.mail, 
   message_ret=0xb414) at lib/database.cc:1734
  
  Ah!  It did show up in the strace.  /home/yabai/Mail/old.mail appears
  to be the offending file.  What's in it?
 
 This is my file full of old mail.  I believe it is in mbox format. It 
 contains approximately 40K emails...could the format of this file affect 
 things?  Orginally, this mail was exported from Apple Mail.

notmuch doesn't support mbox files, but an mbox file looks enough like
a maildir message that notmuch will *try* to index it (but as a
single, gigantic message).  This is certainly the cause of the
failure.  The immediate solution is to move this file out of the tree
you're indexing with notmuch.

Still, notmuch should fail more gracefully and you are probably
hitting a real gmime bug (given that it's trying to allocate
(unsigned)-1 bytes of memory).  How big is old.mail?
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
On 12/16/11, Austin Clements wrote:
 Quoth Nathan Edson on Dec 16 at  1:12 pm:
   Since you're now building notmuch from source, could you build it with
   make clean  make CFLAGS=-g and run it under gdb again to get a
   backtrace?  I don't understand why strace didn't show it opening any
   mail, but with debug symbols the backtrace should hopefully tell us
   that.
  
  First, thanks for your help!  Perhaps I am making progress...
  
  Here is what I get:
  
  yabai@newb:~$ gdb --args notmuch new
  GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
  Copyright (C) 2010 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later 
  http://gnu.org/licenses/gpl.html
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type show copying
  and show warranty for details.
  This GDB was configured as i686-linux-gnu.
  For bug reporting instructions, please see:
  http://www.gnu.org/software/gdb/bugs/...
  Reading symbols from /usr/local/bin/notmuch...done.
  (gdb) run
  Starting program: /usr/local/bin/notmuch new
  [Thread debugging using libthread_db enabled]
  
  GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed to 
  allocate 2147483648 bytes
  aborting...
  
  Program received signal SIGABRT, Aborted.
  0xb7fe1424 in __kernel_vsyscall ()
  (gdb) bt
  #0  0xb7fe1424 in __kernel_vsyscall ()
  #1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
  #2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
  #3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
  #4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
  #5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
  #6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
  #7  0xb7e50d5d in g_array_append_vals () from 
  /lib/i386-linux-gnu/libglib-2.0.so.0
  #8  0xb7e520c0 in g_byte_array_append () from 
  /lib/i386-linux-gnu/libglib-2.0.so.0
  #9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
  #10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
  #11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
  #12 0xb7f829ea in g_mime_parser_construct_message () from 
  /usr/lib/libgmime-2.4.so.2
  #13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
  filename=0x80d0600 /home/yabai/Mail/old.mail) at lib/index.cc:437
  #14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
  filename=0x80d0600 /home/yabai/Mail/old.mail, message_ret=0xb414) 
  at lib/database.cc:1734
 
 Ah!  It did show up in the strace.  /home/yabai/Mail/old.mail appears
 to be the offending file.  What's in it?

This is my file full of old mail.  I believe it is in mbox format. It contains 
approximately 40K emails...could the format of this file affect things?  
Orginally, this mail was exported from Apple Mail.

Thanks again for the help.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Austin Clements
Quoth Nathan Edson on Dec 16 at  1:43 pm:
 On 12/16/11, Austin Clements wrote:
  notmuch doesn't support mbox files, but an mbox file looks enough like
  a maildir message that notmuch will *try* to index it (but as a
  single, gigantic message).  This is certainly the cause of the
  failure.  The immediate solution is to move this file out of the tree
  you're indexing with notmuch.
  
  Still, notmuch should fail more gracefully and you are probably
  hitting a real gmime bug (given that it's trying to allocate
  (unsigned)-1 bytes of memory).  How big is old.mail?
 
 old.mail is about 5gb.  I guess the file type is the
 problem...forgive me, I thought notmuch supported mbox.

There has been talk of supporting mbox for archival situations just
like this, but it's rather contentious because mbox is a terrible
format.

Since it's only 40K messages, there would be little overhead in
converting it to maildir, which notmuch could index.  If you really
want to keep it in one file, you could convert it to maildir, pack
that maildir into an some archive format, and use FUSE or something
similar to mount that archive as a file system.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: GLib-ERROR Mesage Running notmuch new

2011-12-16 Thread Nathan Edson
On 12/16/11, Austin Clements wrote:
 Quoth Nathan Edson on Dec 16 at  1:26 pm:
  On 12/16/11, Austin Clements wrote:
   Quoth Nathan Edson on Dec 16 at  1:12 pm:
 Since you're now building notmuch from source, could you build it with
 make clean  make CFLAGS=-g and run it under gdb again to get a
 backtrace?  I don't understand why strace didn't show it opening any
 mail, but with debug symbols the backtrace should hopefully tell us
 that.

First, thanks for your help!  Perhaps I am making progress...

Here is what I get:

yabai@newb:~$ gdb --args notmuch new
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show 
copying
and show warranty for details.
This GDB was configured as i686-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/local/bin/notmuch...done.
(gdb) run
Starting program: /usr/local/bin/notmuch new
[Thread debugging using libthread_db enabled]

GLib-ERROR **: /build/buildd/glib2.0-2.28.6/./glib/gmem.c:239: failed 
to allocate 2147483648 bytes
aborting...

Program received signal SIGABRT, Aborted.
0xb7fe1424 in __kernel_vsyscall ()
(gdb) bt
#0  0xb7fe1424 in __kernel_vsyscall ()
#1  0xb7ce3e71 in raise () from /lib/i386-linux-gnu/libc.so.6
#2  0xb7ce734e in abort () from /lib/i386-linux-gnu/libc.so.6
#3  0xb7e87f27 in g_logv () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb7e87f62 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xb7e85c3c in g_realloc () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6  0xb7e50965 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb7e50d5d in g_array_append_vals () from 
/lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb7e520c0 in g_byte_array_append () from 
/lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb7f7fc94 in ?? () from /usr/lib/libgmime-2.4.so.2
#10 0xb7f80fbf in ?? () from /usr/lib/libgmime-2.4.so.2
#11 0xb7f81761 in ?? () from /usr/lib/libgmime-2.4.so.2
#12 0xb7f829ea in g_mime_parser_construct_message () from 
/usr/lib/libgmime-2.4.so.2
#13 0xb7fc1168 in _notmuch_message_index_file (message=0x13714078, 
filename=0x80d0600 /home/yabai/Mail/old.mail) at lib/index.cc:437
#14 0xb7fbef9f in notmuch_database_add_message (notmuch=0x806cd40, 
filename=0x80d0600 /home/yabai/Mail/old.mail, 
message_ret=0xb414) at lib/database.cc:1734
   
   Ah!  It did show up in the strace.  /home/yabai/Mail/old.mail appears
   to be the offending file.  What's in it?
  
  This is my file full of old mail.  I believe it is in mbox format. It 
  contains approximately 40K emails...could the format of this file affect 
  things?  Orginally, this mail was exported from Apple Mail.
 
 notmuch doesn't support mbox files, but an mbox file looks enough like
 a maildir message that notmuch will *try* to index it (but as a
 single, gigantic message).  This is certainly the cause of the
 failure.  The immediate solution is to move this file out of the tree
 you're indexing with notmuch.
 
 Still, notmuch should fail more gracefully and you are probably
 hitting a real gmime bug (given that it's trying to allocate
 (unsigned)-1 bytes of memory).  How big is old.mail?

old.mail is about 5gb.  I guess the file type is the problem...forgive me, I 
thought notmuch supported mbox.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v3 1/4] emacs: Let the user choose where to compose new mails

2011-12-16 Thread Jameson Graef Rollins
On Thu, 15 Dec 2011 19:50:36 -0400, David Bremner da...@tethera.net wrote:
 I think the problem is related to emacsclient.
 
 With 'm' I have the following behaviour:
 
 emacs -q --daemon
 M-x notmuch (to load variable definitions)
 M-x customize-variable notmuch-mua-compose-in
 (select compose in new window, save for current session)
 M-x notmuch
 m   ;; new window is opened as it should be
 C-c C-c ;; frame is closed.

Hey, David.  What exactly is the problem here?  These seems like it's
actually reasonable behavior when you're using emacs in daemon mode,
yes?  I don't actually use notmuch with emacs daemon/client, so I'm not
sure what behavior is expected.

If this is an emacsclient issue, should that prevent the patch from
going through?

jamie.


pgpYjMnw7a7Wp.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: [PATCH v2 0/3] emacs: Document notmuch-show-get-message-properties

2011-12-16 Thread Jameson Graef Rollins
On Fri, 16 Dec 2011 09:01:21 -0400, David Bremner da...@tethera.net wrote:
 The others are (not too surprisingly) stale and need rebasing. I'm also
 not clear on whether we have concensus on whether the patches are
 suitable for inclusion, so feedback from others would be welcome
 (perhaps before Daniel goes to the trouble of rebasing).

I definitely like the idea of thread outlining, but this isn't quite the
implementation that I would personally like to see.  What I would like
requires a bunch of changes to notmuch show, though.  This looks like it
could be kind of interesting to me in the interim, though, and it's not
particular invasive, so if Daniel want's to rebase it I see no problem.

jamie.


pgpbCNWj0krLX.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH v2 0/2] emacs: Add thread-outline functionality

2011-12-16 Thread Daniel Schoepe
Rebased to master, only one trivial conflict anyway.

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


[PATCH v2 1/2] emacs: Add thread-outline functionality

2011-12-16 Thread Daniel Schoepe
From: Daniel Schoepe daniel.scho...@googlemail.com

This patch adds some functionality to display the outline for threads
displayed by notmuch-show.  The entries in the outline buffer are
links to the corresponding message in the notmuch-show buffer.
---
 emacs/notmuch-lib.el  |   12 +++
 emacs/notmuch-show.el |  195 -
 2 files changed, 206 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 0f856bf..a8be8b1 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -43,6 +43,10 @@
 (defvar notmuch-folders nil
   Deprecated name for what is now known as `notmuch-saved-searches'.)
 
+(defvar notmuch-show-outline-buffer nil
+  Outline buffer associated with a notmuch-show buffer.)
+(make-variable-buffer-local 'notmuch-show-outline-buffer)
+
 (defun notmuch-saved-searches ()
   Common function for querying the notmuch-saved-searches variable.
 
@@ -91,9 +95,17 @@ the user hasn't set this variable with the old or new value.
   Return the user.other_email value (as a list) from the notmuch 
configuration.
   (split-string (notmuch-config-get user.other_email) \n))
 
+(declare-function notmuch-show-outline-buffer-name  notmuch-show (optional 
buf))
+
 (defun notmuch-kill-this-buffer ()
   Kill the current buffer.
   (interactive)
+  ;; if we are in a notmuch-show buffer, kill the associated outline buffer, 
if any
+  (when (eq major-mode 'notmuch-show-mode)
+(let ((outline-buf notmuch-show-outline-buffer))
+  (when outline-buf
+   (mapc #'delete-window (get-buffer-window-list outline-buf))
+   (kill-buffer outline-buf
   (kill-buffer (current-buffer)))
 
 ;;
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 63b01e5..e7ce811 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -107,6 +107,57 @@ indentation.
   :group 'notmuch
   :type 'boolean)
 
+(defcustom notmuch-always-show-outline nil
+  Always open an outline buffer when viewing a thread?
+  :group 'notmuch
+  :type 'boolean)
+
+(defcustom notmuch-outline-format
+  (list %a - %r)
+  Format used for thread-outline lines.
+
+This is a list supporting the following types of elements:
+For a symbol, its value is used if non-nil.
+A string is inserted verbatim with the exception
+ of the following %-constructs:
+ %a - Author
+ %d - Date
+ %s - Subject
+ %r - Relative date
+For a list of the form `(:eval FORM)', form is evaluated
+ and its result displayed.
+
+The variables author, subject, date and reldate will be bound to
+their respective values when this is interpreted, and can be
+used in (:eval ..)-elements or directly as symbols.
+  :group 'notmuch
+  :type
+  '(repeat (choice (const :tag Author author)
+  (const :tag Date date)
+  (const :tag Relative date reldate)
+  (string :tag Format string)
+  (list :tag Custom expression (will be evaluated when 
rendering)
+(const :tag  :eval)
+sexp
+
+(defface notmuch-outline '((t :inherit default))
+  Face used to display (unhighlighted) lines in thread outlines
+  :group 'notmuch)
+
+(defface notmuch-outline-highlighted
+  'class color) (background light)) (:background #f0f0f0))
+(((class color) (background dark)) (:background #303030)))
+  Face used to display highlight the current message in the outline buffer
+  :group 'notmuch)
+
+(defvar notmuch-outline-mode-map
+  (let ((map (make-sparse-keymap)))
+(define-key map n 'next-line)
+(define-key map p 'previous-line)
+(define-key map q 'kill-buffer-and-window)
+(define-key map x 'kill-buffer-and-window)
+map))
+
 (defmacro with-current-notmuch-show-message (rest body)
   Evaluate body with current buffer set to the text of current message
   `(save-excursion
@@ -747,12 +798,27 @@ current buffer, if possible.
 ;; message.
 (put-text-property message-start message-end :notmuch-message-extent (cons 
message-start message-end))
 
+;; Save the indentation depth, used by `notmuch-show-outline'
+(put-text-property message-start message-end :notmuch-depth depth)
+
 (let ((headers-overlay (make-overlay headers-start headers-end))
   (invis-specs (list headers-invis-spec message-invis-spec)))
   (overlay-put headers-overlay 'invisible invis-specs)
   (overlay-put headers-overlay 'priority 10))
 (overlay-put (make-overlay body-start body-end) 'invisible 
message-invis-spec)
 
+;; Add callbacks that update the outline buffer when moving between 
messages.
+;; Due to the mindbogglingly absurd semantics of point-entered and 
point-left
+;; this function will will be run up to _four_ times when moving between 
messages:
+(let ((goto-msg-func
+  `(lambda (before after)
+ (if (and (= after (marker-position ,message-start))
+  ( after (marker-position ,message-end)))
+ 

[PATCH v2 2/2] emacs: Test for thread-outlining

2011-12-16 Thread Daniel Schoepe
From: Daniel Schoepe daniel.scho...@googlemail.com

---
 test/emacs |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/test/emacs b/test/emacs
index 6e922de..e706909 100755
--- a/test/emacs
+++ b/test/emacs
@@ -71,6 +71,13 @@ test_emacs (let ((notmuch-indent-messages-width 4))
  (test-output))
 test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
 
+test_begin_subtest Thread outlining in notmuch-show
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@dottiness.seas.harvard.edu)
+test_emacs (notmuch-show \$maildir_storage_thread\) (notmuch-show-outline)
+  (switch-to-buffer notmuch-show-outline-buffer)
+  (test-output)
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-outline
+
 test_begin_subtest notmuch-show for message with invalid From
 add_message [subject]=\message-with-invalid-from\ \
[from]=Invalid \\\ From\\\ test_su...@notmuchmail.org\
-- 
1.7.7.3

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


Re: [PATCH v2 2/2] emacs: Test for thread-outlining

2011-12-16 Thread Jameson Graef Rollins
fyi this patch applied, but I got the following warning from git:

Applying: emacs: Test for thread-outlining
/home/jrollins/src/notmuch/git/.git/rebase-apply/patch:16: space before tab in 
indent.
   (switch-to-buffer notmuch-show-outline-buffer)
warning: 1 line adds whitespace errors.


pgpgzKHTBYNdn.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH v3 1/2] emacs: Add thread-outline functionality

2011-12-16 Thread Daniel Schoepe
I somehow managed to forget the actual test file in the previous version...

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


[PATCH v3 1/2] emacs: Add thread-outline functionality

2011-12-16 Thread Daniel Schoepe
From: Daniel Schoepe daniel.scho...@googlemail.com

This patch adds some functionality to display the outline for threads
displayed by notmuch-show.  The entries in the outline buffer are
links to the corresponding message in the notmuch-show buffer.
---
 emacs/notmuch-lib.el  |   12 +++
 emacs/notmuch-show.el |  195 -
 2 files changed, 206 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 0f856bf..a8be8b1 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -43,6 +43,10 @@
 (defvar notmuch-folders nil
   Deprecated name for what is now known as `notmuch-saved-searches'.)
 
+(defvar notmuch-show-outline-buffer nil
+  Outline buffer associated with a notmuch-show buffer.)
+(make-variable-buffer-local 'notmuch-show-outline-buffer)
+
 (defun notmuch-saved-searches ()
   Common function for querying the notmuch-saved-searches variable.
 
@@ -91,9 +95,17 @@ the user hasn't set this variable with the old or new value.
   Return the user.other_email value (as a list) from the notmuch 
configuration.
   (split-string (notmuch-config-get user.other_email) \n))
 
+(declare-function notmuch-show-outline-buffer-name  notmuch-show (optional 
buf))
+
 (defun notmuch-kill-this-buffer ()
   Kill the current buffer.
   (interactive)
+  ;; if we are in a notmuch-show buffer, kill the associated outline buffer, 
if any
+  (when (eq major-mode 'notmuch-show-mode)
+(let ((outline-buf notmuch-show-outline-buffer))
+  (when outline-buf
+   (mapc #'delete-window (get-buffer-window-list outline-buf))
+   (kill-buffer outline-buf
   (kill-buffer (current-buffer)))
 
 ;;
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 63b01e5..e7ce811 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -107,6 +107,57 @@ indentation.
   :group 'notmuch
   :type 'boolean)
 
+(defcustom notmuch-always-show-outline nil
+  Always open an outline buffer when viewing a thread?
+  :group 'notmuch
+  :type 'boolean)
+
+(defcustom notmuch-outline-format
+  (list %a - %r)
+  Format used for thread-outline lines.
+
+This is a list supporting the following types of elements:
+For a symbol, its value is used if non-nil.
+A string is inserted verbatim with the exception
+ of the following %-constructs:
+ %a - Author
+ %d - Date
+ %s - Subject
+ %r - Relative date
+For a list of the form `(:eval FORM)', form is evaluated
+ and its result displayed.
+
+The variables author, subject, date and reldate will be bound to
+their respective values when this is interpreted, and can be
+used in (:eval ..)-elements or directly as symbols.
+  :group 'notmuch
+  :type
+  '(repeat (choice (const :tag Author author)
+  (const :tag Date date)
+  (const :tag Relative date reldate)
+  (string :tag Format string)
+  (list :tag Custom expression (will be evaluated when 
rendering)
+(const :tag  :eval)
+sexp
+
+(defface notmuch-outline '((t :inherit default))
+  Face used to display (unhighlighted) lines in thread outlines
+  :group 'notmuch)
+
+(defface notmuch-outline-highlighted
+  'class color) (background light)) (:background #f0f0f0))
+(((class color) (background dark)) (:background #303030)))
+  Face used to display highlight the current message in the outline buffer
+  :group 'notmuch)
+
+(defvar notmuch-outline-mode-map
+  (let ((map (make-sparse-keymap)))
+(define-key map n 'next-line)
+(define-key map p 'previous-line)
+(define-key map q 'kill-buffer-and-window)
+(define-key map x 'kill-buffer-and-window)
+map))
+
 (defmacro with-current-notmuch-show-message (rest body)
   Evaluate body with current buffer set to the text of current message
   `(save-excursion
@@ -747,12 +798,27 @@ current buffer, if possible.
 ;; message.
 (put-text-property message-start message-end :notmuch-message-extent (cons 
message-start message-end))
 
+;; Save the indentation depth, used by `notmuch-show-outline'
+(put-text-property message-start message-end :notmuch-depth depth)
+
 (let ((headers-overlay (make-overlay headers-start headers-end))
   (invis-specs (list headers-invis-spec message-invis-spec)))
   (overlay-put headers-overlay 'invisible invis-specs)
   (overlay-put headers-overlay 'priority 10))
 (overlay-put (make-overlay body-start body-end) 'invisible 
message-invis-spec)
 
+;; Add callbacks that update the outline buffer when moving between 
messages.
+;; Due to the mindbogglingly absurd semantics of point-entered and 
point-left
+;; this function will will be run up to _four_ times when moving between 
messages:
+(let ((goto-msg-func
+  `(lambda (before after)
+ (if (and (= after (marker-position ,message-start))
+  ( after (marker-position ,message-end)))
+ 

[no subject]

2011-12-16 Thread Daniel Schoepe
Fixed whitespace error reported by Jameson.

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


[PATCH v4 1/2] emacs: Add thread-outline functionality

2011-12-16 Thread Daniel Schoepe
From: Daniel Schoepe daniel.scho...@googlemail.com

This patch adds some functionality to display the outline for threads
displayed by notmuch-show.  The entries in the outline buffer are
links to the corresponding message in the notmuch-show buffer.
---
 emacs/notmuch-lib.el  |   12 +++
 emacs/notmuch-show.el |  195 -
 2 files changed, 206 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 0f856bf..a8be8b1 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -43,6 +43,10 @@
 (defvar notmuch-folders nil
   Deprecated name for what is now known as `notmuch-saved-searches'.)
 
+(defvar notmuch-show-outline-buffer nil
+  Outline buffer associated with a notmuch-show buffer.)
+(make-variable-buffer-local 'notmuch-show-outline-buffer)
+
 (defun notmuch-saved-searches ()
   Common function for querying the notmuch-saved-searches variable.
 
@@ -91,9 +95,17 @@ the user hasn't set this variable with the old or new value.
   Return the user.other_email value (as a list) from the notmuch 
configuration.
   (split-string (notmuch-config-get user.other_email) \n))
 
+(declare-function notmuch-show-outline-buffer-name  notmuch-show (optional 
buf))
+
 (defun notmuch-kill-this-buffer ()
   Kill the current buffer.
   (interactive)
+  ;; if we are in a notmuch-show buffer, kill the associated outline buffer, 
if any
+  (when (eq major-mode 'notmuch-show-mode)
+(let ((outline-buf notmuch-show-outline-buffer))
+  (when outline-buf
+   (mapc #'delete-window (get-buffer-window-list outline-buf))
+   (kill-buffer outline-buf
   (kill-buffer (current-buffer)))
 
 ;;
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 63b01e5..e7ce811 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -107,6 +107,57 @@ indentation.
   :group 'notmuch
   :type 'boolean)
 
+(defcustom notmuch-always-show-outline nil
+  Always open an outline buffer when viewing a thread?
+  :group 'notmuch
+  :type 'boolean)
+
+(defcustom notmuch-outline-format
+  (list %a - %r)
+  Format used for thread-outline lines.
+
+This is a list supporting the following types of elements:
+For a symbol, its value is used if non-nil.
+A string is inserted verbatim with the exception
+ of the following %-constructs:
+ %a - Author
+ %d - Date
+ %s - Subject
+ %r - Relative date
+For a list of the form `(:eval FORM)', form is evaluated
+ and its result displayed.
+
+The variables author, subject, date and reldate will be bound to
+their respective values when this is interpreted, and can be
+used in (:eval ..)-elements or directly as symbols.
+  :group 'notmuch
+  :type
+  '(repeat (choice (const :tag Author author)
+  (const :tag Date date)
+  (const :tag Relative date reldate)
+  (string :tag Format string)
+  (list :tag Custom expression (will be evaluated when 
rendering)
+(const :tag  :eval)
+sexp
+
+(defface notmuch-outline '((t :inherit default))
+  Face used to display (unhighlighted) lines in thread outlines
+  :group 'notmuch)
+
+(defface notmuch-outline-highlighted
+  'class color) (background light)) (:background #f0f0f0))
+(((class color) (background dark)) (:background #303030)))
+  Face used to display highlight the current message in the outline buffer
+  :group 'notmuch)
+
+(defvar notmuch-outline-mode-map
+  (let ((map (make-sparse-keymap)))
+(define-key map n 'next-line)
+(define-key map p 'previous-line)
+(define-key map q 'kill-buffer-and-window)
+(define-key map x 'kill-buffer-and-window)
+map))
+
 (defmacro with-current-notmuch-show-message (rest body)
   Evaluate body with current buffer set to the text of current message
   `(save-excursion
@@ -747,12 +798,27 @@ current buffer, if possible.
 ;; message.
 (put-text-property message-start message-end :notmuch-message-extent (cons 
message-start message-end))
 
+;; Save the indentation depth, used by `notmuch-show-outline'
+(put-text-property message-start message-end :notmuch-depth depth)
+
 (let ((headers-overlay (make-overlay headers-start headers-end))
   (invis-specs (list headers-invis-spec message-invis-spec)))
   (overlay-put headers-overlay 'invisible invis-specs)
   (overlay-put headers-overlay 'priority 10))
 (overlay-put (make-overlay body-start body-end) 'invisible 
message-invis-spec)
 
+;; Add callbacks that update the outline buffer when moving between 
messages.
+;; Due to the mindbogglingly absurd semantics of point-entered and 
point-left
+;; this function will will be run up to _four_ times when moving between 
messages:
+(let ((goto-msg-func
+  `(lambda (before after)
+ (if (and (= after (marker-position ,message-start))
+  ( after (marker-position ,message-end)))
+ 

[PATCH v4 2/2] emacs: Test for thread-outlining

2011-12-16 Thread Daniel Schoepe
From: Daniel Schoepe daniel.scho...@googlemail.com

---
 test/emacs |7 +++
 .../notmuch-show-thread-outline|7 +++
 2 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 test/emacs.expected-output/notmuch-show-thread-outline

diff --git a/test/emacs b/test/emacs
index 6e922de..f986d3c 100755
--- a/test/emacs
+++ b/test/emacs
@@ -71,6 +71,13 @@ test_emacs (let ((notmuch-indent-messages-width 4))
  (test-output))
 test_expect_equal_file OUTPUT 
$EXPECTED/notmuch-show-thread-maildir-storage-with-fourfold-indentation
 
+test_begin_subtest Thread outlining in notmuch-show
+maildir_storage_thread=$(notmuch search --output=threads 
id:20091117190054.gu3...@dottiness.seas.harvard.edu)
+test_emacs (notmuch-show \$maildir_storage_thread\) (notmuch-show-outline)
+   (switch-to-buffer notmuch-show-outline-buffer)
+   (test-output)
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-outline
+
 test_begin_subtest notmuch-show for message with invalid From
 add_message [subject]=\message-with-invalid-from\ \
[from]=Invalid \\\ From\\\ test_su...@notmuchmail.org\
diff --git a/test/emacs.expected-output/notmuch-show-thread-outline 
b/test/emacs.expected-output/notmuch-show-thread-outline
new file mode 100644
index 000..b210ba7
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-show-thread-outline
@@ -0,0 +1,7 @@
+Lars Kellogg-Stedman l...@seas.harvard.edu - 2009-11-17
+ Mikhail Gusarov dotted...@dottedmag.net - 2009-11-17
+  Lars Kellogg-Stedman l...@seas.harvard.edu - 2009-11-17
+   Mikhail Gusarov dotted...@dottedmag.net - 2009-11-17
+   Keith Packard kei...@keithp.com - 2009-11-17
+Lars Kellogg-Stedman l...@seas.harvard.edu - 2009-11-18
+ Carl Worth cwo...@cworth.org - 2009-11-18
-- 
1.7.7.3

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


Re: [PATCH v3 1/4] emacs: Let the user choose where to compose new mails

2011-12-16 Thread David Bremner
On Fri, 16 Dec 2011 15:45:26 -0800, Jameson Graef Rollins 
jroll...@finestructure.net wrote:

 Hey, David.  What exactly is the problem here?  These seems like it's
 actually reasonable behavior when you're using emacs in daemon mode,
 yes?  I don't actually use notmuch with emacs daemon/client, so I'm not
 sure what behavior is expected.

The frame started by emacsclient -c is no different than a frame
started with emacs. It closes when you type C-x C-c. In particular
killing an emacs window should not kill the frame.  With this patch, and
notmuch-mua-compose-in set to new-window, notmuch does this.

 If this is an emacsclient issue, should that prevent the patch from
 going through?

It is pretty disruptive to have a frame closed unexpectedly, and I think
enough people use 'emacsclient -c' that this is not a use case we can
dismiss.

In any event, I just checked with 'emacs -q', no emacsclient, and the
behaviour of 'new-window is strange there too, since it buries the
notmuch window, and leaves the window containing the sent message
displayed.

d

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


Re: [PATCH v3 1/4] emacs: Let the user choose where to compose new mails

2011-12-16 Thread Jameson Graef Rollins
On Fri, 16 Dec 2011 21:19:37 -0400, David Bremner da...@tethera.net wrote:
 The frame started by emacsclient -c is no different than a frame
 started with emacs. It closes when you type C-x C-c. In particular
 killing an emacs window should not kill the frame.  With this patch, and
 notmuch-mua-compose-in set to new-window, notmuch does this.

I'm worried that this is because the behavior emacs' dedicated windows
is a little flaky.  I've experimented with it before and noticed some
weirdnesses.

It's been working for me perfectly in this context, though.  I would
hate to see this patch not go through, cause I'm totally addicted to
this behavior at this point.

What if we just added a warning to the help message for the
customization variable that says the behavior with emacsclient might be
a little flaky?  Obviously people don't have to use this functionality,
so in that sense it doesn't hurt anyone to have it there if they just
don't use it, right?

jamie.


pgpV27hzeyjYS.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 2/4] test: add test for `notmuch-hello-mode-hook'

2011-12-16 Thread Dmitry Kurochkin
Test that `notmuch-hello-mode-hook' is called once when
`notmuch-hello' function is called.
---
 test/emacs |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/test/emacs b/test/emacs
index 6e922de..a864ffa 100755
--- a/test/emacs
+++ b/test/emacs
@@ -476,4 +476,13 @@ test_emacs (let ((notmuch-command 
\$notmuch_counter_command\))
  (notmuch-show \id:$id\))
 test_expect_equal $(notmuch_counter_value) 1
 
+test_begin_subtest notmuch-hello-mode hook is called
+counter=$(test_emacs \
+'(let ((notmuch-hello-mode-hook-counter 0))
+   (kill-buffer *notmuch-hello*)
+   (notmuch-hello)
+   notmuch-hello-mode-hook-counter)'
+)
+test_expect_equal $counter 1
+
 test_done
-- 
1.7.7.3

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


[PATCH 1/4] test: add `notmuch-hello-mode-hook-counter'

2011-12-16 Thread Dmitry Kurochkin
Add `notmuch-hello-mode-hook-counter' hook to count how many times
`notmuch-hello-mode-hook' was called.  The counter function increments
`notmuch-hello-mode-hook-counter' variable value if it is bount,
otherwise it does nothing.
---
 test/test-lib.el |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/test/test-lib.el b/test/test-lib.el
index 97ae593..3bca138 100644
--- a/test/test-lib.el
+++ b/test/test-lib.el
@@ -61,3 +61,12 @@ running, quit if it terminated.
   (if (not (process-attributes pid))
   (kill-emacs)
 (run-at-time 1 min nil 'orphan-watchdog pid)))
+
+(defun notmuch-hello-mode-hook-counter ()
+  Count how many times `notmuch-hello-mode-hook' is called.
+Increments `notmuch-hello-mode-hook-counter' variable value if it
+is bound, otherwise does nothing.
+  (if (boundp 'notmuch-hello-mode-hook-counter)
+  (setq notmuch-hello-mode-hook-counter
+   (1+ notmuch-hello-mode-hook-counter
+(add-hook 'notmuch-hello-mode-hook 'notmuch-hello-mode-hook-counter)
-- 
1.7.7.3

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


[PATCH 3/4] test: add broken test for `notmuch-hello-mode-hook' called during update

2011-12-16 Thread Dmitry Kurochkin
Test that `notmuch-hello-mode-hook' is not called during
`notmuch-hello' buffer updates.  The test is currently broken.
---
 test/emacs |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/test/emacs b/test/emacs
index a864ffa..b4c2444 100755
--- a/test/emacs
+++ b/test/emacs
@@ -485,4 +485,15 @@ counter=$(test_emacs \
 )
 test_expect_equal $counter 1
 
+test_begin_subtest notmuch-hello-mode hook is not called on updates
+test_subtest_known_broken
+counter=$(test_emacs \
+'(let ((notmuch-hello-mode-hook-counter 0))
+   (kill-buffer *notmuch-hello*)
+   (notmuch-hello)
+   (notmuch-hello-update)
+   notmuch-hello-mode-hook-counter)'
+)
+test_expect_equal $counter 1
+
 test_done
-- 
1.7.7.3

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


[PATCH 4/4] emacs: do not call `notmuch-hello-mode' on update

2011-12-16 Thread Dmitry Kurochkin
`notmuch-hello' should call `notmuch-hello-mode' function only when
run for the first time.  But before the change, `notmuch-hello' used
`kill-all-local-variables' to remove editable widgets fields.  This
caused the major mode to be reset, and `notmuch-hello-mode' to be
called every time.

The patch manually deletes all editable widget fields and removes
`kill-all-local-variables' call.
---
 emacs/notmuch-hello.el |   11 +++
 test/emacs |1 -
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index ca3a381..3b21f55 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -403,11 +403,14 @@ Complete list of currently available key bindings:
 (progn
   (widget-forward 1)
   (widget-value (widget-at)))
-  (error nil)
+  (error nil
+   (inhibit-read-only t))
 
-(kill-all-local-variables)
-(let ((inhibit-read-only t))
-  (erase-buffer))
+;; delete all editable widget fields
+(let ((all widget-field-list))
+  (mapc 'widget-delete widget-field-list))
+
+(erase-buffer)
 
 (unless (eq major-mode 'notmuch-hello-mode)
   (notmuch-hello-mode))
diff --git a/test/emacs b/test/emacs
index b4c2444..dffad0f 100755
--- a/test/emacs
+++ b/test/emacs
@@ -486,7 +486,6 @@ counter=$(test_emacs \
 test_expect_equal $counter 1
 
 test_begin_subtest notmuch-hello-mode hook is not called on updates
-test_subtest_known_broken
 counter=$(test_emacs \
 '(let ((notmuch-hello-mode-hook-counter 0))
(kill-buffer *notmuch-hello*)
-- 
1.7.7.3

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