[PATCH RFC?] Compactification support

2012-08-21 Thread Tomi Ollila
On Tue, Aug 21 2012, Ben Gamari  wrote:

> Jani Nikula  writes:
>
>> On Mon, 20 Aug 2012, Ben Gamari  wrote:
>>> Here is a small patchset adding support for database compaction when
>>> supported by Xapian. Here I add a function which both compacts and
>>> closes the database.
>>
>> What are the benefits of this compared to xapian-compact [1]?
>>
> I think it's a bit of a shame you are currently forced to interact with
> Xapian directly (an implementation detail) to compact the database. This
> set seeks to abstract this out. This is especially important since it's
> not too difficult to get the invocation of xapian-compact wrong
> (e.g. forget --no-renumber).

Better reason would be that xapian-compact(1) may not be available although
the library is -- if the command is available it is easy to execve(2) it
with correct arguments... (?)

Tomi

> Also, in the past Carl (id:"87ocl1lut1.fsf at yoom.home.cworth.org") has
> mentioned it would be nice if compact would be run after the initial run
> of "notmuch new". This patchset sets the groundwork to enable this.
>
> Cheers,
>
> - Ben


[PATCH] notmuch-show: add notmuch-show-mark-read-tags option

2012-08-21 Thread Michal Nazarewicz
From: Michal Nazarewicz 

The `notmuch-show-mark-read-tags' lists tags that are to be applied when
message is read.  By default, the only value is "-unread" which will remove
the unread tag.  Among other uses, this variable can be used to stop
notmuch-show from modifying tags when message is shown (by setting the
variable to an empty list).
---

 I've sent this patch a while back but I think it got lost somehow so
 resending.

 emacs/notmuch-show.el |   12 ++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 82b5399..c9fd867 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -183,6 +183,13 @@ provided with an MLA argument nor `completing-read' input."
 notmuch-show-stash-mlarchive-link-alist))
   :group 'notmuch-show)

+(defcustom notmuch-show-mark-read-tags '("-unread")
+  "List of tags to apply when message is read, ie. shown in notmuch-show
+buffer."
+  :type '(repeat string)
+  :group 'notmuch-show)
+
+
 (defmacro with-current-notmuch-show-message ( body)
   "Evaluate body with current buffer set to the text of current message"
   `(save-excursion
@@ -1383,8 +1390,9 @@ current thread."
   (notmuch-show-get-prop :headers-visible))

 (defun notmuch-show-mark-read ()
-  "Mark the current message as read."
-  (notmuch-show-tag-message "-unread"))
+  "Apply `notmuch-show-mark-read-tags' to the message."
+  (when notmuch-show-mark-read-tags
+(apply 'notmuch-show-tag-message notmuch-show-mark-read-tags)))

 ;; Functions for getting attributes of several messages in the current
 ;; thread.
-- 
1.7.7.3



notmuch release 0.14 now available

2012-08-21 Thread David Bremner

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

Which can be verified with:

  http://notmuchmail.org/releases/notmuch-0.14.tar.gz.sha1
  ad1ef9c2d29cfb0faab7837968d11325dee404bd  notmuch-0.14.tar.gz

  http://notmuchmail.org/releases/notmuch-0.14.tar.gz.sha1.asc
  (signed by David Bremner)

What's new in notmuch 0.14
=

General bug fixes
-

Maildir tag synchronization

  Maildir flag-to-tag synchronization now applies only to messages in
  maildir-like directory structures.  Previously, it applied to any
  message that had a maildir "info" part, which meant it could
  incorrectly synchronize tags for non-maildir messages, while at the
  same time failing to synchronize tags for newly received maildir
  messages (typically causing new messages to not receive the "unread"
  tag).

Command-Line Interface
--

  The deprecated positional output file argument to `notmuch dump` has
  been replaced with an `--output` option. The input file positional
  argument to `notmuch restore` has been replaced with an `--input`
  option for consistency with dump.  These changes simplify the syntax
  of dump/restore options and make them more consistent with other
  notmuch commands.

Emacs Interface
---

Search results now get re-colored when tags are updated

The formatting of tags in search results can now be customized

  Previously, attempting to change the format of tags in
  `notmuch-search-result-format` would usually break tagging from
  search-mode.  We no longer make assumptions about the format.

Experimental support for multi-line search result formats

  It is now possible to embed newlines in
  `notmuch-search-result-format` to make individual search results
  span multiple lines.

Next/previous in search and show now move by boundaries

  All "next" and "previous" commands in the search and show modes now
  move to the next/previous result or message boundary.  This doesn't
  change the behavior of "next", but "previous" commands will first
  move to the beginning of the current result or message if point is
  inside the result or message.

Search now uses the JSON format internally

  This should address problems with unusual characters in authors and
  subject lines that could confuse the old text-based search parser.

The date shown in search results is no longer padded before applying
user-specified formatting

  Previously, the date in the search results was padded to fixed width
  before being formatted with `notmuch-search-result-format`.  It is
  no longer padded.  The default format has been updated, but if
  you've customized this variable, you may have to change your date
  format from `"%s "` to `"%12s "`.

The thread-id for the `target-thread` argument for `notmuch-search` should
now be supplied without the "thread:" prefix.

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

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


[PATCH 1/3] Add notmuch_database_close_compact

2012-08-21 Thread Ben Gamari
Tomi Ollila  writes:

> On Mon, Aug 20 2012, Ben Gamari  wrote:
>
>> ---
>>  configure   |   25 -
>>  lib/database.cc |   54 
>> ++
>>  lib/notmuch.h   |   14 ++
>>  3 files changed, 92 insertions(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index dc0dba4..370fedd 100755
>> --- a/configure
>> +++ b/configure
>> @@ -270,7 +270,8 @@ printf "Checking for Xapian development files... "
>>  have_xapian=0
>>  for xapian_config in ${XAPIAN_CONFIG}; do
>>  if ${xapian_config} --version > /dev/null 2>&1; then
>> -printf "Yes (%s).\n" $(${xapian_config} --version | sed -e 's/.* //')
>> +xapian_version=$(${xapian_config} --version | sed -e 's/.* //')
>> +printf "Yes (%s).\n" ${xapian_version}
>>  have_xapian=1
>>  xapian_cxxflags=$(${xapian_config} --cxxflags)
>>  xapian_ldflags=$(${xapian_config} --libs)
>> @@ -282,6 +283,24 @@ if [ ${have_xapian} = "0" ]; then
>>  errors=$((errors + 1))
>>  fi
>>  
>> +have_xapian_compact=0
>> +if [ ${have_xapian} = "1" ]; then
>> +printf "Checking for Xapian compact support... "
>> +IFS='.'
>> +old_args=$@
>> +set -- ${xapian_version}
>> +xapian_major_version=$1
>> +xapian_minor_version=$2
>> +xapian_subminor_version=$3
>> +set -- ${old_args}
>
> The part above breaks the argument vector in case there are spaces in 
> args (I though $IFS chars, but try the script), execute:
>
Hmmm, I suppose so.

> $ echo '#!/bin/bash
> IFS=.
> for x in "$@"; do echo $x; done; echo
> foo=$@
> for x in $foo; do echo $x; done; echo
> set -- $foo
> for x in "$@"; do echo $x; done; echo
> ' > foo.bash
>
> $ bash foo.bash a "b c" d
>
> Also, after processing, IFS is not restored (to $DEFAULT_IFS)
>
I assumed this would be alright since IFS is set in the next 

> an alternative is to put the code in function like the following
> way:
>
Sounds good to me.

> Hmm, I guess the check above is to determine whether xapian version is
> 1.2.6 or newer, but is there xapian version 1.1.6 or 1.0.6 or 0.3.0 or so ?
>
Eh? 1.2.6 is the first Xapian release to have Compactor exposed in the
public API.

> I am not qualified to comment about compaction itself :)
>
Nor am I really. I just noticed that this functionality was blocking on
library support which is now in place. It seemed that a pretty
straightforward thing to implement and it hasn't broken my index yet.

> In the last patch you give copyright to Carl (which is OK). However I'd
> debate whether it is good practise to declare Carl as author; I'd say that
> is OK if he agrees to claim authorship to your potentially shi^H^H^Hperfect
> code ;)
>
Yikes. That certainly wasn't intentional. I'll fix this in the next
iteration.

> There are at least a few style issues below: e.g. no space between function
> name and opening parenthesis.
>
Duly noted.

Thanks!

Cheers,

- Ben


[PATCH RFC?] Compactification support

2012-08-21 Thread Ben Gamari
Jani Nikula  writes:

> On Mon, 20 Aug 2012, Ben Gamari  wrote:
>> Here is a small patchset adding support for database compaction when
>> supported by Xapian. Here I add a function which both compacts and
>> closes the database.
>
> What are the benefits of this compared to xapian-compact [1]?
>
I think it's a bit of a shame you are currently forced to interact with
Xapian directly (an implementation detail) to compact the database. This
set seeks to abstract this out. This is especially important since it's
not too difficult to get the invocation of xapian-compact wrong
(e.g. forget --no-renumber).

Also, in the past Carl (id:"87ocl1lut1.fsf at yoom.home.cworth.org") has
mentioned it would be nice if compact would be run after the initial run
of "notmuch new". This patchset sets the groundwork to enable this.

Cheers,

- Ben



[PATCH 1/3] Add notmuch_database_close_compact

2012-08-21 Thread Tomi Ollila
On Mon, Aug 20 2012, Ben Gamari  wrote:

> ---
>  configure   |   25 -
>  lib/database.cc |   54 ++
>  lib/notmuch.h   |   14 ++
>  3 files changed, 92 insertions(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index dc0dba4..370fedd 100755
> --- a/configure
> +++ b/configure
> @@ -270,7 +270,8 @@ printf "Checking for Xapian development files... "
>  have_xapian=0
>  for xapian_config in ${XAPIAN_CONFIG}; do
>  if ${xapian_config} --version > /dev/null 2>&1; then
> - printf "Yes (%s).\n" $(${xapian_config} --version | sed -e 's/.* //')
> + xapian_version=$(${xapian_config} --version | sed -e 's/.* //')
> + printf "Yes (%s).\n" ${xapian_version}
>   have_xapian=1
>   xapian_cxxflags=$(${xapian_config} --cxxflags)
>   xapian_ldflags=$(${xapian_config} --libs)
> @@ -282,6 +283,24 @@ if [ ${have_xapian} = "0" ]; then
>  errors=$((errors + 1))
>  fi
>  
> +have_xapian_compact=0
> +if [ ${have_xapian} = "1" ]; then
> +printf "Checking for Xapian compact support... "
> +IFS='.'
> +old_args=$@
> +set -- ${xapian_version}
> +xapian_major_version=$1
> +xapian_minor_version=$2
> +xapian_subminor_version=$3
> +set -- ${old_args}

The part above breaks the argument vector in case there are spaces in 
args (I though $IFS chars, but try the script), execute:

$ echo '#!/bin/bash
IFS=.
for x in "$@"; do echo $x; done; echo
foo=$@
for x in $foo; do echo $x; done; echo
set -- $foo
for x in "$@"; do echo $x; done; echo
' > foo.bash

$ bash foo.bash a "b c" d

Also, after processing, IFS is not restored (to $DEFAULT_IFS)

an alternative is to put the code in function like the following
way:

set_xapian_version ()
{
xapian_major_version=$1
xapian_minor_version=$2
xapian_subminor_version=$3
}

have_xapian_compact=0
if [ ${have_xapian} = "1" ]; then
printf "Checking for Xapian compact support... "
IFS=.
set_xapian_version ${xapian_version}
IFS=$DEFAULT_IFS
if [ "${xapian_major_version}" -gt 1 ] || [ ${xapian_minor_version} -gt 2 ] 
|| [ ${xapian_subminor_version} -ge 6 ]; then
printf "Yes.\n"
have_xapian_compact=1
else
printf "No.\n"
fi
fi

Hmm, I guess the check above is to determine whether xapian version is
1.2.6 or newer, but is there xapian version 1.1.6 or 1.0.6 or 0.3.0 or so ?

I am not qualified to comment about compaction itself :)

In the last patch you give copyright to Carl (which is OK). However I'd
debate whether it is good practise to declare Carl as author; I'd say that
is OK if he agrees to claim authorship to your potentially shi^H^H^Hperfect
code ;)

There are at least a few style issues below: e.g. no space between function
name and opening parenthesis.

Tomi


> +if [ "${xapian_major_version}" -gt 1 ] || [ ${xapian_minor_version} -gt 
> 2 ] || [ ${xapian_subminor_version} -ge 6 ]; then
> + printf "Yes.\n"
> + have_xapian_compact=1
> +else
> + printf "No.\n"
> +fi
> +fi
> +
>  printf "Checking for GMime development files... "
>  have_gmime=0
>  IFS=';'
> @@ -675,6 +694,9 @@ LINKER_RESOLVES_LIBRARY_DEPENDENCIES = 
> ${linker_resolves_library_dependencies}
>  XAPIAN_CXXFLAGS = ${xapian_cxxflags}
>  XAPIAN_LDFLAGS = ${xapian_ldflags}
>  
> +# Whether compact is supported by this version of Xapian
> +HAVE_XAPIAN_COMPACT = ${have_xapian_compact}
> +
>  # Flags needed to compile and link against GMime-2.4
>  GMIME_CFLAGS = ${gmime_cflags}
>  GMIME_LDFLAGS = ${gmime_ldflags}
> @@ -711,6 +733,7 @@ CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) 
> \$(GMIME_CFLAGS)  \\
>  CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)\\
>\$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
>\$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS) \\
> + -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT)   \\
>   -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR)
>  CONFIGURE_LDFLAGS =  \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)
>  EOF
> diff --git a/lib/database.cc b/lib/database.cc
> index 761dc1a..6e83a61 100644
> --- a/lib/database.cc
> +++ b/lib/database.cc
> @@ -781,6 +781,60 @@ notmuch_database_close (notmuch_database_t *notmuch)
>  }
>  
>  void
> +notmuch_database_close_compact (notmuch_database_t *notmuch)
> +{
> +void *local = talloc_new (NULL);
> +Xapian::Compactor compactor;
> +char *notmuch_path, *xapian_path, *compact_xapian_path, *old_xapian_path;
> +
> +#if HAVE_XAPIAN_COMPACT
> +if (! (notmuch_path = talloc_asprintf (local, "%s/%s", notmuch->path, 
> ".notmuch"))) {
> + fprintf (stderr, "Out of memory\n");
> + goto DONE;
> +}
> +
> +if (! (xapian_path = talloc_asprintf (local, "%s/%s", notmuch_path, 
> "xapian"))) {
> + fprintf (stderr, "Out of memory\n");
> + goto DONE;
> +}
> +
> +if (! 

[PATCH RFC?] Compactification support

2012-08-21 Thread Jani Nikula
On Mon, 20 Aug 2012, Ben Gamari  wrote:
> Here is a small patchset adding support for database compaction when
> supported by Xapian. Here I add a function which both compacts and
> closes the database.

What are the benefits of this compared to xapian-compact [1]?

Jani.

[1] http://xapian.org/docs/admin_notes.html#compacting-a-database


Re: [PATCH 1/3] Add notmuch_database_close_compact

2012-08-21 Thread Tomi Ollila
On Mon, Aug 20 2012, Ben Gamari bgamari.f...@gmail.com wrote:

 ---
  configure   |   25 -
  lib/database.cc |   54 ++
  lib/notmuch.h   |   14 ++
  3 files changed, 92 insertions(+), 1 deletion(-)

 diff --git a/configure b/configure
 index dc0dba4..370fedd 100755
 --- a/configure
 +++ b/configure
 @@ -270,7 +270,8 @@ printf Checking for Xapian development files... 
  have_xapian=0
  for xapian_config in ${XAPIAN_CONFIG}; do
  if ${xapian_config} --version  /dev/null 21; then
 - printf Yes (%s).\n $(${xapian_config} --version | sed -e 's/.* //')
 + xapian_version=$(${xapian_config} --version | sed -e 's/.* //')
 + printf Yes (%s).\n ${xapian_version}
   have_xapian=1
   xapian_cxxflags=$(${xapian_config} --cxxflags)
   xapian_ldflags=$(${xapian_config} --libs)
 @@ -282,6 +283,24 @@ if [ ${have_xapian} = 0 ]; then
  errors=$((errors + 1))
  fi
  
 +have_xapian_compact=0
 +if [ ${have_xapian} = 1 ]; then
 +printf Checking for Xapian compact support... 
 +IFS='.'
 +old_args=$@
 +set -- ${xapian_version}
 +xapian_major_version=$1
 +xapian_minor_version=$2
 +xapian_subminor_version=$3
 +set -- ${old_args}

The part above breaks the argument vector in case there are spaces in 
args (I though $IFS chars, but try the script), execute:

$ echo '#!/bin/bash
IFS=.
for x in $@; do echo $x; done; echo
foo=$@
for x in $foo; do echo $x; done; echo
set -- $foo
for x in $@; do echo $x; done; echo
'  foo.bash

$ bash foo.bash a b c d

Also, after processing, IFS is not restored (to $DEFAULT_IFS)

an alternative is to put the code in function like the following
way:

set_xapian_version ()
{
xapian_major_version=$1
xapian_minor_version=$2
xapian_subminor_version=$3
}

have_xapian_compact=0
if [ ${have_xapian} = 1 ]; then
printf Checking for Xapian compact support... 
IFS=.
set_xapian_version ${xapian_version}
IFS=$DEFAULT_IFS
if [ ${xapian_major_version} -gt 1 ] || [ ${xapian_minor_version} -gt 2 ] 
|| [ ${xapian_subminor_version} -ge 6 ]; then
printf Yes.\n
have_xapian_compact=1
else
printf No.\n
fi
fi

Hmm, I guess the check above is to determine whether xapian version is
1.2.6 or newer, but is there xapian version 1.1.6 or 1.0.6 or 0.3.0 or so ?

I am not qualified to comment about compaction itself :)

In the last patch you give copyright to Carl (which is OK). However I'd
debate whether it is good practise to declare Carl as author; I'd say that
is OK if he agrees to claim authorship to your potentially shi^H^H^Hperfect
code ;)

