emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [mentoring-done] a darkroom/writeroom mode for Emacs


From: martin rudalics
Subject: Re: [mentoring-done] a darkroom/writeroom mode for Emacs
Date: Mon, 15 Dec 2014 14:19:01 +0100

> The library still has an outstanding problem with "window-width", which
> I have solved with an isolated hack. See the docstring for
> `darkroom--real-window-width' for an explanation.

I'm not sure whether I understand well enough what you want to do but if
the idea is to horizontally center some block of text in a window then I
would (1) get rid of margins, (2) get the width of the text to be
displayed via `window-text-pixel-size' and (3) if the text fits into the
window and there is some space left, distribute that space evenly among
the fringes of the window.  You'll be missing one pixel, at most.

I have no idea whether and when to recenter text while typing but this
seems to be unresolved in your original proposal too.

martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]