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

Annotations #15

Open
Hugo-Heagren opened this issue Apr 30, 2022 · 1 comment
Open

Annotations #15

Hugo-Heagren opened this issue Apr 30, 2022 · 1 comment

Comments

@Hugo-Heagren
Copy link
Owner

Annotate candidates when listing music items (tracks, albums, etc.), such as in `consult-emms-library).

I want the annotation to be configurable, vertically aligned, and to have annotations in similar spirit for different categories (i.e. a track's and an album's playing time) aligned to each other.

I think the way to do this is to have:

  • a list variable for the different fields to display, and how long they should be (similar to how ebib handles index-item formatting). Perhaps this could also include fall-backs for if the field is undefined.
  • a generic function for each field
  • an implementation of each such function for each category (track, album, etc.). If the field is inappropriate, then return nil, or an empty string or something.

To solve the truncate issue mentioned here, I think the functions for gettng candidate lists will just have to include the ability to truncate? Maybe look into how citar handles this problem. Because of that issue (unless I want to have a long excursion into implementing proper affixation for consult-multi), annotation will have to come after the string. This is something I can live with.

@Hugo-Heagren
Copy link
Owner Author

It would also be possible to implement prefix annotation using display properties. This would be a bit of a hack, and vertical alignment would be reliant on the annotations themselves being the same length. Perhaps we should just expose the interface such the user (me!) can set this up if they want to?

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

No branches or pull requests

1 participant