Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new buffer to search and display messages #896

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

andresmrm
Copy link
Contributor

@andresmrm andresmrm commented Sep 30, 2016

This is a search buffer that list messages chronologically and displays a selected message. It can be used to display all messages from a thread in a way similar to Mutt's thread viewer:

search-messages-buffer

And with searchmessages <querystring> in the prompt it should display a list with all messages from all threads matching <querystring>.

It can't display the thread tree like current thread buffer or the proposed retro thread buffer (#734, #740), but it seems to be much faster for big threads (#694, #873) and it doesn't have the indentation problem (>20th messages having a half screen left margin) (#695).

It still needs some work for better theme settings and more commands, but it seems usable. The code should also be much better than the one from retro thread PR.

I'm using these hotkeys for this buffer:

[[searchmessages]]
  enter = select
  l = move next
  h = move previous
  r = reply --all
  R = reply
  n = editnew
  f = forward
  w = pipeto urlscan
  s = toggletags unread
  d = toggletags inbox
  a = save
  A = save --all
  c = togglesource

And to call it from search buffer:

[[search]]
    enter = selectthreadmessages

I'll start to use this mode as my main thread viewer (instead of retro thread), let's see what bugs it has... =P
If anyone is in the mood to also test it: hope you enjoy it! =)

@andresmrm andresmrm mentioned this pull request Sep 30, 2016
@geier
Copy link
Collaborator

geier commented Jan 2, 2017

This seems to work as intended for me. Some questions/suggestions:

  • is the focus line gone on purpose? I believe it would be better to be consistent with the standard buffer here
  • and to be consistent with mutt you could jump to the next/previous message if the end/beginning of the current mail has been reached

@andresmrm
Copy link
Contributor Author

Thanks for testing it, @geier!

is the focus line gone on purpose? I believe it would be better to be consistent with the standard buffer here

You mean to have a focus line moving up/down while you scroll the email text? I would argue against that...

In the Retro Thread Buffer PR that I made before this rewrite, there was an unintended invisible focus line moving while scrolling (it happened because of the reuse of UI elements). It was bad because when switching from going up/down you had to wait the focus line to cross all the screen until the other lower/upper limit for the scroll to start again. Of course you could make it jump from the lower/upper limit to the other, but that seems to me a strange behavior for a focus line.

Besides that, the focus line seems useful for me when there is something to be selected, and that's not the case in the email text. But I did keep the focus line for the message list (top of the screen) and for the attachment list, that stays between the email metadata and text. The attachment list share the same move commands as the text scroll. Maybe I was a bit confusing, but try with an email with more than 1 attachment and enough text to need scroll...

and to be consistent with mutt you could jump to the next/previous message if the end/beginning of the current mail has been reached

Does Mutt do that? I didn't remember... It seems more confusing to me (I would switch emails without noticing it). But I could add this behavior as an option, if you like it. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants