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: João Távora
Subject: Re: [mentoring-done] a darkroom/writeroom mode for Emacs
Date: Mon, 15 Dec 2014 13:37:38 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt)

martin rudalics <address@hidden> writes:

>> 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

How would you code the condition in (3)? To test "if fits" don't you
need the width of the window? I can more or less see how it could be
done if I could find a character position that I am sure is at the
window edge, but that would just be a rehash of what the hack of
`darkroom--real-window-width' already does

> window and there is some space left, distribute that space evenly among
> the fringes of the window.

If I understand correctly, this is related to (1) and independent of the
implementation in (2,3). I chose to use the margins to center because
(1) the term "margins" made sense for this purpose (2) I consider the
fringes more still useful for continuation markers and other bitmaps.

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

Indeed, this is not the intent of darkroom.el, at least in its current
state. I don't even understand what how such a feature would work or
feel like. Do you mean like "center paragraph", where a typing a word
alone on a line makes it occupy the horizontal center?



reply via email to

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