Re: [PATCH RFC] Emacs: Add address completion mechanism implemented in elisp

2014-07-31 Thread Michal Sojka
On Thu, Jul 31 2014, Trevor Jim wrote: BTW I have been refactoring my async process code. You might consider it for your patch. I'll look at that. I figured out that I might also reuse notmuch-parser.el. I'll post here my findings later. -Michal ___

Re: [PATCH] config: read database.path from $MAILDIR if set

2014-07-31 Thread David Bremner
Mark Oteiza mvote...@udel.edu writes: Try to read the config parameter database.path from $MAILDIR before falling back to $HOME/mail --- This patch doesn't apply to git master. I'm not really sure happened, maybe you generated it against some old version? d

Re: [PATCH] config: read database.path from $MAILDIR if set

2014-07-31 Thread David Bremner
David Bremner da...@tethera.net writes: Mark Oteiza mvote...@udel.edu writes: Try to read the config parameter database.path from $MAILDIR before falling back to $HOME/mail --- This patch doesn't apply to git master. I'm not really sure happened, maybe you generated it against some old

Re: [PATCH v2 02/14] util: Make string-util.h C++-compatible

2014-07-31 Thread David Bremner
Austin Clements amdra...@mit.edu writes: --- util/string-util.h | 8 1 file changed, 8 insertions(+) pushed this one patch. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH] config: read user.name from $NAME if set

2014-07-31 Thread David Bremner
Mark Oteiza mvote...@udel.edu writes: Try to read the config parameter user.name from $NAME before taking the user name from /etc/passwd. pushed d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH] config: read database.path from $MAILDIR if set

2014-07-31 Thread David Bremner
Mark Oteiza mvote...@udel.edu writes: Try to read the config parameter database.path from $MAILDIR before falling back to $HOME/mail pushed. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH] emacs: Clarify that notmuch-poll-script is deprecated

2014-07-31 Thread David Bremner
Austin Clements amdra...@mit.edu writes: notmuch-poll-script has long since been deprecated in favor of post-new hooks, but this wasn't obvious from the documentation. Update the documentation to make this clear. Since notmuch-poll-script could, to some extend, be used to control the path

Re: [PATCH RFC] Emacs: Add address completion mechanism implemented in elisp

2014-07-31 Thread David Bremner
Michal Sojka sojk...@fel.cvut.cz writes: notmuch-company.el hooks itself into message-mode and uses company-mode to offer the completion to the user. The file is put into the contrib directory which means that the use has to install it himself. This is because company-mode is not a part of

[PATCH v3 02/13] util: Const version of strtok_len

2014-07-31 Thread Austin Clements
Because of limitations in the C type system, we can't a strtok_len that can work on both const string and non-const strings. The C library solves this by taking a const char* and returning a char* in functions like this (e.g., strchr), but that's not const-safe. Solve it by introducing

[PATCH v3 00/13] Implement and use database features

2014-07-31 Thread Austin Clements
This is v3 of id:1406652492-27803-1-git-send-email-amdra...@mit.edu. This fixes one issue and tidies up another thing in notmuch_database_upgrade I found while working on change tracking support. Most of the patches are logically identical to v2, but the changes ripple through the patch context,

[PATCH v3 12/13] lib: Return an error from operations that require an upgrade

2014-07-31 Thread Austin Clements
Previously, there was no protection against a caller invoking an operation on an old database version that would effectively corrupt the database by treating it like a newer version. According to notmuch.h, any caller that opens the database in read/write mode is supposed to check if the database

[PATCH v3 09/13] lib: Reorganize upgrade around document types

2014-07-31 Thread Austin Clements
Rather than potentially making multiple passes over the same type of data in the database, reorganize upgrade around each type of data that may be upgraded. This eliminates code duplication, will make multi-version upgrades faster, and will let us improve progress reporting. --- lib/database.cc

[PATCH v3 01/13] test: Include generated dependencies for test sources

2014-07-31 Thread Austin Clements
Previously the build system was generating automatic header dependencies for test sources, but only smtp-dummy was in SRCS, so only its dependencies were being included. Add all of the test sources to SRCS so that the root Makefile.local includes their dependencies. --- test/Makefile.local | 19

