From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Adding olivetti to GNU ELPA Date: Thu, 9 May 2019 10:14:15 +0200 Message-ID: <875d1b0c-7f44-ba5d-4660-84637533b8f3@gmx.at> References: <83tvemzcn2.fsf@gnu.org> <9bb5fc63-61ae-44dc-a8d5-b67803eab1e5@www.fastmail.com> <83h8amz24g.fsf@gnu.org> <24cca761-36ea-4c16-bce1-e3651aad52c8@www.fastmail.com> <83ftq6yx5o.fsf@gnu.org> <83ftppii16.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="146818"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: "Paul W. Rankin" , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 09 10:14:59 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOeCg-000c59-Bh for ged-emacs-devel@m.gmane.org; Thu, 09 May 2019 10:14:58 +0200 Original-Received: from localhost ([127.0.0.1]:50165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOeCf-00082p-3n for ged-emacs-devel@m.gmane.org; Thu, 09 May 2019 04:14:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:43467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOeC2-000811-E4 for emacs-devel@gnu.org; Thu, 09 May 2019 04:14:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOeC1-00050R-JP for emacs-devel@gnu.org; Thu, 09 May 2019 04:14:18 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:34045) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOeC1-0004zO-AH; Thu, 09 May 2019 04:14:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1557389651; bh=hlEGi32T+kQzPDce4UgO11HE0hFiwaSuRDZ5SXAMCYI=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=f8r34Muf6/yGrRzeDi8JqGcUkwFoetsh0b61SLF6vkausPe1FevHABMbs6lWWRCw6 HhCm2F4ob4xMkuCBJ5JvZfUK+27N4sdeXSGTcsGML5JeHIvbJWeaXJwyPr/l8SjA9s Rog4EkOHFS3MNHwRiytBNo73KdDb7DXavUTLgC6Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.238]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MJjvw-1hPked2bpc-001Bz3; Thu, 09 May 2019 10:14:11 +0200 In-Reply-To: Content-Language: de-DE X-Provags-ID: V03:K1:yty51jwQplduS4uUNfX7vyWL06gf14sLbvNMY+APnDhTa9b0diA DsXUvGQb5URVao7MeoEABstJwgTIGILZaSRL6eqSYJhvEv09gC8GSAfJ+iWkEwdXFIbOH5Y wOhdtaB/+6RppoamdJecxWNS71diqgTk+KK1XPjjsxSxNC8QTv/AKVWawfg6i+50vMfnk32 w/jfCFbOgSc5nnvLXIlxQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZbhIWAjU42E=:F235CSL7f7vOlP2jhNHZon nOqSNyfE0y3k8nSm6W+94Poa1N+X/cNqPiyXGWD5kmy9eKwlk80ISQclg0vLGLoYUH/VO0WwM iuKE3XNZwsQI4+DOPoVlZkdRdfFJrC9eGZf1BPhKBNNweSiAbeS+dwjORrI7927brQeYFvMch xarpmgAADu2dPPMq5R2jlBn5yF3zcb0ngPLbt+/T72x/2zGIa0lnTmMPhGWAPFIRuilTCEypq 2gfnbbqlYqr83R5csIbniLe9qaSZ2/Dax31zius2Zd4+/K/9J+D/m3IO46IH5oHY85aDXdFWq VO0ceQoRE15R4zN2HpjFsmSIRgJ2U7iyIrpI6exO3LFTqZf1AyXZP0Yhk/0KSjg61BkhAv5hY 4yLUsMn/6P5KAXm2DHpnXSFUMpcvg7hcQK/Q1X28QdXCDYMaYE/AcqcBITz3K9V82cGpleq7j As0pKJpRWu0tx5bCDYTJBJSYFO26Nk9FIZYY5EpBVJzkqjbSFswLdbZnPaxZQ291c6/b5lfZg 0l3yUfyWOcDpYdZEKDiR+AIhh40QyzzUDI4P//oY+bmGzjpUePLM7mZYqD2Tf1meOMBFWhl1T KoT8z/lOvx1tiU9xdlYGAaKmivFNuvTknN/G8QxPmXdloohKduJwzj4Up/ZnIEkhb89QtxE+e dwRxtwHtIQDuK3kePrhOf1lQ5z4b8w3f93dCL/geHrfnDX88qBW91HkENYjP4awx+tOq4HM7N VZy/mkwSueVu8R7MjbnS5abUclbaasDwWOtjI8xQImza6lsZwaMjMFqsgwExBBhqubhG/fu8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:236327 Archived-At: > (set-window-margins > (current-window) (/ 2 (- (window-width) olivetti-body-width))) What is 'current-window' and how does it relate to 'selected-window'? > There are some other ancillary functions, but really it's just a > case of running this function in all windows displaying the current > buffer when olivetti-body-width changes or when the window width > changes. What does "current buffer" refer to here? I suppose you want to run "this function" whenever the body width of a window showing a buffer with olivetti mode enabled changes. So with Emacs 27 it should suffice to add your function to `window-size-change-functions' for each buffer where olivetti mode is enabled > 1. Some users have complained of lagging input, which seems to be > due to olivetti setting the margins too often, i.e. on too many > hooks. So using the minimal number of hooks is preferable. 'set-window-margins' doesn't do much when margins don't change. So I suppose that for some reason olivetti mode wants margins to change too often. If so, could you try to find out why? > 2. But I've experienced olivetti failing to set the margins during a few common cases, e.g.: > - splitting window with icomplete "*Completions*" buffer > - splitting window with ispell-word "*Choices*" buffer > - splitting window with magit-status > - splitting window vertically with any buffers in a side-window in the same frame (which results in window being too large to split -- I think this is a separate issue) Too _large_ to split? > It would be nice to achieve consistency with these. Are these failures due to the fact that a releated hook is not run or are there other issues? martin