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
Add recursion-indicator recipe #7241
Conversation
Additional notes for reviewers: This is a really simple package which only marries two different builtin indicators, to show the recursion level (minibuffer-depth-indicate-mode and the brackets around the mode for recursive editing). I like it more to have these two indicators unified since both minibuffer and recursive-edit are recursion levels. Maybe there is also potential for more indicators, like for example indicating a debugger recursion level by showing a small 🪲. But for now the status of the package is the one I've used for a while as part of my init.el and extracted from the init.el as a separate package. |
Hello, just letting you know I see this but will check it more closely on my next cycle since I just looked at one of your PRs. I can quickly mention you may want to revise
Since I think it's possible someone could modify the global map and bind this chord to something else. |
I think I copied this from how the mode-line-format-modes where this is used as tooltip. I think it is "messed-up" there too. I have to recheck. I agree that this could be improved. (Edit: I checked again and the help text is copied verbatim from here https://github.com/emacs-mirror/emacs/blob/master/lisp/bindings.el#L357). Two other things you might find during your review and which I thought about improving:
How do you feel about these points? Point 2 is not very important for me, but I am not happy with point 1. |
I'd suggest just inheriting the faces without modification (or using them directly). This makes it easy for themes to support the face, and it makes it easy for users to fix problems you might not anticipate with the colors. I might be missing something, so do you have some examples of other face attributes affecting the mode line? (I can imagine modifications to the height of the face could matter, but that's probably rare.) I guess one attribute you would want to have an effect is |
I think some faces are applied to the whole modeline, so if I inherit from some font-lock face this could mess up some other face properties. I will make few tests if I find something satisfactory. Otherwise I can define my own colors, but I would like to avoid that if possible. Since you mention height, I think that's one of the things which some of the themes adjust for the modeline. Do you have more things you would like to have addressed? This is a pretty simple thing over all, so maybe there are no bigger issues. |
@riscy Edit: Edit 2: @riscy There was some unnecessary confusion, I defined a custom face, which inherits from a font lock face. It works now as excpected. I tested multiple themes. See minad/recursion-indicator@f4f003a |
@riscy From my side this is ready. Do you agree? |
I'll take a look soon! |
Great -- thanks for this. |
Brief summary of what the package does
Show recursion-indicator in the mode-line.
Direct link to the package repository
https://github.com/minad/recursion-indicator
Your association with the package
Maintainer
Relevant communications with the upstream package maintainer
None needed
Checklist
Please confirm with
x
:M-x checkdoc
is happy with my docstrings