Commit graph

200 commits

Author SHA1 Message Date
Carl Worth
55559ea409 notmuch.el: Make 'x' and 'X' in show-mode archive the current thread.
This makes these keys different than 'q' in this mode, (where 'x'
and 'q' are identical in all of the other modes currently).

The idea here is to make it easier to do non-linear reading of messages,
(such as when poking in to read just one or two threads from a search
result that returned many threads).
2009-11-30 23:21:04 -08:00
Carl Worth
7a63942577 notmuch.el: Use let to avoid assigning to a free variable.
The dynamic scoping of emacs lisp is such that we never want to assign
to any variable unless it's something we've defined with `defvar' or
else something we're using locally via `let'.
2009-11-30 23:14:11 -08:00
Carl Worth
a708ea627e notmuch.el: Avoid warning about referencing free variable `button'.
I'm not even sure how the previous code worked at all---it seems
clear it was supposed to be using `cite-button' rather than `button'.
2009-11-30 23:09:08 -08:00
Carl Worth
9ec9662ec7 notmuch.el: Avoid calling next/previous-line non-interactively.
Emacs always complains if we use these from lisp code.
2009-11-30 23:05:32 -08:00
Carl Worth
9e6ee30cbe notmuch.el: Make notmuch-help use a full-screen window.
Our documentation is long enough that I think it will be more useful
to use an entire window for it (which is easily dismissed with 'q').
This is also kinder for a user not well-initiated with emacs, for
whom the multi-window help can be confusing.
2009-11-30 23:02:10 -08:00
Carl Worth
e9443aeafc notmuch.el: Make documentation of notmuch-search-mode dynamic.
Previously, we had some hard-coded keybindings mentioned in the
introductory paragraphs of the documentation for notmuch-search-mode.
Now, we take advantage of the substitute-command-keys functionality to
produce the same text by default, but to dynamically generate the
correct text in the face of the user customizing the keybindings.
2009-11-30 22:47:10 -08:00
Carl Worth
86992aeb85 notmuch.el: Clean up documentation of notmuch-folder-mode-map commands.
Again, ensuring we have standalone first-line documentation strings,
and overriding builtin commands to add our own documentation strings
to them.
2009-11-30 22:43:14 -08:00
Carl Worth
62993c7622 notmuch.el: Clean up documentation of notmuch-show-mode-map commands.
As we did recently for notmuch-search-mode-map, ensure that the first
line of docuemntation for each command stands alone.

We also take advantage of the substitute-command-keys functionality
within notmuch-help so that the introductory paragraphs can talk
about key bindings by key (rather than function name) in a way that
will always be current even in the face of the user rebinding keys.
2009-11-30 22:24:05 -08:00
Carl Worth
f5e125a9c0 notmuch.el: Fix notmuch-help to properly display prefixed bindings.
Previously, we would do only a single-level traverse of the keymap.
That meant that for a keybinding such as "M-TAB" we would just see
the prefix key ("ESC") and print that it was a keymap---never printing
the TAB nor the documentation for the command it is bound to.

Now, we do the full walk, constructing a proper description of the
full keybdinding with prefix characters, (and converting "ESC" to
"M-" for legibility).
2009-11-30 21:46:55 -08:00
Carl Worth
335a8aec2b notmuch.el: Clean up documentation of notmuch-search-mode-map commands.
Since notmuch-help now displays a single line of documentation from
each of these commands we ensure that the first line stands alone for
each command.

We also override some builtin commands with new commands that don't
behave any differently, but have our own notmuch-specific
documentation, (such as "select next thread" rather than "move point
to next line").
2009-11-30 16:52:31 -08:00
Carl Worth
b7a6e05980 notmuch.el: Fix notmuch-search-goto-last-thread.
This broke when we switched to filter-based processing of search
results and added the "End of search results" line onto the end. Fix
to skip ignore that line when moving to the last thread.
2009-11-30 16:50:52 -08:00
Carl Worth
07a46d10ea notmuch.el: Fix notmuch-search-scroll-down to go to first thread.
When there's no more to scroll, we want to select the first thread.

This used to work, and I'm not sure when it broke, (perhaps when we
switched from post-process decorating of the search results to
filtering). Fix the calculation to work again.
2009-11-30 16:48:19 -08:00
Carl Worth
c24360e59e notmuch.el: Don't document mouse actions in notmuch-help.
The concept behind direct manipulation with mouse clicks is that
documentation shouldn't be necessary, (though my original motivation
here was simply that "<mouse-1>" was exceeding my TAB width.

