notmuch-mutt: Use of uninitialized value.

2013-02-15 Thread Suvayu Ali
Hi Kevin and others,

On Thu, Feb 14, 2013 at 03:06:51PM -0800, Kevin J. McCarthy wrote:
> 
> Here are some proposed improved macros.  (I'll attach a patch file in
> another email.)  Despite my earlier warning about not line-breaking
> macros, these are getting a bit unreadable.  We may want to see
> if/where we can safely line-break them.

I find sticking by the rule "do not introduce whitespaces to make it
readable" very useful in multi-line macros.  For example,

macro index  "some text\
continuation"

the above is preferable over,

macro index  "some text \
   continuation"

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.


[OT] mutt configuration & philosophy (was Re: notmuch-mutt: Use of uninitialized value.)

2013-02-14 Thread Michael Elkins
On Thu, Feb 14, 2013 at 03:13:22PM +0100, Profpatsch wrote:
>Plus it still takes about 10 steps to configure a new account with
>offlineimap, mutt and msmtp, there is nothing to automate this and
>every config is different. Whoa.

Mutt was designed with the UNIX philosophy in mind.  When users 
don't like the way something is implemented in Mutt, you can use 
an external tool to do the job instead.  We consider this to be a 
feature, not a deficiency.

>For example:
>Why does one have to spend two?four hours enabling pgp with the basic,
>pre-configured commands?
>Why is there no command that enables pgp with default sane gnupg values
>that I assume 99.9% of mutt users use?

set crypt_use_gpgme

>Why is the standard mailbox named ?spooldir? and an easy explanation of
>that is nowhere to be found in the official docs?

We assume users are familiar with basic UNIX concepts like the 
mail spool.

>And the list goes on.

Documentation patches are highly welcome.


[OT] mutt configuration & philosophy (was Re: notmuch-mutt: Use of uninitialized value.)

2013-02-14 Thread David Bremner
Michael Elkins  writes:

> On Thu, Feb 14, 2013 at 03:13:22PM +0100, Profpatsch wrote:
>>Plus it still takes about 10 steps to configure a new account with
>>offlineimap, mutt and msmtp, there is nothing to automate this and
>>every config is different. Whoa.
>
> Mutt was designed with the UNIX philosophy in mind.  When users 
> don't like the way something is implemented in Mutt, you can use 
> an external tool to do the job instead.  We consider this to be a 
> feature, not a deficiency.

Hi Guys;

I know that once a thread starts on a mailing list, it is harder to kill
than a legion of zombies, but at this point the discussion has not much to
do with notmuch.

d



notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Profpatsch
On 13-02-14 09:37am, Stefano Zacchiroli wrote:
> More isolation for this kind of
> things in Mutt would definitely be welcome...

Maybe it?s time for an overhaul of the mutt configuration from the
ground up. I know, it?s ?configure once and be done with it?, but it
took me two hard weeks to get that program up and running the way I want
(that?s even more time than I used on my 300+ line vimrc!).

I suppose it?s a documentation issue, too. One relies on blog entries
way too much, even to find out how to use multiple accounts (I?ve got
around 10).

Plus it still takes about 10 steps to configure a new account with
offlineimap, mutt and msmtp, there is nothing to automate this and
every config is different. Whoa.

For example:
Why does one have to spend two?four hours enabling pgp with the basic,
pre-configured commands?
Why is there no command that enables pgp with default sane gnupg values
that I assume 99.9% of mutt users use?
Why is the standard mailbox named ?spooldir? and an easy explanation of
that is nowhere to be found in the official docs?
And the list goes on.

~Profpatsch

-- 
Proudly written in Mutt with Vim on Archlinux.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: 



notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Kevin J. McCarthy
Stefano Zacchiroli wrote:
> Right, but still a more graceful failure model would be nice.
> 
> Please find attached a patch that in such cases should 1) give a
> supposedly nice error message explaining what's going on and 2) empty
> the results dir to avoid showing you unrelated results. It works for me.
> But extra checking never hurts, in particular for the tag action, which
> I don't personally use.

The patch works for me (for thread reconstruction - I don't use the
tagging features either).

