notmuch release 0.5 now available

2010-11-11 Thread Carl Worth
sed) thread display.

Display current thread subject in a header line.

Provide a "c i" binding to copy a thread ID from the search view.

Allow for notmuch-fcc-dirs to have a value of nil.

  Also, the more complex form of notmuch-fcc-dirs now has a slightly
  different format. It no longer has a special first-element, fallback
  string. Instead it's now a list of cons cells where the car of each
  cell is a regular expression to be matched against the sender
  address, and the cdr is the name of a folder to use for an FCC. So
  the old fallback behavior can be achieved by including a fineal cell
  of (".*" . "default-fcc-folder").

Vim interface improvements
--
Felipe Contreras provided a number of updates for the vim interface.

  These include optimiations, support for newer versions of vim, fixed
  support for sending mail on modern systmms, new commands, and
  various cleanups.

New bindings

Added initial ruby bindings in bindings/ruby

What is notmuch
===
Notmuch is a system for indexing, searching, reading, and tagging
large collections of email messages in maildir or mh format. It uses
the Xapian library to provide fast, full-text search with a convenient
search syntax.

For more about notmuch, see http://notmuchmail.org
make[1]: Leaving directory `/home/cworth/src/notmuch'

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/fa37ab76/attachment.pgp>


Maildir-flags synchronization now on master branch

2010-11-11 Thread Dirk Hohndel
On Thu, 11 Nov 2010 16:43:45 -0800, Carl Worth  wrote:
> 
> Now that all of this maildir-flag synchronization is possible, I wonder
> if we shouldn't allow the user to configure the mapping of maildir-flag
> characters to tag names. That would allow for (a limited number of) tags
> to be synchronized on multiple machines using synchronization mechanisms
> such as offlineimap without needing any notmuch-aware synchronization.
> 
> So that might be very interesting.

Oh I LOVE that idea. There are only a small number of tags that I
/really/ need and to be able to access them from multiplme machines,
kept in sync through the imap server... awesome.

/D


Strings vs symbols in notmuch-search-result-format

2010-11-11 Thread Carl Worth
On Sat, 11 Sep 2010 18:37:55 -0500, Rob Browning  
wrote:
> I've started to look at the elisp, and wondered why
> notmuch-search-result-format expected strings rather than symbols for
> the field names, i.e.:
...
> Perhaps there's a good argument for strings, but if not, the latter is
> more idiomatic, and a bit more efficient too (comparisons will just be
> pointer compares (via assq) rather than something like a strcmp (assoc)).


I'm not sure that this is my code. But I do know that most of the emacs
lisp code I've written is very non-idiomatic and without good
justification.

Please don't look at my elisp code and assume it is sane at all. I'm
looking forward to the day where "git blame -- emacs/*.el" doesn't show
my name at all...

Said another way, please feel free to post improvements for any strange
elisp you see, (C code too, of course).

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/43384c15/attachment.pgp>


[notmuch] loss of duplicate messages

2010-11-11 Thread Carl Worth
On Wed, 15 Sep 2010 19:53:41 -0500, Rob Browning  
wrote:
> I'm not sure what the current plan is, but please consider this a
> belated agreement.  It doesn't necessarily need to be the default (and
> perhaps shouldn't be), but I'd like to have some way to ask notmuch for
> *all* matching messages (regardless of message id) -- perhaps via an
> --include-duplicates argument to search/show/count, etc.

As mentioned recently, the new notmuch_message_get_filenames function
will make it quite easy to implement the above.

Any contribution will be welcome.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/4021cce9/attachment.pgp>


[PATCH 2/2] emacs: add stash thread-id function to notmuch-search mode

2010-11-11 Thread Carl Worth
On Sat, 18 Sep 2010 15:48:22 -0400, Jameson Rollins  wrote:
> This add a "stash-map" for search-mode, just like in show-mode, and
> adds one function, bound to "i" to stash the thread-id of the current
> selected thread.
> 
> Couldn't think of the correct way to stash other thread info, so I
> didn't add any other stash functions for now.

Excellent. I've wanted this functionality for a while now. Hopefully I
can keep up better with patches on the list in the future so I don't
have to delay my gratification so much.

This is pushed now.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/f6dbd3e2/attachment.pgp>


notmuchsync: handling of the deleted tag

2010-11-11 Thread Carl Worth
On Mon, 20 Sep 2010 21:25:13 -0500, Rob Browning  
wrote:
> Sebastian Spaeth  writes:
> Conceptually what I'd like for it to do, is reference count -- only mark
> the message deleted if every occurrence (across all maildirs) is marked
> trashed (T).

[I'm going back through this old notmuchsync thread after having worked
to merge and improve some related synchronization featured.]

The above idea sounds quite interesting and would be possible in the
current approach. The only thing I don't like is that we would have some
very detailed knowledge about the semantics of "deleted" hard-coded deep
in the library.

I already don't like the fact that the library has a hard-coded list
with a handful of mappings between flags and tags.

So, what we probably need here is for the user to be able to configure
the mapping and in a fairly sophisticated way:

'R' on _any_ filename  -> "replied" tag gets added
'T' on _all_ filenames -> "deleted" tag gets added
'S' on _any_ filename  -> "unread" tag gets removed

That would be expressible with just a couple of pieces of punctuation:

R=replied;T*=deleted;S=~unread

So maybe something like that?

> > If notmuch gave me at least all filenames that are associated with a
> > mail id, I could introduce a command line option "--prune --safe"
> > which would

This feature is at least implemented in libnotmuch at least.

Hopefully things just keep getting better and better.

I am looking forward to some feedback from users of notmuchsync who try
out the new maildir.synchronize_flags support in notmuch itself.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/c82055c8/attachment.pgp>


[PATCH] emacs: Improve the definition and use of `notmuch-fcc-dirs'.