This does cause a blank line to be added for the mouse binding. This
isn't directly desired, but as long as it's there we put it at a
natural place for a separator.
2009-11-30 16:46:26 -08:00
Carl Worth
161b2738e1 notmuch.el: Reorder notmuch-search-mode keybindings map.
I had originally created this keymap in order from most important to
least important commands. But our new notmuch-help command is
presented with the list in the reverse order. So we reverse the input
so that the user sees the most important commands first.
2009-11-30 16:02:27 -08:00
Carl Worth
de4be1b229 notmuch.el: Implement our own notmuch-help instead of describe-mode.
This gives somewhat friendlier output for the '?' binding than we had
previously with `describe-mode'. First, we no longer have the various
minor modes cluttering up the output. Second the display of the
binding table uses the first line of documentation for the bound
function rather than the function name.
2009-11-30 09:53:38 -08:00
Carl Worth
04036fb806 notmuch.el: Add documentation for notmuch-search-show-thread.
It's especially unkind to leave interactive functions without
documentation.
2009-11-30 09:49:53 -08:00
Carl Worth
0671436872 notmuch.el: Don't use beginning-of-buffer from elisp program.
This silences a warning when compiling notmuch.el. The documentation
of beginning-of-buffer does say (rather emphatically) that it's not
to be used from lisp programs.
2009-11-30 09:48:15 -08:00
Jed Brown
0a41c34310 More portable and easier to read regex in notmuch-search-operate-all
The former one worked in 23.1.50.1 but not in 23.1.1.

Signed-off-by: Jed Brown <jed@59A2.org>
Tested-by: Keith Packard <keithp@keithp.com>
2009-11-28 12:01:10 -08:00
Keith Amidon
0a7bd1c728 Adjust autoload comments
The previous location of autoload comments didn't seem to correspond
with the functions most likely to be the entry points for using
notmuch.  This change adjusts them to match those likely entry points.
2009-11-28 09:35:28 -08:00
Aneesh Kumar K.V
92c4dcc641 notmuch.el: Add face support to search mode
This patch use notmuch-tag-face showing tags in the notmuch-search-mode.

We can selectively highlight each tag by setting notmuch-tag-face-alist as below

(defface notmuch-tag-unread-face
 '((((class color)) (:foreground "goldenrod")))
  "Notmuch search mode face used to highligh tags.")

(defface notmuch-tag-inbox-face
 '((((class color)) (:foreground "red")))
  "Notmuch search mode face used to highligh tags.")

(setq notmuch-tag-face-alist '(("unread" . 'notmuch-tag-unread-face)
			       ("inbox" . 'notmuch-tag-inbox-face)))
(require 'notmuch)

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2009-11-27 22:52:22 -08:00
Keith Amidon
f94146bd39 Key binding rearrangement for save attachments in show mode
The most obvious bindings for save attachments are already taken.  The
existing 'w' binding was bound to view the raw message.  This commit
moves it to 'V' which still seems somewhat mnemonic and uses 'w' for
save (write) attachments.
2009-11-27 21:24:03 -08:00
Keith Amidon
e593b6aacb Provide ability to save attachments
Previously the only way to save an attachment was to attempt to view
it and then save it from within the viewer program.
2009-11-27 21:23:58 -08:00
Keith Amidon
07ce64e435 Forward individual messages using message-forward
Sometimes forwarding a message is preferable to replying and modifying
the set of recipients.  This commit provides that ability using the
message-forward function.
2009-11-27 21:11:37 -08:00
Keith Amidon
c4463d4cb4 Factor out message buffer mgmt from notmuch-show-view-all-mime-parts
The ability to temporarily create a buffer containing only the
contents of the currently selected message in notmuch show mode is
generally useful.  This commit factors the majority of the code
required to do so out of notmuch-show-view-all-mime-parts into a macro
called with-current-notmuch-show-message and rewrites the original
function in terms of the macro.

A future set of commits will provide additional functionality using
the macro as well.
2009-11-27 21:07:35 -08:00
Keith Amidon
30bdcfe651 Add key binding for notmuch-search in show-mode
It's not uncommon to want to start a search as a result of something
read in a message so this is convenient.
2009-11-27 21:06:56 -08:00
Aneesh Kumar K.V
8418dee2f6 notmuch.el: Use message-mode font-face to highlight mail headers
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2009-11-27 20:57:43 -08:00
Alexander Botero-Lowry
ed16edc94d Add some very rudimentary support for handling html parts
If there is an html mime-part in the message and it's the first part,
it gets inlined using `mm-display-part' to convert it to plain text.

