From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28844: 26.0.90; display-line-numbers-mode should call window-configuration-change-hook Date: Sat, 09 Dec 2017 18:01:10 +0200 Message-ID: <83vahfubzt.fsf@gnu.org> References: <1508054203.3504379.1139170720.0D0E99E9@webmail.messagingengine.com> <59E32D49.4030007@gmx.at> <1508065717.3534312.1139251176.600E646A@webmail.messagingengine.com> <59E350AE.3060005@gmx.at> <1508074073.3557079.1139314312.4BFE5BC2@webmail.messagingengine.com> <83o9p8h2yv.fsf@gnu.org> <1508124120.3709085.1139805520.1F653A1C@webmail.messagingengine.com> <87efq37knc.fsf@gmail.com> <1508130850.3734431.1139876192.21CE8281@webmail.messagingengine.com> <83zi8rf8rx.fsf@gnu.org> <1508200557.2705080.1141019864.6A2B8BD5@webmail.messagingengine.com> <83bml6fqbv.fsf@gnu.org> <1508213954.647567.1141167720.1CC00459@webmail.messagingengine.com> <06925BCF-6C99-423B-AB13-E7331E22B867@gnu.org> <1508224426.2790345.1141279648.61B955E6@webmail.messagingengine.com> <87a7yuey7i.fsf@users.sourceforge.net> <1512833441.1115759.1199488160.6523D7E7@webmail.messagingengine.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1512835332 15741 195.159.176.226 (9 Dec 2017 16:02:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 9 Dec 2017 16:02:12 +0000 (UTC) Cc: 28844@debbugs.gnu.org, agrambot@gmail.com, npostavs@users.sourceforge.net To: Paul Rankin Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 09 17:02:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNhZn-0003rp-H3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Dec 2017 17:02:07 +0100 Original-Received: from localhost ([::1]:41812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNhZu-000603-AG for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Dec 2017 11:02:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNhZo-0005sR-1j for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 11:02:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNhZj-00033C-3Y for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 11:02:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45338) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eNhZi-00032u-VF for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 11:02:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eNhZi-0003KS-Ji for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2017 11:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Dec 2017 16:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28844 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28844-submit@debbugs.gnu.org id=B28844.151283531212780 (code B ref 28844); Sat, 09 Dec 2017 16:02:02 +0000 Original-Received: (at 28844) by debbugs.gnu.org; 9 Dec 2017 16:01:52 +0000 Original-Received: from localhost ([127.0.0.1]:54019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNhZY-0003K4-2B for submit@debbugs.gnu.org; Sat, 09 Dec 2017 11:01:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eNhZW-0003Jr-Mu for 28844@debbugs.gnu.org; Sat, 09 Dec 2017 11:01:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eNhZQ-0002k3-NN for 28844@debbugs.gnu.org; Sat, 09 Dec 2017 11:01:45 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33968) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eNhZK-0002i6-OC; Sat, 09 Dec 2017 11:01:38 -0500 Original-Received: from [176.228.60.248] (port=1313 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eNhZI-0000Bm-RP; Sat, 09 Dec 2017 11:01:38 -0500 In-reply-to: <1512833441.1115759.1199488160.6523D7E7@webmail.messagingengine.com> (message from Paul Rankin on Sun, 10 Dec 2017 01:30:41 +1000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140860 Archived-At: > From: Paul Rankin > Date: Sun, 10 Dec 2017 01:30:41 +1000 > > I’m sorry Eli, and everyone else in this thread. I should have shown > gratitude for your help instead of such arrogance. Thanks. > > For example, > > what should happen if the user enlarges or makes smaller the default > > face's font with the likes of "C-x +”? > > The basic idea of the package is to take a text body width value > (integer or float) and keep the margins balanced on either side in each > window the buffer is displayed. Whenever anything display-related > changes, the package calls olivetti-set-environment. This function calls > olivetti-scale-width to account for any changes to the font size. I see. This does work with "C-x +", but when I try changing the font size via mouse-appearance-menu (by clicking S-mouse-1), the margins seem to not react to the change. (I was mistaken above to ask about "C-x +", the problem is with selecting a font from the font menu.) > I’m going to implement post-command-hook as you suggested, and once the > API for line-number-display-width is locked I will call that to account > for display-line-numbers. Sounds like a good idea. Let me know if you need help in using the current line-number-display-width as part of implementing this idea. I think with the current APIs you want to call line-number-display-width with the optional argument 'columns'. This is especially important if the 'line-number' face is customized to use a font different from the one used to display the buffer text. > You know, the silly thing is... olivetti is designed for prose writing, > most people will never use it in conjunction with line numbers... I know. I myself never use line numbers, and only wrote the code because so many people do via linum.el and similar packages, and then complain that Emacs redisplay slows down too much.