[PATCH v3 03/13] new: Don't report version after upgrade

2014-07-31 Thread Austin Clements
The version number has always been pretty meaningless to the user and it's about to become even more meaningless with the introduction of features. Hopefully, the database will remain on version 3 for some time to come; however, the introduction of new features over time in version 3 will

[PATCH v3 05/13] test: Tool to build DB with specific version and features

2014-07-31 Thread Austin Clements
This will let us test basic version and feature handling. --- test/.gitignore | 1 + test/Makefile.local | 4 test/make-db-version.cc | 35 +++ 3 files changed, 40 insertions(+) create mode 100644 test/make-db-version.cc diff --git

[PATCH v3 11/13] lib: Support empty header values in database

2014-07-31 Thread Austin Clements
Commit 567bcbc2 introduced support for storing various headers in document values. However, doing so in a backwards-compatible way meant that genuinely empty header values could not be distinguished from the old behavior of not storing the headers at all, so these required parsing the original

[PATCH v3 08/13] lib: Use database features to drive upgrade

2014-07-31 Thread Austin Clements
Previously, we had database version information hard-coded in the upgrade code. Slightly re-organize the upgrade process around the set of new database features to be enabled by the upgrade. --- lib/database.cc | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-)

[PATCH v3 07/13] lib: Simplify upgrade code using a transaction

2014-07-31 Thread Austin Clements
Previously, the upgrade was organized as two passes -- an upgrade pass, and a separate cleanup pass -- so the database was always in a valid state. This change substantially simplifies this code by performing the upgrade in a transaction and combining both passes in to one. This 1) eliminates a

[PATCH v3 04/13] lib: Database version 3: Introduce fine-grained features

2014-07-31 Thread Austin Clements
Previously, our database schema was versioned by a single number. Each database schema change had to occur atomically in Notmuch's development history: before some commit, Notmuch used version N, after that commit, it used version N+1. Hence, each new schema version could introduce only one

[PATCH v3 10/13] lib: Report progress for combined upgrade operation

2014-07-31 Thread Austin Clements
Previously, some parts of upgrade didn't report progress and for others it was possible for the progress meter to restart at 0 part way through the upgrade because each stage was reported separately. Fix this by computing the total amount of work that needs to be done up-front and updating

[PATCH v3 06/13] test: Tests for future version and unknown feature handling

2014-07-31 Thread Austin Clements
--- test/T550-db-features.sh | 48 1 file changed, 48 insertions(+) create mode 100755 test/T550-db-features.sh diff --git a/test/T550-db-features.sh b/test/T550-db-features.sh new file mode 100755 index 000..5569768 --- /dev/null +++

[PATCH v3 13/13] lib: Update doc of notmuch_database_{needs_upgrade, upgrade}

2014-07-31 Thread Austin Clements
Clients are no longer required to call these functions after opening a database in read/write mode (which is good, because almost none of them do!). --- lib/notmuch.h | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index

[PATCH] lib: Fix slight misinformation in the database schema doc

2014-07-31 Thread Austin Clements
The database schema documentation made it sound like each mail document had exactly one on-disk message file, which hasn't been true for a long time. --- lib/database.cc | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index

[PATCH] lib: Invalidate message metadata in _notmuch_message_gen_terms

2014-07-31 Thread Austin Clements
Previously, we invalidated stored message metadata in _notmuch_message_add_term and _notmuch_message_remove_term, but not in _notmuch_message_gen_terms. This doesn't currently result in any bugs because of our limited uses of _notmuch_message_gen_terms, but it may could cause trouble in the

[PATCH RFC] Emacs: Add address completion mechanism implemented in elisp

2014-07-31 Thread Michal Sojka
On Thu, Jul 31 2014, Trevor Jim wrote: > BTW I have been refactoring my async process code. You might consider > it for your patch. I'll look at that. I figured out that I might also reuse notmuch-parser.el. I'll post here my findings later. -Michal

[PATCH] config: read database.path from $MAILDIR if set

2014-07-31 Thread David Bremner
Mark Oteiza writes: > Try to read the config parameter database.path from $MAILDIR before > falling back to $HOME/mail > --- This patch doesn't apply to git master. I'm not really sure happened, maybe you generated it against some old version? d

[PATCH] config: read database.path from $MAILDIR if set

2014-07-31 Thread David Bremner
David Bremner writes: > Mark Oteiza writes: > >> Try to read the config parameter database.path from $MAILDIR before >> falling back to $HOME/mail >> --- > > This patch doesn't apply to git master. I'm not really sure happened, > maybe you generated it against some old version? Ah, nevermind

[PATCH] config: read database.path from $MAILDIR if set

2014-07-31 Thread David Bremner
Mark Oteiza writes: > Try to read the config parameter database.path from $MAILDIR before > falling back to $HOME/mail pushed. d

[PATCH] config: read user.name from $NAME if set

2014-07-31 Thread David Bremner
Mark Oteiza writes: > Try to read the config parameter user.name from $NAME before taking the > user name from /etc/passwd. pushed d

[PATCH v2 02/14] util: Make string-util.h C++-compatible

2014-07-31 Thread David Bremner
Austin Clements writes: > --- > util/string-util.h | 8 > 1 file changed, 8 insertions(+) pushed this one patch. d

[PATCH] emacs: Clarify that notmuch-poll-script is deprecated

2014-07-31 Thread David Bremner
Austin Clements writes: > notmuch-poll-script has long since been deprecated in favor of > post-new hooks, but this wasn't obvious from the documentation. > Update the documentation to make this clear. Since > notmuch-poll-script could, to some extend, be used to control the path > of the

[PATCH RFC] Emacs: Add address completion mechanism implemented in elisp

2014-07-31 Thread David Bremner
Michal Sojka writes: > notmuch-company.el hooks itself into message-mode and uses > company-mode to offer the completion to the user. The file is put into > the contrib directory which means that the use has to install it > himself. This is because company-mode is not a part of Emacs and >

[PATCH v3 02/13] util: Const version of strtok_len

2014-07-31 Thread Austin Clements
Because of limitations in the C type system, we can't a strtok_len that can work on both const string and non-const strings. The C library solves this by taking a const char* and returning a char* in functions like this (e.g., strchr), but that's not const-safe. Solve it by introducing

[PATCH v3 00/13] Implement and use database "features"

2014-07-31 Thread Austin Clements
This is v3 of id:1406652492-27803-1-git-send-email-amdragon at mit.edu. This fixes one issue and tidies up another thing in notmuch_database_upgrade I found while working on change tracking support. Most of the patches are logically identical to v2, but the changes ripple through the patch

[PATCH v3 01/13] test: Include generated dependencies for test sources

2014-07-31 Thread Austin Clements
Previously the build system was generating automatic header dependencies for test sources, but only smtp-dummy was in SRCS, so only its dependencies were being included. Add all of the test sources to SRCS so that the root Makefile.local includes their dependencies. --- test/Makefile.local | 19

[PATCH v3 09/13] lib: Reorganize upgrade around document types

2014-07-31 Thread Austin Clements
Rather than potentially making multiple passes over the same type of data in the database, reorganize upgrade around each type of data that may be upgraded. This eliminates code duplication, will make multi-version upgrades faster, and will let us improve progress reporting. --- lib/database.cc

[PATCH v3 12/13] lib: Return an error from operations that require an upgrade

2014-07-31 Thread Austin Clements
Previously, there was no protection against a caller invoking an operation on an old database version that would effectively corrupt the database by treating it like a newer version. According to notmuch.h, any caller that opens the database in read/write mode is supposed to check if the database

[PATCH v3 03/13] new: Don't report version after upgrade

2014-07-31 Thread Austin Clements
The version number has always been pretty meaningless to the user and it's about to become even more meaningless with the introduction of "features". Hopefully, the database will remain on version 3 for some time to come; however, the introduction of new features over time in version 3 will

[PATCH v3 05/13] test: Tool to build DB with specific version and features