The HTML content is still available as a non-text part as well.
2009-11-27 20:47:27 -08:00
Eric Anholt
f0bb5e9c3e notmuch.el: Require message mode to avoid undefined function in replies.
Otherwise, those without keithp's .emacs would end up with reply mode
not being entered.  Suggested by keithp.
2009-11-27 19:45:36 -08:00
Jed Brown
0ce9c53fd4 notmuch-search-add/remove-tag: restrict to messages in current query
Rather than tagging the everything in the thread.  This is arguably more
desirable behavior and is consistent with clearly desirably behavior of
notmuch-search-operate-all.

Note that this change applies indirectly to
notmuch-search-archive-thread (which is actually equivalent behavior
since this function is primarily used when browsing an inbox).

Signed-off-by: Jed Brown <jed@59A2.org>
2009-11-27 05:57:07 -08:00
Jed Brown
7293d84826 New function notmuch-search-operate-all: operate on all messages in the current query.
It is often convenient to change tags on several messages at once.  This
function applies any number of tag whitespace-delimited tag
modifications to all messages matching the current query.

I have bound this to `*'.

Signed-off-by: Jed Brown <jed@59A2.org>
2009-11-27 05:57:04 -08:00
Tassilo Horn
b7898b0c2a Return unpropertized strings for filename and message-id 2009-11-26 13:18:20 -08:00
Aneesh Kumar K.V
dc4d0a53a2 notmuch.el: Use variable notmuch-search-oldest-first to decide the search order
Make sure we use notmuch-search-oldest-first to decide the how
the search result should be displayed. This helps to set the
value to nil and have latest mail shown first

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2009-11-26 13:09:12 -08:00
Jan Janak
5ab69232bc notmuch.el: When removing tags, offer only those a msg/thread has set.
When removing a tag from a message or thread, build a completion buffer
which contains only tags that the message or thread has really set.

Signed-off-by: Jan Janak <jan@ryngle.com>
2009-11-26 07:07:12 -08:00
Jan Janak
16eab4c87d notmuch.el: Select tag names with completion.
Several commands ask the user for a tag name. With this feature the
user can just press tab and Emacs automatically retrieves the list of
all existing tags from notmuch database with 'notmuch search-tags' and
presents a completion buffer to the user.

This feature is very useful for users who have a large number of tags
because it saves typing and minimizes the risk of typos.

Signed-off-by: Jan Janak <jan@ryngle.com>
2009-11-26 07:03:32 -08:00
Carl Worth
03ea266bc2 notmuch.el: Remove some dead code.
This was left over from before the switch to using a filter for
processing the results of "notmuch search".
2009-11-25 09:18:39 -08:00
Carl Worth
adef907918 notmuch.el: Quote arguments to protect from shell interpretation.
We want to allow the user to be able to use search expressions with
parentheses and semi-colons, etc. and we definitely don't want the
shell interpreting those!
2009-11-24 19:08:53 -08:00
Carl Worth
93af7b5745 notmuch.el: Exceute "notmuch search" asynchronously.
Previously, our emacs interface was waiting for the "notmuch search"
to complete before it would display anything. Now, we execute the
process asyncrhonously and filter results as they come in.

This takes advantage of the recent work to make "notmuch search"
results stream out steadily. The result is that some search results
will be available nearly instantly and the user can navigate and view
those while additional results continue loading.
2009-11-24 18:49:58 -08:00
Alexander Botero-Lowry
0ad3534b94 Remove the global expand body keymapping
With local buttons done now, we don't need this anymore.
2009-11-24 11:34:13 -08:00
Alexander Botero-Lowry
daeda152b8 Make bodies locally toggleable
Having actually implemented this, I realized that my
initial approach of providing a function to configure
a button was wrong. Instead I've replaced that with
button types. This then makes it possible to provide
the fully expanded view when all threads in a message
are unread.

It also has the potential to allow global-expansion functions
if that is desireable
2009-11-24 10:39:18 -08:00
Alexander Botero-Lowry
9eb90688b7 make a nice function for generating invisibility toggle buttons
I realized I was replicating this code over and over again, so this
way if I change my mind about something I only have to do it on one
place.
2009-11-24 10:39:18 -08:00
Alexander Botero-Lowry
60817c39d8 cleanup a lot of left-overs from the global invis
Basically I'd left in a lot of the key-bindings and all the
invisiblity spec variables so just rid the world of those
2009-11-24 10:38:53 -08:00
Alexander Botero-Lowry
bde9284064 make headers locally expandable/collapsable
This is the same as with citations and signatures.
I used an ellipsis here for the invisible region, which
I think make it more obvious that there are extra headers.
MH-e used this for extra long To/CC headers.
2009-11-24 10:37:40 -08:00
Carl Worth
f615803932 notmuch.el: Add TAB and M-TAB buttons to move between buttons.
Thanks to Alexander Botero-Lowry for pointing out the interesting
functions to use here. This functionality was really easy to add.
2009-11-23 19:03:59 -08:00
Keith Packard
a378dff8a1 Add notmuch-folder mode to provide an overview of search matches
Folder mode takes a (user-configurable) list of search patterns and
produces a list of those patterns and the count of messages that they
match. When an entry in this list is selected, a search window with
the defined search is opened.  The set of folders is defined as a
list, each element contains the name of the folder and the query string
to count.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-23 06:34:05 +01:00
Keith Packard
43daa6f070 Make mouse-1 click in search view show thread
Selecting text in the search view isn't all that useful, so instead,
make mouse-1 clicks actually show the thread you click on. It's almost
like direct manipulation or something.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-23 06:29:53 +01:00
Keith Packard
265be025c2 Insert signature into replies
When you compose a new message, message mode carefully inserts your
mail signature at the bottom of the message; as notmuch constructs the
reply all by itself, this doesn't happen then. Use the message mode
function 'message-insert-signature' to add that to reply buffers.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-23 01:28:29 +01:00
Jed Brown
03fd69322b Quote file names passed to the shell
Prior to this, notmuch-show-pipe-message could not handle file names
with spaces and similar.
2009-11-23 01:24:19 +01:00
Alexander Botero-Lowry
82bcd1b2d0 switch to button-1, which seems to interact poorly with text-selection by mouse 2009-11-22 15:42:59 -08:00
Alexander Botero-Lowry
5aea0dcb61 instead of trying to cause a redisplay, actually do a redisplay 2009-11-22 15:26:18 -08:00
Alexander Botero-Lowry
89d85e28b2 put a newline after the headers 2009-11-22 15:26:18 -08:00
Alexander Botero-Lowry
00c0896c9b make header names bold in show-mode 2009-11-22 15:26:18 -08:00
Alexander Botero-Lowry
b38bd7efd8 Make expanding/collapsing signatures and citations local to them
This is the first step towards localizing all the expand/collapse
operations in the show buffer
2009-11-22 15:26:12 -08:00
Alexander Botero-Lowry
89f55ab84b buttonize signatures as well 2009-11-22 15:24:49 -08:00
Alexander Botero-Lowry
14f492ba0c Buttonize citation expander.
Currently the button has no action or special handling at all.
2009-11-22 15:24:49 -08:00
Kan-Ru Chen
6b823b6fba Fix invalid face reference.
To avoid the "Invalid face reference: cons [18 times]" kind of message
goes on and on in the *Messages*.

Signed-off-by: Kan-Ru Chen <kanru@kanru.info>
2009-11-22 13:22:36 +01:00
Carl Worth
aac1d60352 INSTALL/notmuch.el: More details on how to install/run notmuch.el
Hopefully this will save some people some head-scratching trying
to figure out how to use it.
2009-11-21 21:40:57 +01:00
Carl Worth
882a58de5f notmuch.el: Don't use end-of-buffer which is inappropriate from programs
The documentation is quite clear about this case.

With this, we can now byte compile without warnings.
2009-11-21 00:58:16 +01:00
Carl Worth
aa46a34408 notmuch.el: Fix stale reference to non-existing variable.
We changed from "query" to "thread-id" a while ago, and broke this
error message at the time. Fix it now.
2009-11-21 00:53:27 +01:00
Carl Worth
d295f50ac7 notmuch.el: Add many missing defvar calls.
Without these, emacs was complaining about "assignment to free variable",
(though only when byte compiling, which is why we didn't notice earlier).
2009-11-21 00:52:23 +01:00
Mikhail Gusarov
dbb29a77fa Allow to redefine notmuch binary name and path in elisp mode
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2009-11-20 13:37:54 +01:00
Carl Worth
2cc3165163 notmuch.el: Don't use literal control characters in strings.
Avoding these is nicer to users, text editors, and our poor little
notmuch.el code itself that would get confused when seeing a copy of
itself in email. (Of course, we should still fix that bug, but this
workaround is good nonetheless.)
2009-11-20 13:09:58 +01:00
Aneesh Kumar K.V
3f52f59c1e notmuch: Add search mode hook
This patch add notmuch-search-hook that gets run when we
after displaying search results

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc:Keith Packard <keithp@keithp.com>
2009-11-19 14:01:49 +01:00
Carl Worth
83a2ed3c2f notmuch.el: Add a reply binding ('r') to search mode to reply to a whole thread.
This is basically right, (I get a message buffer with all the mails
quoted), but somehow notmuch reply is reversing the messages. That's a
nuisance.
2009-11-19 00:21:24 +01:00
Keith Packard
1a75f88d8b We use the message mail system for new mail, let emacs know.
This makes things like the goto-address system bring up the right
message composition window.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-18 23:32:39 +01:00
Keith Packard
adbdafbde2 Create a default notmuch-show-hook that highlights URLs and uses word-wrap
I created the notmuch-show-hook precisely so I could add these two
options, but I suspect most people will want them, so I just made them
the default. If you don't want them, you can use remove-hook to get
rid of this.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-18 23:30:10 +01:00
Keith Packard
86f7ee24d6 Set truncate-lines variable for search buffers.
This keeps them from wrapping.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-18 23:29:55 +01:00
Keith Packard
6caf631ebf Add notmuch-show-hook to allow customization of show windows
I wanted to enable got-address-mode and visual-line-mode in my show
windows to make messages easier to read and URLs easier to
follow. This hook allows the user to run arbitrary code each time a
message is shown.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-18 23:29:44 +01:00
Carl Worth
0656fb518d Make '?" bring up a list of bindings.
Just using describe-mode for now, (though something more specialized
would be better).
2009-11-18 19:12:13 +01:00
Ingmar Vanhassel
2ce25b93a7 Typsos 2009-11-18 03:21:36 -08:00
Carl Worth
3334865725 notmuch search: Change default search order to be newest messages first.
This is what most people want for a _search_ command. It's often
different for actually reading mail in an inbox, (where it makes more
sense to have results displayed in chronological order), but in such a
case, ther user is likely using an interface that can simply pass the
--sort=oldest-first option to "notmuch search".

Here we're also change the sort enum from NOTMUCH_SORT_DATE and
NOTMUCH_SORT_DATE_REVERSE to NOTMUCH_SORT_OLDEST_FIRST and
NOTMUCH_SORT_NEWEST_FIRST. Similarly we replace the --reverse option
to "notmuch search" with two options: --sort=oldest-first and
--sort=newest-first.

Finally, these changes are all tracked in the emacs interface, (which
has no change in its behavior).
2009-11-17 20:58:30 -08:00
Keith Packard
dac31c9e01 Use 'forward-line' instead of 'next-line' while walking search display
The documentation for 'next-line' suggests that 'forward-line' is a
better choice for non-interactive usage. That appears to be the case
here; using next-line caused emacs to spin forever for me.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-16 22:10:36 -08:00
Carl Worth
057b3060e8 notmuch.el: Consider an entire line of underscores as a signature separator.
This is the default separator used by mailman, so there's a lot of
clutter in thread displays without this. Also, we not provide a nice
variable to the user (notmuch-show-signature-regexp) for configuring
this.
2009-11-16 16:39:59 -08:00
Carl Worth
ea484f0ebf notmuch.el: Insert a newline if the last line of a part is missing one.
I think there's a GMime bug that we're getting parts decoded without a
final newline (the encoded parts seem to have them just fine). We can
workaround the bug easily enough by finding a part-closing delimiter
that is not at the beginning of a line, and if so, just insert a
newline.

Without this, the one-line-summary of the next message would continue
on the same line as the last line of the previous message, (and this
would often happen for mailing-list messages where mailman would add
an extra part for its signature block).
2009-11-16 14:53:02 -08:00
Carl Worth
d5068983b8 notmuch.el: Display authors in a column separate from subject.
This makes it much easier to actually read the subject lines.

The user can set notmuch-search-authors-width to control the width of
the column.

Two possible ideas for improving this support further:

  1. Make the excess authors invisible instead of removing them from
     the buffer, (which means that isearch could still find them).

  2. Have the user variable control a percentage of the window width
  rather than being a fixed number of columns.
2009-11-16 11:57:05 -08:00
Carl Worth
352e91625b notmuch.el: Indent messages to show nested structure of thread.
Now that we're actually adding text to the buffer for the indentation,
our old aproach of using positions to record regions to manipulate is
now longer correct. Fortunately, it's easy to switch from positions to
markers which are robust, (just call point-marker instead of point and
all relevant functions accept markers as well as points).

I also finally fixed the bug where the text "[6 line signature]" we
display was causing the one-line-summary of the next message to be on
its same line rather than at the beginning of the next line where it
belongs.
2009-11-16 11:08:24 -08:00
Carl Worth
322fe4f3fb notmuch.el: Add support for viewing MIME-encoded parts (with 'v').
Currently just supports viewing all MIME parts in the message. There's
not yet support for selecting and viewing individual parts, but that
should be easy to add from here, (now that we've found
mm-display-parts to do all the heavy lifting).
2009-11-14 08:57:38 -08:00
Carl Worth
4812cfb368 notmuch.el: Add an 'm' binding to start composing a new mail.
Available from either the "search" or the "show" view.
2009-11-13 15:54:58 -08:00
Carl Worth
77088624af notmuch.el: Use require instead of load to get the cl functions.
Not only is "load" probably the wrong thing, but loading cl-seq befoe
cl can cause complaints anyway.
2009-11-13 15:49:43 -08:00
Carl Worth
8561c7463a notmuch.el: Add a binding ('o') and command to toggle current search order.
This ended up being a bit easier than I thought. Just flip the controlling
variable and then run `notmuch-search-refresh-view'.
2009-11-12 23:16:19 -08:00
Carl Worth
a5e9c06eb6 notmuch.el: Hook up support for different search orders.
This gives us two different default search orders: The inbox view that
comes up from "M-x notmuch" is sorted in chronological order (oldest
threads first). A new global search "M-x notmuch-search" will instead
be in reverse chronological order (newest threads first).

