home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

introduce `accounts.email.order` for aerc accounts

Open RyanGibb opened this issue 1 year ago • 6 comments

Description

Nix does not preserve attrset order, instead sorting attributes by alphabetical order https://github.com/NixOS/nixpkgs/issues/81986.

However, aerc displays accounts based on their order in .config/aerc/accounts.conf.

This PR introduces a accounts.email.order list that provides an optional order for accounts in accounts.email.accounts.

I implement support for this in the aerc module, and I suspect other front-ends might also be able to benefit from this.

If a partial order is provided those will be ordered after the primary account, and any unordered accounts will be included with the previous alphabetical behavior after.

Checklist

  • [x] Change is backwards compatible.

    • The primary account is still displayed first and if no order list is provided the previous behavior is maintained.
  • [x] Code formatted with ./format.

  • [x] Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • [ ] Test cases updated/added. See example.

  • [x] Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

Maintainer CC

@lukasngl

RyanGibb avatar Jan 08 '24 14:01 RyanGibb

Hi @olmokramer, just putting a gentle ping here.

RyanGibb avatar Mar 21 '24 16:03 RyanGibb

Oh I'm sorry for just disappearing into the void! I think the changes look good! But I'm not in a position to merge PRs, sorry, I should have been more clear about that.

olmokramer avatar Mar 22 '24 08:03 olmokramer

No problem at all! Thanks for the approval :-)

RyanGibb avatar Mar 22 '24 10:03 RyanGibb

Can I ask what you think of this @rycee ?

RyanGibb avatar Mar 22 '24 10:03 RyanGibb

Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting.

If you are the original author of the PR

  • GitHub sometimes doesn't notify people who commented / reviewed a PR previously when you (force) push commits. If you have addressed the reviews you can officially ask for a review from those who commented to you or anyone else.
  • If it is unfinished but you plan to finish it, please mark it as a draft.
  • If you don't expect to work on it any time soon, please consider closing it with a short comment encouraging someone else to pick up your work.
  • To get things rolling again, rebase the PR against the target branch and address valid comments.
If you are not the original author of the PR

  • If you want to pick up the work on this PR, please create a new PR and indicate that it supercedes and closes this PR.

stale[bot] avatar Jun 21 '24 23:06 stale[bot]

Rebased on master

RyanGibb avatar Jun 22 '24 08:06 RyanGibb

Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting.

If you are the original author of the PR

  • GitHub sometimes doesn't notify people who commented / reviewed a PR previously when you (force) push commits. If you have addressed the reviews you can officially ask for a review from those who commented to you or anyone else.
  • If it is unfinished but you plan to finish it, please mark it as a draft.
  • If you don't expect to work on it any time soon, please consider closing it with a short comment encouraging someone else to pick up your work.
  • To get things rolling again, rebase the PR against the target branch and address valid comments.
If you are not the original author of the PR

  • If you want to pick up the work on this PR, please create a new PR and indicate that it supercedes and closes this PR.

stale[bot] avatar Sep 22 '24 19:09 stale[bot]

This is finished, but I'm no longer interested in trying to get it merged.

RyanGibb avatar Sep 23 '24 07:09 RyanGibb