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

bug: Neomutt with home-manager; valid options on sort #6263

Closed
bbaserdem opened this issue Jan 3, 2025 · 1 comment · Fixed by #6283
Closed

bug: Neomutt with home-manager; valid options on sort #6263

bbaserdem opened this issue Jan 3, 2025 · 1 comment · Fixed by #6283
Labels

Comments

@bbaserdem
Copy link
Contributor

bbaserdem commented Jan 3, 2025

# allow users to choose any option from sortOptions, or any option prefixed with "reverse-"

The list of valid options for the config option programs.neomutt.sort does not include the sorting options prefixed with last-. Can be seen as one of the available options in the documentation for muttrc. (https://neomutt.org/man/neomuttrc)

You may optionally use the "reverse-" prefix to specify reverse sorting order, or the "last-" prefix to sort threads based on the corresponding attribute of the last descendant rather than the thread root. If both prefixes are in use, "reverse-" must come before "last-". The "last-" prefix has no effect on a flat view.

It wouldn't be much of an issue by setting this through programs.neomutt.settings.sort, but then the folder-hook generated by the accounts.email.accounts.<name> entry sets the sort option referring to programs.neomutt.sort; overriding the sorting option. Right now I use a workaround with setting this again in the folder hook account-.email.accounts.<name>.neomutt.extraConfig = "set sort=${config.programs.neomutt.settings.sort}";

(I could send a pull request as this should be a very quick fix that edits a single line; namely the line 371 should be changed to the following)

          (sortOptions
            ++ (map (option: "reverse-" + option) sortOptions)
            ++ (map (option: "last-" + option) sortOptions)
            ++ (map (option: "reverse-last-" + option) sortOptions)
          );

Or something more elegant than this

@teto teto added the mail label Jan 6, 2025
@teto
Copy link
Collaborator

teto commented Jan 6, 2025

could send a pull request as this should be a very quick fix that edits a single line

Please do

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 a pull request may close this issue.

2 participants