[PATCH 1/5] Use notmuch-show-get-message-id in notmuch-show-get-bodypart-content.

2010-07-01 Thread Dmitry Kurochkin
--- emacs/notmuch-show.el |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 84c6cd6..a845efc 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -349,7 +349,7 @@ current buffer, if possible. (defun

[PATCH 2/5] Add quotes around id:message-id queries.

2010-07-01 Thread Dmitry Kurochkin
--- emacs/notmuch-message.el |2 +- emacs/notmuch-show.el|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el index d5c96c2..4bc76b2 100644 --- a/emacs/notmuch-message.el +++ b/emacs/notmuch-message.el @@ -45,7 +45,7

[PATCH 4/5] Add notmuch-hook. Called when notmuch is started, before notmuch-hello buffer is created.

2010-07-01 Thread Dmitry Kurochkin
--- emacs/notmuch.el |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 5ab3df7..4900a27 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -185,6 +185,11 @@ For a mouse binding, return nil. (set-buffer-modified-p

[PATCH 5/5] Add notmuch-hello-hook. Called every time notmuch-hello buffer is updated.

2010-07-01 Thread Dmitry Kurochkin
--- emacs/notmuch-hello.el |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index f8ae332..5777e99 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -32,6 +32,11 @@ (defvar

Re: [PATCH 2/5] Add quotes around id:message-id queries.

2010-07-02 Thread Dmitry Kurochkin
On Fri, 2 Jul 2010 04:41:43 + (UTC), Olly Betts o...@survex.com wrote: On 2010-07-01, Dmitry Kurochkin wrote: - (concat id: (notmuch-show-get-prop :id props))) + (concat id:\ (notmuch-show-get-prop :id props) \)) This is probably a good idea (the .. example is arguably a Xapian bug

Re: release-candidate/0.6

2011-05-07 Thread Dmitry Kurochkin
Hi Jameson. First of all, thank you for your effort on notmuch. It is a great project and I am happy to see it going forward (again)! Can we include FCC fix in the 0.6 please? It was broken in 0.5 (IIRC) because of old configuration check. There are two patches on the ML to address it. The

[PATCH] Add part filename in notmuch show output if available.

2011-05-07 Thread Dmitry Kurochkin
Before the change, notmuch show output had filename only for parts with Content-Disposition: attachment. But parts with inline disposition may have filename as well. The patch makes notmuch show always output filename if available, independent of Content-Disposition. Both JSON and text output

Re: [PATCH] Add part filename in notmuch show output if available.

2011-05-07 Thread Dmitry Kurochkin
Forgot to note, this patch is for release-candidate/0.6 branch. Regards, Dmitry ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH] Use message-field-value instead of message-fetch-field in FCC header setup.

2011-05-09 Thread Dmitry Kurochkin
For message-fetch-field the buffer is expected to be narrowed to just the header of the message. That is not the case when notmuch-fcc-header-setup is run, hence a wrong header value may be returned. E.g. when forwarding an email, (message-fetch-field From) returns the From header value of the

[PATCH] Fix old style notmuch-fcc-dirs configuration check.

2011-05-09 Thread Dmitry Kurochkin
In notmuch 0.5 notmuch-fcc-dirs style changed. The previous code did not correctly identify an old configuration and, as a consequence, broke new configurations. The fix was extracted from a bigger patch series by David Edmondson id:1290682750-30283-2-git-send-email-...@dme.org. --- The patch

[PATCH] Don't re-compress .gz al. in notmuch-show-save-part.

2011-05-09 Thread Dmitry Kurochkin
Write-region handles some file names specially, see Emacs Lisp manual section 25.11 Making Certain File Names Magic [1]. This is a nice feature for normal text editing, but it is not desirable if we need to save raw file content (e.g. attachment). In particular, this affects archives and may

[PATCH] test: saving attachments from within emacs using notmuch-show-save-part

2011-05-09 Thread Dmitry Kurochkin
--- Oops, the previos patch (id:1304990327-8665-1-git-send-email-dmitry.kuroch...@gmail.com) has wrong title. s/notmuch-show-save-attachments/notmuch-show-save-part/ Regards, Dmitry test/emacs | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/test/emacs

[PATCH v2 0/2] test: add test for saving attachments using notmuch-show-save-part

2011-05-09 Thread Dmitry Kurochkin
This is amended patch from id:1304990689-10933-1-git-send-email-dmitry.kuroch...@gmail.com to test saving attachments withing Emacs using notmuch-show-save-part. It uses test_expect_equal_file instead of test_expect_equal as suggested by Jameson. This patch is for the release-candidate/0.6

[PATCH 1/2] test: copy files in test_expect_equal_file instead of moving them

2011-05-09 Thread Dmitry Kurochkin
Before the change, test_expect_equal_file moved files it compared in case of failure. The patch changes it to copy the files instead. This allows testing non-temporary files which are stored in git. Note: the change should not result in new temporary files left after the tests.

[PATCH 2/2] test: add test for saving attachments using notmuch-show-save-part

2011-05-09 Thread Dmitry Kurochkin
Use .gz filenames for saved attachments in the tests to check that Emacs does not re-compress the file. Use test_expect_equal_file instead of test_expect_equal to avoid binary output on the console. --- test/emacs | 14 +- 1 files changed, 9 insertions(+), 5 deletions(-) diff

Re: [PATCH] test: add %s format string to all `message' calls in emacs tests

2011-05-09 Thread Dmitry Kurochkin
, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: The patch replaces all (message (buffer-string)) calls in emacs tests with (message %s (buffer-string)).  This works around an Emacs (23.3+1-1 on current Debian Unstable) segfault in Ensure that emacs doesn't drop results test.  Note

[PATCH 1/2] Make `notmuch-show-clean-address' parsing-error-proof.

2011-05-12 Thread Dmitry Kurochkin
Mail-header-parse-address may fail for an invalid address. Before the change, this would result in empty notmuch-show buffer with an error message like: Scan error: Unbalanced parentheses. The patch wraps the function in condition-case and returns unchanged address in case of error. ---

[PATCH 2/2] test: add notmuch-show for message with invalid From test

2011-05-12 Thread Dmitry Kurochkin
--- test/emacs | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index 2e85b0c..f2983a7 100755 --- a/test/emacs +++ b/test/emacs @@ -37,8 +37,21 @@ output=$(test_emacs (notmuch-show \$maildir_storage_thread\) (princ (buffer-s

[PATCH 1/3] Use different labels for wash buttons when text is visible or hidden.

2011-05-22 Thread Dmitry Kurochkin
Before the change, citation and signature wash buttons used the same label in both visible and hidden states. Sometimes it is very convenient when you can determine if the text is hidden or shown without reading the context and/or clicking the button. The patch makes it easy to see if the text is

[PATCH 3/3] test: add test for hiding/showing signature in notmuch-show view

2011-05-22 Thread Dmitry Kurochkin
--- test/emacs | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index f2983a7..ccf02af 100755 --- a/test/emacs +++ b/test/emacs @@ -141,4 +141,15 @@ first_line=$(echo $expected | head -n1) output=$(test_emacs '(notmuch-show

[PATCH 2/3] test: fix expected output for emacs tests after the wash button label changes

2011-05-22 Thread Dmitry Kurochkin
--- .../notmuch-show-thread-maildir-storage| 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/emacs.expected-output/notmuch-show-thread-maildir-storage b/test/emacs.expected-output/notmuch-show-thread-maildir-storage index 2f24630..241b5b7

[PATCH] Save and restore point explicitly in `notmuch-wash-toggle-invisible-action'.

2011-05-23 Thread Dmitry Kurochkin
Before the change, save-excursion was used to save the point. But the restored position is affected by buffer modifications, which results in jumping cursor. The patch saves and restores point explicitly by using a variable instead of save-excursion. --- emacs/notmuch-wash.el | 13

Re: [PATCH] Save and restore point explicitly in `notmuch-wash-toggle-invisible-action'.

2011-05-24 Thread Dmitry Kurochkin
Hi Carl. On Tue, 24 May 2011 13:20:56 -0700, Carl Worth cwo...@cworth.org wrote: On Mon, 23 May 2011 19:29:46 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Before the change, save-excursion was used to save the point. But the restored position is affected by buffer

Re: [PATCH] Save and restore point explicitly in `notmuch-wash-toggle-invisible-action'.

2011-05-24 Thread Dmitry Kurochkin
On Tue, 24 May 2011 15:01:04 -0700, Carl Worth cwo...@cworth.org wrote: On Wed, 25 May 2011 00:43:20 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Now, looking at Emacs source code, save_excursion_save() uses point_marker() to save the point. As you said above, markers

Re: [PATCH] Save and restore point explicitly in `notmuch-wash-toggle-invisible-action'.

2011-05-24 Thread Dmitry Kurochkin
On Tue, 24 May 2011 18:43:41 -0400, Austin Clements amdra...@mit.edu wrote: On Tue, May 24, 2011 at 6:16 PM, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: When a user clicks the button, the cursor is somewhere inside the old label.  If we save the point as a marker, after step 3

[PATCH] Save and restore point explicitly in `notmuch-wash-toggle-invisible-action'.

2011-05-24 Thread Dmitry Kurochkin
Before the change, save-excursion was used to save the point. But the restored position is affected by buffer modifications, which results in jumping cursor. The patch saves and restores point explicitly by using a variable instead of save-excursion. --- emacs/notmuch-wash.el | 13

Re: [PATCH] Save and restore point explicitly in `notmuch-wash-toggle-invisible-action'.

2011-05-24 Thread Dmitry Kurochkin
On Tue, 24 May 2011 16:20:34 -0700, Carl Worth cwo...@cworth.org wrote: On Tue, 24 May 2011 18:43:41 -0400, Austin Clements amdra...@mit.edu wrote: Saving point this way is a bit dangerous, though. For example, if you're near the end of the buffer and shorten the label, attempting to

[PATCH] Fix hiding a message while some citations are visible

2011-05-25 Thread Dmitry Kurochkin
This patch series does some fixes and improvements for hiding and showing messages in notmuch-show. However it comes with a regression: isearch is broken for hidden overlays when `invisible' property is a list. I have opened emacs bug #8721 [1] and sent a patch. It has been committed to emacs

[PATCH 1/5] Pass message to the `notmuch-show-insert-text/plain-hook' hook.

2011-05-25 Thread Dmitry Kurochkin
Before the change, the `notmuch-show-insert-text/plain-hook' was given only the `depth' argument. The patch adds another one - the message. Currently, the new message argument is not used by any on the hooks. But it will be used later to get access to message invisibility specs when wash

[PATCH 2/5] Set message invisibility spec properties before inserting the body.

2011-05-25 Thread Dmitry Kurochkin
This would allow body-inserting code (in particular, wash button-inserting code) to use message invisibility specs. --- emacs/notmuch-show.el |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 786debf..34c0b79 100644

[PATCH 3/5] Fix hiding a message while some citations are shown in notmuch-show view.

2011-05-25 Thread Dmitry Kurochkin
Before the change, message and citation invisibility overlays conflicted: if some citation is made visible and then the whole message is hidden, that citation remained visible. This happened because the citation's overlay has an invisible property which takes priority over the message overlay.

[PATCH 4/5] Set higher priority for headers and hidden citation overlays.

2011-05-25 Thread Dmitry Kurochkin
Before the patch, message, headers and hidden citation overlays had zero priority. All these overlay have `invisible' property. Emacs documentation says that we should not make assumptions about which overlay will prevail when they have the same priority [1]. It happens to work as we need, but

[PATCH 5/5] Simplify message and headers visibility code in notmuch-show view.

2011-05-25 Thread Dmitry Kurochkin
Before the change, headers and message visibility functions took extra care to correctly set `buffer-invisibility-spec'. This was needed because headers overlay `invisible' property had only headers' invisibility spec. So visibility of headers was determined only by the headers invisibility

Re: [PATCH 3/5] Fix hiding a message while some citations are shown in notmuch-show view.

2011-05-25 Thread Dmitry Kurochkin
On Wed, 25 May 2011 15:23:47 -0700, Carl Worth cwo...@cworth.org wrote: On Thu, 26 May 2011 02:10:14 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Before the change, message and citation invisibility overlays conflicted: if some citation is made visible and then the whole

Re: [PATCH 3/5] Fix hiding a message while some citations are shown in notmuch-show view.

2011-05-25 Thread Dmitry Kurochkin
On Wed, 25 May 2011 15:46:40 -0700, Carl Worth cwo...@cworth.org wrote: On Thu, 26 May 2011 02:34:28 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: I am not sure how it is best to test this. The common `printc' method for emacs tests does not work, because it prints invisible

Re: [PATCH 3/5] Fix hiding a message while some citations are shown in notmuch-show view.

2011-05-26 Thread Dmitry Kurochkin
On Wed, 25 May 2011 18:02:49 -0700, Carl Worth cwo...@cworth.org wrote: On Thu, 26 May 2011 03:10:11 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: On Wed, 25 May 2011 15:46:40 -0700, Carl Worth cwo...@cworth.org wrote: Well, emacs trunk is not broken :) The bug is in lisp code

[PATCH] test: add test-lib.el file with `visible-buffer-string' function

2011-05-26 Thread Dmitry Kurochkin
http://www.gnu.org/licenses/. +;; +;; Authors: Dmitry Kurochkin dmitry.kuroch...@gmail.com + +(defun visible-buffer-string () + Same as `buffer-string', but excludes invisible text. + (visible-buffer-substring (point-min) (point-max))) + +(defun visible-buffer-substring (start end) + Same

[PATCH 1/2] test: add tests for hiding messages in notmuch-show view

2011-05-26 Thread Dmitry Kurochkin
--- test/emacs | 16 .../notmuch-show-thread-with-hidden-messages |3 +++ 2 files changed, 19 insertions(+), 0 deletions(-) create mode 100644 test/emacs.expected-output/notmuch-show-thread-with-hidden-messages diff --git

[PATCH 2/2] Workaround for Emacs bug #8721.

2011-05-26 Thread Dmitry Kurochkin
The patch adds `notmuch-isearch-range-invisible' function which is the same as `isearch-range-invisible' but with fixed Emacs bug `notmuch-isearch-range-invisible' instead of the original `isearch-range-invisible' when in `notmuch-show-mode'. --- emacs/notmuch-wash.el | 67

Re: [PATCH 3/5] Fix hiding a message while some citations are shown in notmuch-show view.

2011-05-26 Thread Dmitry Kurochkin
On Thu, 26 May 2011 14:31:30 -0700, Carl Worth cwo...@cworth.org wrote: On Thu, 26 May 2011 14:26:34 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: It is called indirectly. What is the best way to fix it? I imagine that we can replace `isearch-range-invisible' function

Re: [PATCH 2/2] Workaround for Emacs bug #8721.

2011-05-26 Thread Dmitry Kurochkin
On Fri, 27 May 2011 01:38:35 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: The patch adds `notmuch-isearch-range-invisible' function which is the same as `isearch-range-invisible' but with fixed Emacs bug `notmuch-isearch-range-invisible' instead of the original `isearch-range

Re: [PATCH 2/2] Workaround for Emacs bug #8721.

2011-05-27 Thread Dmitry Kurochkin
This is an amended patch which uses `isearch-range-invisible' from Emacs trunk r104393 (includes the second patch from #8721). Regards, Dmitry From d56f2c308c995639aad04f0e5388b52912e603b0 Mon Sep 17 00:00:00 2001 From: Dmitry Kurochkin dmitry.kuroch...@gmail.com Date: Fri, 27 May 2011 01:35:09

[PATCH 1/2] Add part filename and content-id in notmuch show output if available.

2011-05-28 Thread Dmitry Kurochkin
Before the change, notmuch show output had filename only for parts with Content-Disposition: attachment. But parts with inline disposition may have filename as well. The patch makes notmuch show always output filename if available, independent of Content-Disposition. Both JSON and text output

[PATCH 2/2] test: fix tests after notmuch show output changes related to filenames

2011-05-28 Thread Dmitry Kurochkin
--- test/crypto|3 +-- test/multipart | 12 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/test/crypto b/test/crypto index 8e92016..796c4ca 100755 --- a/test/crypto +++ b/test/crypto @@ -168,8 +168,7 @@ Non-text part: application/pgp-encrypted part{ ID:

Re: [PATCH] Added C-up and C-down to cycle through previous searches

2011-05-30 Thread Dmitry Kurochkin
Hi Dima. On Sun, 29 May 2011 01:56:28 -0700, notm...@dima.secretsauce.net wrote: From: Dima Kogan d...@secretsauce.net --- Hi. I made a few improvements to the emacs UI. This patch allows the user to scroll through the most recent searches with C-up and C-down while in the search

Re: [PATCH 14/25] Fix old style notmuch-fcc-dirs configuration check.

2011-06-02 Thread Dmitry Kurochkin
case to correctly use notmuch_search_sanitize to avoid spurious failures unmatching thread ID values). This patch, however, isn't ready. The big problem is in this commit message: From: Dmitry Kurochkin dmitry.kuroch...@gmail.com In notmuch 0.5 notmuch-fcc-dirs style changed

Re: [PATCH 14/25] Fix old style notmuch-fcc-dirs configuration check.

2011-06-03 Thread Dmitry Kurochkin
On Fri, 03 Jun 2011 13:05:00 -0700, Carl Worth cwo...@cworth.org wrote: Non-text part: multipart/signed On Thu, 02 Jun 2011 10:49:57 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Well, it says that changes are in notmuch 0.5. So old and previous refer to pre-0.5 (i.e. 0.4

Re: [PATCH] Add dir-locals style variables for C++ and Elisp code.

2011-06-06 Thread Dmitry Kurochkin
Hi Austin. On Tue, 7 Jun 2011 01:20:25 -0400, Austin Clements amdra...@mit.edu wrote: Also, slightly reformat dir-locals.el so that the settings align and to make it friendlier for future additions. --- .dir-locals.el | 18 ++ 1 files changed, 14 insertions(+), 4

[PATCH 2/3] Fix memory leak in guess_from_received_header().

2011-06-15 Thread Dmitry Kurochkin
Mta variable was not free()d in one case. --- notmuch-reply.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index dab69e6..64f70bf 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -401,8 +401,10 @@ guess_from_received_header

[PATCH 3/3] Fix indentation in guess_from_received_header().

2011-06-15 Thread Dmitry Kurochkin
--- notmuch-reply.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 64f70bf..27ef37b 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -427,13 +427,13 @@ guess_from_received_header (notmuch_config_t *config,

Re: [PATCH 3/5] Fix hiding a message while some citations are shown in notmuch-show view.

2011-06-15 Thread Dmitry Kurochkin
On Wed, 15 Jun 2011 07:06:40 -0700, Carl Worth cwo...@cworth.org wrote: On Fri, 27 May 2011 01:42:22 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: I have just send two more patches to this thread. One with new tests. Another with a workaround for the bug. The workaround should

Re: [PATCH 3/5] Fix hiding a message while some citations are shown in notmuch-show view.

2011-06-15 Thread Dmitry Kurochkin
On Wed, 15 Jun 2011 10:00:36 -0700, Carl Worth cwo...@cworth.org wrote: On Wed, 15 Jun 2011 18:25:14 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: I know you prefer tests to go before patches and I agree with that. Great! But most of the time I do tests after coding. Yes

[PATCH] Fix compilation warnings in test/smtp-dummy.c.

2011-06-16 Thread Dmitry Kurochkin
* Remove unused variables in main(): buf, bytes and greeting. * Replace return with no value in main() with exit(3). --- test/smtp-dummy.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/test/smtp-dummy.c b/test/smtp-dummy.c index e58d0ad..133d6c4 100644 ---

Re: [python] segfaults at Message.get_date

2011-06-19 Thread Dmitry Kurochkin
Hi Sebastian, Patrick. On Sat, 18 Jun 2011 12:30:01 +0200, Sebastian Spaeth sebast...@sspaeth.de wrote: On Fri, 17 Jun 2011 17:10:24 +0100, Patrick Totzke : #0 0x006eb87d in Xapian::Document::Internal::get_value(unsigned int) const () from /usr/lib/sse2/libxapian.so.22 #1 0x006eb952 in

Re: [PATCH 14/25] Fix old style notmuch-fcc-dirs configuration check.

2011-06-23 Thread Dmitry Kurochkin
On Thu, 23 Jun 2011 15:22:46 -0700, Carl Worth cwo...@cworth.org wrote: On Sat, 04 Jun 2011 00:22:04 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: On Fri, 03 Jun 2011 13:05:00 -0700, Carl Worth cwo...@cworth.org wrote: I do not think we need a test for this fix. What we need

[PATCH] test: remove useless test_emacs call from an emacs FCC test

2011-06-23 Thread Dmitry Kurochkin
--- test/emacs |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/test/emacs b/test/emacs index 9b5d485..6f82b08 100755 --- a/test/emacs +++ b/test/emacs @@ -124,7 +124,6 @@ mkdir -p mail/sent-string/new mkdir -p mail/sent-string/tmp test_begin_subtest notmuch-fcc-dirs

[PATCH 1/5] test: do not set `message-signature' in test_emacs

2011-06-26 Thread Dmitry Kurochkin
It is no longer needed since tests are run in a temporary home directory instead of the user's one. --- test/test-lib.sh |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index cc20f41..3ec388c 100755 --- a/test/test-lib.sh +++

[PATCH 2/5] test: cleanup test_emacs

2011-06-26 Thread Dmitry Kurochkin
--- a/test/test-lib.el +++ b/test/test-lib.el @@ -20,6 +20,14 @@ ;; ;; Authors: Dmitry Kurochkin dmitry.kuroch...@gmail.com +;; avoid crazy 10-column default of --batch +(set-frame-width (window-frame (get-buffer-window)) 80) + +(defun notmuch-test-wait () + Wait for process completion. + (while (get

[PATCH 3/5] test: wrap and indent test_emacs calls

2011-06-26 Thread Dmitry Kurochkin
Most test_emacs calls have long arguments that consist of many expressions. Putting them on a single line makes it hard to read and produces poor diff when they are changed. The patch puts every expression in test_emacs calls on a separate line. --- test/emacs | 124

[PATCH 5/5] test: remove some sed(1) calls in Emacs tests

2011-06-26 Thread Dmitry Kurochkin
Few Emacs tests used sed(1) to remove unexpected output in the beginning to avoid getting confused by messages such as Parsing /home/cworth/.mailrc... done. This is no longer needed since tests are run in a temporary home directory instead of the user's one. So remove these sed(1) calls. ---

[PATCH 1/2] test: use emacs_deliver_message in Emacs SMTP send test

2011-06-26 Thread Dmitry Kurochkin
Minor changes to expected results of other Emacs tests were needed because the message Date header changed. --- test/emacs | 34 +- 1 files changed, 9 insertions(+), 25 deletions(-) diff --git a/test/emacs b/test/emacs index f3239ea..4f16b41 100755 ---

[PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-26 Thread Dmitry Kurochkin
Before the change, every Emacs tests ran in a separate Emacs instance. Starting Emacs many times wastes considerable time and it gets worse as the test suite grows. The patch solves this by using a single Emacs server and emacsclient(1) to run multiple tests. Emacs server is started on the

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
this condition in the elisp code and not bother with the trap, but the error thrown is just an 'error, so I don't think we can catch and ignore it without catching and ignoring *all* errors. On Sun, Jun 26, 2011 at 11:54 PM, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Before

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Austin, On Tue, 28 Jun 2011 00:22:41 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements amdra...@mit.edu wrote: This looks like a great idea! The test suite has been getting irritating slow. A few minor comments: This patch

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
On Mon, 27 Jun 2011 23:49:37 -0400, Austin Clements amdra...@mit.edu wrote: Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: The only way I know to reliably kill a child process is to open a pipe to it and have it exit on its own when it reads EOF. Unfortunately, I couldn't find a way

[PATCH 03/10] test: cleanup test_emacs

2011-06-27 Thread Dmitry Kurochkin
--- a/test/test-lib.el +++ b/test/test-lib.el @@ -20,6 +20,14 @@ ;; ;; Authors: Dmitry Kurochkin dmitry.kuroch...@gmail.com +;; avoid crazy 10-column default of --batch +(set-frame-width (window-frame (get-buffer-window)) 80) + +(defun notmuch-test-wait () + Wait for process completion. + (while (get

[PATCH 06/10] test: remove some sed(1) calls in Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Few Emacs tests used sed(1) to remove unexpected output in the beginning to avoid getting confused by messages such as Parsing /home/cworth/.mailrc... done. This is no longer needed since tests are run in a temporary home directory instead of the user's one. So remove these sed(1) calls. ---

[PATCH 05/10] test: save buffer content to file instead of printing it in Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Before the change, the common Emacs test scheme was to print buffer content to stdout and redirect it to a file or capture it in a shell variable. This does not work if we switch to using emacsclient(1) for running the tests, because you can not print to the stdout in this case. (Actually, you

[PATCH 07/10] test: use emacs_deliver_message in Emacs SMTP send test

2011-06-27 Thread Dmitry Kurochkin
Minor changes to expected results of other Emacs tests were needed because the message Date header changed. --- test/emacs | 34 +- 1 files changed, 9 insertions(+), 25 deletions(-) diff --git a/test/emacs b/test/emacs index 4592005..409e033 100755 ---

[PATCH 09/10] test: generate run_emacs script once on test startup

2011-06-27 Thread Dmitry Kurochkin
Instead of generating auxiliary run_emacs script every time test_emacs is run, do it once in the beginning of the test. Also, use absolute paths in the script to make it more robust. --- test/test-lib.sh | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git

[PATCH 08/10] test: set variables using `let' instead of `setq' in Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Using `setq' for setting variables in Emacs tests affect other tests that may run in the same Emacs environment. Currently it works because each test is run in a separate Emacs instance. But in the future multiple tests will run in a single Emacs instance. The patch changes all variables to use

[PATCH 10/10] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Before the change, every Emacs test ran in a separate Emacs instance. Starting Emacs many times wastes considerable time and it gets worse as the test suite grows. The patch solves this by using a single Emacs server and emacsclient(1) to run multiple tests. Emacs server is started on the first

[PATCH 04/10] test: wrap and indent test_emacs calls

2011-06-27 Thread Dmitry Kurochkin
Most test_emacs calls have long arguments that consist of many expressions. Putting them on a single line makes it hard to read and produces poor diff when they are changed. The patch puts every expression in test_emacs calls on a separate line. --- test/emacs | 124

[PATCH] test: use emacsclient(1) for Emacs tests

2011-06-27 Thread Dmitry Kurochkin
Before the change, every Emacs test ran in a separate Emacs instance. Starting Emacs many times wastes considerable time and it gets worse as the test suite grows. The patch solves this by using a single Emacs server and emacsclient(1) to run multiple tests. Emacs server is started on the first

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 12:22:57 -0400, Austin Clements amdra...@mit.edu wrote: Quoth myself on Jun 27 at 11:49 pm: Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: EMACSDONE=$TEST_DIRECTORY/emacsdone mkfifo $EMACSDONE coproc emacs --batch --eval '(while t (eval (read)) (write-region \n nil

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 13:10:58 -0700, Carl Worth cwo...@cworth.org wrote: On Tue, 28 Jun 2011 20:42:42 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: I would like to hear what other (Carl in particular) think about this. If the consensus is for your approach, I would be happy

Re: [PATCH 2/2] test: use emacsclient(1) for Emacs tests

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 13:10:58 -0700, Carl Worth cwo...@cworth.org wrote: Non-text part: multipart/signed On Tue, 28 Jun 2011 20:42:42 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: I would like to hear what other (Carl in particular) think about this. If the consensus is for your

Re: [PATCH 10/10] test: use emacsclient(1) for Emacs tests

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 15:14:04 -0700, Carl Worth cwo...@cworth.org wrote: On Tue, 28 Jun 2011 08:45:11 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Before the change, every Emacs test ran in a separate Emacs instance. Starting Emacs many times wastes considerable time

[PATCH 1/3] test: `notmuch-show-advance-and-archive' with invisible signature

2011-06-28 Thread Dmitry Kurochkin
Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible signature. --- This patch series fixes the bug reported by Sebastien in [1]. I was able to reproduce it and confirm that the second patch from this series fixes the problem.

[PATCH 2/3] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive

2011-06-28 Thread Dmitry Kurochkin
Use `previous-single-char-property-change' instead of going through each character by hand and testing it's visibility. This fixes `notmuch-show-advance-and-archive' to work for the last message in thread with hidden signature. --- emacs/notmuch-show.el | 17 + 1 files changed,

[PATCH 3/3] emacs: remove no longer used functions from notmuch-show.el

2011-06-28 Thread Dmitry Kurochkin
Remove `notmuch-show-move-past-invisible-backward' and `notmuch-show-move-past-invisible-forward' functions which are unused. --- emacs/notmuch-show.el |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index

Re: bug in emacs-ui ?

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 21:38:17 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Hi Jani. On Tue, 28 Jun 2011 10:35:48 + (UTC), Jani Nikula j...@nikula.org wrote: Carl Worth cworth@... writes: On Wed, 22 Jun 2011 08:50:23 +0200, Sebastien Binet seb.binet@... wrote

[PATCH] emacs: remove unused `point-invisible-p' function

2011-06-28 Thread Dmitry Kurochkin
`point-invisible-p' does not work correctly when `invisible' property is a list. There are standard `invisible-p' and related functions that should be used instead. --- emacs/notmuch-lib.el | 15 --- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git

Re: [PATCH 1/3] test: `notmuch-show-advance-and-archive' with invisible signature

2011-06-28 Thread Dmitry Kurochkin
On Wed, 29 Jun 2011 05:48:50 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible signature. --- This patch series fixes the bug reported by Sebastien in [1]. I

[PATCH 1/6] test: run emacs inside screen

2011-06-29 Thread Dmitry Kurochkin
Before the change, emacs run in daemon mode without any visible buffers. Turns out that this affects emacs behavior in some cases. In particular, `window-end' function returns `point-max' instead of the last visible position. That makes it hard or impossible to implement some tests. The patch

[PATCH 2/6] test: do not set frame width in emacs

2011-06-29 Thread Dmitry Kurochkin
@@ ;; ;; Authors: Dmitry Kurochkin dmitry.kuroch...@gmail.com -;; avoid crazy 10-column default of --batch -(set-frame-width (window-frame (get-buffer-window)) 80) - ;; `read-file-name' by default uses `completing-read' function to read ;; user input. It does not respect `standard-input

[PATCH 3/6] test: `notmuch-show-advance-and-archive' with invisible signature

2011-06-29 Thread Dmitry Kurochkin
Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible signature. --- test/emacs | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index e59de47..bad1122 100755 ---

[PATCH 4/6] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive

2011-06-29 Thread Dmitry Kurochkin
Use `previous-single-char-property-change' instead of going through each character by hand and testing it's visibility. This fixes `notmuch-show-advance-and-archive' to work for the last message in thread with hidden signature. --- emacs/notmuch-show.el | 17 + 1 files changed,

[PATCH 5/6] emacs: remove no longer used functions from notmuch-show.el

2011-06-29 Thread Dmitry Kurochkin
Remove `notmuch-show-move-past-invisible-backward' and `notmuch-show-move-past-invisible-forward' functions which are unused. --- emacs/notmuch-show.el |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index

[PATCH 6/6] emacs: remove unused `point-invisible-p' function

2011-06-29 Thread Dmitry Kurochkin
`point-invisible-p' does not work correctly when `invisible' property is a list. There are standard `invisible-p' and related functions that should be used instead. --- emacs/notmuch-lib.el | 15 --- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git

Re: [PATCH 1/3] test: `notmuch-show-advance-and-archive' with invisible signature

2011-06-29 Thread Dmitry Kurochkin
On Wed, 29 Jun 2011 09:10:19 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: On Wed, 29 Jun 2011 05:48:50 +0400, Dmitry Kurochkin dmitry.kuroch...@gmail.com wrote: Add Emacs test to check that `notmuch-show-advance-and-archive' works for the last message in thread with invisible

[PATCH] test: avoid using screen(1) configuration files

2011-06-29 Thread Dmitry Kurochkin
Set SCREENRC and SYSSCREENRC environment variables to /dev/null as suggested by Jim Paris to avoid potential problems with screen(1) configuration files. --- test/test-lib.sh |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index

Re: [PATCH 1/6] test: run emacs inside screen

2011-06-29 Thread Dmitry Kurochkin
On Wed, 29 Jun 2011 16:16:40 -0400, Jim Paris j...@jtan.com wrote: Dmitry Kurochkin wrote: Before the change, emacs run in daemon mode without any visible buffers. Turns out that this affects emacs behavior in some cases. In particular, `window-end' function returns `point-max' instead

[PATCH] test: json show format of message with inline attachment with filename

2011-07-01 Thread Dmitry Kurochkin
The patch adds a test to check that json show format includes filenames for attachments with inline disposition. --- Carl, I owe you this test case for my patch that added filenames for inline attachments :) Regards, Dmitry test/json | 13 + 1 files changed, 13 insertions(+), 0

[PATCH] test: do not hide test_emacs errors

2011-07-01 Thread Dmitry Kurochkin
Do not redirect test_emacs stderr to /dev/null. Test_emacs uses emacsclient(1) now and it does not print unwanted messages (like those from `message') to stderr. But it does print useful errors, e.g. when emacs server connection fails, given expression is not valid or undefined function is

[PATCH v2 0/7] advance-and-archive bugfix, run emacs inside screen

2011-07-01 Thread Dmitry Kurochkin
Amended patch series. Only minor changes: * redirect errors from test_emacs in the emacs server wait loop to /dev/null * reordered patches Regards, Dmitry ___ notmuch mailing list notmuch@notmuchmail.org

[PATCH v2 5/7] emacs: improve hidden signatures handling in notmuch-show-advance-and-archive

2011-07-01 Thread Dmitry Kurochkin
Use `previous-single-char-property-change' instead of going through each character by hand and testing it's visibility. This fixes `notmuch-show-advance-and-archive' to work for the last message in thread with hidden signature. --- emacs/notmuch-show.el | 17 + 1 files changed,

[PATCH v2 6/7] emacs: remove no longer used functions from notmuch-show.el

2011-07-01 Thread Dmitry Kurochkin
Remove `notmuch-show-move-past-invisible-backward' and `notmuch-show-move-past-invisible-forward' functions which are unused. --- emacs/notmuch-show.el |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index

[PATCH v2 7/7] emacs: remove unused `point-invisible-p' function

2011-07-01 Thread Dmitry Kurochkin
`point-invisible-p' does not work correctly when `invisible' property is a list. There are standard `invisible-p' and related functions that should be used instead. --- emacs/notmuch-lib.el | 15 --- 1 files changed, 0 insertions(+), 15 deletions(-) diff --git

[PATCH v2 1/7] test: run emacs inside screen

2011-07-01 Thread Dmitry Kurochkin
Before the change, emacs run in daemon mode without any visible buffers. Turns out that this affects emacs behavior in some cases. In particular, `window-end' function returns `point-max' instead of the last visible position. That makes it hard or impossible to implement some tests. The patch

  1   2   3   4   5   6   7   8   9   10   >