Re: [PATCH] emacs: notmuch-hello: Add variable to control order or saved-search results
Carl Worth writes: > This allows for the user to control the order that results are > returned from saved-searches, (and independently from the order of all > other searches which is controlled by notmuch-search-oldest-first). After we lost this from notmuch, I added this to my .emacs, which made my hello searches oldest first: (defun notmuch-hello-widget-search (widget &rest ignore) (notmuch-search (widget-get widget :notmuch-search-terms) t)) -- keith.pack...@intel.com pgp2wWQx1qZST.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] emacs: notmuch-hello: Add variable to control order or saved-search results
Carl Worth writes: > This allows for the user to control the order that results are > returned from saved-searches, (and independently from the order of all > other searches which is controlled by notmuch-search-oldest-first). After we lost this from notmuch, I added this to my .emacs, which made my hello searches oldest first: (defun notmuch-hello-widget-search (widget &rest ignore) (notmuch-search (widget-get widget :notmuch-search-terms) t)) -- keith.packard at intel.com -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 810 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140207/5aecf5fb/attachment.pgp>
Re: [PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring
On Wed, Feb 05, 2014 at 07:31:27AM -0800, W. Trevor King wrote: > On Wed, Feb 05, 2014 at 05:24:56PM +0200, Tomi Ollila wrote: > > Forgot to mention that the <, >, & etc. characters could also be > > encoded in this patch series (to <, >, & etc.) > > Good point. I'll xml.sax.saxutils.escape the message-id, from, and > subject at the end of HtmlPage._message_display_data, and squash that > into the Page / HtmlPage commit. I added this as a new commit instead of squashing (since the escaping wasn't present in the original nmbug-status), and also pushed the color and radius reductions [1] to my nmbug-status-python3 branch. Is this at the point where I should push v2 to the list, or do we want to wait for more feedback first? Cheers, Trevor [1]: http://mid.gmane.org/20140205152738.gj14...@odin.tremily.us -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy signature.asc Description: OpenPGP digital signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 00/17] nmbug-status: Python-3-compabitility and general refactoring
On Wed, Feb 05, 2014 at 07:31:27AM -0800, W. Trevor King wrote: > On Wed, Feb 05, 2014 at 05:24:56PM +0200, Tomi Ollila wrote: > > Forgot to mention that the <, >, & etc. characters could also be > > encoded in this patch series (to <, >, & etc.) > > Good point. I'll xml.sax.saxutils.escape the message-id, from, and > subject at the end of HtmlPage._message_display_data, and squash that > into the Page / HtmlPage commit. I added this as a new commit instead of squashing (since the escaping wasn't present in the original nmbug-status), and also pushed the color and radius reductions [1] to my nmbug-status-python3 branch. Is this at the point where I should push v2 to the list, or do we want to wait for more feedback first? Cheers, Trevor [1]: http://mid.gmane.org/20140205152738.GJ14197 at odin.tremily.us -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: OpenPGP digital signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140207/d954bffb/attachment.pgp>
[PATCH 2/2] emacs: add support for defining custom sort order for saved searches
Add a new customization option notmuch-saved-searches-oldest-first to define custom sort order for saved searches. Do this as a separate option from notmuch-saved-searches to dodge backwards compatibility issues. NOTE: If the name of a tag matches the name of a saved search with a custom sort order, then the search for that tag using the all tags section of notmuch-hello will use the custom sort order too. If you change any sort orders, you must refresh notmuch-hello for the changes to take effect. Only searches initiated from notmuch-hello will be affected. --- emacs/notmuch-hello.el |6 +- emacs/notmuch-lib.el |9 + 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 1c30b47..530b3ac 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -463,7 +463,11 @@ Such a list can be computed with `notmuch-hello-query-counts'." (widget-create 'push-button :notify #'notmuch-hello-widget-search :notmuch-search-terms query - :notmuch-search-oldest-first notmuch-search-oldest-first + :notmuch-search-oldest-first + (let ((m (assoc +name +notmuch-saved-searches-oldest-first))) +(if m (cdr m) notmuch-search-oldest-first)) name) (setq column-indent (1+ (max 0 (- column-width (length name))) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index fa35fa9..16d9a52 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -113,6 +113,15 @@ Note that the recommended way of achieving the same is using :type '(alist :key-type string :value-type string) :group 'notmuch-hello) +(defcustom notmuch-saved-searches-oldest-first nil + "List of saved searches with custom sort order. + +For each saved search name appearing in the list, use t for +oldest-first, nil for newest-first. Saved searches not present in +this list will use `notmuch-search-oldest-first' sort order." + :type '(alist :key-type string :value-type boolean) + :group 'notmuch-hello) + (defcustom notmuch-archive-tags '("-inbox") "List of tag changes to apply to a message or a thread when it is archived. -- 1.7.2.5
[PATCH 1/2] emacs: store sort order in the widgets in notmuch-hello
--- emacs/notmuch-hello.el |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 7b3d76b..1c30b47 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -325,7 +325,8 @@ diagonal." (defun notmuch-hello-widget-search (widget &rest ignore) (notmuch-search (widget-get widget :notmuch-search-terms) - notmuch-search-oldest-first)) + (widget-get widget + :notmuch-search-oldest-first))) (defun notmuch-saved-search-count (search) (car (process-lines notmuch-command "count" search))) @@ -462,6 +463,7 @@ Such a list can be computed with `notmuch-hello-query-counts'." (widget-create 'push-button :notify #'notmuch-hello-widget-search :notmuch-search-terms query + :notmuch-search-oldest-first notmuch-search-oldest-first name) (setq column-indent (1+ (max 0 (- column-width (length name))) -- 1.7.2.5
[PATCH 0/2] emacs: per saved search sort order
On Thu, 06 Feb 2014, Carl Worth wrote: > This allows for the user to control the order that results are > returned from saved-searches, (and independently from the order of all > other searches which is controlled by notmuch-search-oldest-first). > --- > > This allows me to get back to the behavior that notmuch had long ago, > (the documentation for the changed behavior was updated in commit > c1a42652a173a4bb70ab72388e6ad150d19a2b06). I'm not sure when the > actual behavioral change was made. I seem to have fixed the documentation (I'd forgotten!) but I'm pretty sure I had nothing to do with changing the behaviour! :) > A fanicer change might allow for a configurable sort order for each > saved search, but this more minimal change at least lets me use the > latest notmuch once again. Here are simple patches to support per saved search sort order. I seem to have been running these for more than a year now [1]. It's not perfect or pretty but works for me. BR, Jani. [1] id:1349209083-7170-1-git-send-email-jani at nikula.org Jani Nikula (2): emacs: store sort order in the widgets in notmuch-hello emacs: add support for defining custom sort order for saved searches emacs/notmuch-hello.el |8 +++- emacs/notmuch-lib.el |9 + 2 files changed, 16 insertions(+), 1 deletions(-) -- 1.7.2.5
[PATCH 2/2] emacs: add support for defining custom sort order for saved searches
Add a new customization option notmuch-saved-searches-oldest-first to define custom sort order for saved searches. Do this as a separate option from notmuch-saved-searches to dodge backwards compatibility issues. NOTE: If the name of a tag matches the name of a saved search with a custom sort order, then the search for that tag using the all tags section of notmuch-hello will use the custom sort order too. If you change any sort orders, you must refresh notmuch-hello for the changes to take effect. Only searches initiated from notmuch-hello will be affected. --- emacs/notmuch-hello.el |6 +- emacs/notmuch-lib.el |9 + 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 1c30b47..530b3ac 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -463,7 +463,11 @@ Such a list can be computed with `notmuch-hello-query-counts'." (widget-create 'push-button :notify #'notmuch-hello-widget-search :notmuch-search-terms query - :notmuch-search-oldest-first notmuch-search-oldest-first + :notmuch-search-oldest-first + (let ((m (assoc +name +notmuch-saved-searches-oldest-first))) +(if m (cdr m) notmuch-search-oldest-first)) name) (setq column-indent (1+ (max 0 (- column-width (length name))) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index fa35fa9..16d9a52 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -113,6 +113,15 @@ Note that the recommended way of achieving the same is using :type '(alist :key-type string :value-type string) :group 'notmuch-hello) +(defcustom notmuch-saved-searches-oldest-first nil + "List of saved searches with custom sort order. + +For each saved search name appearing in the list, use t for +oldest-first, nil for newest-first. Saved searches not present in +this list will use `notmuch-search-oldest-first' sort order." + :type '(alist :key-type string :value-type boolean) + :group 'notmuch-hello) + (defcustom notmuch-archive-tags '("-inbox") "List of tag changes to apply to a message or a thread when it is archived. -- 1.7.2.5 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 0/2] emacs: per saved search sort order
On Thu, 06 Feb 2014, Carl Worth wrote: > This allows for the user to control the order that results are > returned from saved-searches, (and independently from the order of all > other searches which is controlled by notmuch-search-oldest-first). > --- > > This allows me to get back to the behavior that notmuch had long ago, > (the documentation for the changed behavior was updated in commit > c1a42652a173a4bb70ab72388e6ad150d19a2b06). I'm not sure when the > actual behavioral change was made. I seem to have fixed the documentation (I'd forgotten!) but I'm pretty sure I had nothing to do with changing the behaviour! :) > A fanicer change might allow for a configurable sort order for each > saved search, but this more minimal change at least lets me use the > latest notmuch once again. Here are simple patches to support per saved search sort order. I seem to have been running these for more than a year now [1]. It's not perfect or pretty but works for me. BR, Jani. [1] id:1349209083-7170-1-git-send-email-j...@nikula.org Jani Nikula (2): emacs: store sort order in the widgets in notmuch-hello emacs: add support for defining custom sort order for saved searches emacs/notmuch-hello.el |8 +++- emacs/notmuch-lib.el |9 + 2 files changed, 16 insertions(+), 1 deletions(-) -- 1.7.2.5 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH 1/2] emacs: store sort order in the widgets in notmuch-hello
--- emacs/notmuch-hello.el |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 7b3d76b..1c30b47 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -325,7 +325,8 @@ diagonal." (defun notmuch-hello-widget-search (widget &rest ignore) (notmuch-search (widget-get widget :notmuch-search-terms) - notmuch-search-oldest-first)) + (widget-get widget + :notmuch-search-oldest-first))) (defun notmuch-saved-search-count (search) (car (process-lines notmuch-command "count" search))) @@ -462,6 +463,7 @@ Such a list can be computed with `notmuch-hello-query-counts'." (widget-create 'push-button :notify #'notmuch-hello-widget-search :notmuch-search-terms query + :notmuch-search-oldest-first notmuch-search-oldest-first name) (setq column-indent (1+ (max 0 (- column-width (length name))) -- 1.7.2.5 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch