BUG: bad notmuch shared library install_name on Mac OS X

2014-09-04 Thread David Bremner
"J. Lewis Muir"  writes:

> Hello.
>
> I submitted a patch [1] to fix a bug in how the notmuch shared library
> is built on Mac OS X, but perhaps it's not clear it fixes a bug, so I
> wanted to just request it be tagged as a bug for nmbug.

Done, at least twice (waves to Jani).  

The usual problem we have with OS/X patches is finding somebody to
review them.  It's a little surprising to me that it was completely
broken before, since there have been people using notmuch on OS/X.

d


How to debug 'ignoring non-mail file' issues

2014-09-04 Thread Perttu Luukko
On 2014-09-01 09:41:06, Perttu Luukko wrote:
> Yes, that indeed works. I'll probably move these ignored files to a
> separate folder for inspection.

I looked at the mails that are still ignored after upgrading GMime to
latest version, and I think I have found what they have in common. All
of my ignored emails are from 2010-2011, and for some reason these mails
contain a line like this:

>From username  Wed Sep 28 16:43:49 2011

somewhere among the headers. Note the '>' at the beginning of the line.
The mails that are still ignored after upgrading GMime are those where
this line happens to be the first line. Also, all of them have
attachments for some reason. That line certainly doesn't look right, and
I don't know where it came from. It might be some byproduct of mail
redirection, since it shows my username, but the mails are not sent by
me.

I moved these problematic lines to the second line of each message, and
now they are imported without problems. I probably won't file a bug for
GMime because I have no idea whether this is just some oddity caused by
my mail setup. Let this information reside here in case someone else has
a similar problem.

-- 
Perttu


BUG: bad notmuch shared library install_name on Mac OS X

2014-09-04 Thread J. Lewis Muir
Hello.

I submitted a patch [1] to fix a bug in how the notmuch shared library
is built on Mac OS X, but perhaps it's not clear it fixes a bug, so I
wanted to just request it be tagged as a bug for nmbug.

Thank you!

Lewis

[1] http://notmuchmail.org/pipermail/notmuch/2014/018956.html


[PATCH] emacs: jump: fix compile warning on emacs 23

2014-09-04 Thread Mark Walters
notmuch-jump uses window-body-width which is not defined in emacs
23. To get around this it does