> I guess it would also be nice to actually disable $pipe_decode in the
> relevant Mutt macros, but I'm not sure about to do that without
> interfering with user desired configuration. Kevin: do you know if there
> is a common Mutt trick to store the value of a variable before changing
> it, and restoring it a posteriori?  More isolation for this kind of
> things in Mutt would definitely be welcome...

It looks like this is possible, as Suvayu Ali mentioned too.  An
improvement to his example is also mentioned in the manual at
  http://www.mutt.org/doc/devel/manual.html#set-myvar
You can defer evaluation of the variables until runtime by prefixing
them with \$.

Here are some proposed improved macros.  (I'll attach a patch file in
another email.)  Despite my earlier warning about not line-breaking
macros, these are getting a bit unreadable.  We may want to see
if/where we can safely line-break them.

macro index  \
  "set my_old_pipe_decode=\$pipe_decode 
my_old_wait_key=\$wait_key nopipe_decode 
nowait_keynotmuch-mutt -r --prompt 
search`echo 
${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`set 
pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key" \
  "notmuch: search mail"
macro index  \
  "set my_old_pipe_decode=\$pipe_decode 
my_old_wait_key=\$wait_key nopipe_decode 
nowait_keynotmuch-mutt -r 
thread`echo 
${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`set 
pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_key" \
  "notmuch: reconstruct thread"
macro index  \
  "set my_old_pipe_decode=\$pipe_decode 
my_old_wait_key=\$wait_key nopipe_decode 
nowait_keynotmuch-mutt tag -- 
-inboxset pipe_decode=\$my_old_pipe_decode 
wait_key=\$my_old_wait_key" \
  "notmuch: remove message from inbox"

-Kevin

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: 



notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Andrei POPESCU
On Jo, 14 feb 13, 00:36:58, Profpatsch wrote:
> 
> So much for copying a basic rc from someone else.

There's no problem with that, as long as you take the time to read and 
understand what each option does.

Kind regards,
Andrei
-- 
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: 



notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Suvayu Ali
On Thu, Feb 14, 2013 at 09:37:13AM +0100, Stefano Zacchiroli wrote:
> 
> I guess it would also be nice to actually disable $pipe_decode in the
> relevant Mutt macros, but I'm not sure about to do that without
> interfering with user desired configuration. Kevin: do you know if there
> is a common Mutt trick to store the value of a variable before changing
> it, and restoring it a posteriori?  More isolation for this kind of
> things in Mutt would definitely be welcome...

This should work:

"set my_var=$varunset var\
\
set var=$my_var"

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.


notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Stefano Zacchiroli
On Thu, Feb 14, 2013 at 12:36:58AM +0100, Profpatsch wrote:
> On 13-02-13 02:35pm, Kevin J. McCarthy wrote:
> > A more likely idea is to check whether you have $pipe_decode set.
> 
> BRILLIANT!
> So much for copying a basic rc from someone else.
> Of course, that was it and I?m officially an idiot.

Neat, thanks Kevin for debugging the issue down to $pipe_decode (which
I've never used, mutt never stops to amaze me :-)).

> And apparently Mail::Internet errors out if there is no Message-ID.
> (Which mentioned in the docs at CPAN?)
> 
> Mystery solved.

Right, but still a more graceful failure model would be nice.

Please find attached a patch that in such cases should 1) give a
supposedly nice error message explaining what's going on and 2) empty
the results dir to avoid showing you unrelated results. It works for me.
But extra checking never hurts, in particular for the tag action, which
I don't personally use.

I guess it would also be nice to actually disable $pipe_decode in the
relevant Mutt macros, but I'm not sure about to do that without
interfering with user desired configuration. Kevin: do you know if there
is a common Mutt trick to store the value of a variable before changing
it, and restoring it a posteriori?  More isolation for this kind of
things in Mutt would definitely be welcome...

Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  zack at upsilon.cc . . . . o . . . o . o
Ma?tre de conf?rences . . . . . http://upsilon.cc/zack . . . o . . . o o
Debian Project Leader . . . . . . @zack on identi.ca . . o o o . . . o .
? the first rule of tautology club is the first rule of tautology club ?
-- next part --
A non-text attachment was scrubbed...
Name: 0001-notmuch-mutt-more-graceful-handling-of-missing-Messa.patch
Type: text/x-diff
Size: 1617 bytes
Desc: not available
URL: 



notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Profpatsch
On 13-02-13 02:35pm, Kevin J. McCarthy wrote:
> A more likely idea is to check whether you have $pipe_decode set.
> If you have this set, you need to make sure you are not weeding out
> message-id with 'ignore'.
> 
> In fact, I've just tried this, and I can replicate the problem and exact
> error messages with these settings:
> 
>   set pipe_decode
>   ignore *
>   unignore From Date To Cc Bcc Subject
> 
> Adding this will fix the problem:
>   unignore Message-ID

BRILLIANT!
So much for copying a basic rc from someone else.
Of course, that was it and I?m officially an idiot.

And apparently Mail::Internet errors out if there is no Message-ID.
(Which mentioned in the docs at CPAN?)

Mystery solved.

~Profpatsch

-- 
Proudly written in Mutt with Vim on Archlinux.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es


Re: notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Andrei POPESCU
On Jo, 14 feb 13, 00:36:58, Profpatsch wrote:
 
 So much for copying a basic rc from someone else.

There's no problem with that, as long as you take the time to read and 
understand what each option does.

Kind regards,
Andrei
-- 
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)


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


Re: notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Stefano Zacchiroli
On Thu, Feb 14, 2013 at 12:36:58AM +0100, Profpatsch wrote:
 On 13-02-13 02:35pm, Kevin J. McCarthy wrote:
  A more likely idea is to check whether you have $pipe_decode set.
 
 BRILLIANT!
 So much for copying a basic rc from someone else.
 Of course, that was it and I’m officially an idiot.

Neat, thanks Kevin for debugging the issue down to $pipe_decode (which
I've never used, mutt never stops to amaze me :-)).

 And apparently Mail::Internet errors out if there is no Message-ID.
 (Which mentioned in the docs at CPAN…)
 
 Mystery solved.

Right, but still a more graceful failure model would be nice.

Please find attached a patch that in such cases should 1) give a
supposedly nice error message explaining what's going on and 2) empty
the results dir to avoid showing you unrelated results. It works for me.
But extra checking never hurts, in particular for the tag action, which
I don't personally use.

I guess it would also be nice to actually disable $pipe_decode in the
relevant Mutt macros, but I'm not sure about to do that without
interfering with user desired configuration. Kevin: do you know if there
is a common Mutt trick to store the value of a variable before changing
it, and restoring it a posteriori?  More isolation for this kind of
things in Mutt would definitely be welcome...

Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  z...@upsilon.cc . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Debian Project Leader . . . . . . @zack on identi.ca . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »
From b67ab95855ce7d279d8c0b3ddcbc20e679afc70b Mon Sep 17 00:00:00 2001
From: Stefano Zacchiroli z...@upsilon.cc
Date: Thu, 14 Feb 2013 09:31:37 +0100
Subject: [PATCH] notmuch-mutt: more graceful handling of missing Message-Id
 errors

in particular:
- the thread action would print an error and empty results dir
- the tag action would print an error
---
 contrib/notmuch-mutt/notmuch-mutt |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/contrib/notmuch-mutt/notmuch-mutt b/contrib/notmuch-mutt/notmuch-mutt
