From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: PATCH: make linum.el play nicely with other margin-setting extensions Date: Sat, 14 Nov 2015 09:27:55 +0100 Message-ID: <5646F08B.5000907@gmx.at> References: <5645B4F6.7000306@gmx.at> <5645F958.6040409@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1447492254 23064 80.91.229.3 (14 Nov 2015 09:10:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Nov 2015 09:10:54 +0000 (UTC) Cc: markus.triska@gmx.at, emacs-devel To: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 14 10:10:38 2015 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 1ZxWqy-0001zG-CP for ged-emacs-devel@m.gmane.org; Sat, 14 Nov 2015 10:10:36 +0100 Original-Received: from localhost ([::1]:32835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxWqx-0000S3-QL for ged-emacs-devel@m.gmane.org; Sat, 14 Nov 2015 04:10:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxWBw-00057e-8E for emacs-devel@gnu.org; Sat, 14 Nov 2015 03:28:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxWBs-0000Zx-7P for emacs-devel@gnu.org; Sat, 14 Nov 2015 03:28:12 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:53662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxWBr-0000Ze-Tk for emacs-devel@gnu.org; Sat, 14 Nov 2015 03:28:08 -0500 Original-Received: from [192.168.1.101] ([213.162.68.70]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LnxVE-1adAWy2EA4-00fyCj; Sat, 14 Nov 2015 09:28:04 +0100 In-Reply-To: X-Provags-ID: V03:K0:RbEfE8HbzFa8ueKTIGj5i+zmAikdshr+/CxEwn+PmlWqw3hq0ul rbIIgtIoe3+8B6TueVYgotsOL4JOL7vd0PA3Et+faHFNeOszS1KfMDgJ6SUOYXlxYPDBUZM HfuNPGBjqDGHWcBuHRTtsOndwYa4GK52RGdqD+Tl3WaGFPkrIlAg1bUEroLI8oYeAW+UNUK cKDI2XSdM9OEtMefvmrzA== X-UI-Out-Filterresults: notjunk:1;V01:K0:JmlnEOqKCog=:ygxwHRipff2V8ZwOL9/H4j JixGgXHdB+sN+bEu10M4EbL65hAo6Kd8DCIv2dRxdc5TlViJSOpxHXMaKlEOVreKhiJoQtmJG wzsu3ZZxlw2ZSeYrMOfQ0ID4PfGty/vacLgJYNiTPWrFu53AU4ub6uSFQ8ZDLxF99b93i5Jp6 dzpRn/9TAOIyCRQsT/Pa/VLEqrpd+DQWS7cHXOY7DUggqYJDs6I40934At2NOSDeU8Co1Q+F7 /nWrHr3KSC0wjp7AmuDU49yxNktt+Zowwc8T1fbbbVeddIUCN5fLXuNfYgxcDUgAit74k7FuT BSEEaQkQ3R+UC7xTJf0nQt+6rDlD3s01wgJpWQfnofLgo1+PoQC3fvdDzVSr4ag6j/V8B/wdW 4JlVxcnkT30i0V3w7uAiRlflsL/31UUDshrTtaau1rCoc/0u3fks6rslnu3dxHDs1TV//4TOb LJ2MjI0JKVspFcRabQ78Osjz1KXHAcy/VX6bmuFRyjiGIz3RsZIoXGLQpYJcNkOQw6UBbKzJV LvyyDyJbwne4Rln2KITxuvnSftRztXVOWwIEQLG712X89WVEOETHxmPoQYR+s6+0JKwNJkZz2 jFH6qV2v0mgLHRm4i0SgjVNL9m4HyMrDr6PBPKF0B++efKTRiaLDv1GAywGmlbroQdJ8nNVud jt5nIH/9VgdGxCJBb71Q83x16uCyg/tM+j3q6gk65Q41JOBf2H99DXPFIddnKYGLco16hAl73 E4O/HfQfaH68JS7ljycIzB/XjleH/RtVLAfa6M30ZP1G8G4KfHy4nUvIeOT0nh3vcFtHgVXS X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 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:194439 Archived-At: >> But wasn't the problem that darkroom should respect the minimum width= of >> =E2=80=98linum-mode=E2=80=99 and vice-versa? How would "owning" fit = into this? > > Yes. Did you see the example implementation, which provides the exampl= e > you request? If you have a "noisy" owner like =E2=80=98linum-mode=E2=80=99 that recalc= ulates margin widths every redisplay cycle, things are easy. But with a "quiet" owner that establishes a preferred margin width once only when it gets started, things are not that easy. You would have to wake such modes up somehow every time an owner resigns. >> This "before" is problematic when a second or third mode kicks in aft= er >> an owner has set its preferred size. > > But then it's those other modes that need to be fixed, to follow > whatever their policy is regarding overwriting current settings. Just > like linum.el does in its `linum-update-window'. If =E2=80=98linum-mode=E2=80=99 prevails what should those other modes do= ? > The policy there is: "make just the space I need. If I need to change = to > change the margins, then I own them, and it's my responsibility to res= et > them to what they were before unless someone else takes that > responsibility from me". This would work if we assume some stacking order on how modes set up margins. In practice there might be no such order. >> And how do we decide prioritization when the "owner" is deactivated a= nd >> there are two or more contenders? > > We don't. Up to the package. Every package has its policy and can deci= de > to take ownership. A good policy for taking ownership is "I needed to > change it, I take ownership, so I can check later if I should revert > it". But there might be other cases The problem is not that of taking ownership. It's that of what to do when "I should revert it". martin