(unless (fboundp 'window-body-width)
  ;; Compatibility for Emacs pre-24
  (defalias 'window-body-width 'window-width))

This makes sure window-body-width is defined and all should be
well. But it seems that the byte compiler does not realise that this
guarantees that window-body-width will be defined and so, when
compiling with emacs 23, it gives an error

In end of data:
notmuch-jump.el:172:1:Warning: the function `window-body-width' is not known to 
be defined.

Domo and I came to following on irc: wrap the (unless (fboundp ...))
inside eval-and-compile which ensures that both the test and the
defalias (if needed) happen at both compile and load time.  This fixes
the warning.
---
I think Domo and I were both not completely sure whether the
eval-and-compile should be inside or outside the (unless fboundp ..)
or not (ie should it wrap the unless fboundp or just the defalias) nor
whether it should be eval-and-compile or eval-when-compile.

We think this is the right version but it would be good to have confirmation.

I tested notmuch jump inside emacs 23 and 24 with notmuch-emacs
compiled with emacs 23 or 24 (ie all four combinations) and it seemed to work.

Best wishes

Mark



 emacs/notmuch-jump.el |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el
index 5eb0949..2706b6c 100644
--- a/emacs/notmuch-jump.el
+++ b/emacs/notmuch-jump.el
@@ -25,9 +25,10 @@
 (require 'notmuch-lib)
 (require 'notmuch-hello)

-(unless (fboundp 'window-body-width)
-  ;; Compatibility for Emacs pre-24
-  (defalias 'window-body-width 'window-width))
+(eval-and-compile
+  (unless (fboundp 'window-body-width)
+;; Compatibility for Emacs pre-24
+(defalias 'window-body-width 'window-width)))

 ;;;###autoload
 (defun notmuch-jump-search ()
-- 
1.7.10.4



How to debug 'ignoring non-mail file' issues

2014-09-04 Thread Perttu Luukko
On 2014-09-03 19:03:40, Jani Nikula wrote:
> On Wed, 03 Sep 2014, Perttu Luukko  wrote:
> > What I mean that there would be a separate error for cases "Does not
> > resemble an email message at all", i.e., some control file your mail
> > server happens to store in the mailbox, and "Looks like mail but we
> > can't parse it", i.e., better find out why it can't be parsed to avoid
> > potentially important messages going missing from the database.
> 
> As I said, GMime does not tell us the difference between the two.

There could be a separate parsing step that reads the first kilobyte or
so and checks whether it is text, and whether there is a line starting
with "From: " and possibly other headers. This could be run if GMime
thinks the file is not mail so there would be negligible overhead.

This is just a suggestion. Notmuch users are probably quite experienced
so they can always investigate on their own why their emails are being
ignored. But there could be more warning about ignored messages.
Something like, at the end of each 'notmuch new' output: "Note: some
files were ignored as non-mail. Check the list at
~/mail/.notmuch/ignored-files and adjust your ~/.notmuch-config".

-- 
Perttu


[PATCH] emacs: jump: fix compile warning on emacs 23

2014-09-04 Thread Mark Walters
notmuch-jump uses window-body-width which is not defined in emacs
23. To get around this it does

(unless (fboundp 'window-body-width)
  ;; Compatibility for Emacs pre-24
  (defalias 'window-body-width 'window-width))

This makes sure window-body-width is defined and all should be
well. But it seems that the byte compiler does not realise that this
guarantees that window-body-width will be defined and so, when
compiling with emacs 23, it gives an error

In end of data:
notmuch-jump.el:172:1:Warning: the function `window-body-width' is not known to 
be defined.

Domo and I came to following on irc: wrap the (unless (fboundp ...))
inside eval-and-compile which ensures that both the test and the
defalias (if needed) happen at both compile and load time.  This fixes
the warning.
---
I think Domo and I were both not completely sure whether the
eval-and-compile should be inside or outside the (unless fboundp ..)
or not (ie should it wrap the unless fboundp or just the defalias) nor
whether it should be eval-and-compile or eval-when-compile.

We think this is the right version but it would be good to have confirmation.

I tested notmuch jump inside emacs 23 and 24 with notmuch-emacs
compiled with emacs 23 or 24 (ie all four combinations) and it seemed to work.

Best wishes

Mark



 emacs/notmuch-jump.el |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el
index 5eb0949..2706b6c 100644
--- a/emacs/notmuch-jump.el
+++ b/emacs/notmuch-jump.el
@@ -25,9 +25,10 @@
 (require 'notmuch-lib)
 (require 'notmuch-hello)
 
-(unless (fboundp 'window-body-width)
-  ;; Compatibility for Emacs pre-24
-  (defalias 'window-body-width 'window-width))
+(eval-and-compile
+  (unless (fboundp 'window-body-width)
+;; Compatibility for Emacs pre-24
+(defalias 'window-body-width 'window-width)))
 
 ;;;###autoload
 (defun notmuch-jump-search ()
-- 
1.7.10.4

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


BUG: bad notmuch shared library install_name on Mac OS X

2014-09-04 Thread J. Lewis Muir
Hello.

I submitted a patch [1] to fix a bug in how the notmuch shared library
is built on Mac OS X, but perhaps it's not clear it fixes a bug, so I
wanted to just request it be tagged as a bug for nmbug.

Thank you!

Lewis

[1] http://notmuchmail.org/pipermail/notmuch/2014/018956.html
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: BUG: bad notmuch shared library install_name on Mac OS X

2014-09-04 Thread David Bremner
J. Lewis Muir jlm...@imca-cat.org writes:

 Hello.

 I submitted a patch [1] to fix a bug in how the notmuch shared library
 is built on Mac OS X, but perhaps it's not clear it fixes a bug, so I
 wanted to just request it be tagged as a bug for nmbug.

Done, at least twice (waves to Jani).  

The usual problem we have with OS/X patches is finding somebody to
review them.  It's a little surprising to me that it was completely
broken before, since there have been people using notmuch on OS/X.

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