2014-07-31 Thread Austin Clements
This will let us test basic version and feature handling. --- test/.gitignore | 1 + test/Makefile.local | 4 test/make-db-version.cc | 35 +++ 3 files changed, 40 insertions(+) create mode 100644 test/make-db-version.cc diff --git

[PATCH v3 11/13] lib: Support empty header values in database

2014-07-31 Thread Austin Clements
Commit 567bcbc2 introduced support for storing various headers in document values. However, doing so in a backwards-compatible way meant that genuinely empty header values could not be distinguished from the old behavior of not storing the headers at all, so these required parsing the original

[PATCH v3 07/13] lib: Simplify upgrade code using a transaction

2014-07-31 Thread Austin Clements
Previously, the upgrade was organized as two passes -- an upgrade pass, and a separate cleanup pass -- so the database was always in a valid state. This change substantially simplifies this code by performing the upgrade in a transaction and combining both passes in to one. This 1) eliminates a

[PATCH v3 06/13] test: Tests for future version and unknown feature handling

2014-07-31 Thread Austin Clements
--- test/T550-db-features.sh | 48 1 file changed, 48 insertions(+) create mode 100755 test/T550-db-features.sh diff --git a/test/T550-db-features.sh b/test/T550-db-features.sh new file mode 100755 index 000..5569768 --- /dev/null +++

[PATCH v3 10/13] lib: Report progress for combined upgrade operation

2014-07-31 Thread Austin Clements
Previously, some parts of upgrade didn't report progress and for others it was possible for the progress meter to restart at 0 part way through the upgrade because each stage was reported separately. Fix this by computing the total amount of work that needs to be done up-front and updating

[PATCH v3 08/13] lib: Use database features to drive upgrade

2014-07-31 Thread Austin Clements
Previously, we had database version information hard-coded in the upgrade code. Slightly re-organize the upgrade process around the set of new database features to be enabled by the upgrade. --- lib/database.cc | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-)

[PATCH v3 04/13] lib: Database version 3: Introduce fine-grained "features"

2014-07-31 Thread Austin Clements
Previously, our database schema was versioned by a single number. Each database schema change had to occur "atomically" in Notmuch's development history: before some commit, Notmuch used version N, after that commit, it used version N+1. Hence, each new schema version could introduce only one

[PATCH v3 13/13] lib: Update doc of notmuch_database_{needs_upgrade, upgrade}

2014-07-31 Thread Austin Clements
Clients are no longer required to call these functions after opening a database in read/write mode (which is good, because almost none of them do!). --- lib/notmuch.h | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index

[PATCH] lib: Fix slight misinformation in the database schema doc

2014-07-31 Thread Austin Clements
The database schema documentation made it sound like each mail document had exactly one on-disk message file, which hasn't been true for a long time. --- lib/database.cc | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index

[PATCH] lib: Invalidate message metadata in _notmuch_message_gen_terms

2014-07-31 Thread Austin Clements
Previously, we invalidated stored message metadata in _notmuch_message_add_term and _notmuch_message_remove_term, but not in _notmuch_message_gen_terms. This doesn't currently result in any bugs because of our limited uses of _notmuch_message_gen_terms, but it may could cause trouble in the

Custom Tag Images

2014-07-31 Thread MaDhAt2r
Hello Everyone. If this is not the place to address this issue, could you please direct me to the proper forum. Info: Using Emacs 24.3.1 on ArchLinux I am interested in setting up custom image for some of the tags I use. I have tried to use a svg file by setting it in the following ways:

Custom Tag Images

2014-07-31 Thread MaDhAt2r
Hello Everyone. If this is not the place to address this issue, could you please direct me to the proper forum. Info: Using Emacs 24.3.1 on ArchLinux I am interested in setting up custom image for some of the tags I use. I have tried to use a svg file by setting it in the following ways:

Custom Tag Images

2014-07-31 Thread MaDhAt2r
Hello Everyone. If this is not the place to address this issue, could you please direct me to the proper forum. Info: Using Emacs 24.3.1 on ArchLinux I am interested in setting up custom image for some of the tags I use. I have tried to use a svg file by setting it in the following ways: