diff --git a/NEWS.org b/NEWS.org index cbd5be86..2c9f80af 100644 --- a/NEWS.org +++ b/NEWS.org @@ -21,11 +21,11 @@ no exact match; small convenience that affects most the single-char option reading in mu4e. - Now, just before executing any search, a hook-function - `mu4e-headers-search-pre-hook` is invoked, which receives the + `mu4e-headers-search-hook` is invoked, which receives the search expression as its parameter. - In addition there's a `mu4e-headers-search-bookmark-hook` which gets called when searches get invoked as a bookmark (note that - `mu4e-headers-search-pre-hook` will also be called just + `mu4e-headers-search-hook` will also be called just afterwards). This hook also receives the search expression as its parameter. diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index ff8ffb33..e0047127 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -164,7 +164,7 @@ query have been received and are displayed." "Hook run just after we invoke a bookmarked search. This function receives the query as its parameter. -The reason to use this instead of `mu4e-headers-search-pre-hook' +The reason to use this instead of `mu4e-headers-search-hook' is if you only want to execute a hook when a search is entered via a bookmark, e.g. if you'd like to treat the bookmarks as a custom folder and change the options for the search, @@ -173,7 +173,7 @@ e.g. `mu4e-headers-show-threads', `mu4e-headers-include-related', :type 'hook :group 'mu4e-headers) -(defcustom mu4e-headers-search-pre-hook nil +(defcustom mu4e-headers-search-hook nil "Hook run just before executing a new search operation. This function receives the query as its parameter. @@ -1032,7 +1032,7 @@ the query history stack." (mu4e-context-label))))) (switch-to-buffer buf) - (run-hook-with-args 'mu4e-headers-search-pre-hook expr) + (run-hook-with-args 'mu4e-headers-search-hook expr) (mu4e~proc-find expr mu4e-headers-show-threads diff --git a/mu4e/mu4e.texi b/mu4e/mu4e.texi index 0fa1f63e..a4e6fb64 100644 --- a/mu4e/mu4e.texi +++ b/mu4e/mu4e.texi @@ -828,8 +828,8 @@ found during the indexing process, and if there is no current user-interaction. If you do not want such automatic updates, set @code{mu4e-headers-auto-update} to @code{nil}. @item Just before executing a search, a hook-function -@code{mu4e-headers-search-pre-hook} is invoked, which receives the -search expression as its parameter. +@code{mu4e-headers-search-hook} is invoked, which receives the search +expression as its parameter. @item Also, there is a hook-function @code{mu4e-headers-found-hook} available which is invoked just after @t{mu4e} has completed showing the messages in the headers-view.