aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-hello.el
Commit message (Collapse)AuthorAge
* emacs: drop support for deprecated notmuch-foldersGravatar Jani Nikula2012-12-04
| | | | | | | | | | | | Remove notmuch-folders which has been deprecated since commit a4669217600e4536dc0c49f0255af5e2d9bc183f Author: Carl Worth <cworth@cworth.org> Date: Mon Apr 26 22:42:07 2010 -0700 emacs: Rip out all of the notmuch-folder code. This lets us simplify the notmuch-saved-searches code slightly.
* emacs: Escape tag queries performed by helloGravatar Austin Clements2012-10-27
|
* emacs: simplify point placement in notmuch-hello refreshGravatar Jani Nikula2012-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | notmuch-hello (called also through notmuch-hello-update, bound to '=' by default) tries to find the widget under or following point before refresh, and put the point back to the widget afterwards. The code has grown quite complicated, and has at least the following issues: 1) All the individual section functions have to include code to support point placement. If there is no such support, point is dropped to the search box. Only saved searches and all tags sections support point placement. 2) Point placement is based on widget-value. If there are two widgets with the same widget-value (for example a saved search with the same name as a tag) the point is moved to the earlier one, even if point was on the later one. 3) When first entering notmuch-hello notmuch-hello-target is nil, and point is dropped to the search box. Moving the point to the search box is annoying because the user is required to move the point before being able to enter key bindings. Simplify the code by removing all point placement based on widgets, as it does not work properly, and trying to fix that would unnecessarily complicate the code. Save current line and column before refresh, and restore them afterwards. Sometimes, if notmuch-show-empty-saved-searches is nil, and the refresh adds or removes saved searches from the list, this has the appearance of moving the point relative to the nearest widgets. This is a much smaller and less frequent problem than the ones listed above.
* emacs: fix custom queries section customization widget in notmuch-helloGravatar Dmitry Kurochkin2012-05-06
| | | | | | | 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.
* emacs: Put notmuch-hello-sections in custom group notmuch-helloGravatar Austin Clements2012-04-24
|
* emacs: get rid of trailing spaces in notmuch-hello viewGravatar Dmitry Kurochkin2012-04-12
| | | | | | | | | | | 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.
* emacs: do not modify the alist passed to notmuch-sort-saved-searchesGravatar Jani Nikula2012-04-06
| | | | | | 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.
* emacs: fix off-by-one error in notmuch-hello column alignmentGravatar Dmitry Kurochkin2012-04-05
| | | | | Expected results for few tests are fixed, the relevant test is unmarked broken.
* emacs-hello: Do not calculate the count of the messages in hidden sectionsGravatar Michal Sojka2012-03-10
| | | | | The result is that hello screen shows much faster when some sections are hidden.
* emacs: User-defined sections in notmuch-helloGravatar Daniel Schoepe2012-03-01
| | | | | | | | | | 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.
* emacs: polish notmuch-hello help textGravatar Dmitry Kurochkin2012-01-26
| | | | Make `=' binding description consistent with others.
* emacs: bind "s" to `notmuch-hello-search' in notmuch-hello bufferGravatar Dmitry Kurochkin2012-01-25
| | | | | `notmuch-hello-search' uses `notmuch-search' function but refreshes notmuch-hello buffer when the search buffer is closed.
* emacs: use a single history for all searchesGravatar Dmitry Kurochkin2012-01-25
| | | | | | | | 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.
* emacs: bind "s" to `notmuch-search' in notmuch-hello bufferGravatar Dmitry Kurochkin2012-01-25
| | | | | | 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.
* emacs/*.el: changed one-char comment prefix ';' to two; ';;'Gravatar Tomi Ollila2012-01-21
| | | | | In order for emacs (indent-region) to (re)indent emacs lisp properly there needs to be at least 2 comment characters (;;).
* emacs: add invisible dot instead of space at the end of notmuch-hello search boxGravatar Dmitry Kurochkin2012-01-21
| | | | | | | | | | 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.
* emacs: globally replace non-branching "(if (not ..." with "(unless ..."Gravatar Pieter Praet2012-01-21
| | | | Less code, same results, without sacrificing readability.
* emacs: logically group def{custom,face}sGravatar Pieter Praet2012-01-19
| | | | | | | | | | | | | | | | | | | | | 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.
* emacs: Improve `notmuch-hello' display on ttys.Gravatar David Edmondson2012-01-12
| | | | | | | | 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.
* emacs: put the last search on top of recent searches in notmuch-helloGravatar Dmitry Kurochkin2011-12-22
| | | | | | | | 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.
* emacs: Change the default thousands separator to a spaceGravatar Thomas Jost2011-12-22
| | | | | | | | | | | | | 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)
* emacs: rename notmuch-decimal-separator to notmuch-hello-thousands-separatorGravatar Thomas Jost2011-12-22
| | | | In 123,456.78, "." is the decimal separator, but "," is the thousands separator.
* emacs: Fix notmuch-hello-tag-list-make-query defcustomGravatar Jani Nikula2011-12-22
| | | | | | | 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>
* emacs: add notmuch-hello-refresh-hookGravatar Thomas Jost2011-12-21
| | | | This hook is called every time a notmuch-hello buffer is updated.
* Don't quote lambda formsGravatar Aaron Ecay2011-12-21
| | | | | | This generates byte-compiler warnings on (at least) current trunk versions of Emacs. The quote is not necessary; lambda forms are self-quoting.
* emacs: do not call `notmuch-hello-mode' on updateGravatar Dmitry Kurochkin2011-12-20
| | | | | | | | | | | `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.
* emacs: Add notmuch-hello-mode-hookGravatar Ivy Foster2011-12-16
| | | | Functions called after entering `notmuch-hello-mode'
* 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.