index d14709d..bc97908 100755
--- a/contrib/notmuch-mutt/notmuch-mutt
+++ b/contrib/notmuch-mutt/notmuch-mutt
@@ -121,7 +121,8 @@ sub prompt($$) {
 
 sub get_message_id() {
 my $mail = Mail::Internet-new(\*STDIN);
-$mail-head-get(message-id) =~ /^(.*)$/;	# get message-id
+my $mid = $mail-head-get(message-id) or return undef;
+$mid =~ /^(.*)$/;	# get message-id value
 return $1;
 }
 
@@ -142,6 +143,10 @@ sub thread_action($$@) {
 my ($results_dir, $remove_dups, @params) = @_;
 
 my $mid = get_message_id();
+if (! defined $mid) {
+	empty_maildir($results_dir);
+	die notmuch-mutt: cannot find Message-Id, abort.\n;
+}
 my $search_cmd = 'notmuch search --output=threads ' . shell_quote(id:$mid);
 my $tid = `$search_cmd`;	# get thread id
 chomp($tid);
@@ -151,6 +156,7 @@ sub thread_action($$@) {
 
 sub tag_action(@) {
 my $mid = get_message_id();
+defined $mid or die notmuch-mutt: cannot find Message-Id, abort.\n;
 
 system(notmuch tag 
 	   . shell_quote(join(' ', @_))
-- 
1.7.10.4

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


Re: notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Suvayu Ali
On Thu, Feb 14, 2013 at 09:37:13AM +0100, Stefano Zacchiroli wrote:
 
 I guess it would also be nice to actually disable $pipe_decode in the
 relevant Mutt macros, but I'm not sure about to do that without
 interfering with user desired configuration. Kevin: do you know if there
 is a common Mutt trick to store the value of a variable before changing
 it, and restoring it a posteriori?  More isolation for this kind of
 things in Mutt would definitely be welcome...

This should work:

enter-commandset my_var=$varenterenter-commandunset varenter\
do-your-stuff\
enter-commandset var=$my_varenter

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Profpatsch
On 13-02-14 09:37am, Stefano Zacchiroli wrote:
 More isolation for this kind of
 things in Mutt would definitely be welcome...

Maybe it’s time for an overhaul of the mutt configuration from the
ground up. I know, it’s “configure once and be done with it”, but it
took me two hard weeks to get that program up and running the way I want
(that’s even more time than I used on my 300+ line vimrc!).

I suppose it’s a documentation issue, too. One relies on blog entries
way too much, even to find out how to use multiple accounts (I’ve got
around 10).

Plus it still takes about 10 steps to configure a new account with
offlineimap, mutt and msmtp, there is nothing to automate this and
every config is different. Whoa.

For example:
Why does one have to spend two–four hours enabling pgp with the basic,
pre-configured commands?
Why is there no command that enables pgp with default sane gnupg values
that I assume 99.9% of mutt users use?
Why is the standard mailbox named “spooldir” and an easy explanation of
that is nowhere to be found in the official docs?
And the list goes on.

~Profpatsch

-- 
Proudly written in Mutt with Vim on Archlinux.


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


[OT] mutt configuration philosophy (was Re: notmuch-mutt: Use of uninitialized value.)

2013-02-14 Thread Michael Elkins

On Thu, Feb 14, 2013 at 03:13:22PM +0100, Profpatsch wrote:

Plus it still takes about 10 steps to configure a new account with
offlineimap, mutt and msmtp, there is nothing to automate this and
every config is different. Whoa.


Mutt was designed with the UNIX philosophy in mind.  When users 
don't like the way something is implemented in Mutt, you can use 
an external tool to do the job instead.  We consider this to be a 
feature, not a deficiency.



For example:
Why does one have to spend two–four hours enabling pgp with the basic,
pre-configured commands?
Why is there no command that enables pgp with default sane gnupg values
that I assume 99.9% of mutt users use?


set crypt_use_gpgme


Why is the standard mailbox named “spooldir” and an easy explanation of
that is nowhere to be found in the official docs?


We assume users are familiar with basic UNIX concepts like the 
mail spool.



And the list goes on.


Documentation patches are highly welcome.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Kevin J. McCarthy
Stefano Zacchiroli wrote:
 Right, but still a more graceful failure model would be nice.
 
 Please find attached a patch that in such cases should 1) give a
 supposedly nice error message explaining what's going on and 2) empty
 the results dir to avoid showing you unrelated results. It works for me.
 But extra checking never hurts, in particular for the tag action, which
 I don't personally use.

The patch works for me (for thread reconstruction - I don't use the
tagging features either).

 I guess it would also be nice to actually disable $pipe_decode in the
 relevant Mutt macros, but I'm not sure about to do that without
 interfering with user desired configuration. Kevin: do you know if there
 is a common Mutt trick to store the value of a variable before changing
 it, and restoring it a posteriori?  More isolation for this kind of
 things in Mutt would definitely be welcome...

It looks like this is possible, as Suvayu Ali mentioned too.  An
improvement to his example is also mentioned in the manual at
  http://www.mutt.org/doc/devel/manual.html#set-myvar
You can defer evaluation of the variables until runtime by prefixing
them with \$.

Here are some proposed improved macros.  (I'll attach a patch file in
another email.)  Despite my earlier warning about not line-breaking
macros, these are getting a bit unreadable.  We may want to see
if/where we can safely line-break them.

macro index F8 \
  enter-commandset my_old_pipe_decode=\$pipe_decode 
my_old_wait_key=\$wait_key nopipe_decode 
nowait_keyentershell-escapenotmuch-mutt -r --prompt 
searchenterchange-folder-readonly`echo 
${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`enterenter-commandset 
pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_keyenter \
  notmuch: search mail
macro index F9 \
  enter-commandset my_old_pipe_decode=\$pipe_decode 
my_old_wait_key=\$wait_key nopipe_decode 
nowait_keyenterpipe-messagenotmuch-mutt -r 
threadenterchange-folder-readonly`echo 
${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`enterenter-commandset 
pipe_decode=\$my_old_pipe_decode wait_key=\$my_old_wait_keyenter \
  notmuch: reconstruct thread
macro index F6 \
  enter-commandset my_old_pipe_decode=\$pipe_decode 
my_old_wait_key=\$wait_key nopipe_decode 
nowait_keyenterpipe-messagenotmuch-mutt tag -- 
-inboxenterenter-commandset pipe_decode=\$my_old_pipe_decode 
wait_key=\$my_old_wait_keyenter \
  notmuch: remove message from inbox

-Kevin



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


Re: notmuch-mutt: Use of uninitialized value.

2013-02-14 Thread Suvayu Ali
Hi Kevin and others,

On Thu, Feb 14, 2013 at 03:06:51PM -0800, Kevin J. McCarthy wrote:
 
 Here are some proposed improved macros.  (I'll attach a patch file in
 another email.)  Despite my earlier warning about not line-breaking
 macros, these are getting a bit unreadable.  We may want to see
 if/where we can safely line-break them.

I find sticking by the rule do not introduce whitespaces to make it
readable very useful in multi-line macros.  For example,

macro index key some-long-functionsome textanother-function\
continuationfinally-the-end

the above is preferable over,

macro index key some-long-functionsome textanother-function \
   continuationfinally-the-end

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


notmuch-mutt: Use of uninitialized value.

2013-02-13 Thread Profpatsch
On 13-02-13 05:26pm, Stefano Zacchiroli wrote:
> OK, I understand the problem now. Although I don't understand how it's
> possible. Can you please do the following test:
> 
> - go on a mail, try  on it to ensure it exhibit the bad behavior
>   you've reported

It does.

> - find out the Message-Id of that mail, e.g.
> "20130213095752.GA20009 at foobar"
> - on a shell prompt, try:
> notmuch search --output=threads id:20130213095752.GA20009 at foobar
> - it should give you something like
>   thread:00018bce

% notmuch search --output=threads
id:8e85854f-8b30-4821-bf3e-4c19e576bf67 at googlegroups.com
thread:0566

% notmuch search thread:0566
thread:0566  Today 04:59 [39/39] [?]

So it?s not notmuch.

Bear in mind that I use Arch, so this is the version on my system atm:
https://www.archlinux.org/packages/community/x86_64/notmuch-mutt/

This is the bad guy:
sub get_message_id() {
my $mail = Mail::Internet->new(\*STDIN);
$mail->head->get("message-id") =~ /^<(.*)>$/;# get message-id #l.124
return $1;
}

I?m not much of a perl coder (not at all to be exact), but
Use of uninitialized value in pattern match (m//) at
/usr/bin/notmuch-mutt line 124,  line 66.
sounds suspiciously like nothing gets read out of STDIN and $mail is
definitely not a Mail::Internet object.

~Profpatsch

-- 
Proudly written in Mutt with Vim on Archlinux.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: 



notmuch-mutt: Use of uninitialized value.

2013-02-13 Thread Stefano Zacchiroli
[ please keep the notmuch@ list in Cc:, so that others could help and/or
  benefit from the solution ... when we find one :-) ]

On Tue, Feb 12, 2013 at 10:51:05PM +0100, Profpatsch wrote:
> > I'm sorry, but I still don't get it. What do you mean with "no mail"?
> 
> Haha, sorry, that was misleading. I meant: It doesn?t work with any
> mail, even if it?s indexed by notmuch.

OK, I understand the problem now. Although I don't understand how it's
possible. Can you please do the following test:

- go on a mail, try  on it to ensure it exhibit the bad behavior
  you've reported

- find out the Message-Id of that mail, e.g. "20130213095752.GA20009 at foobar"
  ('h' will show all the headers of the mail in Mutt, in case you're not
  seeing the Message-Id header by default)

- on a shell prompt, try:

notmuch search --output=threads id:20130213095752.GA20009 at foobar

  with the appropriate message id for your case, preceded by "id:"

- it should give you something like

  thread:00018bce

> Am I getting this right: I go to a mail in the index and when I hit F9
> it should show me the whole thread of that message? So I can get the
> whole picture, even if it already archived some of the older messages?

That's correct (as long as the archived messages are still part of
notmuch index), and it's working for quite a lot of people, hence I'm
eager to find out what's not working in your setup.

Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  zack at upsilon.cc . . . . o . . . o . o
Ma?tre de conf?rences . . . . . http://upsilon.cc/zack . . . o . . . o o
Debian Project Leader . . . . . . @zack on identi.ca . . o o o . . . o .
? the first rule of tautology club is the first rule of tautology club ?


notmuch-mutt: Use of uninitialized value.

2013-02-13 Thread Kevin J. McCarthy
Profpatsch wrote:
> Since I don?t get your bug tracking system (d?oh ;), here is a bug I
> encountered with notmuch-mutt using this macro I guess was from the
> ?official? tutorial:
> 
> # Construct a thread ouf of the marked mail (or something like that,
> # doesn?t work atm (errors out))
> macro index  \
> "unset wait_key \
>   /usr/bin/notmuch-mutt thread \
>   ~/.cache/notmuch/mutt/results/ \
>   set wait_key" \
>   "search and reconstruct owning thread (using
>   notmuch)"
> 
> I hope this still works, best to put it on one line I guess.

Mutt macros can behave strangely if you try to break them into multiple
lines.  So my first suggestion is to try setting your macro to exactly
how it's shown in the tutorial and see if that fixes the problem.  (I
admit that this is not likely your problem though, as notmuch-mutt is
running...)

A more likely idea is to check whether you have $pipe_decode set.
If you have this set, you need to make sure you are not weeding out
message-id with 'ignore'.

In fact, I've just tried this, and I can replicate the problem and exact
error messages with these settings:

  set pipe_decode
  ignore *
  unignore From Date To Cc Bcc Subject

Adding this will fix the problem:
  unignore Message-ID

-Kevin

-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: 



Re: notmuch-mutt: Use of uninitialized value.

2013-02-13 Thread Kevin J. McCarthy
Profpatsch wrote:
 Since I don’t get your bug tracking system (d’oh ;), here is a bug I
 encountered with notmuch-mutt using this macro I guess was from the
 “official” tutorial:
 
 # Construct a thread ouf of the marked mail (or something like that,
 # doesn’t work atm (errors out))
 macro index F9 \
 enter-commandunset wait_keyenterpipe-message \
   /usr/bin/notmuch-mutt threadenterchange-folder-readonly \
   ~/.cache/notmuch/mutt/results/enter \
   enter-commandset wait_keyenter \
   search and reconstruct owning thread (using
   notmuch)
 
 I hope this still works, best to put it on one line I guess.

Mutt macros can behave strangely if you try to break them into multiple
lines.  So my first suggestion is to try setting your macro to exactly
how it's shown in the tutorial and see if that fixes the problem.  (I
admit that this is not likely your problem though, as notmuch-mutt is
running...)

