[notmuch] [PATCH 2/3] add checking for zlib development libraries to configure script

2009-11-29 Thread da...@tethera.net
Mikhail Gusarov wrote: >Twas brillig at 18:57:36 28.11.2009 UTC-05 when jrollins at finestructure.net >did gyre and gimble: > JGR> + sudo apt-get install libxapian-dev libgmime-2.4-dev > JGR> libtalloc-dev libz-dev >Proper fix is to fix libgmime-2.4.pc upstream to stop exposing -lz This is no

[notmuch] Debian packaging

2009-11-29 Thread da...@tethera.net
Jameson Graef Rollins wrote: >I'm happy to combine efforts. Seems to me the most appropriate thing >to do, since we're already working in git, is to track each others >"debian" branches. Is this the canonical URL of your repo?: >http://pivot.cs.unb.ca/git/notmuch.git That should work, but git

[notmuch] Requires g++, and something else?

2009-11-30 Thread da...@tethera.net
Adrian Perez de Castro wrote: >[1 ] >[1.1 ] >On Tue, 1 Dec 2009 00:01:16 +, Scot wrote: >> CXXlib/thread.o >> AR lib/notmuch.a >> CXXnotmuch >> /usr/bin/ld: cannot find -lz >This is because you will need the development package for zlib, package >name is "zlib1g-dev",

[notmuch] hack to retag a directory

2009-12-03 Thread da...@tethera.net
I think this will be obsolete pretty soon when the equivalent is built-in to notmuch, but in the mean time, here is a script that somebody might find useful: retag a whole directory (recursively). I don't claim it is nice in any way, but it seems usable for me, taking about 5 seconds to retag a di

[notmuch] hack to retag a directory

2009-12-03 Thread da...@tethera.net
At Thu, 03 Dec 2009 09:39:32 -0400, david at tethera.net wrote: > I think this will be obsolete pretty soon when the equivalent is > built-in to notmuch, but in the mean time, here is a script that > somebody might find useful: retag a whole directory (recursively). I > don't claim it is nice in an

[notmuch] [PATCH (rebased)] Handle message renames in mail spool

2009-12-04 Thread da...@tethera.net
At Thu, 03 Dec 2009 16:45:22 -0800, > Anyway, I think we'll see code for that soon, so I'm not planning to > commit the offered patch. But people really needing renames might want > to use it for now, (and live with any performance implications it > causes). I could live with the performance iss

[notmuch] Patches in support of linking from org-mode