Any filtered searches retain the sort order of the search being
filtered.

There's not yet any interface for changing the sort order of a search
after it is constructed.
2009-11-12 23:09:56 -08:00
Carl Worth
e530910ae2 notmuch.el: Remove functions to show/hide thread IDs.
I wrote these originally jsut for debugging. They've never been hooked
up to any keybinding and the existing "M-x visible-mode" does what's
needed anyway.
2009-11-12 14:35:41 -08:00
Carl Worth
1407e409b1 notmuch.el: Switch to using "notmuch reply" rather than message-reply.
This way we get to take advantage of the configuration of the user's
email addresses in notmuch, (rather than expecting the user to
configure all of their email addresses in message mode as well).
2009-11-11 21:37:35 -08:00
Carl Worth
26bb521f52 notmuch.el: Add a binding ('r') to reply to the current message.
We were just starting to get "notmuch reply" into shape in order to
provide the needed functionality here, but then I realized that the
message-reply function built into emacs is already more functional,
(at least for the case of replying to a single message).
2009-11-10 18:47:53 -08:00
Carl Worth
54d79f60a1 notmuch.el: Simplify get-message-id
We were stripping off the "id:" portion of the identifier, only to
put it back on again in all cases. Stop this madness.
2009-11-10 18:45:30 -08:00
Carl Worth
8ae1c3c6e1 notmuch.el: Don't advance line in search buffer before showing thread.
Previously, when selecting a thread to view from the search buffer, we
would advance the point by one line before showing the thread, (so
that it would be ready to show the next thread once the user was done
with the current thread). This was annoying when the user temporarily
exited the thread view, (because the "wrong" thread was then selected
in the search view).