A more likely idea is to check whether you have $pipe_decode set.
If you have this set, you need to make sure you are not weeding out
message-id with 'ignore'.

In fact, I've just tried this, and I can replicate the problem and exact
error messages with these settings:

  set pipe_decode
  ignore *
  unignore From Date To Cc Bcc Subject

Adding this will fix the problem:
  unignore Message-ID

-Kevin



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


Re: notmuch-mutt: Use of uninitialized value.

2013-02-13 Thread Profpatsch
On 13-02-13 02:35pm, Kevin J. McCarthy wrote:
 A more likely idea is to check whether you have $pipe_decode set.
 If you have this set, you need to make sure you are not weeding out
 message-id with 'ignore'.
 
 In fact, I've just tried this, and I can replicate the problem and exact
 error messages with these settings:
 
   set pipe_decode
   ignore *
   unignore From Date To Cc Bcc Subject
 
 Adding this will fix the problem:
   unignore Message-ID

BRILLIANT!
So much for copying a basic rc from someone else.
Of course, that was it and I’m officially an idiot.

And apparently Mail::Internet errors out if there is no Message-ID.
(Which mentioned in the docs at CPAN…)

Mystery solved.

~Profpatsch

-- 
Proudly written in Mutt with Vim on Archlinux.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


notmuch-mutt: Use of uninitialized value.

