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

Fix simple-modline--format in olivetti-mode #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

duckwork
Copy link

olivetti-mode adjusts the window margin, which pushes the right segment of the modeline with simple-modeline to the left. At least for me.

After a little experimentation I've found that adding (- 0 right-margin) to the simple-modeline--format function adjusts the spacing for olivetti-mode.

I tried (- right-margin) but that doesn't work for some reason. I've also done very minimal testing, so it might not work everywhere.

`olivetti-mode` adjusts the window margin, which pushes the right segment of the modeline with simple-modeline to the left.  At least for me.

After a little experimentation I've found that adding `(- 0 right-margin)` to the `simple-modeline--format` function adjusts the spacing for `olivetti-mode`.

I tried `(- right-margin)` but that doesn't work for some reason.  I've also done very minimal testing, so it might not work everywhere.
@florhizome
Copy link

I experience the same for "visual-fill-mode"!
Will try to test this the upcoming days, I am still not sure how to do it the right way with "straight.el" packaging and a bit afraid to break stuff^^

@duckwork
Copy link
Author

duckwork commented Aug 26, 2021

@florhizome iirc you can just go to the repo in straight/repos and edit it. If you want to make your own fork you can add the :fork directive to the straight recipe you use, so it'd look something like

(straight-use-package '(visual-fill-column 
                        :host github
                        :repo "joostkremers/visual-fill-column"
                        :fork "florhizome/visual-fill-column"))

... that is, until it's accepted upstream ^_^

@florhizome
Copy link

florhizome commented Aug 26, 2021

I know of that but I actually don't want to fork everything myself just to be able to use a patch someone else has applied. Most of the time it's only temporary, until things get merged/fixed upstream and I prefer not having to clutter my repo with forks everytime I find a patch I want to try out. This has to be even more true for ppl that do more codework, you might want to just load a certain recipe to try it and inspect it, right?
It's interesting, if you too haven't really found how to do that. straight should support it, I think, it has all the capabilities needed, right?
but let's not get too far off topic :D

@florhizome
Copy link

It would be interesting to generalize this for any modeline or "normal modeline", to be able to add it to olivetti-mode and visual-fill-mode, since it would cover more ground there.at least for the default modeline i have the problem, too.

@duckwork
Copy link
Author

@florhizome I'm not sure what you mean -- my patch works with or without olivetti-mode, and should work in visual-fill-column-mode as well; I haven't tried it with the latter but it should Just Work®

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

Successfully merging this pull request may close these issues.

2 participants