aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs/notmuch-hello.el
Commit message (Collapse)AuthorAge
* emacs: Expand default saved searches and add shortcut keysGravatar Austin Clements2014-08-05
| | | | | | This should help new users off to a better start with the addition of more sensible saved searches and default shortcut keys. Most existing users have probably customized this variable and won't be affected.
* emacs: Introduce notmuch-jump: shortcut keys to saved searchesGravatar Austin Clements2014-08-05
| | | | | | | | | | | | | | | This introduces notmuch-jump, which is like a user-friendly, user-configurable global prefix map for saved searches. This provides a non-modal and much faster way to access saved searches than notmuch-hello. A user configures shortcut keys in notmuch-saved-searches, which are immediately accessible from anywhere in Notmuch under the "j" key (for "jump"). When the user hits "j", the minibuffer immediately shows a helpful table of bindings reminiscent of a completions buffer. This code is a combination of work from myself (originally, "notmuch-go"), David Edmondson, and modifications from Mark Walters.
* emacs: hello: bugfix for saved searches defcustomGravatar Mark Walters2014-04-21
| | | | | | | | | | | | | | | | | | | | The recent changes for saved searches introduced a bug when notmuch was loaded after the saved search was defined. This was caused by a utility function not being defined when the defcustom was loaded. Fix this by moving some code around: the defcustom is moved into notmuch-hello (which is a more natural place anyway), and the utility functions are moved before the defcustom in notmuch-hello. We are rather constrained as the defcustom for saved searches is the first variable in the notmuch-hello customize window; to avoid moving this customize the defcustom needs to be the first defcustom in notmuch-hello, and the utility functions come before that. This patch also renames one of the utility functions from notmuch--saved-searches-to-plist to notmuch-hello--saved-searches-to-plist (as it is purely local to notmuch-hello) and corrects a couple of typo/spelling mistakes pointed out by Tomi.
* emacs: hello: bugfix: make alphabetically sorted saved searches workGravatar Mark Walters2014-04-14
| | | | | | | | | | | My recent changes to the saved search format broke the alphabetically sorted saved sort option. This makes it work again. Also update docs for saved-search sort defcustom to match the new format. Finally, since the saved-search list is no longer an alist change the names in the sort function to avoid confusion.
* emacs: Add a sort-order option to saved-searchesGravatar Mark Walters2014-04-11
| | | | | | | | | This adds a sort-order option to saved-searches, stores it in the saved-search buttons (widgets), and uses the stored value when the button is pressed. Storing the sort-order in the widget was suggested by Jani in id:4c3876274126985683e888641b29cf18142a5eb8.1391771337.git.jani@nikula.org.
* emacs: hello: switch notmuch-hello-insert-buttons to plistsGravatar Mark Walters2014-04-11
| | | | | Switching notmuch-hello-insert-buttons to plists means we can easily pass extra options through to the buttons.
* emacs: hello: add a customize for saved-searchesGravatar Mark Walters2014-04-11
| | | | | | Make the defcustom for notmuch-saved-searches use the new plist format. It should still work with oldstyle saved-searches but will write the newstyle form.
* emacs: hello: use the saved-search helper functionsGravatar Mark Walters2014-04-11
| | | | | This uses the helper functions: the saved searches format has not changed yet but backwards compatibility means everything still works.
* emacs: hello: add helper functions for saved-searchesGravatar Mark Walters2014-04-11
| | | | | | Add helper functions to for saved searches to ease the transition to the new plist form while maintaining backwards compatibility. They will be used in the next patch.
* emacs: defun notmuch-hello-versions and bind 'v' in hello mode to itGravatar Tomi Ollila2014-04-10
| | | | | | If notmuch cli & notmuch emacs MUA versions differ, print also the emacs MUA version string (along with the cli version) to the minibuffer.
* emacs: remove newlines from input to notmuch count --batchGravatar David Bremner2014-02-25
| | | | | | | | | | | Since a newline starts a new query in batch mode, this causes mysterious crashes in the emacs interface if saved searches contain newlines. See the discussion at id:87wqhcxb5j.fsf@maritornes.cs.unb.ca In general newlines seem to be just whitespace to the xapian query parser, so this should be mainly harmless.
* emacs: add notmuch-assert-cli-sane to notmuch-helloGravatar David Bremner2014-01-26
| | | | | | | This is meant to be the friendly entrypoint, so let's do something better than the mangled output described in id:5228989D.8030607@fifthhorseman.net
* emacs: Move ?, q, s, m, =, and G to the common keymapGravatar Austin Clements2013-09-10
| | | | | | | | | The only user-visible effect of this should be that "G" now works in show mode (previously it was unbound for no apparent reason). This shared keymap gives us one place to put global commands, which both forces us to think about what commands should be global, and ensures their bindings can't diverge (like the missing "G" in show).
* emacs: Define a common shared keymap for all of notmuchGravatar Austin Clements2013-09-10
| | | | | This defines a single, currently empty keymap that all other notmuch mode maps inherit from.
* emacs: Add unified refresh-this-buffer functionGravatar Austin Clements2013-09-10
| | | | | | | | This unifies the various refresh and poll-and-refresh functions we have for different modes. Now all modes bind "=" and "G" (except show, which doesn't bind "G" for some reason) to `notmuch-refresh-this-buffer' and `notmuch-poll-and-refresh-this-buffer', respectively.
* emacs: Bind "s" to notmuch-search in hello-modeGravatar Austin Clements2013-09-10
| | | | | | Since there is now no difference between notmuch-hello-search and notmuch-search when called interactively, bind "s" to notmuch-search in notmuch-hello-mode-map. Now all modes bind "s" this way.
* emacs: Refresh hello whenever the user switches to the bufferGravatar Austin Clements2013-09-10
| | | | | | | | | | Previously, we refreshed hello when the user quit a search that was started from hello. This is fine assuming purely stack-oriented buffer use, but is quite fragile and requires hacks to search. This replaces that logic with a new approach that refreshes hello whenever the user switches to the hello buffer, regardless of how this happens.
* emacs: hello: make --batch error gracefullyGravatar Mark Walters2013-07-27
| | | | | | | | | Recently notmuch-hello was converted to use batch count. However, it seems that several people run different versions of notmuch-emacs and notmuch-cli so this batch makes emacs fail with an error message if --batch is not available in the CLI. Amended by: db
* emacs: hello: allow deleting individual searches in the historyGravatar Servilio Afre Puentes2013-06-08
| | | | | | This commit adds an extra button at the end of the search entries that allows deleting that individual search from the history. A short confirmation («y» or «n») is made before taking action.
* emacs: hello: ask confirmation for clearing recent searchesGravatar Servilio Afre Puentes2013-06-08
| | | | | | The button to clear the recent searches in notmuch-hello is easy to press accidentally while moving around the, clearing potentially useful searches with no way of recovering them.
* emacs: fixed (declare-function ...) definitionsGravatar Tomi Ollila2013-04-30
| | | | | | | | Some (declare-function ...) definitions were drifted away from the actual (defun ...)'s. To find the drifts and to verify changes the following command line was used: $ emacs --batch -L emacs --eval '(check-declare-directory "emacs")'
* emacs: hello: use batch countGravatar Mark Walters2013-04-01
| | | | | | | | | | | | This modifies notmuch hello to use the new count --batch functionality. It should give exactly the same results as before but under many conditions it should be much faster. In particular it is much faster for remote use. The code is a little ugly as it has to do some working out of the query when asking the query and some when dealing with the result. However, the code path is exactly the same in both local and remote use.
* emacs: don't use deprecated "notmuch search-tags" commandGravatar David Bremner2013-01-22
| | | | | A followup patch will finally remove this command, so we need to stop using it.
* 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'