From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Adding olivetti to GNU ELPA Date: Tue, 14 May 2019 12:50:44 -0400 Message-ID: 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> <875d1b0c-7f44-ba5d-4660-84637533b8f3@gmx.at> <877eat58ec.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="11117"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: martin rudalics , Eli Zaretskii , emacs-devel@gnu.org To: Joost Kremers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 14 18:52:11 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 1hQaev-0002ja-Ht for ged-emacs-devel@m.gmane.org; Tue, 14 May 2019 18:52:10 +0200 Original-Received: from localhost ([127.0.0.1]:51228 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQaeu-00079b-Ik for ged-emacs-devel@m.gmane.org; Tue, 14 May 2019 12:52:08 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQadm-0006dw-E6 for emacs-devel@gnu.org; Tue, 14 May 2019 12:50:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQadl-00022v-BF for emacs-devel@gnu.org; Tue, 14 May 2019 12:50:58 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13496) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hQadc-0001hB-Qg; Tue, 14 May 2019 12:50:49 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id ED895442308; Tue, 14 May 2019 12:50:46 -0400 (EDT) Original-Received: from mail02.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BF538442305; Tue, 14 May 2019 12:50:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1557852645; bh=ApRlIEdBoMPjKkMkoTdhWFbtrk7FNXXefOzvr8WItYI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=e/QBvMuyHT5gU/qAnaOFb+h/Kpnr5D/SElNq4RoGfJP76I6fqKRmFbcO4GYFC1vN3 zVUQW0U0NOrK60oDOAPLjZSXqS3Jc5o3c9oSDzo4jL/I4qjW7ywqqkgVqqfUmqrl9z 714lTIoPWkrOHcl6ZfNIduiaWDsrcHR/tjdrYIXaZ0X+fkuhj1j4/n/lA/1EbMwRL3 hprwyvYmEFJYknu1IoYU9guqv7tQv8EKvcORsl/yoT9SGUB74eCmOkpR6QWCZ/MFPN yiNVFdBTbr8TC9HkHBPqkFBInQJAh+cl/mVBVaowg1Cy9RU+SBNKjrjyhC01PkM/iR CwaDWzm0QbfBw== Original-Received: from pastel (69-196-155-191.dsl.teksavvy.com [69.196.155.191]) by mail02.iro.umontreal.ca (Postfix) with ESMTPSA id 84756120B78; Tue, 14 May 2019 12:50:45 -0400 (EDT) In-Reply-To: <877eat58ec.fsf@fastmail.fm> (Joost Kremers's message of "Tue, 14 May 2019 18:05:15 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 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:236512 Archived-At: > (defun visual-fill-column-mode--enable () > "Set up `visual-fill-column-mode' for the current buffer." > (add-hook 'window-configuration-change-hook > #'visual-fill-column--adjust-window 'append 'local) > (if (>= emacs-major-version 26) > (add-hook 'window-size-change-functions > #'visual-fill-column--adjust-frame 'append)) > (visual-fill-column--adjust-window)) If you fundamentally only care about the size of the windows, then in Emacs-27 all you need is (add-hook 'window-size-change-functions #'visual-fill-column--adjust-window 'append 'local) > frame. In Emacs 27, this function must be in the global part of > `window-size-change-functions`, Not really: in Emacs-26, if it's on the local-part of the hook, then it will fail to be called when your window's size is changed as a side-effect of some other window being resized (this is fixed in Emacs-27). In Emacs-27, on the contrary it can be in the local part of the hook and can limit its action to the window passed as an argument rather than having to cycle through all windows on the selected frame, because the local part of the hook is run (separately) for every window whose size has changed. Stefan