2010-11-11 Thread Carl Worth
On Mon,  8 Nov 2010 15:01:25 +, David Edmondson  wrote:
> Re-work the declaration and definition of `notmuch-fcc-dirs'. The
> variable now allows three types of values:

Thanks. This is pushed now.

> ---
> 
> Fix runtime cl use.

Hopefully I stalled long enough to get the latest version of this
one. ;-)

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/20ee3b46/attachment-0001.pgp>


[PATCH] emacs: Show cleaner addresses during message display.

2010-11-11 Thread Carl Worth
On Wed, 10 Nov 2010 09:23:07 +, David Edmondson  wrote:
> Simplify the display of addresses by setting
> `notmuch-show-address-simplication' to:
> 
> - 'full: Only the name component of the address, if present, is
>   shown (the default),
> - 'partial: Addresses are stripped of redundant information,
> - 'none: Addresses are shown as-is.

Now that we've got emacs-based testing, this change needs to update the
test suite as well.

Personally, I like to see email addresses, and I think that's a sane
default, so I'd actually prefer 'partial as the default setting here.

I tried changing that and hoped that that would let me not even update
the test suite. But then I found that comapred to the current state,
adding this patch actually adds unnecessary double-quotation marks
around user's names. That's annoying.

Can we get that cleaned up?

Meanwhile, I just pushed your three patches for cleaning up the display
of subjects[*]. So, thanks!

-Carl

[*] None of these needed test-suite changes, which actually just points
out holes in our test suite here.

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/112e734c/attachment.pgp>


[PATCH] test: Better handling of stdout and stderr

2010-11-11 Thread Michal Sojka
On Thu, 11 Nov 2010, Carl Worth wrote:
> On Wed, 10 Nov 2010 13:15:45 -0800, Carl Worth  wrote:
> > Meanwhile, I've just now pushed out my little test-lib.sh change, so you
> > can update the patch for that as well.
> 
> Oh, and one other thing I forgot to mention about the patch. It
> currently talks about things along the lines of "git-style tests" and
> "cworth-style tests".
> 
> You and I might understand perfectly well what that means now, but we
> need the test suite to be independently comprehensible. (I'd like to be
> able to understand it myself when I look at it again in the future,
> having forgotten the current history.)
> 
> So if you could describe these instead as something like "tests using
> test_expect_success" vs. "tests using
> test_begin_subtest/test_expect_equal" or something like that, that would
> be great.

I'll look at this tomorrow.

-Michal


[PATCH v4 0/4] Maildir synchronization

2010-11-11 Thread Michal Sojka
On Wed, 10 Nov 2010, Carl Worth wrote:
> I'm thinking of documenting/implementing this such that the
> _flags_to_tags function merges (as a logical OR) the set of flags from
> all filenames for a given email message, and then computes tags from the
> final set. This does assume a particular kind of life-cycle for the
> flags, (that they are additionally unset, and once set for the logical
> message will not want to be cleared again). This lifecycle seems correct
> for things like the flags for "seen" or "replied" as documented in the
> original maildir specification.

Does this mean, that if I want to remove the replied tag (for example) I
can still do it by manipulating flags, i.e. I would remove the R flag
from all messages with the coreposnding Message-ID? Or does it mean that
the only way is to remove the replied tag in notmuch? I'd prefer the
first.

-Michal


[PATCH] emacs: Correctly count the number of lines in a signature.

