Commit graph

3057 commits

Author SHA1 Message Date
Carl Worth
253c11b675 notmuch.el: Fix notmuch-snow-next-message when on the last message.
Before this just brought the current line to the top of the
window. Now it actually moves to the beginning of the current message.

This is built on a much more solid foundation now with a function to
move to the summary-line of the current message, and then moving from
there.
2009-11-04 08:43:14 -08:00
Carl Worth
fbf473220b notmuch.el: Add more complete documentation to the major modes.
These now provide a summary of the most useful features/bindings
as well as a complete printout of the relevant mode maps to show
all available keybindings.
2009-11-03 18:24:13 -08:00
Carl Worth
e0b830410a notmuch.el: Make archive-thread advance to next line.
This is the command in notmuch-search mode and it's cer convenient
for it to advance to the next line there. (It would be even more
convenient if it didn't also take forever, but as mentioned before
that's an issue we'll need to fix in Xapian.)
2009-11-03 17:18:04 -08:00
Carl Worth
c4ea149a9b notmuch.el: Add 't' binding to filter results to a specific tag.
This is a convenience function to avoid having to type "tag:" with
the (f)ilter command.
2009-11-03 17:01:07 -08:00
Carl Worth
50f260a1a3 notmuch.el: Add bindings for scrolling to notmuch-search mode.
We turn on the scroll-preserve-screen-position option which seems
like what's desired here, (though that's not what I normally use
when editing files---but I think scrolling through a list of email
threads is different).
2009-11-03 16:55:20 -08:00
Carl Worth
d47fc17263 Drop inapplicable copyright statements.
I had put these in here since I had originally planned to copy
liberally from the body of the implementation of 'compile in order
to get process output into a buffer. But once I found call-process
in the documentation of emacs, that was all I needed.