We get a more consistent experience by waiting to advance until the
user has finished viewing one thread and is ready to view the next.
2009-11-09 13:48:58 -08:00
Carl Worth
97ef8a74c9 notmuch.el: Fix add/remove tag from search buffers.
These were recently broken with the change of "notmuch search" to
prefix thread IDs with "thread:" rather than printing them raw.
2009-11-09 13:45:11 -08:00
Carl Worth
306e19f5dd notmuch show: Move subject from one-line summary down to its own line.
And change the display code in emacs to display the one-line summary
in inverse video.
2009-11-05 15:02:20 -08:00
Carl Worth
afcd85ee71 notmuch.el: Bring back the "End of search results." message.
The recent change of the hidden thread-ID syntax caused this message
to instead be replaced with a cryptic "search failed" error and an
internal regular expression. Put our nice message back.
2009-11-05 14:18:44 -08:00
Carl Worth
51a68d4e01 notmuch.el: Make hidden parts advertise how to unhide them.
This is in place now citations and signatures. We'll still need to
add something else for hidden messages (those that are already
read and hidden away).
2009-11-05 11:25:02 -08:00
Carl Worth
ab68891bec notmuch.el: Add 'A' binding to archive thread after removing all "unread" tags.
This is useful for when the rest of the thread is visible on screen so
the user really has read the rest of it.
2009-11-05 11:22:20 -08:00
Carl Worth
494c74229b notmuch show: Fix to work with any search string rather than just a thread ID.
The more general command is more consistent, and more useful.