2013-02-12 Thread Stefano Zacchiroli
On Tue, Feb 12, 2013 at 05:55:31PM +0100, Profpatsch wrote:
> > Do you still have the mail in question? Can you verify if it is the
> > case or not?
> 
> That?s my problem: It works with no mail.
> I initialized notmuch and this one works:

I'm sorry, but I still don't get it. What do you mean with "no mail"?
I've tried using  on an empty Maildir (i.e. one without any mail in
it), but there  doesn't work in the right sense, i.e. mutt complains
with "There are no messages" and doesn't even try to run notmuch-mutt.
So no bug there.

If it does anything different for you, can you please compare the macros
you're using with the one you can find at:

  
http://git.notmuchmail.org/git/notmuch/blob/HEAD:/contrib/notmuch-mutt/notmuch-mutt.rc

Many thanks in advance for your feedback,
Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  zack at upsilon.cc . . . . o . . . o . o
Ma?tre de conf?rences . . . . . http://upsilon.cc/zack . . . o . . . o o
Debian Project Leader . . . . . . @zack on identi.ca . . o o o . . . o .
? the first rule of tautology club is the first rule of tautology club ?


notmuch-mutt: Use of uninitialized value.

2013-02-12 Thread Stefano Zacchiroli
[ many thanks to David Bremner for the forward ]

