aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* notmuch setup: Break the implementation up into manageable functions.Carl Worth2009-11-11
| | | | | The notmuch_setup_command function was getting entirely unwieldy. Break it up into smaller functions for better maintainability.
* notmuch reply: Use GMime to construct the header for the reply.Carl Worth2009-11-11
| | | | | | | | | The advantage here is that we actually get the necessary folding of long headers, (particularly the References header, but also things like Subject). This also gives us parsed recipient addresses so that we can easily elide the sender's address(es) from the recipient list (just as soon as we have a configured value for the recipient's address(es)).
* notmuch.el: Add a binding ('r') to reply to the current message.Carl Worth2009-11-10
| | | | | | | 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).
* notmuch reply: Process headers a bit more accurately.Carl Worth2009-11-10
| | | | | | We know take the original From: and all recipients and put them on the To: line. We also add a "Re: " to the subject, and we add In-Reply-To: and References: headers.
* notmuch.el: Simplify get-message-idCarl Worth2009-11-10
| | | | | We were stripping off the "id:" portion of the identifier, only to put it back on again in all cases. Stop this madness.
* notmuch reply: Add (incomplete) reply commandKeith Packard2009-11-10
| | | | | | | | | | | | | | Reviewed-by: Carl Worth <cworth@cworth.org> Keith wrote all the code here against notmuch before notmuch.c was split up into multiple files. So I've pushed the code around in various ways to match the new code structure, but have generally tried to avoid making any changes to the behavior of the code. I did fix one bug---a missing call to g_mime_stream_file_set_owner in show_part which would cause "notmuch show" to go off into the weeds when trying to show multiple messages, (since the first stream would fclose stdout).
* notmuch: Break notmuch.c up into several smaller files.Carl Worth2009-11-10
| | | | | | | | Now that the client sources are alone here in their own directory, (with all the library sources down inside the lib directory), we can break the client up into multiple files without mixing the files up. The hope is that these smaller files will be easier to manage and maintain.
* .gitignore: Ignore .deps directory.Carl Worth2009-11-10
| | | | | We recently moved dependencies from a single .depends file to a directory named .deps with many files, but neglected to update our .gitignore rules.
* Makefile: Change default flags to -O2.Carl Worth2009-11-10
| | | | | We've now verified that it's reliable for the user to override CFLAGS on the command line, so just make the user do to get a debug build.
* Makefile: Make the top-level Makefile a little more independent.Carl Worth2009-11-10
| | | | | | | Previously, the top-level Makefile was explicitly adding -I./lib to the compiler flags. However, that's something that's much better done from within the Makefile.local fragment within the lib directory itself.
* Makefile: Simplify setting of CFLAGS, etc.Carl Worth2009-11-10
| | | | | | | | | | We were previously using separate CFLAGS and NOTMUCH_CFLAGS variables in an attempt to allow the user to specify CFLAGS on the command-line. However, that's just a lot of extra noise in the Makefile when we can instead let the user specify what is desired for CFLAGS and then use an override to append the things we require. So our Makefile is much neater now.
* Makefile: Fix dependency generation to make .d files themselves dependent.Carl Worth2009-11-10
| | | | | | | | | | | | | | | I saw this recommendation in the implementation notes for "Recursive Make Considered Harmful" and then the further recommendation for implementing the idea in the GNU make manual. The idea is that if any of the files change then we need to regenerate the dependency file before we regenerate any targets. The approach from the GNU make manual is simpler in that it just uses a sed script to fix up the output of an extra invocation of the compiler, (as opposed to the approach in the implementation notes from the paper's author which use a wrapper script for the compiler that's always invoked rather than the compiler itself).
* Implement a non-recursive make.Carl Worth2009-11-10
| | | | | | | | | | | | The idea here is that every Makefile at each lower level will be an identical, tiny file that simply defers to a top-level make. Meanwhile, the Makefile.local file at each level is a Makefile snippet to be included at the top-level into a large, flat Makefile. As such, it needs to define its rules with the entire relative directory to each file, (typically in $(dir)). The local files can also append to variables such as SRCS and CLEAN for files to be analyzed for dependencies and to be cleaned.
* Makefile: Hide away auto-generated dependency file as .depends.Carl Worth2009-11-09
| | | | | | Instead of the old name of Makefile.dep. The idea being that the user really doesn't need to see this by default, (and if debugging the Makefile, the rules will make the name obvious).
* Remove obsolete message.h.Carl Worth2009-11-09
| | | | | This has been around but never used, and only became apparent now that the other sources moved down into the lib sub-directory.
* libify: Move library sources down into lib directory.Carl Worth2009-11-09
| | | | | A "make" invocation still works from the top-level, but not from down inside the lib directory yet.
* notmuch.el: Don't advance line in search buffer before showing thread.Carl Worth2009-11-09
| | | | | | | | | | | | 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.
* notmuch.el: Fix add/remove tag from search buffers.Carl Worth2009-11-09
| | | | | These were recently broken with the change of "notmuch search" to prefix thread IDs with "thread:" rather than printing them raw.
* add_message: Fix crash for file recognized as not email.Carl Worth2009-11-09
| | | | | | This crash was introduced sometime recently, as previously things worked fine when notmuch detected that a file is not an email. We're definitely overdue for that test suite.
* TODO: Note that notmuch restore needs some progress indication.Carl Worth2009-11-09
| | | | | | A recent "notmuch restore" command took *forever* for me. Obviously, we need to fix the underlying performance bug in Xapian, but in the meantime, a progress indicator would help.
* notmuch setup: Remove a debugging print.Carl Worth2009-11-09
| | | | | This was just some extra noise printed when requesting a non-default mail directory itneractively.
* add_message: Start storing In-Reply-To information in the database.Carl Worth2009-11-06
| | | | | We'll use this eventually for properly nesting messages in the output of "notmuch show", etc.
* Makefile: Fix install target to depend on the all target.Carl Worth2009-11-06
| | | | Otherwise, it would just fail if you hadn't run "make" already.
* notmuch show: Don't show the subject line twice.Carl Worth2009-11-06
| | | | | | | | I recently added a print of the subject line for use as part of a two-line summary in the emacs client. But of course, the subject was already being printed on the next line. So I didn't really need to add anything, I could have just stopped hiding what was already printed. Anyway, we now avoid printing it twice in a row.
* add_message: Fix segfault for message with no Date header.Carl Worth2009-11-06
| | | | | | I'd fixed this earlier when I had a private copy of GMime's date-parsing code, but I lost the fix when I recently switched to calling the GMime function.
* notmuch show: Move subject from one-line summary down to its own line.Carl Worth2009-11-05
| | | | | And change the display code in emacs to display the one-line summary in inverse video.
* notmuch.el: Bring back the "End of search results." message.Carl Worth2009-11-05
| | | | | | 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.
* notmuch.el: Make hidden parts advertise how to unhide them.Carl Worth2009-11-05
| | | | | | 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).
* notmuch.el: Add 'A' binding to archive thread after removing all "unread" tags.Carl Worth2009-11-05
| | | | | This is useful for when the rest of the thread is visible on screen so the user really has read the rest of it.
* Update notmuch man page with recently-added documentation.Carl Worth2009-11-05
| | | | | It would be nice to have this documentation live in a single place, but for now, this is what we get.
* notmuch search: Document the from, to, and subject prefixes.Carl Worth2009-11-05
| | | | | I've been using these for a long time, but I had neglected to document them until now.
* notmuch show: Fix to work with any search string rather than just a thread ID.Carl Worth2009-11-05
| | | | | | | | | | | 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.
* notmuch.el: Add 'N' binding to mark message read and go to next.Carl Worth2009-11-05
| | | | | | 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.
* notmuch.el: Don't require an extra press of space bar before archiving.Carl Worth2009-11-04
| | | | | | | | | | | | | | | | | | 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.
* notmuch.el: Add a simple command to pipe a message to a process.Carl Worth2009-11-04
| | | | With the obvious keybinding.
* notmuch.el: Don't skip read messages when they are open.Carl Worth2009-11-04
| | | | | | | 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).
* notmuch.el: Allow for scrolling backwards through thread with DELCarl Worth2009-11-04
| | | | | | | | 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).
* notmuch.el: Add 'w' binding to view raW email message.Carl Worth2009-11-04
| | | | | This takes advantage of the new filename output just added to "notmuch show".
* notmuch show: Add filename to output (next to message ID).Carl Worth2009-11-04
| | | | | This will allow a client using "notmuch show" to directly open the filename and do whatever it wants with it.
* notmuch.el: Don't use defvar for undocumented variables.Carl Worth2009-11-04
| | | | | Make at least some attempt to distinguish internal variables from those that the user is expected to fiddle with.
* notmuch.el: Don't hide long signatures.Carl Worth2009-11-04
| | | | | | | | | 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).
* notmuch.el: Fix to claim correct number of lines for hidden signature.Carl Worth2009-11-04
| | | | Previously, it was reporting that all signatures were 0 lines.
* notmuch.el: Don't hide message bodies when all messages are read.Carl Worth2009-11-04
| | | | | | Presumably the user is trying to view this thread for a reason, so it's better to actually show *something* rather than just the summary lines.
* notmuch show: Fix misplaced g_object_unref leading to error message.Carl Worth2009-11-04
| | | | | | | | | | We were inadvertently calling g_object_unref on a wild pointer leading to the following error message: GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed Now, why glib doesn't abort on critical errors, I'll never understand.
* notmuch.el: Make notmuch-search scroll commands move to first/last message.Carl Worth2009-11-04
| | | | | If there's nothing to scroll but we're not yet on the first or last message then move point to that message.
* notmuch.el: Override next-line and previous-line to make them reliable.Carl Worth2009-11-04
| | | | | | | | | | | | | | | | I noticed that these functions would sometimes leave point on an invisible character[*]. The problem would be that point would appear to be on a particular message, but adding or removing a tag would actually add/remove a tag from the *previous* message. Fix the C-n and C-p keybindings at least to call the underlying command and then advance to a visible character. We set this-command in our overrides so that the temporary-goal-column feature still works. [*] The documentation says that command loop is supposed to move point outside of any invisible region when a command exits. But apparently not.
* notmuch.el: Un-break the magic space bar to scroll a long, single message.Carl Worth2009-11-04
| | | | | | | | | | | | | | Clearly some recent code was very fragile, which I noticed in that the space bar would no longer scroll a long message if it was the only message in a thread. This resulted in a lot of churn, but hopefully things are more robust now, (for example by using new predicates like notmuch-show-last-message-p rather than doing heuristics based on (eobp) or (window-end)). As usual, the presence of invisible characters complicates the task of making this stuff robust.
* notmuch.el: Fix to show *something* when all messages are already read.Carl Worth2009-11-04
| | | | | | | | With the recent change of showing the first unread message, we would scroll down to the end of the buffer if all messages were already read. This would confusingly show nothing visible in the window. Instead, detect this case and move to the beginning of the buffer.
* notmuch.el: Make magic space bar advance to next unread messages.Carl Worth2009-11-04
| | | | | | | | | The magic of the space bar is all about unread messages, so there's no reason for it to advance to messages that have already been read. Similarly, we now remove any magic from (n)ext so that it simply advances to the next message without marking anything read, (which makes it symmetrical with (p)revious).
* notmuch.el: Move to first unread message on notmuch-show.Carl Worth2009-11-04
| | | | | This is important for when a new message is delivered to an existing enormous thread.