We also fix "notmuch search" to output copy-and-pasteable search terms
for the thread with "thread:" prepended already. Similarly, the
message-ID in the output of "notmuch show" is also now printed as a
valid search term, ("id:<message-id>" rather than "ID: <message-id>").

Naturally, the emacs code is also changed to track these changes.
2009-11-05 10:23:04 -08:00
Carl Worth
2b576c62be notmuch.el: Add 'N' binding to mark message read and go to next.
The magic space bar is nice, but sometimes there's a message with a
long attachment that I just want to skip, but still consider the
message marked as read.
2009-11-05 04:55:51 -08:00
Carl Worth
22adeeaab7 notmuch.el: Don't require an extra press of space bar before archiving.
I had implemented this intentionally originally, thinking that it
would be important to see the last message scroll all the way off
screen before the next press of the magic space bar would go and
archive away the whole thread.

But in practice, that just turns out to be annoying, (especially for a
long sequence of single-message threads where the space bar has to be
pressed twice for every one). It's actually quite easy to know if it's
"safe" to press the space bar expecting just a scroll instead of an
archive by simply looking down and seeing if the current window is
full.

And as for the total lack of undo with all of this, I'm getting by by
simply using x to get back to the search view, and then going back
into the thread of interest.
2009-11-04 17:42:01 -08:00
Carl Worth
19993ea33b notmuch.el: Add a simple command to pipe a message to a process.
With the obvious keybinding.
2009-11-04 16:54:09 -08:00
Carl Worth
3a330cb84a notmuch.el: Don't skip read messages when they are open.
More magic for the magic space bar: If a thread is entirely open,
(such as when viewing an old thread where every message is read), the
space bar now visits each message in turn (rather than skipping all of
the unread messages).
2009-11-04 16:22:42 -08:00
Carl Worth
b7366f8052 notmuch.el: Allow for scrolling backwards through thread with DEL
Otherwise known as "Backspace" on keyboards in the real, (rather than
emacs), world. This will go by screenfuls for long messages, and
message by message for short messages. So it does the reverse of the
magic space bar, (but without reversing any tag-changing magic that
the magic space bar might have done).
2009-11-04 16:15:56 -08:00
Carl Worth
988320ad74 notmuch.el: Add 'w' binding to view raW email message.
This takes advantage of the new filename output just added to "notmuch
show".
2009-11-04 15:53:41 -08:00
Carl Worth
9f668b3d56 notmuch.el: Don't use defvar for undocumented variables.
Make at least some attempt to distinguish internal variables from
those that the user is expected to fiddle with.
2009-11-04 15:45:33 -08:00
Carl Worth
97b5f81533 notmuch.el: Don't hide long signatures.
Chances are, a signature above a certain threshold isn't just a
signature, (for example, it could be an encrypted messages tacked onto
the end of the file, or could be any sort of PS.)

We add a new variable, notmuch-show-signature-lines-max that can be
used to configure the threshold, (set to 6 by default for now).
2009-11-04 15:44:11 -08:00
Carl Worth
3604a19beb notmuch.el: Fix to claim correct number of lines for hidden signature.
Previously, it was reporting that all signatures were 0 lines.
2009-11-04 15:19:08 -08:00