From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joaotavora@gmail.com (=?iso-8859-1?Q?Jo=E3o_T=E1vora?=) Newsgroups: gmane.emacs.devel Subject: Re: [mentoring-done] a darkroom/writeroom mode for Emacs Date: Mon, 15 Dec 2014 13:37:38 +0000 Message-ID: References: <20141203142859.24393.98673@vcs.savannah.gnu.org> <83388u4bps.fsf@gnu.org> <83y4qm2uz9.fsf@gnu.org> <83vblq2los.fsf@gnu.org> <87vblpjq24.fsf@uwakimon.sk.tsukuba.ac.jp> <83mw7119yz.fsf@gnu.org> <87sigqiaaz.fsf@gmx.us> <878uihhv5q.fsf@gmx.us> <87bnnczcjg.fsf@gmx.us> <87bnna11ez.fsf@pank.eu> <87wq5xxe6g.fsf@gmx.us> <548EDFC5.7070209@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1418650760 28954 80.91.229.3 (15 Dec 2014 13:39:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 15 Dec 2014 13:39:20 +0000 (UTC) Cc: Rasmus , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 15 14:39:11 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y0Vri-0004S5-5U for ged-emacs-devel@m.gmane.org; Mon, 15 Dec 2014 14:39:10 +0100 Original-Received: from localhost ([::1]:39770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0Vrh-0003rE-Ot for ged-emacs-devel@m.gmane.org; Mon, 15 Dec 2014 08:39:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0VqO-0001mA-Ki for emacs-devel@gnu.org; Mon, 15 Dec 2014 08:37:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0VqJ-0006I4-42 for emacs-devel@gnu.org; Mon, 15 Dec 2014 08:37:48 -0500 Original-Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:48251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0VqI-0006Hg-TL for emacs-devel@gnu.org; Mon, 15 Dec 2014 08:37:43 -0500 Original-Received: by mail-wg0-f41.google.com with SMTP id y19so14610561wgg.28 for ; Mon, 15 Dec 2014 05:37:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=4sb83Jm2d4hYYkl2nENUlJTb2oSpivMMZFzmcXdEkNg=; b=jhKCiIQLMpPFhr7ufDVd00iNSzGQB3w1L12k9IWBreArms6corX9xSpNdTo9VJLRId s1F+Btj7T4O0XClgrIzatgjsfz0ZwoohUIDEEtF/tMPPisyUk952hT67DEu5kPrREm// na1NaTHrZAAD6CY2R/OS523FQF8OLJwv2QmEBnoLixDoq6QUi1AnixHWAKuLzNJS58i3 poinMbWH9gMEawhE7EDgtAJeU5zTnviDqCOZkeu7n9O8rYzhxmoFp5cJzDgtXZ3lrFYf esm3Oy9QeCS76MCrOcRq3EG45M+8et28Sw+vgjQe+ghtfmYAgY7a+mCQm9I+75/dkk+C HpKQ== X-Received: by 10.180.205.177 with SMTP id lh17mr30729453wic.75.1418650662100; Mon, 15 Dec 2014 05:37:42 -0800 (PST) Original-Received: from GONDOMAR.yourcompany.com (mail3.siscog.pt. [195.23.29.18]) by mx.google.com with ESMTPSA id je12sm13286755wic.22.2014.12.15.05.37.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Dec 2014 05:37:41 -0800 (PST) In-Reply-To: <548EDFC5.7070209@gmx.at> (martin rudalics's message of "Mon, 15 Dec 2014 14:19:01 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::229 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:180147 Archived-At: martin rudalics 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?