2009-12-04 Thread da...@tethera.net
These two patches are pretty much independent. The first is needed by my work in progress patch for org-mode to provide links into notmuch (http://pivot.cs.unb.ca/git/?p=org-mode.git;a=shortlog;h=refs/heads/notmuch-link). The second changes the interface of git-show to take the query-string rec

[notmuch] [PATCH 1/2] notmuch-search-process-filter: add text properties for authors and subject to each line

2009-12-04 Thread da...@tethera.net
From: David Bremner Add functions notmuch-search-find-authors and notmuch-find-subject to match notmuch-find-thread-id. These functions are just a wrapper around get-text-property, but in principle that could change. --- notmuch.el | 12 +++- 1 files changed, 11 insertions(+), 1 delet

[notmuch] [PATCH 2/2] notmuch-show: add optional argument for query context instead of using global binding notmuch-search-query-string

2009-12-04 Thread da...@tethera.net
From: David Bremner Also modify the one call to notmuch-show in notmuch.el. This makes the call (notmuch-show thread-id) will work when there is no binding for notmuch-search-query-string; e.g. when called from user code outside notmuch. --- notmuch.el | 16 ++-- 1 files changed,

[notmuch] [PATCH] notmuch-restore.c: only update tags for messages that differ from dump file.

2009-12-06 Thread da...@tethera.net
From: David Bremner The main feature of this patch is that it compares the list of current tags on a message with those read by restore. Only if the two lists differ is the tag list in the message replaced. In my experiments this leads to a large performance improvement. Since I had to rewrite

[notmuch] [PATCH] notmuch-restore.c: only update tags for messages that differ from dump file.

2009-12-07 Thread da...@tethera.net
From: David Bremner The main feature of this patch is that it compares the list of current tags on a message with those read by restore. Only if the two lists differ is the tag list in the message replaced. In my experiments this leads to a large performance improvement. Since I had to rewrite

[notmuch] [PATCH] notmuch-restore.c: only update tags for messages that differ from dump file.

2009-12-08 Thread da...@tethera.net
From: David Bremner The main feature of this patch is that it compares the list of current tags on a message with those read by restore. Only if the two lists differ is the tag list in the message replaced. In my experiments this leads to a large performance improvement. Since I had to rewrite

[notmuch] [PATCH] notmuch.el: patch notmuch-show to call notmuch show without query-context (i.e. without tag:inbox) if the first query returns nothing.

2009-12-10 Thread da...@tethera.net
From: David Bremner This fixes the annoying bug of archiving a thread, and then going back to open it and getting an error. It needs the notmuch-show API changing patch of 1259979997-31544-3-git-send-email-david at tethera.net. --- I'm not really expecting Carl to push this patch, because I thi

[notmuch] [PATCH] initial proof of concept patch to output a message in json

2009-12-13 Thread da...@tethera.net
From: David Bremner --- Like I said in the apology/introduction, I don't claim this patch is ready for the master branch; hence the complete lack of sensible commit message. But it does give some idea about what would be required. In particular definitely more things will have to be passed arou

[notmuch] [PATCH] notmuch-show.c: provide an option --format=message-ids which outputs only ids.

2009-12-17 Thread da...@tethera.net
From: David Bremner If the option --format=message-ids is passed on the command line, only message IDs are output. A new structure show_options_t is defined to keep track of all (currently 2) command line options. --- It seems a shame to parse the entire output of notmuch show to get a message

[notmuch] [PATCH] Add an "--output=(json|text|)" command-line option to both notmuch-search and notmuch-show.

2009-12-18 Thread da...@tethera.net
From: Scott Robinson In the case of notmuch-show, "--output=json" also implies "--entire-thread" as the thread structure is implicit in the emitted document tree. As a coincidence to the implementation, multipart message ID numbers are now incremented with each part printed. This changes the pre

[notmuch] Prototype of --show option to control what is shown.

2009-12-19 Thread da...@tethera.net
Here is a set of 3 patches to implement (some) output control. [PATCH 1/3] rename option to select output format to --format from --output. [PATCH 2/3] notmuch-show.c: make calls to format functions conditional The first two are essentially suggestions for Scott. In particular the first is no

[notmuch] [PATCH 1/3] rename option to select output format to --format from --output.

2009-12-19 Thread da...@tethera.net
From: David Bremner --- notmuch-search.c |6 +++--- notmuch-show.c |6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index e243747..482c6e8 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -221,14 +221,14 @@ notmuch_sea

[notmuch] [PATCH 2/3] notmuch-show.c: make calls to format functions conditional

2009-12-19 Thread da...@tethera.net
From: David Bremner This makes it easier to define minimal formats without defining several dummy functions that do nothing. --- notmuch-show.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index b6e3f44..51aa87d 100644 --- a

[notmuch] [PATCH 3/3] notmuch-show.c: prototype tabular output format, with output control

2009-12-19 Thread da...@tethera.net
From: David Bremner Currently this only outputs the information from the "message header"; i.e. the part before the rfc2822 header or body. Adding this required adding an extra parameter, currently unused, to format_message_text and format_message_json. Also the struct definition is changed to m

[notmuch] [PATCH] notmuch-query.el: new file to support access to the notmuch database.

2009-12-20 Thread da...@tethera.net
From: David Bremner Initially this file provides one main function notmuch-query-get-threads, which takes a set of search terms, and returns a parsed set of matching threads as a lisp data structure. A set of notmuch-query-map-* functions are provided to help map functions over the data structur

[notmuch] [PATCH] notmuch.el: Refactor citation markup. Variables for minimum size, button text.

2009-12-24 Thread da...@tethera.net
From: David Bremner This is a fairly intrusive rewrite. - I pulled the common code for the signature and citation case out into a separate function. This is not so much shorter, but I think it will be easier to maintain. - I replaced the sequence of (looking-at blah) (forward-line) with a

[notmuch] [PATCH] notmuch.el: Refactor citation markup. Variables for minimum size, button text.

2009-12-24 Thread da...@tethera.net
From: David Bremner This is a fairly intrusive rewrite. - I pulled the common code for the signature and citation case out into a separate function. This is not so much shorter, but I think it will be easier to maintain. - I replaced the sequence of (looking-at blah) (forward-line) with a

[notmuch] [PATCH] notmuch.el: add a submap (on "z" for "ztash") to stash things.

2009-12-25 Thread da...@tethera.net
From: David Bremner Provide key bindings for stuffing everything with a notmuch-show-get-foo function into the emacs kill-ring as text. Currently this is just message-id, filename, and tags. --- One thing I find myself doing often is going into raw message mode in order to grab a message-id. Th

[notmuch] Update Patch Series. Only collapse part of citations.

2009-12-25 Thread da...@tethera.net
On Fri, 25 Dec 2009 09:47:02 +0800, Kan-Ru Chen wrote: > I like this idea, but this patch hides all citations larger than the > threshold. I'd like to see limited lines of citations been displayed. Since you ask nicely, OK :). I kept it as two patches so that people could compare the usability

[notmuch] [PATCH 1/2] notmuch.el: Refactor citation markup. Variables for minimum size, button text.

2009-12-25 Thread da...@tethera.net
From: David Bremner This is a fairly intrusive rewrite. - I pulled the common code for the signature and citation case out into a separate function. This is not so much shorter, but I think it will be easier to maintain. - I replaced the sequence of (looking-at blah) (forward-line) with a

[notmuch] [PATCH 2/2] notmuch.el: show some of citation even when hiding.

2009-12-25 Thread da...@tethera.net
From: David Bremner - rename notmuch-show-citation-lines-min to n-s-c-l-prefix - call forward-line with the appropriate parameter to adjust region to be hidden. - change citation button text so that it makes (some) sense when citation is shown --- notmuch.el | 18 -- 1 files

[notmuch] (no subject)

2009-12-26 Thread da...@tethera.net
Thanks to Micah Anderson on IRC for pointing out that the previous version of this patch broke '?' in notmuch-show mode. This was arguably a bug in the notmuch help code, fixed in patch 2 of the series. I wouldn't be surprised if 'map-keymap' could be used other places in the code, but I kept thi

[notmuch] [PATCH 1/2] notmuch.el: add a submap (on "z" for "ztash") to stash things.

2009-12-26 Thread da...@tethera.net
From: David Bremner Provide key bindings for stuffing everything with a notmuch-show-get-foo function into the emacs kill-ring as text. Currently this is just message-id, filename, and tags. --- notmuch.el | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-)