And all the code I've written since has been entirely my own with
just the help of emacs documentation.
2009-11-03 16:47:34 -08:00
Carl Worth
3f04059b33 notmuch-el: Fix implementation of show/hide-thread-ids.
I'm definitely more comfortable with the add-to-invisibility-spec
now than I was when I first wrote these functions, (which weren't
working at all).
2009-11-03 16:46:27 -08:00
Carl Worth
0bec4692b6 notmuch.el: Add command to (a)rchive a thread from notmuch-show mode.
This is our first race-free implementation of archive-thread! It
acts only on the messages explcitly contained in the buffer, not
on an entire thread ID, so it's safe in the face of new messages
have been delivered for this thread since the view was made.
2009-11-03 13:39:09 -08:00
Carl Worth
3dc1507d15 notmuch.el: Don't try to remove an "unread" tag that's not there.
This optimization wouldn't be necessary if we had a nice fast "notmuch
tag" command. But since it's currently fairly slow, (see Xapian defect
250: http://trac.xapian.org/ticket/250), we're willing to take some
extra care to avoid calling "notmuch tag" unnecessarily.
2009-11-03 13:38:05 -08:00
Carl Worth
aa34eb2a37 notmuch show: Remove custom "unread" hack, (printing tag in two locations).
I previously had a hack that special-cased the "unread" tag and
printed it on the same line as the message ID. But now that we are
printing all tags at the end of the one-line summary we don't need
this anymore. Get rid of it, and just read "unread" from the list of
tags just like any other tag.
2009-11-03 13:38:00 -08:00
Carl Worth
0ceef70efd notmuch.el: Add + and - bindings to add/remove tags from messages.
This is in notmuch-show mode rather than in notmuch-search mode,
(where we had + and - working already). This gives the same visual
feedback as in notmuch-search-mode, (the tags are manipulated first in
the database and then the list of tags in the buffer is updated).
2009-11-03 12:54:10 -08:00
Carl Worth
02aa1391be notmuch show: Print tags for each message.
This is in the one-line summary so should always be visible even
in our emacs client that's so eager to make things invisible.
2009-11-03 12:29:07 -08:00
Carl Worth
6be03c1761 notmuch.el: Preserve current thread when refreshing search results.
Otherwise, try to keep point in the same place, (such as when the
current thread has been archived away).
2009-11-03 11:54:34 -08:00
Carl Worth
2d507c9c6d notmuch.el: Add an '=' key to refresh the current view.
This will allow for updates when a separate process (say, a notmuch-
show buffer), has archived messages.
2009-11-03 11:47:48 -08:00
Carl Worth
e96e34c3f1 notmuch.el: Mark messages read when the (n)ext keybinding is pressed
Of course, technically, we're removing the "unread" tag, but you
get the idea. :-)
2009-11-03 11:42:04 -08:00
Carl Worth
3998f3a61c notmuch.el: Hide citations and signatures.
The user can make these visible again by pressing 'c' or 's',
(though we'd like to move to direct manipulation instead soon).
2009-11-03 11:14:52 -08:00
Carl Worth
9c6a010674 Hide bodies of message that have already been read.
Also hide all markers.

From here, all we really need for legibility is the following:

  * Hide away citations and signatures

  * Call out the one-line summary some way, (larger font size?)

  * Add nesting for replies
2009-11-03 10:32:42 -08:00
Carl Worth
f2a4c3e565 notmuch.el: Hide email headers by default.
The display of the header can be toggled with the 'h' key.
2009-11-02 22:24:35 -08:00
Carl Worth
a81849b5e2 notmuch show: Switch to control character to mark sections of output
We were previously using things like "%message{" which were not
guaranteed to never appear in an email message. Using a control
character (^L or '\f' instead of '%') gives us better assurance that
our delimiter doesn't show up in an original email message.

This still isn't entirely safe since we're decoding encoded text in
the body of the email message so almost all bets are off really.
2009-11-02 21:13:19 -08:00
Carl Worth
40382ed98c notmuch.el: Make 'n' and 'p' bring the current message to the top.
This is much more convenient for reading the messages, and happens
to match the behavior of sup.
2009-11-02 20:47:11 -08:00
Carl Worth
8debf74e82 notmuch.el: Add (n)ext and (p)revious bindings to notmuch-show mode.
Almost starting to get usable now. Still need to make it mark messages
as they are read, (by removing the unread tag), and selectively hiding
the full header.
2009-11-02 18:45:17 -08:00
Carl Worth
4f974ac600 TODO: Add an idea from talking with keithp on the train.
I mentioned the read-only directory optimization to Keith, and he
liked it but wanted to be able to configure it to be fully automated.
2009-11-02 18:44:34 -08:00
Carl Worth
07b2ef26de notmuch.el: Add '<' and '>' bindings to goto first/last thread.
Also, take care to remove a final blank line to avoid the point
going beyond the last thread in the buffer.
2009-11-02 18:23:06 -08:00
Carl Worth
e5faf380d1 TODO: Organize tasks based on emacs interface, command-line tool, or library.
There are conceptually three different projects here, so it helps
to keep the tasks for each separated.
2009-11-02 18:02:38 -08:00
Carl Worth
df76a704b5 notmuch.el: Add commands to (s)earch globally, and (f)ilter a search
Also add 'q' and 'x' keybindings to kill the current buffer.
2009-11-02 17:56:18 -08:00
Carl Worth
e1f95213ae Tweak relative dates to be close to the same length.
Most all of the returned strings will now fill most of a 12-character
string, (depending on the length of the month).
2009-11-02 16:18:28 -08:00
Carl Worth
dac7e1d4b1 Remove notmuch_message_get_header_size and notmuch_message_get_all_headers
The notmuch.c main program now uses GMime directly rather than using
these functions, and I'd rather not export any functions unless we
have good evidence that the functions are necessary.
2009-11-02 16:08:24 -08:00
Carl Worth
ab2d904e06 notmuch.el: Hide thread IDs in notmuch-search mode.
One more baby step toward something that's pleasant to use.
2009-11-02 16:02:32 -08:00
Carl Worth
d4c4318fb9 notmuch.el: Implement visual feedback for add/remove tags.
There's no undo still, but at least you can see what you are doing
now.
2009-11-02 15:48:21 -08:00
Carl Worth
fa226a7a10 Drop date.c file, (use identical function from GMime instead).
We had originally copied this function in at a time when notmuch
wasn't actually depending on the GMime library. Now that it does,
we might as well call the function that exists there rather
than having a private copy of it.
2009-11-02 14:36:33 -08:00
Carl Worth
8ff934803c notmuch show: Don't print non-text MIME parts.
Additionally, print a part number for each MIME part so that the
client could (conceivably) ask for the contents of a specific
part by part number.
2009-11-02 14:33:15 -08:00
Carl Worth
6a7f4df6f7 Fix to decode header values, (primarily subject).
Use GMime function to decode message-header values according to
RFC 2047.
2009-11-02 14:32:20 -08:00
Carl Worth
d6615b554e Print "part" markers for each MIME part (with Content-type).
This can allow for the client to hide undesired MIME parts
such as text/html.
2009-11-02 13:41:04 -08:00
Carl Worth
ab317ca474 notmuch show: Use GMime to decode messages.
We now actually get text content rather than blocks of BASE64, etc.
2009-11-02 13:19:39 -08:00
Carl Worth
88ab96dc40 TODO: Add several items.
These are the things that are actively preventing me from being able
to use notmuch as an email-reading client.
2009-11-02 13:18:58 -08:00
Carl Worth
1b10c32a52 Add an INSTALL file.
The README file was already referring to this, so we actually add it
now.
2009-11-02 09:25:04 -08:00
Carl Worth
ddb4713b4b Add a simple configure script.
This is *not* based on autoconf. In fact, this doesn't actually
configure anything, (one can compile notmuch directly with just
"make" without running configure if the dependencies are all
satisfied).

The only thing that this configure script does is to check for the
presence of the various dependencies and provide some guidance to
the user if they are not all available.
2009-11-02 09:11:37 -08:00
Carl Worth
f6183a92b5 Makefile: Rewrite to use NOTMUCH rather than MY in variable names.
I was about to refer to these names in some documentation, so I
wanted a slightly better name for them.
2009-11-02 07:18:49 -08:00
Carl Worth
5e2a479e69 README: Add a simple file explaining notmuch and pointing out resources.
This is part of getting notmuch ready for a more public announcement.
2009-11-02 07:18:49 -08:00
Carl Worth
1a579dfe6b Add a simple manual page for notmuch.
By pulling content out of notmuch help, and also the messages
printed by "notmuch setup".
2009-11-02 07:18:31 -08:00
Carl Worth
2405b45a06 notmuch: Add a talloc context argument to each top-level command function.
I had noticed several times earlier that having a talloc context
passed in would make things more convenient. I'm not exercising
that convenience yet, but the context is there now, (and there's
one fewer item on our TODO list).
2009-10-31 16:40:47 -07:00
Carl Worth
c96021a477 Rename message_results/thread_results to messages/threads.
Shorter naming without being any less clear. A definite win.
2009-10-31 16:32:30 -07:00
Carl Worth
c33eed84f2 notmuch.el: Add commands to add tag, remove tag, and archive (== remove inbox tag)
These have keybindings of '+', '-', and 'a'. The bug they have so
far is lack of visual feedback for their effect, and lack of undo.

(Also the fact that adding or removing a single tag for a thread
takes way too long--but that's as a Xapian issue as discussed here:

	replace_document should make minimal changes to database file
	http://trac.xapian.org/ticket/250
)
2009-10-31 12:09:06 -07:00
Carl Worth
c37b1bdf2d notmuch: Reference help, don't print it for unknown commands.
The shorter output is much nicer for something that might end up
in an emacs mini-buffer, for example.
2009-10-31 12:08:00 -07:00
Carl Worth
acdc9988a2 notmuch.el: Add final '*' to generated buffer names.
Just looks a little neater that way.
2009-10-31 01:55:12 -07:00
Carl Worth
1c75d622c9 notmuch.el: Enter now calls "notmuch show" on the current thread
It's remarkable how little code we need for a very functional GUI
here. I think we're doing something right.
2009-10-31 01:41:44 -07:00
Carl Worth
8c9cc63a2e notmuch.el: Start fleshing out notmuch-search-mode with a custom keymap
All we have here so far is 'n' and 'p' for going to next and
previous lines respectively.
2009-10-31 01:06:10 -07:00
Carl Worth
095a5ac382 notmuch.el: Switch from start-process to call-process
We now get the point staying right at the top where we want it.
We also don't get any extraneous noise about "Process notmuch
completed" or anything like that. Just the output in a read-only
buffer.
2009-10-31 00:44:39 -07:00
Carl Worth
eb1a5b441b notmuch.el: Switch from compilation-start to start-process
Compilation mode does a bunch of things that we don't want. Instead
of trying to tear it down to what we want, let's start at the other
end and build up only things that we really want.
2009-10-30 23:42:39 -07:00
Carl Worth
7e8ba9adf8 notmuch.el: Add notmuch-search command as well as notmuch
This allows for entering a query string interactively.
2009-10-30 17:18:19 -07:00