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

Added an option to unfold only messages matching a query #1585

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added an option to unfold only messages matching a query
  • Loading branch information
po1vo committed Jul 28, 2021
commit dd3988d328b9bb97f6d6882b7de5d90c5b4dc2d1
5 changes: 4 additions & 1 deletion alot/commands/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from .. import buffers
from ..db.errors import DatabaseROError
from ..settings.const import settings


MODE = 'search'
Expand All @@ -35,7 +36,9 @@ def apply(self, ui):
if not self.thread:
self.thread = ui.current_buffer.get_selected_thread()
if self.thread:
query = ui.current_buffer.querystring
query = settings.get('thread_unfold_matching')
if not query:
query = ui.current_buffer.querystring
logging.info('open thread view for %s', self.thread)

tb = buffers.ThreadBuffer(ui, self.thread)
Expand Down
3 changes: 3 additions & 0 deletions alot/defaults/alot.rc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,9 @@ periodic_hook_frequency = integer(default=300)
# for the whole message body.
thread_focus_linewise = boolean(default=True)

# Unfold messages matching the query. If not set, will unfold all messages matching search buffer query.
thread_unfold_matching = string(default=None)


# Key bindings
[bindings]
Expand Down