There are at least a few style issues below: e.g. no space between function
name and opening parenthesis.

Tomi


 +if [ ${xapian_major_version} -gt 1 ] || [ ${xapian_minor_version} -gt 
 2 ] || [ ${xapian_subminor_version} -ge 6 ]; then
 + printf Yes.\n
 + have_xapian_compact=1
 +else
 + printf No.\n
 +fi
 +fi
 +
  printf Checking for GMime development files... 
  have_gmime=0
  IFS=';'
 @@ -675,6 +694,9 @@ LINKER_RESOLVES_LIBRARY_DEPENDENCIES = 
 ${linker_resolves_library_dependencies}
  XAPIAN_CXXFLAGS = ${xapian_cxxflags}
  XAPIAN_LDFLAGS = ${xapian_ldflags}
  
 +# Whether compact is supported by this version of Xapian
 +HAVE_XAPIAN_COMPACT = ${have_xapian_compact}
 +
  # Flags needed to compile and link against GMime-2.4
  GMIME_CFLAGS = ${gmime_cflags}
  GMIME_LDFLAGS = ${gmime_ldflags}
 @@ -711,6 +733,7 @@ CONFIGURE_CFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) 
 \$(GMIME_CFLAGS)  \\
  CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)\\
\$(TALLOC_CFLAGS) -DHAVE_VALGRIND=\$(HAVE_VALGRIND) \\
\$(VALGRIND_CFLAGS) \$(XAPIAN_CXXFLAGS) \\
 + -DHAVE_XAPIAN_COMPACT=\$(HAVE_XAPIAN_COMPACT)   \\
   -DHAVE_STRCASESTR=\$(HAVE_STRCASESTR)
  CONFIGURE_LDFLAGS =  \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(XAPIAN_LDFLAGS)
  EOF
 diff --git a/lib/database.cc b/lib/database.cc
 index 761dc1a..6e83a61 100644
 --- a/lib/database.cc
 +++ b/lib/database.cc
 @@ -781,6 +781,60 @@ notmuch_database_close (notmuch_database_t *notmuch)
  }
  
  void
 +notmuch_database_close_compact (notmuch_database_t *notmuch)
 +{
 +void *local = talloc_new (NULL);
 +Xapian::Compactor compactor;
 +char *notmuch_path, *xapian_path, *compact_xapian_path, *old_xapian_path;
 +
 +#if HAVE_XAPIAN_COMPACT
 +if (! (notmuch_path = talloc_asprintf (local, %s/%s, notmuch-path, 
 .notmuch))) {
 + fprintf (stderr, Out of memory\n);
 + goto DONE;
 +}
 +
 +if (! (xapian_path = talloc_asprintf (local, %s/%s, notmuch_path, 
 xapian))) {
 + fprintf (stderr, Out of memory\n);
 + goto DONE;
 +}
 +
 +if (! (compact_xapian_path = talloc_asprintf (local, %s.compact, 
 xapian_path))) {
 + fprintf (stderr, Out of memory\n);
 + goto 

Re: [PATCH RFC?] Compactification support

2012-08-21 Thread Jani Nikula
On Mon, 20 Aug 2012, Ben Gamari bgamari.f...@gmail.com wrote:
 Here is a small patchset adding support for database compaction when
 supported by Xapian. Here I add a function which both compacts and
 closes the database.

What are the benefits of this compared to xapian-compact [1]?

Jani.

[1] http://xapian.org/docs/admin_notes.html#compacting-a-database
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


notmuch release 0.14 now available

2012-08-21 Thread David Bremner

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

Which can be verified with:

  http://notmuchmail.org/releases/notmuch-0.14.tar.gz.sha1
  ad1ef9c2d29cfb0faab7837968d11325dee404bd  notmuch-0.14.tar.gz

  http://notmuchmail.org/releases/notmuch-0.14.tar.gz.sha1.asc
  (signed by David Bremner)

What's new in notmuch 0.14
=

General bug fixes
-

Maildir tag synchronization

  Maildir flag-to-tag synchronization now applies only to messages in
  maildir-like directory structures.  Previously, it applied to any
  message that had a maildir info part, which meant it could
  incorrectly synchronize tags for non-maildir messages, while at the
  same time failing to synchronize tags for newly received maildir
  messages (typically causing new messages to not receive the unread
  tag).

Command-Line Interface
--

  The deprecated positional output file argument to `notmuch dump` has
  been replaced with an `--output` option. The input file positional
  argument to `notmuch restore` has been replaced with an `--input`
  option for consistency with dump.  These changes simplify the syntax
  of dump/restore options and make them more consistent with other
  notmuch commands.

Emacs Interface
---

Search results now get re-colored when tags are updated

The formatting of tags in search results can now be customized

  Previously, attempting to change the format of tags in
  `notmuch-search-result-format` would usually break tagging from
  search-mode.  We no longer make assumptions about the format.

Experimental support for multi-line search result formats

  It is now possible to embed newlines in
  `notmuch-search-result-format` to make individual search results
  span multiple lines.

Next/previous in search and show now move by boundaries

  All next and previous commands in the search and show modes now
  move to the next/previous result or message boundary.  This doesn't
  change the behavior of next, but previous commands will first
  move to the beginning of the current result or message if point is
  inside the result or message.

Search now uses the JSON format internally

  This should address problems with unusual characters in authors and
  subject lines that could confuse the old text-based search parser.

The date shown in search results is no longer padded before applying
user-specified formatting

  Previously, the date in the search results was padded to fixed width
  before being formatted with `notmuch-search-result-format`.  It is
  no longer padded.  The default format has been updated, but if
  you've customized this variable, you may have to change your date
  format from `%s ` to `%12s `.

The thread-id for the `target-thread` argument for `notmuch-search` should
now be supplied without the thread: prefix.

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



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


Re: [PATCH RFC?] Compactification support

2012-08-21 Thread Tomi Ollila
On Tue, Aug 21 2012, Ben Gamari bgamari.f...@gmail.com wrote:

 Jani Nikula j...@nikula.org writes:

 On Mon, 20 Aug 2012, Ben Gamari bgamari.f...@gmail.com wrote:
 Here is a small patchset adding support for database compaction when
 supported by Xapian. Here I add a function which both compacts and
 closes the database.

 What are the benefits of this compared to xapian-compact [1]?

 I think it's a bit of a shame you are currently forced to interact with
 Xapian directly (an implementation detail) to compact the database. This
 set seeks to abstract this out. This is especially important since it's
 not too difficult to get the invocation of xapian-compact wrong
 (e.g. forget --no-renumber).

Better reason would be that xapian-compact(1) may not be available although
the library is -- if the command is available it is easy to execve(2) it
with correct arguments... (?)

Tomi

 Also, in the past Carl (id:87ocl1lut1@yoom.home.cworth.org) has
 mentioned it would be nice if compact would be run after the initial run
 of notmuch new. This patchset sets the groundwork to enable this.

 Cheers,

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