On Tue, 12 Feb 2013 01:58:01 +0100, Profpatsch wrote:
> # Construct a thread ouf of the marked mail (or something like that,
> # doesn?t work atm (errors out))

> I hope this still works, best to put it on one line I guess.
> 
> Error message:
> Use of uninitialized value in pattern match (m//) at
> /usr/bin/notmuch-mutt line 124,  line 28.
> Use of uninitialized value $mid in concatenation (.) or string at
> /usr/bin/notmuch-mutt line 145,  line 28.

Heya, thanks for your report.  The only reasonable explanation I can
think of is that you hit  while being on a mail that does not
contain a Message-Id header, which is uncommon.

Do you still have the mail in question? Can you verify if it is the case
or not?

If that's the case, I'd agree that the error message could be better,
but without a message-id there won't be much that can be done to rebuild
a thread in any reliable way. (One possibility might be falling back to
subject-based thread reconstruction, but I'd rather not do that.)

Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  zack at upsilon.cc . . . . o . . . o . o
Ma?tre de conf?rences . . . . . http://upsilon.cc/zack . . . o . . . o o
Debian Project Leader . . . . . . @zack on identi.ca . . o o o . . . o .
? the first rule of tautology club is the first rule of tautology club ?


notmuch-mutt: Use of uninitialized value.

2013-02-12 Thread Profpatsch
Since I don?t get your bug tracking system (d?oh ;), here is a bug I
encountered with notmuch-mutt using this macro I guess was from the
?official? tutorial:

# Construct a thread ouf of the marked mail (or something like that,
# doesn?t work atm (errors out))
macro index  \
"unset wait_key \
/usr/bin/notmuch-mutt thread \
~/.cache/notmuch/mutt/results/ \
set wait_key" \
"search and reconstruct owning thread (using
notmuch)"

I hope this still works, best to put it on one line I guess.

Error message:
Use of uninitialized value in pattern match (m//) at
/usr/bin/notmuch-mutt line 124,  line 28.
Use of uninitialized value $mid in concatenation (.) or string at
/usr/bin/notmuch-mutt line 145,  line 28.

~Profpatsch

-- 
Proudly written in Mutt with Vim on Archlinux.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es


Re: notmuch-mutt: Use of uninitialized value.

2013-02-12 Thread Stefano Zacchiroli
[ many thanks to David Bremner for the forward ]

On Tue, 12 Feb 2013 01:58:01 +0100, Profpatsch wrote:
 # Construct a thread ouf of the marked mail (or something like that,
 # doesn’t work atm (errors out))
snip
 I hope this still works, best to put it on one line I guess.
 
 Error message:
 Use of uninitialized value in pattern match (m//) at
 /usr/bin/notmuch-mutt line 124, STDIN line 28.
 Use of uninitialized value $mid in concatenation (.) or string at
 /usr/bin/notmuch-mutt line 145, STDIN line 28.

Heya, thanks for your report.  The only reasonable explanation I can
think of is that you hit F9 while being on a mail that does not
contain a Message-Id header, which is uncommon.

Do you still have the mail in question? Can you verify if it is the case
or not?

If that's the case, I'd agree that the error message could be better,
but without a message-id there won't be much that can be done to rebuild
a thread in any reliable way. (One possibility might be falling back to
subject-based thread reconstruction, but I'd rather not do that.)

Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  z...@upsilon.cc . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Debian Project Leader . . . . . . @zack on identi.ca . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: notmuch-mutt: Use of uninitialized value.

2013-02-12 Thread Stefano Zacchiroli
On Tue, Feb 12, 2013 at 05:55:31PM +0100, Profpatsch wrote:
  Do you still have the mail in question? Can you verify if it is the
  case or not?
 
 That’s my problem: It works with no mail.
 I initialized notmuch and this one works:

I'm sorry, but I still don't get it. What do you mean with no mail?
I've tried using F9 on an empty Maildir (i.e. one without any mail in
it), but there F9 doesn't work in the right sense, i.e. mutt complains
with There are no messages and doesn't even try to run notmuch-mutt.
So no bug there.

If it does anything different for you, can you please compare the macros
you're using with the one you can find at:

  
http://git.notmuchmail.org/git/notmuch/blob/HEAD:/contrib/notmuch-mutt/notmuch-mutt.rc

Many thanks in advance for your feedback,
Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  z...@upsilon.cc . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Debian Project Leader . . . . . . @zack on identi.ca . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


notmuch-mutt: Use of uninitialized value.

2013-02-11 Thread Profpatsch
Since I don’t get your bug tracking system (d’oh ;), here is a bug I
encountered with notmuch-mutt using this macro I guess was from the
“official” tutorial:

# Construct a thread ouf of the marked mail (or something like that,
# doesn’t work atm (errors out))
macro index F9 \
enter-commandunset wait_keyenterpipe-message \
/usr/bin/notmuch-mutt threadenterchange-folder-readonly \
~/.cache/notmuch/mutt/results/enter \
enter-commandset wait_keyenter \
search and reconstruct owning thread (using
notmuch)

I hope this still works, best to put it on one line I guess.

Error message:
Use of uninitialized value in pattern match (m//) at
/usr/bin/notmuch-mutt line 124, STDIN line 28.
Use of uninitialized value $mid in concatenation (.) or string at
/usr/bin/notmuch-mutt line 145, STDIN line 28.

~Profpatsch

-- 
Proudly written in Mutt with Vim on Archlinux.
Q: Why is this email five sentences or less?
A: http://five.sentenc.es
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch