Commit graph

41 commits

Author SHA1 Message Date
Jani Nikula
b8a136187a emacs: hello: promote '?' as the universal help key
Move the brief help text at the bottom of the hello screen to the
notmuch-hello-mode help, and promote '?' as the universal help key
across Notmuch. This unclutters the hello screen, and allows for a
more verbose description in the mode help. Hopefully, this change is
useful for both experienced and new users alike.

While at it, improve the links to Notmuch and hello screen
customization.
2016-03-14 19:54:32 -03:00
Austin Clements
e501a16e71 emacs: Expand default saved searches and add shortcut keys
This should help new users off to a better start with the addition of
more sensible saved searches and default shortcut keys.  Most existing
users have probably customized this variable and won't be affected.
2014-08-05 08:07:52 -03:00
Pieter Praet
f5aa5ac6c7 test: emacs: new tests "notmuch-show: {, un}collapse all messages in thread"
* test/emacs:

  - New subtest "notmuch-show: collapse all messages in thread":
    `notmuch-show-open-or-close-all' with prefix arg ("C-u M-RET")
    collapses all messages in thread.

  - New subtest "notmuch-show: uncollapse all messages in thread":
    `notmuch-show-open-or-close-all' without prefix arg ("M-RET")
    uncollapses all messages in thread.
