Skip to content
Snippets Groups Projects
  1. Jan 06, 2022
  2. Nov 12, 2021
    • Kieran Bingham's avatar
      db: thread: Fix 'oldest subject' thread names · a3b60181
      Kieran Bingham authored
      
      The notmuch2 bindings change now means the retrieval of the oldest
      subject from a thread needs to be reworked.
      
      When the config option is chosen to use the oldest subject:
        # Set thread subjects to the first (oldest) message
        thread_subject = oldest
      
      The following error is generated:
      
          File "/home/kbingham/iob/alot/alot/db/thread.py", line 50, in _refresh
            first_msg = list(thread.get_toplevel_messages())[0]
        AttributeError: 'Thread' object has no attribute 'get_toplevel_messages'
      
      Update the code to use the correct interface on both the Thread and
      Message objects.
      
      Signed-off-by: default avatarKieran Bingham <kieran.bingham@ideasonboard.com>
      a3b60181
  3. Sep 28, 2021
  4. Sep 26, 2021
  5. Sep 23, 2021
  6. Apr 25, 2021
  7. Mar 29, 2021
    • Michael J Gruber's avatar
      toggletags: refactor and fix behaviour in a thread buffer · 1ade6de2
      Michael J Gruber authored
      0cd98062 ("db/manager: Handle tag toggling messages", 2020-05-18) moved
      the handling of `toggletags` (i.e. the determination of tags to
      removeand add) from the search buffer command to the db manager. It did
      not move the corresponding code from the thread buffer command, though.
      
      Refactor the thread buffer command so that it calls the db manager
      methods as the search buffer command does. Besides reducing reduncancy,
      this also fixes an old issue with `toggletags --all` in a thread buffer:
      If this is supposed to do something useful and unsursprising then it
      should act the same way as `toggletags` in a search buffer for
      `thread:tid`, i.e. toggle a tag based on the presence in the thread (not
      individually). The refactoring achieves this as an intended side-effect.
      1ade6de2
    • Michael J Gruber's avatar
      toggletags: restore correct behaviour in a search buffer · 8fdd7203
      Michael J Gruber authored
      `toggletags` is supposed to toggle tags based on the presence of a tag
      in a thread or search result.
      
      0cd98062 ("db/manager: Handle tag toggling messages", 2020-05-18) moved
      the handling of `toggletags` (i.e. the determination of tags to remove
      and add) from the search buffer command to the db manager. Alas, it also
      turned the handling to be per message: If you toggle the `unread` tag on
      a thread with unread messages then the unread ones get untagged but the
      read messages get tagged `unread`.
      
      This might have gone unnoticed so far because - as long as the search
      buffer does not get requeried by thread IDs - a search buffer for
      `tag:unread` would not match other messages and would not act on them at
      all. But this is different when you toggle a tag that you have not
      searched for, of course.
      
      (Re-)Teach the db manager to toggle tags based on the presence of a tag
      in the results of a query.
      8fdd7203
    • Michael J Gruber's avatar
      db/manager: provide collect_tags() · 5067a596
      Michael J Gruber authored
      This used to be available in the old notmuch bindings. Use direct access
      with the new cffi bindings.
      
      The request to upstream for exposing this library function is pending.
      5067a596
  8. Mar 24, 2021
    • Kevin Velghe's avatar
      fix fold and unfold commands · eab06e0e
      Kevin Velghe authored
      Explicitly expand or collapse every message, like we do in
      ThreadBuffer.unfold_matching instead of only expanding or collapsing the
      matching messages.
      
      Closes #1496
      eab06e0e
  9. Mar 19, 2021
  10. Feb 09, 2021
  11. Jan 01, 2021
  12. Nov 08, 2020
  13. Oct 23, 2020
Loading