sorting in show tree

2021-07-30 Thread Jose Antonio Ortega Ruiz


Hi,

I wanted to be able to sort oldest-first in notmuch-tree view (inside
emacs).  Turns out that needed 'notmuch show' to accept a --sort
argument (as search does).  I've given it a try (with the patient help
of David on IRC) in this repo:
https://jao.io/cgit/notmuch/log/?h=tree-sort.

With that in place, it was also pretty straightforward to make 'o' work
in notmuch-tree-mode to toggle the thread ordering.

Hope you find it useful!

Cheers,
jao
-- 
In my youth I thought of writing a satire on mankind; but now in my
old age I think I should write an apology for them. -Horace Walpole
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: sorting in show tree

2021-06-25 Thread Jose Antonio Ortega Ruiz

On Fri, Jun 25 2021, David Bremner wrote:

[...]

> Unless the series is really huge (thousands of lines of diff) we prefer
> sending it to the list with git-send-email for review. So I guess that's
> the other thing you should do ;).

okay, i'm attaching to this mail the single patch produced by git after
rebasing and squashing all my modifications (i don't think it's
particularly interesting keeping the story of the 7 individual patches,
but they can still be retrieved from my tree-sort branch if you like).

thanks,
jao

>From 735366a138a301fb86f83b8434ecff8c8da35d16 Mon Sep 17 00:00:00 2001
From: jao 
Date: Thu, 10 Jun 2021 22:32:45 +0100
Subject: [PATCH] Allow sorting in notmuch-tree search buffers.

 - CLI/show: accept --sort
 - emacs/hello: honouring :sort-order in threaded queries
 - emacs/tree: command to toggle search sort order in tree mode
---
 devel/emacs-keybindings.org | 10 +-
 doc/man1/notmuch-show.rst   | 13 +
 doc/notmuch-emacs.rst   |  7 +++
 emacs/notmuch-hello.el  |  4 +++-
 emacs/notmuch-tree.el   | 24 +++-
 notmuch-show.c  |  7 +++
 test/T520-show.sh   | 17 +
 7 files changed, 71 insertions(+), 11 deletions(-)

diff --git a/devel/emacs-keybindings.org b/devel/emacs-keybindings.org
index 65dfe0eb..f7df3040 100644
--- a/devel/emacs-keybindings.org
+++ b/devel/emacs-keybindings.org
@@ -15,7 +15,7 @@
 | l | notmuch-search-filter  | notmuch-show-filter-thread| |
 | m | notmuch-mua-new-mail   | notmuch-mua-new-mail  | notmuch-mua-new-mail|
 | n | notmuch-search-next-thread | notmuch-show-next-open-message| notmuch-tree-next-matching-message  |
-| o | notmuch-search-toggle-order|   | |
+| o | notmuch-search-toggle-order|   | notmuch-tree-toggle-order   |
 | p | notmuch-search-previous-thread | notmuch-show-previous-open-message| notmuch-tree-prev-matching-message  |
 | q | notmuch-bury-or-kill-this-buffer   | notmuch-bury-or-kill-this-buffer  | notmuch-bury-or-kill-this-buffer|
 | r | notmuch-search-reply-to-thread-sender  | notmuch-show-reply-sender | notmuch-show-reply-sender   |
@@ -38,10 +38,10 @@
 | V || notmuch-show-view-raw-message | notmuch-show-view-raw-message   |
 | X || notmuch-show-archive-thread-then-exit | |
 | Z | notmuch-tree-from-search-current-query | notmuch-tree-from-show-current-query  | |
-| =!=   || notmuch-show-toggle-elide-non-matching| |
-| =#=   || notmuch-show-print-message| |
-| =$=   || notmuch-show-toggle-process-crypto| |
-| =*=   | notmuch-search-tag-all | notmuch-show-tag-all  | notmuch-tree-tag-thread |
+| =!= || notmuch-show-toggle-elide-non-matching| |
+| =#= || notmuch-show-print-message| |
+| =$= || notmuch-show-toggle-process-crypto| |
+| =*= | notmuch-search-tag-all | notmuch-show-tag-all  | notmuch-tree-tag-thread |
 | + | notmuch-search-add-tag | notmuch-show-add-tag  | notmuch-tree-add-tag|
 | - | notmuch-search-remove-tag  | notmuch-show-remove-tag   | notmuch-tree-remove-tag |
 | . || notmuch-show-part-map | |
diff --git a/doc/man1/notmuch-show.rst b/doc/man1/notmuch-show.rst
index fc6bec62..64639174 100644
--- a/doc/man1/notmuch-show.rst
+++ 

Re: sorting in show tree

2021-06-25 Thread David Bremner
Jose Antonio Ortega Ruiz  writes:

> Hi again,
>
> Just in case: is there anything else i should do to request this for
> merging on the main branch? Or just wait? (which is of course okay!)
>
> Thanks,
> jao
>
> On Fri, Jun 11 2021, Jose Antonio Ortega Ruiz wrote:
>

I'm not sure what happened but I don't see your message from June 11 in
the archive (or my inbox).

Unless the series is really huge (thousands of lines of diff) we prefer
sending it to the list with git-send-email for review. So I guess that's
the other thing you should do ;).

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: sorting in show tree

2021-06-24 Thread Jose Antonio Ortega Ruiz


Hi again,

Just in case: is there anything else i should do to request this for
merging on the main branch? Or just wait? (which is of course okay!)

Thanks,
jao

On Fri, Jun 11 2021, Jose Antonio Ortega Ruiz wrote:

> Hi,
>
> I wanted to be able to sort oldest-first in notmuch-tree view (inside
> emacs).  Turns out that needed 'notmuch show' to accept a --sort
> argument (as search does).  I've given it a try (with the patient help
> of David on IRC) in this repo:
> https://jao.io/cgit/notmuch/log/?h=tree-sort.
>
> With that in place, it was also pretty straightforward to make 'o' work
> in notmuch-tree-mode to toggle the thread ordering.
>
> Hope you find it useful!
>
> Cheers,
> jao
> --
> In my youth I thought of writing a satire on mankind; but now in my
> old age I think I should write an apology for them. -Horace Walpole

-- 
How many Zen Buddhist does it take to change a light bulb?
Two. One to change it and one not to change it.
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org