aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-hello.el
Commit message (Collapse)AuthorAge
...
* emacs: Make saving new saved searches append, not prependGravatar Jani Nikula2011-11-22
| | | | | | | Append new saved searches at the end of saved searches rather than insert in front. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: Add new customization option to sort saved searchesGravatar Jani Nikula2011-11-22
| | | | | | | | | | | Add new customization option notmuch-saved-search-sort-function to sort saved searches in user-defined order. Provide a sort function to sort the saved searches in alphabetical order. Setting the search function to nil causes the saved searches not to be sorted, as before. This also remains the default. The function only affects display of the saved searches, not the order in which they are stored by custom. Signed-off-by: Jani Nikula <jani@nikula.org>
* emacs: add invisible space after the search widget field in notmuch-helloGravatar Dmitry Kurochkin2011-11-12
| | | | | | | | | 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.
* fix sum moar typos [comments in source code]Gravatar Pieter Praet2011-06-23
| | | | | | | | | | Various typo fixes in comments within the source code. Signed-off-by: Pieter Praet <pieter@praet.org> Edited-by: Carl Worth <cworth@cworth.org> Restricted to just source-code comments, (and fixed fix of "descriptios" to "descriptors" rather than "descriptions").
* emacs: Make the queries used in the all-tags section configurableGravatar Daniel Schoepe2011-05-26
| | | | | | | | | | This patch adds a customization variable that controls what queries are used to construct the all-tags section in notmuch-hello. It allows the user to specify a function to construct the query given a tag or a string that is used as a filter for each tag. It also adds a variable to hide various tags from the all-tags section. Signed-off-by: Daniel Schoepe <daniel.schoepe@googlemail.com>
* emacs: Allow the user to choose the "From" address when composing a new messageGravatar Thomas Jost2011-05-26
| | | | When pressing C-u m, the user will be prompted for the identity to use.
* Don't use kill-this-buffer to kill notmuch emacs buffersGravatar Jameson Rollins2010-11-08
| | | | | | | | kill-this-buffer appears to be a function intended specifically for use in the menu bar, and causes problem killing notmuch buffers when multiple frames have been used. This patch replaces kill-this-buffer with notmuch-kill-this-buffer, which in turn just simply calls (kill-buffer (current-buffer)).
* Fix problem with notmuch-hello-nice-numberGravatar Dirk Hohndel2010-10-29
| | | | | | | | Without this little patch notmuch fails if asked to display a saved search that has zero results Edited-by: David Edmondson <dme@dme.org>: With code that is a little more "emacsy".
* emacs: Fix the autoload commentsGravatar Carl Worth2010-10-29
| | | | | | | Remove them from non-top-level entry points, (such as the functions to set notmuch modes and the deprecated notmuch-folder function). And add one to the notmuch-hello function. Also, add missing documentation string to notmuch-hello.
* emacs: Avoid runtime use of `cl'.Gravatar David Edmondson2010-10-27
| | | | | | | | | | | | | | | | | | | | | | | | | The GNU Emacs Lisp Reference Manual section D.1 says: > * Please don't require the cl package of Common Lisp extensions at > run time. Use of this package is optional, and it is not part of > the standard Emacs namespace. If your package loads cl at run time, > that could cause name clashes for users who don't use that package. > > However, there is no problem with using the cl package at compile > time, with (eval-when-compile (require 'cl)). That's sufficient for > using the macros in the cl package, because the compiler expands > them before generating the byte-code. Follow this advice, requiring the following changes where `cl' was used at runtime: - replace `rassoc-if' in `notmuch-search-buffer-title' with the `loop' macro and inline code. At the same time find the longest prefix which matches the query rather than simply the last, - replace `union', `intersection' and `set-difference' in `notmuch-show-add-tag' and `notmuch-show-remove-tag' with local code to calculate the result of adding and removing a list of tags from another list of tags.
* emacs: Remove the joke from the first line of the notmuch-hello view.Gravatar Carl Worth2010-10-22
| | | | Overuse just makes the joke unfunny.
* emacs: Fix notmuch-hello to not break when given a very narrow window.Gravatar Carl Worth2010-10-22
| | | | | | Simply ensure that some subtractions never result in a negative number, (since emacs complains when asked to create a string with a negative length).
* emacs: Pretty print the numbers of matching messages.Gravatar David Edmondson2010-06-03
| | | | | | | Insert a separator every three digits when outputting numbers. Allow the user to choose the separator by customizing `notmuch-decimal-separator'. Widen the space allocated for message counts accordingly.
* emacs: notmuch-hello: Make widget-keymap a parent of notmuch-hello-keymapGravatar Nelson Elhage2010-06-03
| | | | | | This lets us pick up later changes to widget-keymap if the user customizes it in some way. This is the recommended way to use `widget-keymap', according to its help.
* add missing docstring for functionsGravatar Sebastian Spaeth2010-06-03
| | | | | | | The '?' key bindings uses them for the help window and these are currently empty. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Make notmuch-hello a mode.Gravatar Sebastian Spaeth2010-06-03
| | | | | | | | | | This enables the nifty '?' key binding to work in notmuch-hello (although for some strange reasons I don't see any descriptions for specific key bindings yet. Not sure how that is supposed to work though. But this starts, runs and behaves identical to the existing code. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* emacs: Remove notmuch-hello-roundup functionGravatar Sebastian Spaeth2010-06-03
| | | | as it does the same as (ceiling number divisor) which is already provided in elisp.
* emacs: In hello mode, bind `C-tab' to move backwards through widgets.Gravatar David Edmondson2010-06-03
| | | | `C-tab' is now the inverse operation to `tab'.
* emacs: Allow tuning of the tag/saved search layout.Gravatar David Edmondson2010-06-03
| | | | | | | | | | | | | | | | | | | | Add `notmuch-column-control', which has three potential sets of values: - t: automatically calculate the number of columns per line based on the tags to be shown and the window width, - an integer: a lower bound on the number of characters that will be used to display each column, - a float: a fraction of the window width that is the lower bound on the number of characters that should be used for each column. So: - if you would like two columns of tags, set this to 0.5. - if you would like a single column of tags, set this to 1.0. - if you would like tags to be 30 characters wide, set this to 30. - if you don't want to worry about all of this nonsense, leave this set to `t'.
* emacs: Usability improvements for `notmuch-hello'.Gravatar David Edmondson2010-06-03
| | | | | | | - If no saved searches exist or are displayed, don't signal an error, - If no saved searches exist or are displayed, leave the cursor in the search bar, - Minor layout improvements.
* emacs: Fix `notmuch-hello-insert-tags' to correctly draw the tags.Gravatar David Edmondson2010-04-27
| | | | | | | The fix in 1e1871154341cdd3413fe3f32e3aae477826d815 broke end-of-row wrapping when drawing the table of tags/saved searches. Fix that and improve the readability of the matrix reflection code to hasten future debugging.
* emacs: If 'all tags' is not shown, don't use it when calculating widths.Gravatar David Edmondson2010-04-27
| | | | | | If the 'all tags' section of the hello buffer will not be shown, don't consider those tags when determining the number of saved searches that can be displayed on a single line.
* emacs: Fix column alignment in `notmuch-hello-insert-tags'Gravatar David Edmondson2010-04-27
| | | | | | | Re-working the saved search/tag insertion to buttonize only the name of the saved search/tag plus one space broke the calculation of how much filler is required to complete the column, resulting in lines wider than the window.
* emacs: Rip out all of the notmuch-folder code.Gravatar Carl Worth2010-04-26
| | | | | | | | | | | | We are asserting that the new notmuch-hello implementation, (available by just calling `notmuch') is just as easy to use as the old notmuch-folder. So let's remove what's now a largely redundant implementation. To make this transition easier, we are still supporting the notmuch-folders variable name, and we still provide `notmuch-folder' as an alias which can be invoked to get the new notmuch-hello functionality.
* emacs: Fix notmuch-hello to use its own function for counting search results.Gravatar Carl Worth2010-04-26
| | | | | | | Previously, this was calling into a notmuch-folder-count function. Only, everything related to notmuch-folder is about to go away, so lets have notmuch-hello define its own function (notmuch-saved-search-count) for this purpose.
* emacs: Add a notmuch-saved-searches function.Gravatar Carl Worth2010-04-26
| | | | | | | | | | | | | We use this function to abstract away the common 3-step process for looking for a value for the saved-searches variable: 1. Look at the notmuch-saved-searches variable itself 2. Look at the notmuch-folders vaiable 3. Use a default value We were already using this logic (open-coded) in notmuch-hello, but notmuch.el was accessing notmuch-folders directly for the clever name selection of search buffers.
* emacs: Move declare-function from notmuch-lib.el to notmuch-hello.el.Gravatar Carl Worth2010-04-26
| | | | | | Apparently the declare-function macro doesn't work in a required file as I might like it too. Put it where it needs to go to avoid the warning.
* notmuch-hello: Add a 'G' keybinding.Gravatar Carl Worth2010-04-26
| | | | | Just like the G keybinding we've had in notmuch-folder-mode and notmuch-search-mode, (to call `notmuch-poll' to 'G'et new mail).
* notmuch-hello: Make this work with a notmuch-folders variable set in ~/.emacsGravatar Carl Worth2010-04-26
| | | | | | | I'm planning to rip out the notmuch-folder-mode completely. So as a token kindness to existing users of notmuch-folders, I'm at least making notmuch-hello support the notmuch-folders variable name as an alternate for the new name of notmuch-saved-searches.
* emacs: Remove "hello" from all variables exported through customize.Gravatar Carl Worth2010-04-26
| | | | | | | We've recently changed things so that the notmuch-hello screen is the default view one gets by executing `notmuch'. So hide the "hello" name from everything exposed in the customize interface, (leaving "hello" as just an internal name within the implementation).
* notmuch-hello: Fix a sign error when computing number of padding spaces.Gravatar Carl Worth2010-04-26
| | | | | | | | | | | After the previous commit, toggling the visibility of tags could result in notmuch-hello aborting with: Wrong type argument: wholenump, -1 At least, the error only occurred for me when making tags visible. But that may be because my longest tag name is longer than my longest saved-search name.
* notmuch-hello: Fix ability to isearch to a saved-search and press RETGravatar Carl Worth2010-04-26
| | | | | | | | | | | After isearching for an entire saved-search name, the point will be immediately after that name in the buffer. Before commit c9ba61bebef7733c4bf12adf94222e57621fdcf6 the space right after the name was part of the widget so the user could press RET right after the isearch to activate the saved search. The above commit broke that functionality. Restore it by including a single space after each name as part of the widget.
* emacs: notmuch-hello: Make viewing of all tags conditional.Gravatar Carl Worth2010-04-26
| | | | | | | | | And off by default. There's a notmuch-hello-show-tags option in customize to toggle the default setting, as well as buttons to persistently toggle the visibility for the current session. I have enough tags in my database that it's quite a bit faster for notmuch-hello to come up without showing the tags.
* notmuch-hello: Preserve current position when invoking notmuch-helloGravatar Carl Worth2010-04-26
| | | | | | | Previously, we preserved the current position only when returning to the notmuch-hello buffer or when refreshing it. Fix to also preserve the position when directly invoking notmuch-hello, (such as from a global keybinding).
* emacs: notmuch-hello: Move to first saved search item.Gravatar Carl Worth2010-04-26
| | | | | | | This give us a useful active widget by default, ("inbox"), and otherwise gives the first saved search in the user's customized list. Not having point on the search bar means that the various keybindings are all available.
* emacs: Fix 's' keybinding to go to search bar in notmuch-hello.Gravatar Carl Worth2010-04-26
| | | | | | | This command was previously written under the fragile assumption that the search bar was always the third widget. That's no longer true with the saved searches now appearing before the search bar, so we save the position of the search bar and go directly to it now.
* emacs: Move saved searches before search bar in notmuch-hello.Gravatar Carl Worth2010-04-26
| | | | | | Once users start using saved searches regularly, it's expected that these will become the primary access points to mail. So give them a priority position in the buffer.
* emacs: Remove the notmuch-hellow-jump-to-search variable.Gravatar Carl Worth2010-04-26
| | | | | Instead, make notmuch-hello unconditionally jump to the first widget in the buffer. By default this will be the search bar anyway.
* emacs: Take advantage of position-remembering when returning to notmuch-helloGravatar Carl Worth2010-04-26
| | | | | | | When we go into a search, and then later quit and return to the notmuch-hello buffer, we want the point to remain in the same position it was in when we left. So we have to call the position-remembering notmuch-hello-update rather than notmuch-hello from the continuation.
* emacs: Make update of notmuch-hello leave point on the same widget.Gravatar Carl Worth2010-04-26
| | | | | | | Before refreshing, we check which widget we are currently on, (or look for the next widget), and then we watch for that same widget to go by when constructing the buffer contents. Finally, we jump to the position we saw when the widget went by.
* emacs: notmuch-hello: Don't include extra spaces in widget values.Gravatar Carl Worth2010-04-26
| | | | | | | | | | Previously, trailing spaces after each saved-search name were included as part of the widget. This is going to be problematic for a future change that will extract the widget's value and compare it to the configured names of saved searches. Instead, just include the name itself in the widget, and then insert the spaces for separation afterwards.
* emacs: Disable automatic jump to search bar for notmuch-hello.Gravatar Carl Worth2010-04-26
| | | | | We're about to get support for maintaining point on the current saved-search, so we don't want this jump-to-search defeating that.
* emacs: `notmuch' should display the `notmuch-hello' interfaceGravatar David Edmondson2010-04-26
| | | | | | | | | | | | | | | | | Reviewed-by: Carl Worth <cworth@cworth.org> The notmuch-hello functionality is now sufficiently useful that we want to make it the default view of notmuch for new users. This also effectively hides the "hello" name from the user, so we'll be free to change that in the implementation if necessary. This change also shuffles the requires between notmuch.el and notmuch-hello.el. This fixes things so that our documented (require 'notmuch) is sufficient for getting the notmuch-hello functionality. Finally, the shuffling caused the notmuch-search-oldest-first variable from one file to the other. While doing that, give this variable the defcustom treatment for easier customization.
* emacs: Add a search to the 'recent searches' list once onlyGravatar David Edmondson2010-04-26
| | | | | | Avoiding adding the same search string to the 'recent searches' list more than once by testing whether the string was already used with `member' rather than `memq'.
* emacs: Remove the accelerator keys from the hello bufferGravatar David Edmondson2010-04-26
| | | | | Carl though that the recent search accelerator keys are not useful, so remove them.
* emacs: Adapt the logo background colour to that of the frameGravatar David Edmondson2010-04-26
| | | | | | | | | The notmuch logo uses transparency. That can display poorly when inserting the image into an emacs buffer (black logo on a black background), so force the background colour of the image. We use a face (`notmuch-hello-logo-background') to represent the colour so that `defface' can be used to declare the different possible colours, which depend on whether the frame has a light or dark background.
* emacs: Make notmuch-hello jumpt to search bar by default.Gravatar Carl Worth2010-04-24
| | | | | | | This isn't ideal for me personally, since I usually want to inovke a saved search rather than entering a new search textually. But it's at least better than just putting point in the upper-left corner where it doesn't do anything.
* emacs: Re-arrange message sending codeGravatar David Edmondson2010-04-23
| | | | | | | | | | | | | | | Define a new `mail-user-agent' (`notmuch-user-agent') and use it by default. Re-arrange various routines that send mail to use this (compose, reply, forward). Insert a `User-Agent:' header by default. This is the real commit for this functionality this time. The previous attempt to merge this code: commit 57926bc7b0f784cbacb620fda0ee5157e2e0ff27 was botched (by Carl Worth, not David) to include only the Makefile change. So the build was broken until this commit that actually adds the new file.
* emacs: Fix some compilation warnings.Gravatar Carl Worth2010-04-23
| | | | | | Fix missing argumen in declaration of notmuch-search function and add a definition of notmuch-search-continuation to avoid warning about assignment to a free variable.
* emacs: Add notmuch-hello.el, a friendly frontend to notmuchGravatar David Edmondson2010-04-23
This is based on the prototype that Carl Worth described in the TODO file. It provides a search bar as well as support for recent searches, saved searches, and a list of all tags in the database (as well as the number of messages with each tag).