[PATCH] emacs: add a filter option to show
Austin Clements writes: > > I do have one request, though. Could we bind this to 'l' for "limit"? > Generally we've been quite good at making the shift key a modifier to > the functionality of the lower-case binding, which argues against 'F'. > It would also make sense to switch away from 'f' for filtering > (limiting) in search-view; 'f' is one of the few bindings that's used > in both search and show mode with completely different meanings and > 'l' would be a good candidate for the related functionality in both > views. This sounds reasonable to me. d
[PATCH] emacs: add a filter option to show
On Wed, 25 Apr 2012, Austin Clements wrote: > LGTM. I've been wanting this functionality for a while, but have been > too lazy to implement it myself. > > I do have one request, though. Could we bind this to 'l' for "limit"? > Generally we've been quite good at making the shift key a modifier to > the functionality of the lower-case binding, which argues against 'F'. > It would also make sense to switch away from 'f' for filtering > (limiting) in search-view; 'f' is one of the few bindings that's used > in both search and show mode with completely different meanings and > 'l' would be a good candidate for the related functionality in both > views. Yes I think that is a good idea. I will wait a little for other replies and then send a new version. I think 'f' in search view should do a "forward-thread" functionality which could also be linked from 'F' in show mode. I know we don't have this functionality yet but unless people think it is not worth supporting I think reserving the natural key is worth while. Best wishes Mark
[PATCH] emacs: add a filter option to show
Show the current thread with a different filter (i.e., open messages in the thread matching the new query). Currently bound to 'F'. Note that it is not the same as filter in search as it replaces the existing query rather than ANDing with it (but it does keep the threadid part of the query). --- I think filtering (i.e. refining current query) is not ideal as one might want to remove some aspects of the query. Hence this patch replaces the query-context. Note does not fully work with excludes pending id:"1331836090-30560-1-git-send-email-markwalters1009 at gmail.com" Best wishes Mark emacs/notmuch-show.el |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 30b26d1..4a5b8b1 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -42,6 +42,7 @@ (declare-function notmuch-search-next-thread "notmuch" nil) (declare-function notmuch-search-show-thread "notmuch" nil) (declare-function notmuch-update-tags "notmuch" (current-tags tag-changes)) +(declare-function notmuch-read-query "notmuch" (prompt)) (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date") "Headers that should be shown in a message, in this order. @@ -1157,6 +1158,7 @@ reset based on the original query." (define-key map "s" 'notmuch-search) (define-key map "m" 'notmuch-mua-new-mail) (define-key map "f" 'notmuch-show-forward-message) + (define-key map "F" 'notmuch-show-filter-thread) (define-key map "r" 'notmuch-show-reply-sender) (define-key map "R" 'notmuch-show-reply) (define-key map "|" 'notmuch-show-pipe-message) @@ -1399,6 +1401,12 @@ current thread." "Mark the current message as read." (notmuch-show-tag-message "-unread")) +(defun notmuch-show-filter-thread () + "Show the current thread with a different filter" + (interactive) + (setq notmuch-show-query-context (notmuch-read-query "Filter thread: ")) + (notmuch-show-refresh-view t)) + ;; Functions for getting attributes of several messages in the current ;; thread. -- 1.7.9.1
Re: [PATCH] emacs: add a filter option to show
On Wed, 25 Apr 2012, Austin Clements amdra...@mit.edu wrote: LGTM. I've been wanting this functionality for a while, but have been too lazy to implement it myself. I do have one request, though. Could we bind this to 'l' for limit? Generally we've been quite good at making the shift key a modifier to the functionality of the lower-case binding, which argues against 'F'. It would also make sense to switch away from 'f' for filtering (limiting) in search-view; 'f' is one of the few bindings that's used in both search and show mode with completely different meanings and 'l' would be a good candidate for the related functionality in both views. Yes I think that is a good idea. I will wait a little for other replies and then send a new version. I think 'f' in search view should do a forward-thread functionality which could also be linked from 'F' in show mode. I know we don't have this functionality yet but unless people think it is not worth supporting I think reserving the natural key is worth while. Best wishes Mark ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] emacs: add a filter option to show
Austin Clements amdra...@mit.edu writes: I do have one request, though. Could we bind this to 'l' for limit? Generally we've been quite good at making the shift key a modifier to the functionality of the lower-case binding, which argues against 'F'. It would also make sense to switch away from 'f' for filtering (limiting) in search-view; 'f' is one of the few bindings that's used in both search and show mode with completely different meanings and 'l' would be a good candidate for the related functionality in both views. This sounds reasonable to me. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] emacs: add a filter option to show
LGTM. I've been wanting this functionality for a while, but have been too lazy to implement it myself. I do have one request, though. Could we bind this to 'l' for "limit"? Generally we've been quite good at making the shift key a modifier to the functionality of the lower-case binding, which argues against 'F'. It would also make sense to switch away from 'f' for filtering (limiting) in search-view; 'f' is one of the few bindings that's used in both search and show mode with completely different meanings and 'l' would be a good candidate for the related functionality in both views. Quoth Mark Walters on Apr 25 at 12:17 am: > Show the current thread with a different filter (i.e., open messages > in the thread matching the new query). > > Currently bound to 'F'. > > Note that it is not the same as filter in search as it replaces the > existing query rather than ANDing with it (but it does keep the > threadid part of the query). > --- > > I think filtering (i.e. refining current query) is not ideal as one > might want to remove some aspects of the query. Hence this patch > replaces the query-context. > > Note does not fully work with excludes pending > id:"1331836090-30560-1-git-send-email-markwalters1009 at gmail.com" > > Best wishes > > Mark > > emacs/notmuch-show.el |8 > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el > index 30b26d1..4a5b8b1 100644 > --- a/emacs/notmuch-show.el > +++ b/emacs/notmuch-show.el > @@ -42,6 +42,7 @@ > (declare-function notmuch-search-next-thread "notmuch" nil) > (declare-function notmuch-search-show-thread "notmuch" nil) > (declare-function notmuch-update-tags "notmuch" (current-tags tag-changes)) > +(declare-function notmuch-read-query "notmuch" (prompt)) > > (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date") >"Headers that should be shown in a message, in this order. > @@ -1157,6 +1158,7 @@ reset based on the original query." > (define-key map "s" 'notmuch-search) > (define-key map "m" 'notmuch-mua-new-mail) > (define-key map "f" 'notmuch-show-forward-message) > + (define-key map "F" 'notmuch-show-filter-thread) > (define-key map "r" 'notmuch-show-reply-sender) > (define-key map "R" 'notmuch-show-reply) > (define-key map "|" 'notmuch-show-pipe-message) > @@ -1399,6 +1401,12 @@ current thread." >"Mark the current message as read." >(notmuch-show-tag-message "-unread")) > > +(defun notmuch-show-filter-thread () > + "Show the current thread with a different filter" > + (interactive) > + (setq notmuch-show-query-context (notmuch-read-query "Filter thread: ")) > + (notmuch-show-refresh-view t)) > + > ;; Functions for getting attributes of several messages in the current > ;; thread. >
[PATCH] emacs: add a filter option to show
Works-for-me, precisely as requested, thanks :)
[PATCH] emacs: add a filter option to show
Show the current thread with a different filter (i.e., open messages in the thread matching the new query). Currently bound to 'F'. Note that it is not the same as filter in search as it replaces the existing query rather than ANDing with it (but it does keep the threadid part of the query). --- I think filtering (i.e. refining current query) is not ideal as one might want to remove some aspects of the query. Hence this patch replaces the query-context. Note does not fully work with excludes pending id:1331836090-30560-1-git-send-email-markwalters1...@gmail.com Best wishes Mark emacs/notmuch-show.el |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 30b26d1..4a5b8b1 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -42,6 +42,7 @@ (declare-function notmuch-search-next-thread notmuch nil) (declare-function notmuch-search-show-thread notmuch nil) (declare-function notmuch-update-tags notmuch (current-tags tag-changes)) +(declare-function notmuch-read-query notmuch (prompt)) (defcustom notmuch-message-headers '(Subject To Cc Date) Headers that should be shown in a message, in this order. @@ -1157,6 +1158,7 @@ reset based on the original query. (define-key map s 'notmuch-search) (define-key map m 'notmuch-mua-new-mail) (define-key map f 'notmuch-show-forward-message) + (define-key map F 'notmuch-show-filter-thread) (define-key map r 'notmuch-show-reply-sender) (define-key map R 'notmuch-show-reply) (define-key map | 'notmuch-show-pipe-message) @@ -1399,6 +1401,12 @@ current thread. Mark the current message as read. (notmuch-show-tag-message -unread)) +(defun notmuch-show-filter-thread () + Show the current thread with a different filter + (interactive) + (setq notmuch-show-query-context (notmuch-read-query Filter thread: )) + (notmuch-show-refresh-view t)) + ;; Functions for getting attributes of several messages in the current ;; thread. -- 1.7.9.1 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] emacs: add a filter option to show
Works-for-me, precisely as requested, thanks :) ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH] emacs: add a filter option to show
LGTM. I've been wanting this functionality for a while, but have been too lazy to implement it myself. I do have one request, though. Could we bind this to 'l' for limit? Generally we've been quite good at making the shift key a modifier to the functionality of the lower-case binding, which argues against 'F'. It would also make sense to switch away from 'f' for filtering (limiting) in search-view; 'f' is one of the few bindings that's used in both search and show mode with completely different meanings and 'l' would be a good candidate for the related functionality in both views. Quoth Mark Walters on Apr 25 at 12:17 am: Show the current thread with a different filter (i.e., open messages in the thread matching the new query). Currently bound to 'F'. Note that it is not the same as filter in search as it replaces the existing query rather than ANDing with it (but it does keep the threadid part of the query). --- I think filtering (i.e. refining current query) is not ideal as one might want to remove some aspects of the query. Hence this patch replaces the query-context. Note does not fully work with excludes pending id:1331836090-30560-1-git-send-email-markwalters1...@gmail.com Best wishes Mark emacs/notmuch-show.el |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 30b26d1..4a5b8b1 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -42,6 +42,7 @@ (declare-function notmuch-search-next-thread notmuch nil) (declare-function notmuch-search-show-thread notmuch nil) (declare-function notmuch-update-tags notmuch (current-tags tag-changes)) +(declare-function notmuch-read-query notmuch (prompt)) (defcustom notmuch-message-headers '(Subject To Cc Date) Headers that should be shown in a message, in this order. @@ -1157,6 +1158,7 @@ reset based on the original query. (define-key map s 'notmuch-search) (define-key map m 'notmuch-mua-new-mail) (define-key map f 'notmuch-show-forward-message) + (define-key map F 'notmuch-show-filter-thread) (define-key map r 'notmuch-show-reply-sender) (define-key map R 'notmuch-show-reply) (define-key map | 'notmuch-show-pipe-message) @@ -1399,6 +1401,12 @@ current thread. Mark the current message as read. (notmuch-show-tag-message -unread)) +(defun notmuch-show-filter-thread () + Show the current thread with a different filter + (interactive) + (setq notmuch-show-query-context (notmuch-read-query Filter thread: )) + (notmuch-show-refresh-view t)) + ;; Functions for getting attributes of several messages in the current ;; thread. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch