

If you are unsure what Zenware is all about, see Part 1 of this series. Whether you call it Zenware, Zen-inspired, minimalist, distraction-free, or just simple, some of these programs have changed little since the genre was promoted around 2007-8 but others have adopted many writers’ suggestions and added features while staying true to their beginnings.
Writeroom windows software#
Window margins that could stand improvement.If Microsoft Word and LibreOffice and OpenOffice are about features, tables, data and publishing, the world of Zen-style writing software is all about you and getting your ideas into words as easily as possible. Is depends on the order in which they were activated and on the hooks (left) margin to a value x and package B sets it to a value y, whichever Two issues specificallyġ) If two modes use the margins at the same time, there is no way toĮnsure that they don't interfere. There is currently no good wayįor a mode to prevent such interference reliably.Ģ) When a window's width is changed, Emacs currently assumes that the That the modes use to adjust the margins. Itself is not a problem, because a mode that does want to change the Margins need to be retained, i.e., their width doesn't change. It becomes a problem in `window-splittable-p' (and Margin width can do so in `window-configuration-change-hook'.


The assumption is not necessarily correct, specifically in modes such as 'split-window-sensibly'), because this function makes this sameĪssumption when determining whether a window can be split horizontally. `writeroom-mode', `olivetti' (both on MELPA) or `darkroom-mode' (onĮLPA), that use the margins to center the text area in the window. Such modes, the width of the margins is determined on the basis of theĭesired text width and the current window width.
Writeroom windows windows#
`window-splittable-p' currentlyĭetermines that such windows cannot be split horizontally, even when the When the window widthĬhanges, the margins are recalculated. Margins after the window has been split.) Isn't, but the aforementioned modes compensate for this by adjusting the Window (including margins) is wide enough. SYM is a symbol (chosen by the caller) that identifies the mode that (set-window-margins WINDOW LEFT-WIDTH &optional RIGHT-WIDTH SYM DYNAMIC) * Amend `set-window-margins' to take two additional parameters: * Add a window parameter (say `window-margins-alist') that records Static (i.e., should not be changed when the window width changes) or Set the margins and to which values they set them and whether they are Of the proposal is that `set-window-margins' keeps track of which modes I'd like to outline a way to hopefully solve both issues. Subsequently, the window margins are set to the total of all * If `set-window-margins' is called with a non-nil value for SYM, anĮntry is recorded in `window-margins-alist', or updated if one isĪlready present, or deleted if both LEFT-WIDTH and RIGHT-WIDTH are Without checking `window-margins-alist', i.e., it behaves as it does * If `set-window-margins' is called without SYM, it sets the margins Requested widths, so in the example above to (6 0).
Writeroom windows code#
Now, in order to prevent existing code from breaking. In this case, the window width is set to the *largest* dynamic value, * If DYNAMIC is t, this is recorded in `window-margins-alist', e.g.: #Writeroom 2 code# Present example, `set-window-margins' should compare 4+2=6 with 40 for Or to the *total* of all static values, whichever is larger.
