aboutsummaryrefslogtreecommitdiff
path: root/emacs/notmuch-hello.el
AgeCommit message (Collapse)Author
2012-05-06emacs: fix custom queries section customization widget in notmuch-helloDmitry Kurochkin
The customization widget referred to a non-existing function `notmuch-hello-insert-query-list'. The patch changes it to the correct one - `notmuch-hello-insert-searches'. The relevant test is fixed now.
2012-04-24emacs: Put notmuch-hello-sections in custom group notmuch-helloAustin Clements
2012-04-12emacs: get rid of trailing spaces in notmuch-hello viewDmitry Kurochkin
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-06emacs: do not modify the alist passed to notmuch-sort-saved-searchesJani Nikula
Sort modifies its input as a side effect. Pass it a copy in notmuch-sort-saved-searches to not modify the notmuch-saved-searches alist.
2012-04-05emacs: fix off-by-one error in notmuch-hello column alignmentDmitry Kurochkin
Expected results for few tests are fixed, the relevant test is unmarked broken.
2012-03-10emacs-hello: Do not calculate the count of the messages in hidden sectionsMichal Sojka
The result is that hello screen shows much faster when some sections are hidden.
2012-03-01emacs: User-defined sections in notmuch-helloDaniel Schoepe
This patch makes the notmuch-hello screen fully customizable by allowing the user to add and remove arbitrary sections. It also provides some convenience functions for constructing sections, e.g. showing the unread message count for each tag. This is done by specifying a list of functions that will be run when notmuch-hello is invoked.
2012-01-26emacs: polish notmuch-hello help textDmitry Kurochkin
Make `=' binding description consistent with others.
2012-01-25emacs: bind "s" to `notmuch-hello-search' in notmuch-hello bufferDmitry Kurochkin
`notmuch-hello-search' uses `notmuch-search' function but refreshes notmuch-hello buffer when the search buffer is closed.
2012-01-25emacs: use a single history for all searchesDmitry Kurochkin
There are two ways to do search in Emacs UI: search widget in notmuch-hello buffer and `notmuch-search' function bound to "s". Before the change, these search mechanisms used different history lists. The patch makes notmuch-hello search use the same history list as `notmuch-search' function.
2012-01-25emacs: bind "s" to `notmuch-search' in notmuch-hello bufferDmitry Kurochkin
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-21emacs/*.el: changed one-char comment prefix ';' to two; ';;'Tomi Ollila
In order for emacs (indent-region) to (re)indent emacs lisp properly there needs to be at least 2 comment characters (;;).
2012-01-21emacs: add invisible dot instead of space at the end of notmuch-hello search boxDmitry Kurochkin
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-21emacs: globally replace non-branching "(if (not ..." with "(unless ..."Pieter Praet
Less code, same results, without sacrificing readability.
2012-01-19emacs: logically group def{custom,face}sPieter Praet
To allow for expansion whilst keeping everything tidy and organized, move all defcustom/defface variables to the following subgroups, defined in notmuch-lib.el: - Hello - Search - Show - Send - Crypto - Hooks - External Commands - Appearance As an added benefit, defcustom keyword args are now consistently ordered as they appear @ defcustom's docstring (OCD much?). Proper defgroup docstrings and various other improvements by courtesy of Austin Clements.
2012-01-12emacs: Improve `notmuch-hello' display on ttys.David Edmondson
Inserting spaces to pad out columns is good, except when the padding makes the line wider than the window. This looks particularly bad on a tty where there is no fringe. Hence, avoid padding the last column on each row.
2011-12-22emacs: put the last search on top of recent searches in notmuch-helloDmitry Kurochkin
Notmuch-hello stores a list of recent searches. Before the change, if a search from this list is repeated, the recent search list is not changed. The patch makes repeated recent searches move to the head of the list. I.e. the last search is always on top of the recent search list, which is what one would expect from a history list.
2011-12-22emacs: Change the default thousands separator to a spaceThomas Jost
This had been discussed and decided on IRC. Rationale: Therefore the space is recommended in the SI/ISO 31-0 standard, and the International Bureau of Weights and Measures states that "for numbers with many digits the digits may be divided into groups of three by a thin space, in order to facilitate reading. Neither dots nor commas are inserted in the spaces between groups of three". (http://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping)
2011-12-22emacs: rename notmuch-decimal-separator to notmuch-hello-thousands-separatorThomas Jost
In 123,456.78, "." is the decimal separator, but "," is the thousands separator.
2011-12-22emacs: Fix notmuch-hello-tag-list-make-query defcustomJani Nikula
It was not possible to define custom filters or filter functions because the types were const. Remove const to allow editing. Signed-off-by: Jani Nikula <jani@nikula.org>
2011-12-21emacs: add notmuch-hello-refresh-hookThomas Jost
This hook is called every time a notmuch-hello buffer is updated.
2011-12-21Don't quote lambda formsAaron Ecay
This generates byte-compiler warnings on (at least) current trunk versions of Emacs. The quote is not necessary; lambda forms are self-quoting.
2011-12-20emacs: do not call `notmuch-hello-mode' on updateDmitry Kurochkin
`notmuch-hello' should call `notmuch-hello-mode' function only when run for the first time. But before the change, `notmuch-hello' used `kill-all-local-variables' to remove editable widgets fields. This caused the major mode to be reset, and `notmuch-hello-mode' to be called every time. The patch manually deletes all editable widget fields and removes `kill-all-local-variables' call.
2011-12-16emacs: Add notmuch-hello-mode-hookIvy Foster
Functions called after entering `notmuch-hello-mode'
2011-11-22emacs: Make saving new saved searches append, not prependJani Nikula
Append new saved searches at the end of saved searches rather than insert in front. Signed-off-by: Jani Nikula <jani@nikula.org>
2011-11-22emacs: Add new customization option to sort saved searchesJani Nikula
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>
2011-11-12emacs: add invisible space after the search widget field in notmuch-helloDmitry Kurochkin
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-06-23fix sum moar typos [comments in source code]Pieter Praet
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").
2011-05-26emacs: Make the queries used in the all-tags section configurableDaniel Schoepe
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>
2011-05-26emacs: Allow the user to choose the "From" address when composing a new messageThomas Jost
When pressing C-u m, the user will be prompted for the identity to use.
2010-11-08Don't use kill-this-buffer to kill notmuch emacs buffersJameson Rollins
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)).
2010-10-29Fix problem with notmuch-hello-nice-numberDirk Hohndel
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".
2010-10-29emacs: Fix the autoload commentsCarl Worth
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.
2010-10-27emacs: Avoid runtime use of `cl'.David Edmondson
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.
2010-10-22emacs: Remove the joke from the first line of the notmuch-hello view.Carl Worth
Overuse just makes the joke unfunny.
2010-10-22emacs: Fix notmuch-hello to not break when given a very narrow window.Carl Worth
Simply ensure that some subtractions never result in a negative number, (since emacs complains when asked to create a string with a negative length).
2010-06-03emacs: Pretty print the numbers of matching messages.David Edmondson
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.
2010-06-03emacs: notmuch-hello: Make widget-keymap a parent of notmuch-hello-keymapNelson Elhage
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.
2010-06-03add missing docstring for functionsSebastian Spaeth
The '?' key bindings uses them for the help window and these are currently empty. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2010-06-03Make notmuch-hello a mode.Sebastian Spaeth
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>
2010-06-03emacs: Remove notmuch-hello-roundup functionSebastian Spaeth
as it does the same as (ceiling number divisor) which is already provided in elisp.
2010-06-03emacs: In hello mode, bind `C-tab' to move backwards through widgets.David Edmondson
`C-tab' is now the inverse operation to `tab'.
2010-06-03emacs: Allow tuning of the tag/saved search layout.David Edmondson
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'.
2010-06-03emacs: Usability improvements for `notmuch-hello'.David Edmondson
- 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.
2010-04-27emacs: Fix `notmuch-hello-insert-tags' to correctly draw the tags.David Edmondson
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.
2010-04-27emacs: If 'all tags' is not shown, don't use it when calculating widths.David Edmondson
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.
2010-04-27emacs: Fix column alignment in `notmuch-hello-insert-tags'David Edmondson
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.
2010-04-26emacs: Rip out all of the notmuch-folder code.Carl Worth
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.
2010-04-26emacs: Fix notmuch-hello to use its own function for counting search results.Carl Worth
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.
2010-04-26emacs: Add a notmuch-saved-searches function.Carl Worth
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.