[notmuch] [PATCH 2/2] notmuch.el: convert sparse keymap to a list in notmuch-substitute-one-command-key-with-prefix

2009-12-26 Thread da...@tethera.net
From: David Bremner The previous version would crash when a key was bound to a sparse keymap, since apparently these are not straightforward lists. The usage of map-keymap is a bit obscure: it only has side-effects, no return value. --- notmuch.el |8 ++-- 1 files changed, 6 insertions(

[notmuch] [PATCH] Add an "--format=(json|text)" command-line option to both notmuch-search and notmuch-show.

2009-12-31 Thread da...@tethera.net
From: Scott Robinson In the case of notmuch-show, "--format=json" also implies "--entire-thread" as the thread structure is implicit in the emitted document tree. As a coincidence to the implementation, multipart message ID numbers are now incremented with each part printed. This changes the pre

[notmuch] [PATCH] notmuch.pod: pod version of documentation, converted by rman, massaged by hand.

2009-12-31 Thread da...@tethera.net
From: David Bremner Some places I deleted a bit of the continuity text introducing a command because I didn't see how to make it work with the slightly more structured layout. --- The idea here is to be able to generate the online help and the man page from one source. To generate a man page:

[notmuch] [PATCH v3] notmuch.el: Refactor citation markup. Variables for minimum size, button text.

2010-01-16 Thread da...@tethera.net
From: David Bremner This is a fairly intrusive rewrite. - I pulled the common code for the signature and citation case out into a separate function. This is not so much shorter, but I think it will be easier to maintain. - I treated top posted copies essentially like signatures, except that

[notmuch] [PATCH] emacs: Move emacs UI (currently just one file) to subdirectory.

2010-02-09 Thread da...@tethera.net
From: David Bremner Add emacs/Makefile.local and emacs/Makefile. Move emacs targets into emacs/Makefile.local, but leave the byte compilation rule in the top level Makefile. --- I decided to put the actual targets for byte compilation and installation in emacs/Makefile.local. This seems more mo

[notmuch] Updated notmuch-show-get-* functions

2010-02-11 Thread da...@tethera.net
I have rebased the patch for notmuch-show-get-header,and added functions for each of the header fields (I think) parsed by mailheader.el. There is a corresponding updated stash patch series that uses these functions to provide convenient access to various fields, even if not currently displaye

[notmuch] [PATCH 1/2] notmuch-show-get-header: new function; return alist of parsed header fields.

2010-02-11 Thread da...@tethera.net
From: David Bremner This function parses the displayed message to recover header fields. It uses mailheader.el to do the actual header parsing, after preprocessing to remove indentation. It relies on the variables notmuch-show-message-begin-regexp, notmuch-show-header-begin-regexp, and notmuch-s

[notmuch] [PATCH 2/2] Add functions notmuch-show-get-(bcc, cc, date, from, subject, to) to return the corresponding header field for the current message as a string. These are thin wrappers around not

2010-02-11 Thread da...@tethera.net
From: David Bremner --- notmuch.el | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/notmuch.el b/notmuch.el index c96fd94..d2a3b1b 100644 --- a/notmuch.el +++ b/notmuch.el @@ -225,6 +225,38 @@ Unlike builtin `previous-line' this version acc

[notmuch] [PATCH v2] Add functions notmuch-show-get-(bcc, cc, date, from, subject, to).

2010-02-11 Thread da...@tethera.net
From: David Bremner Return the corresponding header field for the current message as a string. These are thin wrappers around notmuch-show-get-header, which means they each cause a full parse of the RFC822 header. The main idea is to fix an api. --- Sorry, resending with fixed commit message.

[notmuch] Rebased and updated stash patches.

2010-02-11 Thread da...@tethera.net
These patches let you header fields and similar into the emacs kill-ring (and the X11 clipboard/selection, if things are setup right). Patch 1/2 is actually a bug fix to master, unchanged since last time. The bug didn't manifest because no submaps were used. Patch 2/2 is rebased against current m

[notmuch] [PATCH 1/2] notmuch.el: convert sparse keymap to a list in notmuch-substitute-one-command-key-with-prefix

2010-02-11 Thread da...@tethera.net
From: David Bremner The previous version would crash when a key was bound to a sparse keymap, since apparently these are not straightforward lists. The usage of map-keymap is a bit obscure: it only has side-effects, no return value. --- notmuch.el |8 ++-- 1 files changed, 6 insertions(

[notmuch] [PATCH 2/2] notmuch.el: add a submap (on "z" for "ztash") to stash things.

2010-02-11 Thread da...@tethera.net
From: David Bremner Provide key bindings for stuffing various RFC822 header fields and other metadata into the emacs kill-ring as text. The bindings are as follows: z F notmuch-show-stash-filename z T notmuch-show-stash-tags z c notmuch-show-stash-cc z d

[notmuch] [PATCH v2] notmuch-query.el: new file to support access to the notmuch database.

2010-02-24 Thread da...@tethera.net
From: David Bremner Initially this file provides one main function notmuch-query-get-threads, which takes a set of search terms, and returns a parsed set of matching threads as a lisp data structure. A set of notmuch-query-map-* functions are provided to help map functions over the data structur

[notmuch] [PATCH] notmuch.el: hide original message in top posted replies.

2010-02-24 Thread da...@tethera.net
From: David Bremner This code treats top posted copies essentially like signatures, except that it doesn't sanity check their length, since neither do their senders. In an unrelated cleanup, remove the let definition of sig-end, since it was unused. New user-visible variable: notmuch-show-or

[notmuch] [PATCH] notmuch.el: add a hook to notmuch-reply

2010-02-26 Thread da...@tethera.net
From: David Bremner This patch introduces a variable notmuch-reply-hook and calls it using run-hooks. This allows people to easily override the header setup and so forth done by notmuch. --- This is my solution to trying to rationalize the headers of 'm' versus 'r'; now I just call the same hook

[notmuch] [PATCH v3] notmuch-query.el: new file to support access to the notmuch database.

2010-04-05 Thread da...@tethera.net
From: David Bremner Initially this file provides one main function notmuch-query-get-threads, which takes a set of search terms, and returns a parsed set of matching threads as a lisp data structure. A set of notmuch-query-map-* functions are provided to help map functions over the data structur

Initial support for selecting what is output

2010-04-24 Thread da...@tethera.net
These are some preliminary patches to add a --output argument to notmuch show. notmuch show --format=json --output=from,subject ${query} or notmuch show --format=json --output=to,body ${query} I'd like to implement a bit finer control (to get message-id's only is not possible ri

[PATCH 1/3] remove stale "unused" from around argv and argc in notmuch_show_command.

2010-04-24 Thread da...@tethera.net
From: David Bremner In fact argc and argv are used in this function. --- notmuch-show.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 26449fa..6aa9072 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -403,7 +403,7 @@ show_messa

[PATCH 2/3] notmuch-output.[ch]: initial implementation of output selection argument handling.

2010-04-24 Thread da...@tethera.net
From: David Bremner These two files provide a more or less "object oriented" approach to parsing output selection arguments. The use of a struct to track which output pieces are selected is intended to hide the implementation, which currently uses bitmasks. --- Makefile.local |1 + notmuc

[PATCH 3/3] notmuch-show.c: control which headers are show for json output.

2010-04-24 Thread da...@tethera.net
From: David Bremner This commit adds argument handling from and callbacks to notmuch-output.c to determine what headers to show in json output. This requires passing a pointer to a struct containing the output parameters into several functions, and in particular changes the type of the function p

[PATCH] notmuch.pod: pod version of documentation, converted by rman, massaged by hand.

2010-06-13 Thread da...@tethera.net
From: David Bremner Some places I deleted a bit of the continuity text introducing a command because I didn't see how to make it work with the slightly more structured layout. I also moved show in front of search, because it explains the output formats. Probably it would make sense to add a sep

First draft of logging functionality.

2010-10-11 Thread da...@tethera.net
The patches following this message are my first attempt at implementing atomic logging for notmuch. The idea is that such logs could be useful in synchronizing notmuch instances. Feedback of any kind is welcome. I'm particularly interested in comments about the log format and performance. In my

[PATCH 1/3] Initial implementation of low level logging routines.

2010-10-11 Thread da...@tethera.net
From: David Bremner notmuch_log_open: open a log file; just a wrapper around open(2) notmuch_log_append: atomically append a buffer (character array) to a log file Based on per-write file locking, performance will have to be tested. --- Makefile.local |1 + notmuch-client.h | 10 +

[PATCH 2/3] notmuch-log.c: Add a function to log a pair of strings with a timestamp.

2010-10-11 Thread da...@tethera.net
From: David Bremner Since the function is supposed to work for any pair of strings, this means some form of quoting seems necessary. I decided to re-use the json quoting routines for convenience. --- notmuch-client.h |4 notmuch-log.c| 18 ++ 2 files changed, 22 in

[PATCH 3/3] notmuch-tag.c: Add tag logging.

2010-10-11 Thread da...@tethera.net
From: David Bremner logging of tags is enabled by adding a stanza like [log] tags = /some/path/you/can/write/to to your notmuch config. Note that we intentionally do the logging after the database transaction is finished. --- notmuch-tag.c | 31 +++ 1 files chang

[PATCH 4/4] Enable logging in notmuch-tag.c

2010-10-24 Thread da...@tethera.net
From: David Bremner Currently a separate function must be called to enable logging; this API is subject to change. --- notmuch-tag.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/notmuch-tag.c b/notmuch-tag.c index fd54bc7..bd7bfbc 100644 --- a/notmuch-tag.c +++ b

[PATCH 3/4] Add logging to low level message handling routines.

2010-10-24 Thread da...@tethera.net
From: David Bremner This might not be ideal from the point of view of "atomic" transactions, but it is transparent to the caller of the library. --- lib/message.cc | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/lib/message.cc b/lib/message.

Second draft of logging patches

2010-10-24 Thread da...@tethera.net
Here is my second try at logging, taking into account the feedback I got from Rob and Michal. There is definitely some tidying to do; in particular I know the protoypes in public headers need documentation. Also, I should add a configuration option to enable configuration by command or something l

[PATCH 2/4] Add log component to database struct.

2010-10-24 Thread da...@tethera.net
From: David Bremner - add accessor required because the notmuch database struct is opaque - add a function notmuch_database_open_log to open a log file and associate it with an open database. The reasoning is that this is preferable to breaking the notmuch_database_open API at this point. ---

[PATCH 1/4] Initial implementation of low level logging routines.

2010-10-24 Thread da...@tethera.net
From: David Bremner notmuch_log_open: open a log file; return an opaque "log descriptor" notmuch_log_words: log words, escaping spaces and newlines, and appending a newline. Log format is space delimited, and line oriented. Escaping log text is currently based on a slightly simplified version

generate help from pod.

2010-11-03 Thread da...@tethera.net
Hi Carl; Here is the generation. I hope you don't hate perl too much. I also hope the syntax in notmuch.pod is self-explanatory. For me, with perl 5.10.1, this only uses modules included with Perl.

[PATCH 2/4] Perl script to generate online help.

2010-11-03 Thread da...@tethera.net
From: David Bremner This is a bit more complicated than expected, mainly because it needs to split a chunk of the docs into 3 pieces corresponding to the strings currently filled into a struct command_t. To disable the ANSI escape codes, replace Pod::Text:Color with Pod::Text. It would not be th

[PATCH 1/4] notmuch.pod: pod version of documentation, converted by rman, massaged by hand.

2010-11-03 Thread da...@tethera.net
From: David Bremner Some places I deleted a bit of the continuity text introducing a command because I didn't see how to make it work with the slightly more structured layout. I also moved show in front of search, because it explains the output formats. Probably it would make sense to add a sep

[PATCH 4/4] notmuch.c: use help strings generated from notmuch.pod.

2010-11-03 Thread da...@tethera.net
From: David Bremner It is quite possible this could be more automagically generated; there is a certain amount of boilerplate in typing HELP_command_args, HELP_command_desc, HELP_command_text. But, this way is less error prone. --- notmuch.c | 388 +--

[PATCH 3/4] Add rules to build notmuch.1 and notmuch-help.h from the pod file.

2010-11-03 Thread da...@tethera.net
From: David Bremner Add generated files to CLEAN. Remove notmuch.1 from git because we auto generate it now. --- Makefile.local | 22 ++- notmuch.1 | 609 2 files changed, 21 insertions(+), 610 deletions(-) delete mode 100644 notm

[PATCH] Build debian package for python-bindings.

2011-06-19 Thread da...@tethera.net
From: David Bremner This uses dh_python2 (included with sufficiently recent versions of the python/python-all packages). python-all brings in all of the supported versions of python. The double calls to dh_auto_install are to avoid looping over python versions ourselves. --- debian/control | 1

No subject

2011-06-19 Thread da...@tethera.net
Bah, my previous attempt didn't build cleanly in a chroot, so I had to patch setup.py.

[PATCH 1/2] Build debian package for python-bindings.

2011-06-19 Thread da...@tethera.net
From: David Bremner This uses dh_python2 (included with sufficiently recent versions of the python/python-all packages). python-all brings in all of the supported versions of python. The double calls to dh_auto_install are to avoid looping over python versions ourselves. --- debian/control

[PATCH 2/2] Do not import notmuch in setup.py.

2011-06-19 Thread da...@tethera.net
From: David Bremner Importing notmuch loads the notmuch shared library. When building without a system install of notmuch, this requires e.g. setting LD_LIBRARY_PATH for building and fails completely for cleaning. --- bindings/python/setup.py | 17 - 1 files changed, 16 inserti

No subject

2011-06-21 Thread da...@tethera.net
Here is my proposal, based on Clint's suggestion on IRC, and on the sed hack from librhash, to hide all symbols that are not explicitly part of the notmuch API. In particular it hides the various symbols related to Xapian exceptions.

[PATCH 1/2] libnotmuch: add linker script to declare only notmuch_* symbols as global.

2011-06-21 Thread da...@tethera.net
From: David Bremner This is closely tied to gcc and particularly gnu ld, but I guess the shared library linking code would need to be adjusted to work on a non-gnu linker anyay. I had to make a few not-obviously related changes to the lib/Makefile.local to make this work: libnotmuch_modules is d

[PATCH 2/2] remove Xapian exceptions symbols from libnotmuch1.symbols

2011-06-21 Thread da...@tethera.net
From: David Bremner These were never intended to be public, since the library exports only a C API. --- debian/libnotmuch1.symbols | 14 -- 1 files changed, 0 insertions(+), 14 deletions(-) diff --git a/debian/libnotmuch1.symbols b/debian/libnotmuch1.symbols index f50d168..8df6fec

[PATCH] tests: add a test for symbol hiding side effects

2011-06-22 Thread da...@tethera.net
From: David Bremner The worry here is that a binary linking with libnotmuch might lose access to Xapian::Error symbols because libnotmuch hides them. --- test/basic |2 +- test/notmuch-test |1 + test/symbol-hiding | 21 + test/symbol-test.cc | 17

[PATCH] libnotmuch: fix typo in CLEAN setting, add file

2011-06-24 Thread da...@tethera.net
From: David Bremner - c0961e6 introduced a missing slash and - cdf1c70a created a file and neglected to add it to clean The former seems to have been harmless, so maybe someone (Carl?) can check if $(dir)/$(LIBNAME) really needs to be removed? --- lib/Makefile.local |4 +++- 1 files changed

[PATCH] libnotmuch: fix typos in CLEAN setting, add file

2011-06-25 Thread da...@tethera.net
From: David Bremner - c0961e6 introduced a missing slash between $(dir)$(LIBNAME) and missing $(dir) in front of libnotmuch.a - cdf1c70a created a file $(dir)/notmuch.h.gch and neglected to add it to CLEAN --- Here is an updated version. I'm not sure the best way to do a test of the cleaning

[PATCH] libnotmuch: build symbols list without relying on gcc -aux-info.

2011-06-26 Thread da...@tethera.net
From: David Bremner Carl reports "gcc -aux-info notmuch.aux lib/notmuch.h" does not generate notmuch.aux for him with Debian gcc 4.6.0-8. A small modification of the original sed regular expression allows us to work directly from lib/notmuch.h, rather than preprocessing with gcc. As with most su

[PATCH] libnotmuch: build symbols list without relying on gcc -aux-info.

2011-06-26 Thread da...@tethera.net
From: David Bremner Carl reports "gcc -aux-info notmuch.aux lib/notmuch.h" does not generate notmuch.aux for him with Debian gcc 4.6.0-8. Based on a suggestion by Austin Clements, this version uses objdump to get the symbols from the object files. Any symbol that - is in some object file i

[PATCH] lib/Makefile.local: remove leftover debugging output.

2011-06-29 Thread da...@tethera.net
From: David Bremner The removed "echo $(libnotmuch_modules)" was strictly for debugging. Thanks to Austin Clements for the hint. --- lib/Makefile.local |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/lib/Makefile.local b/lib/Makefile.local index 6dd095c..fe42920 100644

[PATCH 1/2] test/symbol-hiding: rename to test/libnotmuch-abi, prepare to add more subtests

2011-06-29 Thread da...@tethera.net
From: David Bremner Test descriptions changed to accomodate more subtests. The generic 'run_test' is renamed 'run_exception_test', symbol-test(.cc) is renamed exception-test(.cc). --- I'm not sure if it would be better to start a new test script rather than this fuss about renaming, but "symbol-

[PATCH 2/2] test/libnotmuch-abi: compare exported symbols, available symbols, and linker script.

2011-06-29 Thread da...@tethera.net
From: David Bremner This uses objdump and awk to grab the available "notmuch_" symbols from the object files and all exported symbols from libnotmuch.so. The symbols from the linker script are grabbed using sed. All three of these sets of symbols should be equal. --- test/libnotmuch-abi | 10

Proposed changes to release target

2011-07-04 Thread da...@tethera.net
When pushing 0.6 out the door, I found the release target in Makefile daunting. This was partly lack of confidence/understanding on my part: I didn't really like the idea of starting a chain of events that I didn't fully understand that ended up copying files to the web site. Also, it didn't quite

[PATCH 1/6] build-system: replace use of ssh with wget for checking the website

2011-07-04 Thread da...@tethera.net
From: David Bremner The idea is to see if the version we are already releasing exists on the notmuch website. Using wget allows more people to run this target, and also allows people with ssh access to run it without access to their keys. --- Makefile.local | 15 ++- 1 files change

[PATCH 2/6] build-system: remove calls to git-buildpackage and dput in release target.

2011-07-04 Thread da...@tethera.net
From: David Bremner The removed code had the following issues: - It depends on the users git-buildpackage configuration to put the results in the correct place, so is fragile. - The tar file is overwritten in the next step, so copying it is not useful. - We should build the final version of

[PATCH 3/6] build-system: tag earlier in the release process.

2011-07-04 Thread da...@tethera.net
From: David Bremner If tagging fails, we really don't want to upload tarballs. --- Makefile.local |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.local b/Makefile.local index dea813c..b6445e5 100644 --- a/Makefile.local +++ b/Makefile.local @@ -89,12 +89,12 @@

[PATCH 6/6] build-system: guard parts irrevokable parts of release target with REALLY_UPLOAD

2011-07-04 Thread da...@tethera.net
From: David Bremner This supports both testing and use by non-upload privileged users. Along with previous commits in the series, this lets one do a dry run of the release process and created a tarball, signature file, and release announcement to inspect before uploading. --- Makefile.local |

[PATCH 4/6] build-system: use signed tag to make tar file, if available.

2011-07-04 Thread da...@tethera.net
From: David Bremner This as the advantage that "make VERSION=n.m dist" will work correctly even if the wrong branch happens to be checked out. --- Makefile.local |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/Makefile.local b/Makefile.local index b6445e5..d1c0737

[PATCH 5/6] build-system: Use existing signed tag for release, if present.

2011-07-04 Thread da...@tethera.net
From: David Bremner This is to support testing the release machinery without jumping through hoops to delete and restore a tag, or bumping the version number in both version and debian/changelog. --- Makefile.local |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefil

No subject

2011-07-16 Thread da...@tethera.net
So, my conclusion is that we need to export these typeinfo symbols, and it seems to be sufficient to do so to fix the failing tests and crashes discussed above. I think I managed to add them to the debian symbols file in a better way, so every toolchain change and different architecture doesn't mak

[PATCH 1/2] libnotmuch: export Xapian typeinfo symbols

2011-07-16 Thread da...@tethera.net
From: David Bremner The lack of such exporting seems to cause problems catching exceptions, as suggested by http://gcc.gnu.org/wiki/Visibility This manifested in the symbol-hiding test failing when notmuch was compile with gcc 4.4.5. On i386, this further manifested as notmuch new failing t

[PATCH 2/2] debian: add (demangled) Xapian exception typeinfo symbols to libnotmuch1.symbols

2011-07-16 Thread da...@tethera.net
From: David Bremner These are exported (again) by the library to prevent problems with catching exceptions. --- debian/libnotmuch1.symbols | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/debian/libnotmuch1.symbols b/debian/libnotmuch1.symbols index 8df6fec..05d

[PATCH] libnotmuch: export Xapian typeinfo symbols

2011-07-16 Thread da...@tethera.net
From: David Bremner The lack of such exporting seems to cause problems catching exceptions, as suggested by http://gcc.gnu.org/wiki/Visibility This manifested in the symbol-hiding test failing when notmuch was compile with gcc 4.4.5. On i386, this further manifested as notmuch new failing t

[PATCH] test: reset known_broken status in test_expect_equal and test_expect_equal_file

2011-09-11 Thread da...@tethera.net
From: David Bremner Commit 4cc6727 introduced the library function test_subtest_known_broken which sets a variable test_subtest_known_broken_ . Unfortunately this variable is not reset if test_begin_subtest is not called before the next test_expect_success or test_expect_failure. This commit rem

[PATCH] test: reset test_subtest_known_broken_ after each success/failure.

2011-09-12 Thread da...@tethera.net
From: David Bremner This means that test_subtest_known_broken needs to be called before every known broken subtest, which is no different than what is documented for the test_begin_subtest case. The assumption is that every test ends up calling either skipping, calling test_ok_ or test_failure_

No subject

2011-10-10 Thread da...@tethera.net
OK, here is my proposal to add search terms to notmuch dump. Most of the work is in argument processing. It would be nice if we could factor some of that out. 02be821 notmuch-dump: deprecate use of output file argument. 2b7781d test: all dump-restore tests should be working now 7a203d6

[PATCH 1/6] test: update dump-restore to use redirection instead of filename args

2011-10-10 Thread da...@tethera.net
From: David Bremner The idea here is that we want to deprecate the use of arguments to dump and restore to specify paths, since in particular we want to use the non-option arguments to dump to form a query. --- test/dump-restore | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-)

[PATCH 2/6] test: add tests for command line arguments to notmuch-dump

2011-10-10 Thread da...@tethera.net
From: David Bremner The plan is to add the possibility of search terms after the file name, and the use of -- to stop looking for an output file name. --- test/dump-restore | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/test/dump-restore b/te

[PATCH 5/6] test: all dump-restore tests should be working now

2011-10-10 Thread da...@tethera.net
From: David Bremner 3 x test_subtest_known_broken removed to tidy up the output. --- test/dump-restore |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/test/dump-restore b/test/dump-restore index 699337c..d8db259 100755 --- a/test/dump-restore +++ b/test/dump-restore @@

[PATCH 6/6] notmuch-dump: deprecate use of output file argument.

2011-10-10 Thread da...@tethera.net
From: David Bremner We print an intentionally non-specific message on stderr, since it isn't clear if there will be some global output file argument to replace. We update the test suite atomically, since it relies on having the same text in two files. --- notmuch-dump.c|1 + test/dump-r

[PATCH 4/6] notmuch-dump: treat any remaining arguments after the filename as search terms

2011-10-10 Thread da...@tethera.net
From: David Bremner The main motivation here is allow the fast dumping of tag data for messages having certain tags. In practice it seems too slow to pipe dump to grep. --- notmuch-dump.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/notmuch-dump.c b/notmuc

[PATCH 3/6] notmuch-dump: update handling of file name argument

2011-10-10 Thread da...@tethera.net
From: David Bremner We permit -- as an "option processing terminator". Currently this does not do anything useful, but we plan to add search terms after the --. --- notmuch-dump.c | 27 --- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/notmuch-dump.c

make debian-snapshot

2011-10-12 Thread da...@tethera.net
Here is a simple way to make debian packages for testing without fussing about with pristine-tar and so on. The first patch changes the git snapshot versioning scheme from 0.9-2-g1234 to 0.9+2~g1234 to reduce confusion with released versions like 0.9-2 In principle this should work outside a gi

  1   2   3   4   5   >