Emacs: Novel Reading Mode
Here's a command to make current window suitable for reading long text.
Here's the code:
(defun xah-toggle-read-novel-mode () "Setup current buffer to be suitable for reading long novel/article text. • Line wrap at word boundaries. • Set a right margin. • line spacing is increased. • variable width font is used. Call again to toggle back. URL `http://ergoemacs.org/emacs/emacs_novel_reading_mode.html' Version 2016-01-16" (interactive) (if (null (get this-command 'state-on-p)) (progn (set-window-margins nil 0 (if (> fill-column (window-body-width)) 0 (progn (- (window-body-width) fill-column)))) (variable-pitch-mode 1) (setq line-spacing 0.4) (setq word-wrap t) (put this-command 'state-on-p t)) (progn (set-window-margins nil 0 0) (variable-pitch-mode 0) (setq line-spacing nil) (setq word-wrap nil) (put this-command 'state-on-p nil))) (redraw-frame (selected-frame)))
Like it? Buy Xah Emacs Tutorial. ♥ Thanks.
or, buy something from Best Keyboard for Emacs