2012-10-20 12:10:24 -03:00
Pieter Praet
3a8712e7db test: emacs: new tests "notmuch-show: {show, hide} message headers"
* test/emacs:

  - New subtest "notmuch-show: show message headers":
    Setting `notmuch-message-headers-visible' to t causes all headers
    defined in `notmuch-message-headers' to be shown.

  - New subtest "notmuch-show: hide message headers":
    Setting `notmuch-message-headers-visible' to nil causes all headers
    defined in `notmuch-message-headers' to be hidden.
    ("Subject:" may be an exception;  See the use of `headers-start' in
    `notmuch-show-insert-msg')

  - New subtest "notmuch-show: hide message headers (w/ notmuch-show-toggle-headers)":
    Setting `notmuch-message-headers-visible' to t causes all headers
    defined in `notmuch-message-headers' to be shown, but they can be
    hidden for the current message by running `notmuch-show-toggle-headers'.
2012-10-20 12:10:12 -03:00
Ethan Glasser-Camp
518eed1ba7 test: Move tests from emacs to emacs-show
This requires changing the contents of the crypto tests, as one thread
that was marked read by the earlier tests in test/emacs is no longer
marked read.

This moves tests for:

- 09d19ac "test: emacs: toggle eliding of non-matching messages in
   `notmuch-show'", which should have actually read: "test: emacs:
   toggle processing of cryptographic MIME parts in `notmuch-show'".
   See commit 19ec74c5.

- 5ea1dbe "test: emacs: toggle eliding of non-matching messages in
  `notmuch-show'"

- 345faab "test: emacs: toggle thread content indentation in
  `notmuch-show'"

Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
2012-10-18 08:45:16 -03:00
Pieter Praet
345faab1f5 test: emacs: toggle thread content indentation in `notmuch-show'
See commit c205e8ff.
2012-10-17 21:35:38 -03:00
Pieter Praet
5ea1dbe977 test: emacs: toggle eliding of non-matching messages in `notmuch-show'
See commits 44a544ed, 866ce8b1, 668b66ec.
2012-10-17 21:33:44 -03:00
Pieter Praet
09d19ac8c0 test: emacs: toggle eliding of non-matching messages in `notmuch-show'
See commits 44a544ed, 866ce8b1, 668b66ec.

Signed-off-by: Ethan Glasser-Camp <ethan@betacantrips.com>
2012-10-17 21:31:13 -03:00
Dmitry Kurochkin
512df7ec47 test: add Emacs notmuch-hello tests for custom tags and queries section.
The tests use default values from customization widgets to make sure
that these customization widgets work (at least on basic level).

The custom queries section test is currently broken.
2012-05-06 19:44:42 -03:00
Dmitry Kurochkin
6409a27b2c emacs: get rid of trailing spaces in notmuch-hello view
This patch removes trailing spaces in notmuch-hello view.

A side effect of this change is that tag/query buttons no longer
include a space at the end.  This means that pressing RET when the
point is at the first character after the tag/query button no longer
works (note that this is the standard behavior for buttons).  We may
change this behavior in the future (without adding trailing spaces
back) if people would find this change inconvenient.
2012-04-12 08:40:33 -03:00
Dmitry Kurochkin
1361dd37bc emacs: fix off-by-one error in notmuch-hello column alignment
Expected results for few tests are fixed, the relevant test is
unmarked broken.
2012-04-05 07:40:12 -03:00
Dmitry Kurochkin
818790f7b5 test: add broken test for long names in Emacs notmuch-hello view
Currently, the column alignment in Emacs notmuch-hello is broken for
tags/queries with long names.
2012-04-05 07:37:53 -03:00
Daniel Schoepe
6e25ea031f emacs: Tests for user-defined sections
A new file was added for notmuch-hello tests.
2012-03-01 08:16:55 -04:00
Dmitry Kurochkin
d0a048f856 emacs: polish notmuch-hello help text
Make `=' binding description consistent with others.
2012-01-26 08:20:40 -04:00
Dmitry Kurochkin
02d8815922 emacs: bind "s" to `notmuch-search' in notmuch-hello buffer
Before the change, "s" in notmuch-hello buffer would jump to the
search box.  The patch changes the binding to `notmuch-search' which
is consistent with all other notmuch buffers.
2012-01-25 08:33:27 -04:00
Dmitry Kurochkin
d3aa6848da emacs: add invisible dot instead of space at the end of notmuch-hello search box
This makes `show-trailing-whitespace' happy, i.e. it does not mark the
whole search box line as trailing spaces.

Since the dot is invisible, this change makes no visible difference
for `notmuch-hello'.

Edited-by: Pieter Praet <pieter@praet.org> to fix the tests.
2012-01-21 08:50:48 -04:00
David Bremner
7da6733e89 test: add two new messages to corpus with iso-8859-1 encoding
One is quoted printable, the other users 8 bit encoding. The latter
triggers a bug in the python bindings due to missing call to
g_mime_init. The corresponding test is marked broken in this commit.
2011-12-31 23:04:01 -04:00
David Edmondson
c96f5f29dd test: Updated the expected output to match the newly enabled text/plain hooks. 2011-12-28 13:29:08 -04:00
Gregor Zattler
629dbac626 emacs: test notmuch show with fourfold message indentation
Previous behaviour was to indent messages in a thread according
to depth by one space per level.  This commit tests if setting
notmuch-indent-messages-width to `4' provides a message thread
with four spaces of indentation thread depth.
2011-11-25 12:41:59 -05:00
Gregor Zattler
06156f70bf emacs: test: notmuch show without indentation
Previous behaviour was to indent messages in a thread according
to depth by one space per level.  In
id:1311028119-50637-1-git-send-email-fgeller@gmail.com Felix
Geller proposed a patch in order to turn indentation off.  This
commit tests if instead setting notmuch-indent-messages-width to
`0' does turn off indentation.
2011-11-25 12:41:43 -05:00
Pieter Praet
66247d26f3 test: emacs: tidy up "Stashing in notmuch-show" test
Merge expected output into the actual test, so we can verify the stashed
filename using ${gen_msg_filename} instead of doing sed tricks.
2011-11-18 13:29:35 -05:00
Pieter Praet
64febdf71c test: stashing in notmuch-{show,search}
Should provide full test coverage of the stashing feature.

Signed-off-by: Pieter Praet <pieter@praet.org>
2011-11-12 20:32:47 -04:00
Dmitry Kurochkin
e972d752c0 emacs: add invisible space after the search widget field in notmuch-hello
It is very convenient when C-e (bound to `widget-end-of-line') ignores
trailing spaces inside the search widget.  But it only does so if a
widget is not followed by a newline (that is why it works in the saved
search widgets).  The patch just adds an invisible space after the
search widget to get the desirable behavior of `widget-end-of-line'.
The extra space is also added to expected results of emacs tests.
2011-11-12 10:34:53 -05:00
Carl Worth
580de27177 emacs: Fix to unconditionally display subject changes in collapsed thread view
The feature to show subject changes in the collapsed thread view was
originally added (8ab433607) with an option
(notmuch-show-always-show-subject) to display the subject
for all messages, even when there was no change.

The subsequent commit (4f04d273) changed the sense of the test (or to
and) and the name of the controlling variable
(notmuch-show-elide-same-subject).

But this commit is broken in a few ways:

  1. The original definition of notmuch-show-always-show-subject was
     left around

     But the variable isn't actually used in the code at all, so it
     just adds clutter and confusion to the customization interface.

  2. The name and description of the controlling variable doesn't
     match the implementation

     The name suggests that setting the variable to t will cause
     repeated subjects to be elided, (suggesting that when it is nil
     all subjects will be shown).

     However, when the variable is nil, no subjects are shown. So a
     correct name for the variable in this sense would be
     notmuch-show-subject-changes.

Showing subject changes is a useful feature, and should be on by
default. (We don't want to bury generally useful features behind
customizations that users have to find).

Rather than fixing the name of the variable and changing its default
value, here we remove the condition entirely, such that the feature is
enabled unconditionally.

So both the currently-used variable and the stale definition of the
formerly-used are removed.

Also, the one relevant test-suite result is updated, (showing the
intial subject of a collapsed thread, and no subject display for later
messages that do not change the subject).
2011-07-01 02:00:25 -07:00
Dmitry Kurochkin
59b251ef94 test emacs: Add tests for hiding messages in notmuch-show view
This test is expected to fail as it exposes a current bug, (which we
hope to fix soon).
2011-06-15 07:07:32 -07:00
Jameson Graef Rollins
5b0bf70faa test: update emacs test to use test_expect_equal_file
This is a much cleaner way to do the emacs tests, since we're actually
comparing output against existing files with expected output.  We also
won't miss any trailing newlines this way.

And speaking of which, one of the expected output files was actually
missing a trailing blank line that was actually in one of the original
messages, so this was fixed.
2011-06-03 14:29:05 -07:00
Jameson Graef Rollins
1d6b49561f tag signed/encrypted during notmuch new
This patch adds the tag "signed" to messages with any multipart/signed
parts, and the tag "encrypted" to messages with any
multipart/encrypted parts.  This only occurs when messages are indexed
during notmuch new, so a database rebuild is required to have old
messages tagged.
2011-05-27 16:22:00 -07:00
Dmitry Kurochkin
d32b8b1715 test: fix expected output for emacs tests after the wash button label changes 2011-05-24 15:28:44 -07:00
David Edmondson
0898cfad5e emacs: Show cleaner `From:' addresses in the summary line.
Remove double quotes and flatten "foo@bar.com <foo@bar.com>" to
"foo@bar.com".

Edited-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net> (clean up
expected output for emacs tests).

Signed-off-by: Jameson Rollins <jrollins@finestructure.net>
2011-05-18 16:11:53 -07:00
Carl Worth
c51d5b3cdb notmuch show: Include output for the enclosing multipart part of a MIME mail
Previously, the outer multipart part of any multipart/mixed,
multipart/signed, etc. MIME message was silently omitted from the
"notmuch show" output. This prevented any client from correctly
determining to which parts a signature applies, for example.

Now, we actually emit these parts as their own parts. The output is
still flattened---the contained parts are not yet included "within"
the multipart part---so it's still not possible to determine to which
parts a signature applies, but this is one step along the path.

The test suite is updated to reflect this change, (though we'll
eventually want to fix the emacs interface to not display buttons for
the multipart enclosure parts as there's nothing useful for the user
to actually do with them).
2011-05-17 14:51:06 -07:00
Austin Clements
a18a15326c Make author order tests more strict.
Use varying dates in the test messages to test the order authors are
listed in.  Add tests with repeated author names and unusual date
ordering.  Most of these are broken at the moment, but will be fixed
shortly.

Edited-by: Carl Worth <cworth@cworth.org>: Also update the expected
results for existing emacs tests that currently codify the incorrect
author ordering, (and similarly note them as broken in the current
test suite).
2010-12-07 16:21:35 -08:00
David Edmondson
5d05d5434d emacs: Improve the display of truncated authors.
Incremental search does not match strings that span a
visible/invisible boundary. This results in failure to correctly
isearch for authors in `notmuch-search' mode if the name of the author
is split between the visible and invisible components of the authors
string. To avoid this, attempt to truncate the visible component of
the authors string on a boundary between authors, such that the
entirety of an author's name is either visible or invisible.
2010-12-07 13:57:05 -08:00
Carl Worth
42f1a13374 test: Update emacs tests for fix to counting of signature lines.
The recent bug fix invalidated some expected test results. Fix them up.
2010-11-11 17:00:15 -08:00
Carl Worth
f8007ecb29 test: Add test for viewing raw message within emacs.
This provides further coverage for the recently added (and recently
modified) use of "notmuch show --format=raw" within emacs.
2010-11-06 14:33:30 -07:00
Carl Worth
581ea7c8d3 test: Add test for saving an attachment from emacs
This tests the use of "notmuch cat" recently added to the emacs
interface.
2010-11-06 11:25:56 -07:00
Carl Worth
484639453a test: Update mail corpus with original mails (with attachments).
The original mails used to pupulate the mail corpus had had their
attachments (obnoxiously) scrubbed by the pipermail mail archiver.
Since we actually want to test the handling of attachments, this is
less than useful. Restore these files from my own collection, (with
some Received and similar headers pruned).
2010-11-05 17:19:51 -07:00
Carl Worth
2d4b3e3348 test: Clear the "BROKEN" flag on an existing emacs test
I still don't know everything about how I want search order to be
customizable, but I do like the current defaults, (namely, performing
a new search gives results newest first, but performing a saved search
like "tag:inbox" gives results as oldest first).

Until we come up with a better plan for people to select what *they*
want, (rather than just getting what I want), let's codify the current
results in the test suite.
2010-11-05 17:19:51 -07:00
Carl Worth
3fe90a955e test: Test emacs notmuch-hello with no saved searches to display.
Haippily, this works just fine, but we might as well test that.
2010-10-29 15:53:34 -07:00
Carl Worth
dec2d57fbc test: Test emacs notmuch-hello when displaying a saved search with 0 results.
This test verifies that the bug fix in the previous commit is working.
2010-10-29 15:50:42 -07:00
Carl Worth
4884f5496c test: Avoid using unreliable, hard-coded thread ID values in test suite.
Some recently-added tests used hard-coded thread ID values in search
specifications. This is unreliable since the thread IDs depend on the
order in which "notmuch new" encounters new files, (which in turn can
depend on inode ordering within the filesystem).

Fix these by using the new "notmuch search --output=threads" to find the
correct thread IDs given a hard-coded (but reliable) message ID.
2010-10-28 11:45:50 -07:00
Carl Worth
4bb1b1603c test: Add tests for emacs notmuch-search and notmuch-show functions.
Moving the expected output into individual files (rather than inline)
to keep the test script much easier to read.
2010-10-22 16:58:35 -07:00