-
Notifications
You must be signed in to change notification settings - Fork 13
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 and sorting for activities-completing-read #83
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. Here are a few comments.
BTW, are there other pieces of information inside an activity that would be relevant to show that occur to you? |
I can't think of any. For myself, the only one that matters is last-used time, anyway. Let's keep this as simple as possible. |
I could show both default and last ages, but that might be confusing. Along that line, do you think having the default and last buf+file cnt is useful or TMI? Another approach would be to use some indicator (like |
I don't think that's necessary. This is just for completing-read, not for "management."
For me, it's TMI. I select activities by name, not by a number of how many windows or files are visible in it. I can't think of a situation where I would need to know that. However, knowing whether an activity has a last-used state could be useful, I think. |
I'm not sure what you mean by "dirty." For me what would be interesting is whether the activity has a last-used state or just the default. |
Sorry, I'm not sure I understand your idea. If you have activity auto-saving on (which is the default), an activity will pretty much always have a "last" state, even if it's only lightly modified from the default (different window points, sizes, etc.). So my idea of "dirty" is if the last state differs is an interesting way from the default — i.e. different buffers showing. I did need to accommodate a missing "last" state, but that's a pretty rare case for me, like when I've just defined a new state. |
I often use
I feel like that concept might be hard to communicate to the user, but if you want to add an asterisk or something and document it to mean that, I won't object. |
OK sounds good; lack of asterisk would also mean "no last state". One oddity I've found: when I |
I can see pros and cons on either side. Please feel free to open a new issue about that if you like. |
Thanks. I've pushed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Also, could you post a final screenshot showing what it looks like with the asterisk?
2d417ee
to
3e2e13a
Compare
I appreciate that. Sometimes I wonder if I should handle some nitpicks myself before merging; I try to consider whether mentioning it will serve any educational purpose, but then I don't always know how familiar the contributor already is, and whether they just have other preferences. |
737b8bf
to
47b475c
Compare
1b3fbd7
to
b60b7df
Compare
I'd say feel free to push any changes yourself if they are glaring and not worth describing. But I appreciate the collaborative feel your approach creates. I do a lot of work on other people's packages I admire, and some very capable authors have trouble with that, and can't resist NIH syndrome. So I'd say your approach is very valuable, especially to any less experienced contributors who come along.
I do have some different preferences but I always enjoy learning how others approach a problem. And I don't mind adapting to the local accent (Canadian ? ;). So some of both here. As an example I mentioned above, I don't often reach for Other than deciding whether we are OK with ½ in the ages I think this is ready from my end. Feel free to season to taste. |
Actually one more thing: I don't like that Update: done. This reminds me: where did you learn the |
These are the ages that are actually showing during completion.
Do I seem Canadian? I'm American, born and raised. :)
But that might only show up after loading the relevant library that defines that Also, FYI:
|
Ahh, right you are. What's strange is there's nothing in |
Probably an oversight, then, and probably worth a bug report. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I think this will be ready to merge after this.
Thanks for your considerable patience in this process. One final thing: would you be willing to write a changelog entry for this branch's changes? |
No problem, done. |
Anything more to do on this PR, @alphapapa? |
Thanks for your patience. By the way, forgive me for asking about this again, but I can't find where I asked you specifically before, and this contribution is larger, and I'm trying to be extra diligent about this when accepting contributions: You have completed the FSF copyright assignment for Emacs, right? I see in emacs.git some contributions from you, but it's not clear whether they are covered by an assignment (e.g. the recent ones under [email protected] say they are exempt). To be certain, I'm required by the Emacs maintainers to ask them for confirmation for a given name and email address. So is the right name and email address to ask them about |
I appreciate your diligence (which no doubt saves headaches down the road). Yes, I completed this 23 yrs ago ;). I recently updated my email with the FSF, so that should work for confirmation. |
Thanks! Email sent. Should hear back soon, then I can merge this PR. |
Thanks for your patience. Eli confirmed your CA (a while ago, I just didn't get around to handling the message until now). |
(updated) This provides custom annotation and sorting functions for
activities-completing-read
. It shows the number of buffers (and files), for the last or default state, a magit-style color-coded activity age, and flags for being active or having a modified set of buffers.This is shown below with
vertico
but it should support any UI which handles annotation-functions (most do). For theme friendliness, it creates no new faces, insteadborrowing thebuilding its own color palette (along withvc-annotate
color palettesuccess
andwarning
faces). Happy to take any input/ideas.