2010-11-11 Thread Carl Worth
On Tue,  9 Nov 2010 18:15:31 +, David Edmondson  wrote:
> -  (sig-lines (1- (count-lines sig-start (point-max)
> +  (sig-lines (count-lines sig-start (point-max

Thanks. This is pushed.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/3a8ee4b0/attachment.pgp>


[ann] (incomplete) go bindings to libnotmuch

2010-11-11 Thread Carl Worth
On Wed, 10 Nov 2010 18:37:00 +0100, Sebastien Binet  wrote:

> mainly to familiarize myself with the go language, I wrapped the
> libnotmuch library and reaped off Sebastian's vala-addressbooklookup
> program into a go version.
> 
> the buggy and incomplete code is there:
>  http://bitbucket.org/binet/go-notmuch/src

Cool stuff.

Having wrappers and code for a library I'm familiar with like this would
make it much easier for me to sit down and take a good look at go.

Would be you be interested in maintaining these within the bindings/
directory of the main notmuch repository? Let me know.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/7cfa5289/attachment.pgp>


[PATCH] Update of the spec file to the 0.4 release.

2010-11-11 Thread Carl Worth
On Thu, 11 Nov 2010 16:30:49 -0800, Scott Henson  
wrote:
> This is the spec file I used to build a Fedora package.  It has some
> comments that would allow a build of git.  Sorry for the delay, I've
> been at LISA and been a little bit more busy than I thought.

Thanks, Scott.

I've pushed this out now. Thanks for the contribution.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/3bb04c5e/attachment.pgp>


Maildir-flags synchronization now on master branch

2010-11-11 Thread Carl Worth
On Thu, 11 Nov 2010 05:04:48 -0800, Carl Worth  wrote:
> There were two things I had wanted to do before pushing this out, but
> I've decided to get some sleep now instead:
> 
>   1. Don't do maildir-flag things in non-maildir directories
> 
>   2. Preserve any unsupported flags when renaming

After some good sleep, both of these features seemed much easier to
implement. These are both pushed now.

And I've now done a much more thorough audit of all of the
implementation, (adapting things to my preferred coding style, adding
comments, fixing up little corner cases, etc.). So I'm quite comfortable
with all of this now. I think 0.5 will be imminent.

Now that all of this maildir-flag synchronization is possible, I wonder
if we shouldn't allow the user to configure the mapping of maildir-flag
characters to tag names. That would allow for (a limited number of) tags
to be synchronized on multiple machines using synchronization mechanisms
such as offlineimap without needing any notmuch-aware synchronization.

So that might be very interesting.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/bde4f5d3/attachment.pgp>


[PATCH] Update of the spec file to the 0.4 release.

2010-11-11 Thread Scott Henson
---
 packaging/fedora/notmuch.spec |   74 ++---
 1 files changed, 54 insertions(+), 20 deletions(-)

diff --git a/packaging/fedora/notmuch.spec b/packaging/fedora/notmuch.spec
index cca3a1b..ef1af2e 100644
--- a/packaging/fedora/notmuch.spec
+++ b/packaging/fedora/notmuch.spec
@@ -1,4 +1,5 @@
-%global git 306635c2
+%global git 6b9a717c
+%global date %(date +%Y%m%d)

 %if %($(pkg-config emacs) ; echo $?)
 %global emacs_version 23.1
@@ -10,23 +11,29 @@
 %global emacs_startdir %(pkg-config emacs --variable sitestartdir)
 %endif

+# If you are doing a git snapshot:
+#
+# Release should be 1%{git}%{?dist}
+# Source0 should be notmuch-%{version}-%{git}.tar.gz
+# git version is generated by 'git show-ref --hash=8 HEAD'
+#
+# To create a tarball:
+#
+# git clone git://notmuchmail.org/git/notmuch
+# cd notmuch
+# git archive --format=tar --prefix=notmuch-0.4/ HEAD | gzip > 
notmuch-0.4-`git show-ref --hash=8 HEAD`.tar.gz
+#
+
 Name:   notmuch
-Version:0.0
-Release:0.3.%{git}%{?dist}
+Version:0.4
+Release:1%{?dist}
 Summary:Not much of an email program

 Group:  Applications/Internet
 License:GPLv3+
 URL:http://notmuchmail.org/

-#
-# To create a tarball:
-#
-# git clone git://notmuchmail.org/git/notmuch
-# cd notmuch
-# git archive --format=tar --prefix=notmuch/ HEAD | bzip2 > notmuch-`git 
show-ref --hash=8 HEAD`.tar.bz2
-#
-Source0:notmuch-%{git}.tar.bz2
+Source0:http://notmuchmail.org/releases/notmuch-%{version}.tar.gz
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

 BuildRequires:  xapian-core-devel
@@ -61,17 +68,17 @@ Requires:   emacs(bin) >= %{emacs_version}
   can be integrated into any email program.)

 * Notmuch is not much of an email program. It doesn't receive messages
-  (no POP or IMAP suport). It doesn't send messages (no mail composer,
+  (no POP or IMAP support). It doesn't send messages (no mail composer,
   no network code at all). And for what it does do (email search) that
   work is provided by an external library, Xapian. So if Notmuch
   provides no user interface and Xapian does all the heavy lifting,
   then what's left here? Not much.

 Notmuch is still in the early stages of development, but it does
-include one user interface, (implemented within emacs), which has at
+include one user interface, (implemented within Emacs), which has at
 least two users using it for reading all of their incoming mail. If
 you've been looking for a fast, global-search and tag-based email
-reader to use within emacs, then Notmuch may be exactly what you've
+reader to use within Emacs, then Notmuch may be exactly what you've
 been looking for.

 Otherwise, if you're a developer of an existing email program and
@@ -79,32 +86,59 @@ would love a good library interface for fast, global search 
with
 support for arbitrary tags, then Notmuch also may be exactly what
 you've been looking for.

+%packagedevel
+Summary:Development files for %{name}
+Group:  Development/Libraries
+Requires:   %{name} = %{version}-%{release}
+
+%descriptiondevel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
 %prep
-%setup -q -n notmuch
+%setup -q

 %build
+./configure --prefix=/usr --libdir=%{_libdir} --sysconfdir=%{_sysconfdir}
 make %{?_smp_mflags} CFLAGS="%{optflags}"
-emacs -batch -f batch-byte-compile notmuch.el
+emacs -batch -f batch-byte-compile emacs/*.el

 %install
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot} prefix=%{_prefix}
-mkdir -p %{buildroot}%{emacs_startdir}
-install -m0644 -p notmuch.el* %{buildroot}%{emacs_startdir}
+mv %{buildroot}%{_sysconfdir}/bash_completion.d 
%{buildroot}%{_datarootdir}/bash_completion

 %clean
 rm -rf %{buildroot}

+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING COPYING-GPL-3 INSTALL README TODO

-%{_sysconfdir}/bash_completion.d/notmuch
 %{_bindir}/notmuch
+%{_libdir}/libnotmuch.so.*
 %{_mandir}/man1/notmuch.1*
-%{emacs_startdir}/notmuch.el*
+
+%{_emacs_sitelispdir}/*
+
+%{_datarootdir}/zsh/functions/Completion/Unix/notmuch
+%{_datarootdir}/bash_completion/notmuch
+
+%files devel
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING COPYING-GPL-3 INSTALL README TODO
+%{_includedir}/*
+%{_libdir}/*.so
+

 %changelog
+* Tue Nov  2 2010 Scott Henson  - 0.4-1
+- New upstream release
+
 * Wed Nov 18 2009 Jeffrey C. Ollie  - 0.0-0.3.306635c2
 - First version

-- 
1.7.2.3



[PATCH] Update of the spec file to the 0.4 release.

2010-11-11 Thread Scott Henson
This is the spec file I used to build a Fedora package.  It has some
comments that would allow a build of git.  Sorry for the delay, I've
been at LISA and been a little bit more busy than I thought.



Printing mail

2010-11-11 Thread Sebastian Spaeth
On Thu, 11 Nov 2010 12:57:05 +, David Edmondson  wrote:
> How about something like the attached?

Still untested, but hurray, yes please! :) \o/

Sebastian
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/72b76173/attachment.pgp>


Maildir-flags synchronization now on master branch

2010-11-11 Thread Carl Worth
On Thu, 11 Nov 2010 15:11:23 +0100, Kristoffer Str?m  wrote:
> >   1. Don't do maildir-flag things in non-maildir directories
...
> I'm just pinging that the small feedreader sluk i'm writing/maintaining 
> relies on filenames not changing. 
> So if anyone's using it be careful, and #1 would be a tad more important then.

Hi Kristoffer,

I really like the idea of sluk, and I don't want to make it painful to
use. So that's for pointing out this problem.

I've now pushed a change that will avoid doing any renaming except in
directories named either "new" or "cur".

That's not the strongest heuristic for detecting maildir, (we could
actually look and see if all three of "cur", "new", and "tmp"
directories exist, for example). But it's at least a very cheap
heuristic. So hopefully this will help for your use case.

And obviously, one can still configure the maildir synchronization off
(globally) if desired.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/00b143fd/attachment.pgp>


Printing mail

2010-11-11 Thread David Edmondson
On Tue, 09 Nov 2010 23:43:53 -0800, Keith Packard  wrote:
> On Wed, 10 Nov 2010 08:32:01 +0100, Sebastian Spaeth  SSpaeth.de> wrote:
> 
> > which gives me nice menu entries for previewing my printouts (defaults
> > to 'gv' but can easily be set to use 'evince') and which provides the
> > M-x pr-ps-buffer-preview command to invoke the print preview directly
> > (unfortunately it still asks about the n-up scaling of pages).
> 
> Oh, but that doesn't print a message, it prints a buffer which may contain
> other stuff, and may have some elided lines.

Which is swings and roundabouts, especially if the message in question
has multiple parts - muttprint produces mostly horrid output for
something with both text/plain and text/html parts.

How about something like the attached?
-- next part --
A non-text attachment was scrubbed...
Name: 0001-emacs-Improved-printing-support.patch
Type: text/x-diff
Size: 5640 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/d644a466/attachment.patch>
-- next part --

dme.
-- 
David Edmondson, http://dme.org


[PATCH v4 0/4] Maildir synchronization

2010-11-11 Thread Carl Worth
On Thu, 11 Nov 2010 16:51:28 +0100, Michal Sojka  wrote:
> Does this mean, that if I want to remove the replied tag (for example) I
> can still do it by manipulating flags, i.e. I would remove the R flag
> from all messages with the coreposnding Message-ID? Or does it mean that
> the only way is to remove the replied tag in notmuch? I'd prefer the
> first.

It is the former, yes. See, for example the following test in the test
suite:

"Removing 'S' flag from existing filename adds 'unread' tag"

Also, here is the latest documentation of
notmuch_message_maildir_flags_to_tags. If this could be made more clear,
please let me know:

/* Add/remove tags according to maildir flags in the message filename(s)
 *
 * This function examines the filenames of 'message' for maildir
 * flags, and adds or removes tags on 'message' as follows when these
 * flags are present:
 *
 *  FlagAction if present
 *  -
 *  'D' Adds the "draft" tag to the message
 *  'F' Adds the "flagged" tag to the message
 *  'P' Adds the "passed" tag to the message
 *  'R' Adds the "replied" tag to the message
 *  'S' Removes the "unread" tag from the message
 *
 * For each flag that is not present, the opposite action (add/remove)
 * is performed for the corresponding tags.
 *
 * Flags are identified as trailing components of the filename after a
 * sequence of ":2,".
 *
 * If there are multiple filenames associated with this message, the
 * flag is considered present if it appears in one or more
 * filenames. (That is, the flags from the multiple filenames are
 * combined with the logical OR operator.)
 *
 * A client can ensure that notmuch database tags remain synchronized
 * with maildir flags by calling this function after each call to
 * notmuch_database_add_message. See also
 * notmuch_message_tags_to_maildir_flags for synchronizing tag changes
 * back to maildir flags.
 */

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/2010/7feaa329/attachment.pgp>


Support for multiple filenames (in notmuch library)

2010-11-11 Thread Carl Worth
As part of my recent work to fix up the maildir-flags synchronization
patches, I found myself needing to access the complete list of filenames
for a given message. So I added the following, new public function to
libnotmuch:

notmuch_filenames_t *
notmuch_message_get_filenames (notmuch_message_t *message);

This of course, works with the existing notmuch_filenames_valid,
notmuch_filenames_move_to_next, and notmuch_filenames_get functions to
allow iteration over all filenames for a message.

I know some people have been wanting support like this for some time.

Others want similar support in the command-line tools, (to show
duplicate files rather than suppressing them). This would be fairly easy
to add now. Does anyone have recommendations for suitable command-line
arguments?

notmuch search --with-duplicates

Or something else??

Anyway, have fun with this.

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20101111/fda1949a/attachment.pgp>


Maildir-flags synchronization now on master branch

2010-11-11 Thread Carl Worth
Thanks to work by Michal, and a few followups by me, I'm now happy to
report that the patches for synchronizing tags with maildir flags are
now pushed out to the master branch.

I've done a fair bit of testing with this stuff, and I think it's ready
to be used. In fact, I've now got the synchronization turned on by
default.

Please, anyone that cares to test it, let me know how it goes.

There were two things I had wanted to do before pushing this out, but
I've decided to get some sleep now instead:

  1. Don't do maildir-flag things in non-maildir directories

  2. Preserve any unsupported flags when renaming

Of these, number 1 is likely less important. If someone is very
concerned about avoiding the maildir-style renaming then they can simply
configure maildir.synchronize_flags to false.

But this second feature is essential, I think. People may have valuable
information encoded in their mail store as maildir flags, and it's not
right of notmuch to destroy that, (particularly as notmuch has
previously treated the mailstore in an entirely read-only fashion).

So, be warned! If you do have precious information encoded as maildir
flags, (other than D,F,P,R, or S), then you'll want to avoid using the
latest notmuch or be sure to do:

notmuch config set maildir.synchronize_flags false

Meanwhile, as soon as we fix this one misfeature, I think I'd like to
push out what we've got now as notmuch 0.5, (perhaps with a few of the
very recent, tiny changes that have been proposed).

Thanks for the help, everyone!

-Carl

-- 
carl.d.worth at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://notmuchmail.org/pipermail/notmuch/attachments/20101111/2530bbf0/attachment-0001.pgp>


Re: Printing mail

2010-11-11 Thread David Edmondson
On Tue, 09 Nov 2010 23:43:53 -0800, Keith Packard kei...@keithp.com wrote:
 On Wed, 10 Nov 2010 08:32:01 +0100, Sebastian Spaeth sebast...@sspaeth.de 
 wrote:
 
  which gives me nice menu entries for previewing my printouts (defaults
  to 'gv' but can easily be set to use 'evince') and which provides the
  M-x pr-ps-buffer-preview command to invoke the print preview directly
  (unfortunately it still asks about the n-up scaling of pages).
 
 Oh, but that doesn't print a message, it prints a buffer which may contain
 other stuff, and may have some elided lines.

Which is swings and roundabouts, especially if the message in question
has multiple parts - muttprint produces mostly horrid output for
something with both text/plain and text/html parts.

How about something like the attached?
From 2fefbe83fd5d0abed4aa063f5d0d2a7b59873bd8 Mon Sep 17 00:00:00 2001
From: David Edmondson d...@dme.org
Date: Thu, 11 Nov 2010 12:33:19 +
Subject: [PATCH] emacs: Improved printing support.

---
 emacs/Makefile.local   |3 +-
 emacs/notmuch-print.el |   67 
 emacs/notmuch-show.el  |   38 +++
 3 files changed, 107 insertions(+), 1 deletions(-)
 create mode 100644 emacs/notmuch-print.el

diff --git a/emacs/Makefile.local b/emacs/Makefile.local
index c5280f1..df87427 100644
--- a/emacs/Makefile.local
+++ b/emacs/Makefile.local
@@ -13,7 +13,8 @@ emacs_sources := \
 	$(dir)/notmuch-maildir-fcc.el \
 	$(dir)/notmuch-message.el \
 	$(dir)/coolj.el \
-	$(dir)/notmuch-lkml.el
+	$(dir)/notmuch-lkml.el \
+	$(dir)/notmuch-print.el
 
 emacs_images := \
 	$(dir)/notmuch-logo.png
diff --git a/emacs/notmuch-print.el b/emacs/notmuch-print.el
new file mode 100644
index 000..2ad4b45
--- /dev/null
+++ b/emacs/notmuch-print.el
@@ -0,0 +1,67 @@
+;; notmuch-print.el --- printing messages from notmuch.
+;;
+;; Copyright © David Edmondson
+;;
+;; This file is part of Notmuch.
+;;
+;; Notmuch is free software: you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; Notmuch is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with Notmuch.  If not, see http://www.gnu.org/licenses/.
+;;
+;; Authors: David Edmondson d...@dme.org
+
+(defcustom notmuch-print-mechanism 'lpr
+  How should printing be done?
+  :group 'notmuch
+  :type '(choice
+	  (const :tag Use lpr lpr)
+	  (const :tag Use ps-print ps-print)
+	  (const :tag Use muttprint muttprint)
+	  (function :tag Using a custom function)))
+
+(defvar notmuch-print-mechanism-map
+  '((lpr . notmuch-print-lpr)
+(ps-print . notmuch-print-ps-print)
+(muttprint . notmuch-print-muttprint)))
+
+(defmacro notmuch-print-with-file (filename rest body)
+  `(with-temp-buffer
+ (insert-file-contents ,filename)
+ (setq buffer-modified-p nil)
+ ,@body))
+
+(defun notmuch-print-lpr (filename)
+  (notmuch-print-with-file filename
+			   (lpr-buffer)))
+
+(defun notmuch-print-ps-print (filename)
+  (notmuch-print-with-file filename
+			   (ps-print-buffer)))
+
+(defun notmuch-print-muttprint (filename)
+  (shell-command
+   (concat cat  (shell-quote-argument filename)  | muttprint)))
+
+(defun notmuch-print-message (filename)
+  (let ((fn
+	 (cond
+	  ((functionp 'notmuch-print-mechanism)
+	   'notmuch-print-mechanism)
+	  ((assoc notmuch-print-mechanism notmuch-print-mechanism-map)
+	   (cdr (assoc notmuch-print-mechanism notmuch-print-mechanism-map)))
+	  (t
+	   (error No printing mechanism found)
+(funcall fn filename)))
+
+;;
+
+(provide 'notmuch-print)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 5efdf84..3680faf 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -32,6 +32,7 @@
 (require 'notmuch-query)
 (require 'notmuch-wash)
 (require 'notmuch-mua)
+(require 'notmuch-print)
 
 (declare-function notmuch-call-notmuch-process notmuch (rest args))
 (declare-function notmuch-fontify-headers notmuch nil)
@@ -174,6 +175,38 @@ Set `notmuch-show-address-simplication' to:
   mm-handle ( (notmuch-count-attachments mm-handle) 1
   (message Done))
 
+(defun notmuch-show-with-message-as-text (fn)
+  Apply function `fn' to a text representation of the current
+message.
+  (let* ((from (notmuch-show-clean-address
+		(mail-header-parse-address (notmuch-show-get-from
+	 (subject (notmuch-show-get-subject))
+	 (date (notmuch-show-get-date))
+	 (header (concat
+		  Tags:  (mapconcat '(lambda (tag) tag)
+  (notmuch-show-get-tags) , )
+		  \n
+		  From:  from \n
+		  Date:  date \n))
+	 (body (save-excursion
+		 (goto-char 

Maildir-flags synchronization now on master branch

2010-11-11 Thread Carl Worth
Thanks to work by Michal, and a few followups by me, I'm now happy to
report that the patches for synchronizing tags with maildir flags are
now pushed out to the master branch.

I've done a fair bit of testing with this stuff, and I think it's ready
to be used. In fact, I've now got the synchronization turned on by
default.

Please, anyone that cares to test it, let me know how it goes.

There were two things I had wanted to do before pushing this out, but
I've decided to get some sleep now instead:

  1. Don't do maildir-flag things in non-maildir directories

  2. Preserve any unsupported flags when renaming

Of these, number 1 is likely less important. If someone is very
concerned about avoiding the maildir-style renaming then they can simply
configure maildir.synchronize_flags to false.

But this second feature is essential, I think. People may have valuable
information encoded in their mail store as maildir flags, and it's not
right of notmuch to destroy that, (particularly as notmuch has
previously treated the mailstore in an entirely read-only fashion).

So, be warned! If you do have precious information encoded as maildir
flags, (other than D,F,P,R, or S), then you'll want to avoid using the
latest notmuch or be sure to do:

notmuch config set maildir.synchronize_flags false

Meanwhile, as soon as we fix this one misfeature, I think I'd like to
push out what we've got now as notmuch 0.5, (perhaps with a few of the
very recent, tiny changes that have been proposed).

Thanks for the help, everyone!

-Carl

-- 
carl.d.wo...@intel.com


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


Support for multiple filenames (in notmuch library)

2010-11-11 Thread Carl Worth
As part of my recent work to fix up the maildir-flags synchronization
patches, I found myself needing to access the complete list of filenames
for a given message. So I added the following, new public function to
libnotmuch:

notmuch_filenames_t *
notmuch_message_get_filenames (notmuch_message_t *message);

This of course, works with the existing notmuch_filenames_valid,
notmuch_filenames_move_to_next, and notmuch_filenames_get functions to
allow iteration over all filenames for a message.

I know some people have been wanting support like this for some time.

Others want similar support in the command-line tools, (to show
duplicate files rather than suppressing them). This would be fairly easy
to add now. Does anyone have recommendations for suitable command-line
arguments?

notmuch search --with-duplicates

Or something else??

Anyway, have fun with this.

-Carl

-- 
carl.d.wo...@intel.com


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


Re: Printing mail

2010-11-11 Thread Sebastian Spaeth
On Thu, 11 Nov 2010 12:57:05 +, David Edmondson d...@dme.org wrote:
 How about something like the attached?

Still untested, but hurray, yes please! :) \o/

Sebastian


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


Re: Maildir-flags synchronization now on master branch

2010-11-11 Thread Kristoffer Ström
 
   1. Don't do maildir-flag things in non-maildir directories
 
   2. Preserve any unsupported flags when renaming
 
 Of these, number 1 is likely less important. If someone is very
 concerned about avoiding the maildir-style renaming then they can simply
 configure maildir.synchronize_flags to false.

I'm just pinging that the small feedreader sluk i'm writing/maintaining relies 
on filenames not changing. 
So if anyone's using it be careful, and #1 would be a tad more important then.

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


Re: Maildir-flags synchronization now on master branch

2010-11-11 Thread Carl Worth
On Thu, 11 Nov 2010 15:11:23 +0100, Kristoffer Ström kristof...@rymdkoloni.se 
wrote:
1. Don't do maildir-flag things in non-maildir directories
...
 I'm just pinging that the small feedreader sluk i'm writing/maintaining 
 relies on filenames not changing. 
 So if anyone's using it be careful, and #1 would be a tad more important then.

Hi Kristoffer,

I really like the idea of sluk, and I don't want to make it painful to
use. So that's for pointing out this problem.

I've now pushed a change that will avoid doing any renaming except in
directories named either new or cur.

That's not the strongest heuristic for detecting maildir, (we could
actually look and see if all three of cur, new, and tmp
directories exist, for example). But it's at least a very cheap
heuristic. So hopefully this will help for your use case.

And obviously, one can still configure the maildir synchronization off
(globally) if desired.

-Carl

-- 
carl.d.wo...@intel.com


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


[PATCH] Update of the spec file to the 0.4 release.

2010-11-11 Thread Scott Henson
This is the spec file I used to build a Fedora package.  It has some
comments that would allow a build of git.  Sorry for the delay, I've
been at LISA and been a little bit more busy than I thought.

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


[PATCH] Update of the spec file to the 0.4 release.

2010-11-11 Thread Scott Henson
---
 packaging/fedora/notmuch.spec |   74 ++---
 1 files changed, 54 insertions(+), 20 deletions(-)

diff --git a/packaging/fedora/notmuch.spec b/packaging/fedora/notmuch.spec
index cca3a1b..ef1af2e 100644
--- a/packaging/fedora/notmuch.spec
+++ b/packaging/fedora/notmuch.spec
@@ -1,4 +1,5 @@
-%global git 306635c2
+%global git 6b9a717c
+%global date %(date +%Y%m%d)
 
 %if %($(pkg-config emacs) ; echo $?)
 %global emacs_version 23.1
@@ -10,23 +11,29 @@
 %global emacs_startdir %(pkg-config emacs --variable sitestartdir)
 %endif
 
+# If you are doing a git snapshot:
+#
+# Release should be 1%{git}%{?dist}
+# Source0 should be notmuch-%{version}-%{git}.tar.gz
+# git version is generated by 'git show-ref --hash=8 HEAD'
+#
+# To create a tarball:
+#
+# git clone git://notmuchmail.org/git/notmuch
+# cd notmuch
+# git archive --format=tar --prefix=notmuch-0.4/ HEAD | gzip  
notmuch-0.4-`git show-ref --hash=8 HEAD`.tar.gz
+#
+
 Name:   notmuch
-Version:0.0
-Release:0.3.%{git}%{?dist}
+Version:0.4
+Release:1%{?dist}
 Summary:Not much of an email program
 
 Group:  Applications/Internet
 License:GPLv3+
 URL:http://notmuchmail.org/
 
-#
-# To create a tarball:
-#
-# git clone git://notmuchmail.org/git/notmuch
-# cd notmuch
-# git archive --format=tar --prefix=notmuch/ HEAD | bzip2  notmuch-`git 
show-ref --hash=8 HEAD`.tar.bz2
-#
-Source0:notmuch-%{git}.tar.bz2
+Source0:http://notmuchmail.org/releases/notmuch-%{version}.tar.gz
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  xapian-core-devel
@@ -61,17 +68,17 @@ Requires:   emacs(bin) = %{emacs_version}
   can be integrated into any email program.)
 
 * Notmuch is not much of an email program. It doesn't receive messages
-  (no POP or IMAP suport). It doesn't send messages (no mail composer,
+  (no POP or IMAP support). It doesn't send messages (no mail composer,
   no network code at all). And for what it does do (email search) that
   work is provided by an external library, Xapian. So if Notmuch
   provides no user interface and Xapian does all the heavy lifting,
   then what's left here? Not much.
 
 Notmuch is still in the early stages of development, but it does
-include one user interface, (implemented within emacs), which has at
+include one user interface, (implemented within Emacs), which has at
 least two users using it for reading all of their incoming mail. If
 you've been looking for a fast, global-search and tag-based email
-reader to use within emacs, then Notmuch may be exactly what you've
+reader to use within Emacs, then Notmuch may be exactly what you've
 been looking for.
 
 Otherwise, if you're a developer of an existing email program and
@@ -79,32 +86,59 @@ would love a good library interface for fast, global search 
with
 support for arbitrary tags, then Notmuch also may be exactly what
 you've been looking for.
 
+%packagedevel
+Summary:Development files for %{name}
+Group:  Development/Libraries
+Requires:   %{name} = %{version}-%{release}
+
+%descriptiondevel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
 %prep
-%setup -q -n notmuch
+%setup -q
 
 %build
+./configure --prefix=/usr --libdir=%{_libdir} --sysconfdir=%{_sysconfdir}
 make %{?_smp_mflags} CFLAGS=%{optflags}
-emacs -batch -f batch-byte-compile notmuch.el
+emacs -batch -f batch-byte-compile emacs/*.el
 
 %install
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot} prefix=%{_prefix}
-mkdir -p %{buildroot}%{emacs_startdir}
-install -m0644 -p notmuch.el* %{buildroot}%{emacs_startdir}
+mv %{buildroot}%{_sysconfdir}/bash_completion.d 
%{buildroot}%{_datarootdir}/bash_completion
 
 %clean
 rm -rf %{buildroot}
 
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING COPYING-GPL-3 INSTALL README TODO
 
-%{_sysconfdir}/bash_completion.d/notmuch
 %{_bindir}/notmuch
+%{_libdir}/libnotmuch.so.*
 %{_mandir}/man1/notmuch.1*
-%{emacs_startdir}/notmuch.el*
+
+%{_emacs_sitelispdir}/*
+
+%{_datarootdir}/zsh/functions/Completion/Unix/notmuch
+%{_datarootdir}/bash_completion/notmuch
+
+%files devel
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING COPYING-GPL-3 INSTALL README TODO
+%{_includedir}/*
+%{_libdir}/*.so
+
 
 %changelog
+* Tue Nov  2 2010 Scott Henson shen...@redhat.com - 0.4-1
+- New upstream release
+
 * Wed Nov 18 2009 Jeffrey C. Ollie j...@ocjtech.us - 0.0-0.3.306635c2
 - First version
 
-- 
1.7.2.3

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


Re: Maildir-flags synchronization now on master branch

2010-11-11 Thread Carl Worth
On Thu, 11 Nov 2010 05:04:48 -0800, Carl Worth cwo...@cworth.org wrote:
 There were two things I had wanted to do before pushing this out, but
 I've decided to get some sleep now instead:
 
   1. Don't do maildir-flag things in non-maildir directories
 
   2. Preserve any unsupported flags when renaming

After some good sleep, both of these features seemed much easier to
implement. These are both pushed now.

And I've now done a much more thorough audit of all of the
implementation, (adapting things to my preferred coding style, adding
comments, fixing up little corner cases, etc.). So I'm quite comfortable
with all of this now. I think 0.5 will be imminent.

Now that all of this maildir-flag synchronization is possible, I wonder
if we shouldn't allow the user to configure the mapping of maildir-flag
characters to tag names. That would allow for (a limited number of) tags
to be synchronized on multiple machines using synchronization mechanisms
such as offlineimap without needing any notmuch-aware synchronization.

So that might be very interesting.

-Carl

-- 
carl.d.wo...@intel.com


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


Re: [PATCH] emacs: Correctly count the number of lines in a signature.

2010-11-11 Thread Carl Worth
On Tue,  9 Nov 2010 18:15:31 +, David Edmondson d...@dme.org wrote:
 -  (sig-lines (1- (count-lines sig-start (point-max)
 +  (sig-lines (count-lines sig-start (point-max

Thanks. This is pushed.

-Carl

-- 
carl.d.wo...@intel.com


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


Re: [PATCH] emacs: Show cleaner addresses during message display.

2010-11-11 Thread Carl Worth
On Wed, 10 Nov 2010 09:23:07 +, David Edmondson d...@dme.org wrote:
 Simplify the display of addresses by setting
 `notmuch-show-address-simplication' to:
 
 - 'full: Only the name component of the address, if present, is
   shown (the default),
 - 'partial: Addresses are stripped of redundant information,
 - 'none: Addresses are shown as-is.

Now that we've got emacs-based testing, this change needs to update the
test suite as well.

Personally, I like to see email addresses, and I think that's a sane
default, so I'd actually prefer 'partial as the default setting here.

I tried changing that and hoped that that would let me not even update
the test suite. But then I found that comapred to the current state,
adding this patch actually adds unnecessary double-quotation marks
around user's names. That's annoying.

Can we get that cleaned up?

Meanwhile, I just pushed your three patches for cleaning up the display
of subjects[*]. So, thanks!

-Carl

[*] None of these needed test-suite changes, which actually just points
out holes in our test suite here.

-- 
carl.d.wo...@intel.com


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


Re: [PATCH] emacs: Improve the definition and use of `notmuch-fcc-dirs'.

2010-11-11 Thread Carl Worth
On Mon,  8 Nov 2010 15:01:25 +, David Edmondson d...@dme.org wrote:
 Re-work the declaration and definition of `notmuch-fcc-dirs'. The
 variable now allows three types of values:

Thanks. This is pushed now.

 ---
 
 Fix runtime cl use.

Hopefully I stalled long enough to get the latest version of this
one. ;-)

-Carl

-- 
carl.d.wo...@intel.com


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


Re: notmuchsync: handling of the deleted tag

2010-11-11 Thread Carl Worth
On Mon, 20 Sep 2010 21:25:13 -0500, Rob Browning r...@defaultvalue.org wrote:
 Sebastian Spaeth sebast...@sspaeth.de writes:
 Conceptually what I'd like for it to do, is reference count -- only mark
 the message deleted if every occurrence (across all maildirs) is marked
 trashed (T).

[I'm going back through this old notmuchsync thread after having worked
to merge and improve some related synchronization featured.]

The above idea sounds quite interesting and would be possible in the
current approach. The only thing I don't like is that we would have some
very detailed knowledge about the semantics of deleted hard-coded deep
in the library.

I already don't like the fact that the library has a hard-coded list
with a handful of mappings between flags and tags.

So, what we probably need here is for the user to be able to configure
the mapping and in a fairly sophisticated way:

'R' on _any_ filename  - replied tag gets added
'T' on _all_ filenames - deleted tag gets added
'S' on _any_ filename  - unread tag gets removed

That would be expressible with just a couple of pieces of punctuation:

R=replied;T*=deleted;S=~unread

So maybe something like that?

  If notmuch gave me at least all filenames that are associated with a
  mail id, I could introduce a command line option --prune --safe
  which would

This feature is at least implemented in libnotmuch at least.

Hopefully things just keep getting better and better.

I am looking forward to some feedback from users of notmuchsync who try
out the new maildir.synchronize_flags support in notmuch itself.

-Carl

-- 
carl.d.wo...@intel.com


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


Re: [PATCH 2/2] emacs: add stash thread-id function to notmuch-search mode

2010-11-11 Thread Carl Worth
On Sat, 18 Sep 2010 15:48:22 -0400, Jameson Rollins 
jroll...@finestructure.net wrote:
 This add a stash-map for search-mode, just like in show-mode, and
 adds one function, bound to i to stash the thread-id of the current
 selected thread.
 
 Couldn't think of the correct way to stash other thread info, so I
 didn't add any other stash functions for now.

Excellent. I've wanted this functionality for a while now. Hopefully I
can keep up better with patches on the list in the future so I don't
have to delay my gratification so much.

This is pushed now.

-Carl

-- 
carl.d.wo...@intel.com


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


notmuch release 0.5 now available

2010-11-11 Thread Carl Worth
So, I said I was being foolhardy when I said I wanted to have 0.5 come
just a week after 0.4. And, indeed, we missed that. But considering this
release is only 10 days after 0.4, (where it was 6 months(!) after 0.3),
I think we did pretty well.

The major feature in notmuch 0.5 is the ability to automatically
synchronize maildir flags, (so that if a mail file gets marked
externally with the flag 'S' for seen then the unread tag in the
notmuch database will be automatically removed). And of course, there
are various fixes and improvements throughout. See below for details.

And we'll see what another week will bring.

Many thanks to those who contributed code to this release, (Ali Polatel,
Carl Worth, David Edmondson, Felipe Contreras, Jameson Rollins,
Michal Sojka, and Scott Henson), and to the many more that contributed
with ideas, testing and feedback.

-Carl

Where to obtain notmuch 0.5
===
  http://notmuchmail.org/releases/notmuch-0.5.tar.gz

Which can be verified with:

  http://notmuchmail.org/releases/notmuch-0.5.tar.gz.sha1
  8a02dba668abdae783b94d11de01a27f9dcd6085  notmuch-0.5.tar.gz

  http://notmuchmail.org/releases/notmuch-0.5.tar.gz.sha1.asc
  (signed by Carl Worth)

What's new in notmuch 0.5
=
New, general features
-
Maildir-flag synchronization

  Notmuch now knows how to synchronize flags in maildir filenames with
  tags in the notmuch database. The following flag/tag mappings are
  supported:

Flag - Tag
 -
'D'  draft
'F'  flagged
'P'  passed
'R'  replied
'S'  unread (added when 'S' flag is not present)

  The synchronization occurs in both directions, (for example, adding
  the 'S' flag to a file will cause the unread tag to be added, and
  adding the replied tag to a message will cause the file to be
  renamed with an 'R' flag).

  This synchronization is enabled by default for users of the
  command-line interface, (though only files in directories named
  cur or new will be renamed). It can be disabled by setting the
  new maildir.synchronize_flags option in the configuration file. For
  example:

notmuch config set maildir.synchronize_flags false

  Users upgrading may also want to run notmuch setup once (just
  accept the existing configuration) to get a new, nicely-commented
  [maildir] section added to the configuration file.

  For users of the notmuch library, the new synchronization
  functionality is available with the following two new functions:

notmuch_message_maildir_flags_to_tags
notmuch_message_tags_to_maildir_flags

  It is anticipated that future improvements to this support will
  allow for safe synchronization of the 'T' flag with the deleted
  tag, as well as support for custom flag/tag mappings.

New library features

Support for querying multiple filenames for a single message

  It is common for the mailstore to contain multiple files with the
  same message ID. Previously, notmuch would always hide these
  duplicate files, (returning a single, arbitrary filename with
  notmuch_message_get_filename).

  With this release, library users can access all filenames for a
  message with the new function:

notmuch_message_get_filenames

  Together with notmuch_filenames_valid, notmuch_filenames_get, and
  notmuch_filenames_move_to_next it is now possible to iterate over
  all available filenames for a given message.

New command-line features
-
New notmuch show --format=raw for getting at original email contents

  This new feature allows for a fully-functional email client to be
  built on top of the notmuch command-line without needing any direct
  access to the mail store itself.

  For example, it's now possible to run emacs -f notmuch on a local
  machine with only ssh access to the mail store/notmuch database. To
  do this, simply set the notmuch-command variable in emacs to the
  name of a script containing:

ssh u...@host notmuch $@

  If the ssh client has enabled connection sharing (ControlMaster
  option in OpenSSH), the emacs interface can be quite responsive this
  way.

General bug fixes
-
Fix notmuch search to print nothing when nothing matches

  The 0.4 release had a bug in which:

notmuch search expression-with-no-matches

  would produce a single blank line of output, (where previous
  versions would produce no output. This fix also causes a change in
  the --format=json output, (which would previously produce [] and
  now produces nothing).

Emacs interface improvements

Fix to allow pipe ('|') command to work when using notmuch over ssh

Fix count of lines in hidden signatures.

Omit repeated subject lines in (collapsed) thread display.

Display current thread subject in a header line.

Provide a c i binding to copy a thread ID from the search view.

Allow for 

Re: notmuchsync: handling of the deleted tag

2010-11-11 Thread Sebastian Spaeth
On Thu, 11 Nov 2010 17:27:34 -0800, Carl Worth cwo...@cworth.org wrote:
 So, what we probably need here is for the user to be able to configure
 the mapping and in a fairly sophisticated way:
 
   'R' on _any_ filename  - replied tag gets added
   'T' on _all_ filenames - deleted tag gets added
   'S' on _any_ filename  - unread tag gets removed
 So maybe something like that?

Maybe, but that sounds like a horribly complex configuration, in which
the user has to really think through what he wants (and can still make
blunders). :)
 
   If notmuch gave me at least all filenames that are associated with a
   mail id, I could introduce a command line option --prune --safe
   which would

Right, you pushed the ball in my court. The only problem is that -- with
the arrival of maildir sync -- I lost my motivation to work on
notmuchsync. Seriously, what does notmuchsync still provide that notmuch
cannot do? I wonder if I shouldn't stick a deprecated warning on it.

Sebastian


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