-
Notifications
You must be signed in to change notification settings - Fork 28
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
How are global effects disabled? #23
Comments
They're undone in the function I keep a list of writeroom-mode buffers in the variable Note that there are also buffer-local variables whose values are changed. These are saved in the buffer-local value
Adding something like Note that But if you're willing to try out |
To provide a bit more detail: There is a macro These functions used to be called I do see your point that the global effects (which are really frame-specific effects) go beyond what a minor mode should do, which is why they can be disabled (I do that myself, actually). I try to make sure they don't wreak havoc by not using them as toggles, by keeping a list of Actually, I just realised that there is still a bug in the code... If you activate I should fix that. |
But if a user changes a parameter to a different value during the usage of writeroom, for whatever reason, will the restore code catch that and not restore that parameter? If so, how do you do this? Other than that, I see you go to great lengths to make it behave correctly. Or I should say predictably: another predictable way is to enable/disable frame effects in the presence of a I've skimmed the code and it looks well written and clear enough. I'll either import your global-effect managing code into darkroom.el or write up a Thanks for the great writeup! |
No, such changes aren't detected. The parameters are always restored to the value they had before
Yes, that would be an option, but I'm not sure it would be a good idea. Changing frame parameters requires redrawing the GUI window, which is not always instant (the window manager may even employ some fancy graphical effects) and it may change the location of the GUI window and/or the Emacs window you're looking at, so you'd need to reorient your eyes every time a Also, I've had bug reports that toggling fullscreen off does not always restore the frame properly. Those are probably WM bugs, but I don't want to trigger them more often than necessary.
A pull request would be great! |
Should be fixed now in 48b1798. |
Apropos saving/restoring global/local effects, have a look at my proposal in the emacs devel mailing list: https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01296.html |
Yes, I saw it, but I haven't had the time yet to look at it in detail. Will hopefully do so in the next few days. |
This is coming from rnkn/olivetti#6 and joaotavora/darkroom#2, and is just a question.
You say that affecting global frame settings in a minor mode isn't exactly "up and up" but you say that these effects are justified because of distraction free writing. Fair enough, but how and when are these effects undone in your implementation? If/when you undo them, how to you restore them to their previous values?
I'd gladly abandon
darkroom-mode
in favor ofwriteroom-mode
(you seems to be much more actively maintaining it) if you can answer this and also provide somewriteroom-tentative-mode
likedarkroom-tentative-mode
.The text was updated successfully, but these errors were encountered: