From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 14:54:00 2019 Received: (at submit) by debbugs.gnu.org; 28 Aug 2019 18:54:00 +0000 Received: from localhost ([127.0.0.1]:51212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i334y-000570-0X for submit@debbugs.gnu.org; Wed, 28 Aug 2019 14:54:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:44269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i334v-00056s-Bm for submit@debbugs.gnu.org; Wed, 28 Aug 2019 14:53:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35637) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i334u-0006zc-87 for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 14:53:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i334t-0001im-AH for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 14:53:56 -0400 Received: from colin.muc.de ([193.149.48.1]:23443 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1i334t-0001i8-4v for bug-gnu-emacs@gnu.org; Wed, 28 Aug 2019 14:53:55 -0400 Received: (qmail 87971 invoked by uid 3782); 28 Aug 2019 18:01:04 -0000 Received: from acm.muc.de (p4FE15C5E.dip0.t-ipconnect.de [79.225.92.94]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 28 Aug 2019 20:01:03 +0200 Received: (qmail 5930 invoked by uid 1000); 28 Aug 2019 18:53:52 -0000 Date: Wed, 28 Aug 2019 18:53:52 +0000 To: bug-gnu-emacs@gnu.org Subject: Execute set-window-margins. left-margin-width remains 0. Message-ID: <20190828185352.GA4530@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Hello, Emacs. In Emacs-27, recent master branch, do: emacs -Q M-: (set-window-margins (selected-window) 2) ; This works. M-: left-margin-width. The result is that left-margin-width is still at zero, although the value should be 2. This is a bug. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 15:14:57 2019 Received: (at 37213) by debbugs.gnu.org; 28 Aug 2019 19:14:57 +0000 Received: from localhost ([127.0.0.1]:51233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i33PF-0005i1-EV for submit@debbugs.gnu.org; Wed, 28 Aug 2019 15:14:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60315) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i33PD-0005hn-Io for 37213@debbugs.gnu.org; Wed, 28 Aug 2019 15:14:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54143) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i33P7-0004xu-KY; Wed, 28 Aug 2019 15:14:49 -0400 Received: from [176.228.60.248] (port=4901 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i33P6-0008ML-Lz; Wed, 28 Aug 2019 15:14:49 -0400 Date: Wed, 28 Aug 2019 22:14:54 +0300 Message-Id: <83r255ayq9.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20190828185352.GA4530@ACM> (message from Alan Mackenzie on Wed, 28 Aug 2019 18:53:52 +0000) Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. References: <20190828185352.GA4530@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37213 Cc: 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 28 Aug 2019 18:53:52 +0000 > From: Alan Mackenzie > > emacs -Q > M-: (set-window-margins (selected-window) 2) ; This works. > M-: left-margin-width. > > The result is that left-margin-width is still at zero, although the > value should be 2. This is a bug. I don't think this is a bug. This variable is for _setting_ the margin width, not for _returning_ its width as set "by other means". See its documentation. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 28 15:57:12 2019 Received: (at 37213) by debbugs.gnu.org; 28 Aug 2019 19:57:12 +0000 Received: from localhost ([127.0.0.1]:51251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3447-0006oe-VV for submit@debbugs.gnu.org; Wed, 28 Aug 2019 15:57:12 -0400 Received: from colin.muc.de ([193.149.48.1]:24340 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1i3446-0006oU-DL for 37213@debbugs.gnu.org; Wed, 28 Aug 2019 15:57:11 -0400 Received: (qmail 35883 invoked by uid 3782); 28 Aug 2019 19:04:19 -0000 Received: from acm.muc.de (p4FE15C5E.dip0.t-ipconnect.de [79.225.92.94]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 28 Aug 2019 21:04:17 +0200 Received: (qmail 6844 invoked by uid 1000); 28 Aug 2019 19:57:06 -0000 Date: Wed, 28 Aug 2019 19:57:06 +0000 To: Eli Zaretskii Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. Message-ID: <20190828195706.GB4530@ACM> References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83r255ayq9.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37213 Cc: 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Wed, Aug 28, 2019 at 22:14:54 +0300, Eli Zaretskii wrote: > > Date: Wed, 28 Aug 2019 18:53:52 +0000 > > From: Alan Mackenzie > > emacs -Q > > M-: (set-window-margins (selected-window) 2) ; This works. > > M-: left-margin-width. > > The result is that left-margin-width is still at zero, although the > > value should be 2. This is a bug. > I don't think this is a bug. This variable is for _setting_ the > margin width, not for _returning_ its width as set "by other means". > See its documentation. The documentation says "This variable specifies the width of the left margin". As best, this is unclear. What you're saying is that the variable ceases to specify that width, should the margin be altered by other means. I maintain that this is either a bug in the documentation, or in the code. If the former, it should explicitly state that the variable is write-only, and its read value is undefined. It should say that the function window-margins should be used instead. But it might be easier just to amend the code. There appear to be just two ways to set the width of the left margin (or the right margin), so if it gets set the second way, why not just set that variable? Could this do any harm? (Note: I haven't looked at the code, yet.) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 02:42:18 2019 Received: (at 37213) by debbugs.gnu.org; 29 Aug 2019 06:42:18 +0000 Received: from localhost ([127.0.0.1]:51518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3E8Q-00030w-Ha for submit@debbugs.gnu.org; Thu, 29 Aug 2019 02:42:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3E8P-00030h-IW for 37213@debbugs.gnu.org; Thu, 29 Aug 2019 02:42:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i3E8K-0007Ru-6C; Thu, 29 Aug 2019 02:42:12 -0400 Received: from [176.228.60.248] (port=2863 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i3E8J-00037u-DI; Thu, 29 Aug 2019 02:42:11 -0400 Date: Thu, 29 Aug 2019 09:42:17 +0300 Message-Id: <83o908bhh2.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20190828195706.GB4530@ACM> (message from Alan Mackenzie on Wed, 28 Aug 2019 19:57:06 +0000) Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> <20190828195706.GB4530@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37213 Cc: 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 28 Aug 2019 19:57:06 +0000 > Cc: 37213@debbugs.gnu.org > From: Alan Mackenzie > > > I don't think this is a bug. This variable is for _setting_ the > > margin width, not for _returning_ its width as set "by other means". > > See its documentation. > > The documentation says "This variable specifies the width of the left > margin". As best, this is unclear. What you're saying is that the > variable ceases to specify that width, should the margin be altered by > other means. > > I maintain that this is either a bug in the documentation, or in the > code. I'm okay with clarifying the documentation, but let's first agree what needs clarifying there. > If the former, it should explicitly state that the variable is > write-only, and its read value is undefined. It should say that the > function window-margins should be used instead. > > But it might be easier just to amend the code. There appear to be just > two ways to set the width of the left margin (or the right margin), so > if it gets set the second way, why not just set that variable? Could > this do any harm? (Note: I haven't looked at the code, yet.) Think about it: left-margin-width is a per-buffer variable. A buffer can be displayed in zero or more windows, and the margin is a window property. How can a single buffer-local variable reflect a value that can be different in different windows, and can even be meaningless if the buffer is not displayed in any window? What happens in the code is that when a buffer is displayed in a window, this variable is consulted, and the window's margin-width attribute set accordingly. The window margins can grow or shrink thereafter, and the function window-margins then returns this window attribute's value at any given moment for a specific window. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 03:46:45 2019 Received: (at 37213) by debbugs.gnu.org; 29 Aug 2019 07:46:46 +0000 Received: from localhost ([127.0.0.1]:51538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3F8m-0004m5-Pa for submit@debbugs.gnu.org; Thu, 29 Aug 2019 03:46:45 -0400 Received: from mout.gmx.net ([212.227.17.21]:40987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3F8k-0004lj-RI for 37213@debbugs.gnu.org; Thu, 29 Aug 2019 03:46:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1567064794; bh=2aMb0OzmU6QXQhTcgH+pn9/grXO2YdmG+9T82T8uGpc=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=gVxI/sfnyLvtDOTCDi4O9wfFga1Im8AZ5Ie7ZMdd7kkRek2etE+RlkOaDOhOepoLb qJf6Kx8xfWXsgCz4oX8TgiZNPRD1sccjIjJRGzcJ+aQkj1MYlZSXG8Kyvduu0/jKdj oL14miQu5qK311ZyjborWfdcxe2LL/igSx5AJ2hY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([46.125.249.63]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LqE5k-1igigU2hnM-00dr2b; Thu, 29 Aug 2019 09:46:34 +0200 Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. To: Alan Mackenzie , 37213@debbugs.gnu.org References: <20190828185352.GA4530@ACM> From: martin rudalics Message-ID: <77150b42-bc15-89ff-bf67-f2c938ac6b5c@gmx.at> Date: Thu, 29 Aug 2019 09:46:34 +0200 MIME-Version: 1.0 In-Reply-To: <20190828185352.GA4530@ACM> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:PfO/oieHgbUOiEPD+KeqcukvgW3+MavYWRcfeog52JqhqvVuxwA tLY3T05NSNXa3b2adf9veW96IfZkeCQuxSpFPrMc5uoZvutu/tvtrC0xLyrH7fVJvlTmAw6 Jz9sN81a5XulNXdNyX7nWyTkngq85CPd8pbaptgehZKtpzoY9HNKPJ9gqEwQALd+0wLyKZZ X0+1pOlsGwKk0suP7KniA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Ma5Volcz89c=:pF4/885dn311FGy76Q8W/j YsLKTJCjrTtckB8zsSt6JtlN09ZqIshPEL41xM7dMAkzhSHkus/cn9Rm+RBU4oDa/zrfBTeMX AqWT2x6KMOXloM2lsCjFWxP1jGpnGN+vzi3j3yrivIh+ziMZyRjDvmCGTQUgDoiIaYBMXvhcT HE1RCxAF0Jg68FjUgEpiiiwjAhQIA2jEBpe7/6e9n3L5KWxwi84MPpXAQuLdsMsLmxtvC3z+Q a82HDnQXGoNXQaZcFUP4s4MK0pgod6Tdvyr0oOmDiCUNi4DMDoR9ItWB9Uh4g9xpm9W+Ssq6z Q2LHPo0gNIcP3ayPAWz9cvpcSdSHonqlEqgxWVxGppsYAFfEKFPlU1Qu1aB/PCzntpREdpkBx qeNFYPLD+dj28w7eH0HW5mbjxfIEEW7XKS9BIbuMcDMepiUo2qVAEXYr488b/k9oMeTF/CtiL ZdIWWpsdOCO/P6cXD1koyBd+KahbDOu1nOvkeZ1SpJfBaklb7+lgvRPirh1SMjy/MDgCijHYL bL1QEqvkT0eJ/XXRVEWBWSqX+Gi4fFD1T78VBnHViUhb6BttJHspCRyKvLFAXiGIJmC/ERPWg Kx0fJJ0E1bCjggCN6z2qc0kGI0iHYC0ED4JJWru4md9mgWoQc4E8a5d7KKZB7gE6x7WrUaFV2 atveJwM6p8qYBoQxJt9zIgxw8qqDsnS9flXIk3iH6/Iix1DWXw3PeXwj7wgOoM9t9Lx/sMI34 X3kxW/I6XI9i+I1VxpaLll67pyiN1R88cNfcuAUSdKMbDWLtbebVCbvNrnRMPENWOQQr6539l uEMGazrT/b0F9hLs/PfPkb9fpSIxfA3WxmEDmh3Q2IxMAPogpLHToDCAhzoJm67gM0hEqf+Iz p1Tu6FfwnDUFtza0SzAIJjh8++wILhU2uqDMlNUaGdo27tKJX9xoByA7HFiiZi7jVZQZ8KMCn cWJpn2DlqMO+YjGOMbw8RQZnH6rWHAxd7NuZPbPmg2mruURdv6qhL9Yw7Xml2hRYQxFhIsmwe Vy9eqV1N1JRvVu8ZFtM3uvmp7GaPJ3BpE81xN4Yws4Pn5GuMa/JYfwpVSYWJFo9kGq7YbKZZA qfZYPT2kmY2asFFgycnUEgVxfM2132qZNiK+U3KlX7zRLRSS3YTEDIkoeSNDYlVirglxrqj/W Q2UAs= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37213 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Hello, Emacs. Hello, Alan. > In Emacs-27, recent master branch, do: > > emacs -Q > M-: (set-window-margins (selected-window) 2) ; This works. In which sense? > M-: left-margin-width. > > The result is that left-margin-width is still at zero, although the > value should be 2. This is a bug. Neither of the last two statements is correct. 'set-window-margins' sets the margin widths of its WINDOW argument (the selected window in your case) and triggers an update of the display. If WINDOW's buffer is currently displayed in another window as well, the margins of that other window remain unaffected. You can verify that by splitting your window before invoking 'set-window-margins'. 'left-margin-width' is the buffer-local value of the left margin for showing that buffer in a window. That value is put into effect only when 'set-window-buffer' has a window display that buffer. You can verfiy this by setting 'left-margin-width' to some different value before splitting the window as suggested above. Concludingly, you've been comparing apples and oranges here. If the doc-strings or the manual made you do so, please consider adjusting their texts appropriately. Gladly, your questions was about margins only; with fringes we would even have a frame parameter to take into account here ... Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 29 03:47:07 2019 Received: (at 37213) by debbugs.gnu.org; 29 Aug 2019 07:47:07 +0000 Received: from localhost ([127.0.0.1]:51542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3F98-0004nD-W9 for submit@debbugs.gnu.org; Thu, 29 Aug 2019 03:47:07 -0400 Received: from mout.gmx.net ([212.227.17.22]:34447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3F97-0004mb-On for 37213@debbugs.gnu.org; Thu, 29 Aug 2019 03:47:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1567064815; bh=HXjcwbE07b7EyHlP+xhwvqo7565tdkyRlL73bY+0PeE=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=FQygZ7Koquurc/BTLru/gZpNj7FxAyQg2A1aUagtaweiW2kJYTEXGwLTm+WVoCPPq RbeAi1fiprUL/YcT2ZnW+bFqusI1ds+Ef9Dkc8LldQm+zWR5U7Ivht/EB4mKL9rby4 AiLlmHYQcALb5yE++GcBQVu+zJQd030tF/OrehNQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([46.125.249.63]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MUGiJ-1hc7bR3vpz-00RJPB; Thu, 29 Aug 2019 09:46:55 +0200 Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. To: Alan Mackenzie , Eli Zaretskii References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> <20190828195706.GB4530@ACM> From: martin rudalics Message-ID: <263050b1-8a57-dd39-bd49-88913935f96e@gmx.at> Date: Thu, 29 Aug 2019 09:46:54 +0200 MIME-Version: 1.0 In-Reply-To: <20190828195706.GB4530@ACM> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:82kACJGXQzQY/xdvGsKjkGZxHnvWqBeM3mEyqVrWys5FWs5QnmX eVLu/iAShRF4ivYWOPAC3rl5cSz3ZfQXsLqDCpZFgnGsiBTE1ymu99tlKmm9yzkL7jWFdBC cY+CYN+bMTlARHVp0DKvhLEYKKtRwNmfvpCcaaLmMw6Mggj0mSdHBrY0Hif+/sXHgE+3QNe g/wFtzYJttKOOTnjqOe3g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:fQJ3igHIvSI=:wHixI4ubCJ2RuMqSOd6Mqy VgMXSqsjVXpB0qzwDZREg2ieRfmDVkkPRoiGp0h02mRgSFgylWdc896Spi03QQ13J9Ete+mYc RT2GnUI5fE/9MW3qIHnESUPNtVT31HIedjOlSJ7wb1I0pIMcju+jBkVMbZz2hcH/BgNV+mHEL R4KVa5/vTGvFYYo7F/DhVrlHDz01R1VjfA2h+gZToKXifWPdXkTHfb6w2vGXzMCdaP51Vr7ri UYWp4DkX8XxyoE7sRZMebvwiIwzznUP6QYcaog74q4eY+AHkzUTezqfXNXyg9+MqVN0XTUsG4 TzZaVyjxtXWICwuYjVPNNdayTTeT+owPGneUJwI70epOgSF7N2nvKcFrNAKG5q9bMfSqiJZ0X z/vu0vRkIACquUW5TTrNDMgJ9IqzEz7yZrxpoI4Ws4rqYDmoeTggoG3wnFH3fInYVJDtcPPwn d/cVY7tryPzsYnlbKwvUEJ1H80nJt7wxizIalTShvDIEENYDvXDK+Z48tZlcSydKNbJAPp3BB ddQr/quONhJgDcHnX0ZmTWqwRYAjLD1NKjdCNJX+y4xcETSmetxsnV88+r2t6lr8jmIVgG0RL yEAmmCjTwG8s5LOyMLS+TqCgs0ggk4QdGf31mAMnbXkGyZgM2AKFfd3yHGjpFzHVfInrBHG0G nnQ5yThVyVTNbXc+1REJYbW6Y5/831vWQAZ5eaqOwdZVZTPZdTs5OSaIt3sObEzbiuok7Luj6 hn8vaiRYGwuYrKOYOfn2G5NtnYOYw1adB8u40FW4uORofrFAPxxMDPgLD1Y94RKElIUqLlRGT 0qN8/1inU8LRN96ieuoog0qG6iy2xhAoE1jZIFz2De4Oef1kEvDALEZIieDzs2YCeqoe9lDax oVk6DgR1TKhyjNmJazoTqYRkjBbW0a0f0HPOjfa/YV2bUg39eQk5XIFSzVrHIohpLC4kVSjkh HNBwQLbQBBQCcJR4YZp1TT6JeTSprR97vSGc64XJdAkaWBDMXTZRisxEa8RmrCyZdA0/ZI0d7 BWHM0A9xEVwJ57N9aHCjCYnLGvFxjNRJd/XqYh2Y0oKJekq3xITt6h/3NcdraPR+UYnZWVCix 5obOQZqoI0fKk+681/8mt/BBYHLgWSVWJCxLaWsSVBxVRNeuuwC38XwRBTLNXGfOHy651xAMs BlD/w= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 37213 Cc: 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > The documentation says "This variable specifies the width of the left > margin". As best, this is unclear. What you're saying is that the > variable ceases to specify that width, should the margin be altered by > other means. Eli didn't say that. > I maintain that this is either a bug in the documentation, or in the > code. > > If the former, it should explicitly state that the variable is > write-only, and its read value is undefined. It should say that the > function window-margins should be used instead. The variable is not write-only and its read value is well-defined. > But it might be easier just to amend the code. There appear to be just > two ways to set the width of the left margin (or the right margin), so > if it gets set the second way, why not just set that variable? Could > this do any harm? (Note: I haven't looked at the code, yet.) Please re-read the documentations of 'left-margin-width' and 'set-window-margins' having in mind that the same buffer may appear in different windows and the same window may show different buffers all with differing margins. Once you've done that, please look at the respective documentations for fringes and scroll bars which are even more complicated because they have to obey a frame parameter as well. Thanks, martin From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 31 07:59:15 2019 Received: (at 37213) by debbugs.gnu.org; 31 Aug 2019 11:59:15 +0000 Received: from localhost ([127.0.0.1]:55055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i422F-0004YS-2u for submit@debbugs.gnu.org; Sat, 31 Aug 2019 07:59:15 -0400 Received: from colin.muc.de ([193.149.48.1]:33053 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1i422D-0004YK-Tp for 37213@debbugs.gnu.org; Sat, 31 Aug 2019 07:59:14 -0400 Received: (qmail 66245 invoked by uid 3782); 31 Aug 2019 11:06:21 -0000 Received: from acm.muc.de (p2E5D5E4B.dip0.t-ipconnect.de [46.93.94.75]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 31 Aug 2019 13:06:20 +0200 Received: (qmail 5898 invoked by uid 1000); 31 Aug 2019 11:59:11 -0000 Date: Sat, 31 Aug 2019 11:59:11 +0000 To: Eli Zaretskii Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. Message-ID: <20190831115911.GC4822@ACM> References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> <20190828195706.GB4530@ACM> <83o908bhh2.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83o908bhh2.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37213 Cc: 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Thu, Aug 29, 2019 at 09:42:17 +0300, Eli Zaretskii wrote: > > Date: Wed, 28 Aug 2019 19:57:06 +0000 > > Cc: 37213@debbugs.gnu.org > > From: Alan Mackenzie > > > I don't think this is a bug. This variable is for _setting_ the > > > margin width, not for _returning_ its width as set "by other means". > > > See its documentation. > > The documentation says "This variable specifies the width of the left > > margin". As best, this is unclear. What you're saying is that the > > variable ceases to specify that width, should the margin be altered by > > other means. > > I maintain that this is either a bug in the documentation, or in the > > code. > I'm okay with clarifying the documentation, but let's first agree what > needs clarifying there. How about the following, purely pragmatic, patch? diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 7c0a56dcad..428fe9595a 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -5016,7 +5016,9 @@ Display Margins Setting these variables does not immediately affect the window. These variables are checked when a new buffer is displayed in the window. Thus, you can make changes take effect by calling -@code{set-window-buffer}. +@code{set-window-buffer}. Do not use these variables to try to +determine the current width of the left or right margin. Instead, use +the function @code{window-margins}. You can also set the margin widths immediately. With this patch applied, I'd be happy for the bug to be closed. > > If the former, it should explicitly state that the variable is > > write-only, and its read value is undefined. It should say that the > > function window-margins should be used instead. > > But it might be easier just to amend the code. There appear to be just > > two ways to set the width of the left margin (or the right margin), so > > if it gets set the second way, why not just set that variable? Could > > this do any harm? (Note: I haven't looked at the code, yet.) > Think about it: left-margin-width is a per-buffer variable. A buffer > can be displayed in zero or more windows, and the margin is a window > property. How can a single buffer-local variable reflect a value that > can be different in different windows, and can even be meaningless if > the buffer is not displayed in any window? OK. > What happens in the code is that when a buffer is displayed in a > window, this variable is consulted, and the window's margin-width > attribute set accordingly. The window margins can grow or shrink > thereafter, and the function window-margins then returns this window > attribute's value at any given moment for a specific window. Thanks for the explanation. -- Alan Mackenzie (Nurermberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 31 08:13:50 2019 Received: (at 37213) by debbugs.gnu.org; 31 Aug 2019 12:13:50 +0000 Received: from localhost ([127.0.0.1]:55068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i42GL-0004x8-V4 for submit@debbugs.gnu.org; Sat, 31 Aug 2019 08:13:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i42GK-0004wv-Kq for 37213@debbugs.gnu.org; Sat, 31 Aug 2019 08:13:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i42GE-0004MN-4I; Sat, 31 Aug 2019 08:13:42 -0400 Received: from [176.228.60.248] (port=2033 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i42GD-0001H4-FS; Sat, 31 Aug 2019 08:13:41 -0400 Date: Sat, 31 Aug 2019 15:13:34 +0300 Message-Id: <83v9ud8rdd.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20190831115911.GC4822@ACM> (message from Alan Mackenzie on Sat, 31 Aug 2019 11:59:11 +0000) Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> <20190828195706.GB4530@ACM> <83o908bhh2.fsf@gnu.org> <20190831115911.GC4822@ACM> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 37213 Cc: 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 31 Aug 2019 11:59:11 +0000 > Cc: 37213@debbugs.gnu.org > From: Alan Mackenzie > > How about the following, purely pragmatic, patch? > > > diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi > index 7c0a56dcad..428fe9595a 100644 > --- a/doc/lispref/display.texi > +++ b/doc/lispref/display.texi > @@ -5016,7 +5016,9 @@ Display Margins > Setting these variables does not immediately affect the window. These > variables are checked when a new buffer is displayed in the window. > Thus, you can make changes take effect by calling > -@code{set-window-buffer}. > +@code{set-window-buffer}. Do not use these variables to try to > +determine the current width of the left or right margin. Instead, use > +the function @code{window-margins}. > > You can also set the margin widths immediately. Fine with me, thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 31 10:07:43 2019 Received: (at 37213) by debbugs.gnu.org; 31 Aug 2019 14:07:43 +0000 Received: from localhost ([127.0.0.1]:55845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i442Y-0007ob-Qb for submit@debbugs.gnu.org; Sat, 31 Aug 2019 10:07:43 -0400 Received: from colin.muc.de ([193.149.48.1]:22008 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1i442V-0007oS-U5 for 37213@debbugs.gnu.org; Sat, 31 Aug 2019 10:07:41 -0400 Received: (qmail 4509 invoked by uid 3782); 31 Aug 2019 13:14:47 -0000 Received: from acm.muc.de (p2E5D5E4B.dip0.t-ipconnect.de [46.93.94.75]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 31 Aug 2019 15:14:45 +0200 Received: (qmail 17267 invoked by uid 1000); 31 Aug 2019 14:07:36 -0000 Date: Sat, 31 Aug 2019 14:07:36 +0000 To: martin rudalics Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. Message-ID: <20190831140736.GE4822@ACM> References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> <20190828195706.GB4530@ACM> <263050b1-8a57-dd39-bd49-88913935f96e@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <263050b1-8a57-dd39-bd49-88913935f96e@gmx.at> User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37213 Cc: Eli Zaretskii , 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Martin. On Thu, Aug 29, 2019 at 09:46:54 +0200, martin rudalics wrote: > > The documentation says "This variable specifies the width of the left > > margin". As best, this is unclear. What you're saying is that the > > variable ceases to specify that width, should the margin be altered by > > other means. > Eli didn't say that. > > I maintain that this is either a bug in the documentation, or in the > > code. > > If the former, it should explicitly state that the variable is > > write-only, and its read value is undefined. It should say that the > > function window-margins should be used instead. > The variable is not write-only and its read value is well-defined. Is the read value well-defined? Never having set it, the value it has seems always to be 0. But even if it is well-defined, is it useful for anything? > > But it might be easier just to amend the code. There appear to be just > > two ways to set the width of the left margin (or the right margin), so > > if it gets set the second way, why not just set that variable? Could > > this do any harm? (Note: I haven't looked at the code, yet.) > Please re-read the documentations of 'left-margin-width' and > 'set-window-margins' having in mind that the same buffer may appear in > different windows and the same window may show different buffers all > with differing margins. Yes, that's the thing. We don't have "window local variables" in Emacs, so anything specific to a window needs a function interface with the window being one of the parameters. > Once you've done that, please look at the respective documentations > for fringes and scroll bars which are even more complicated because > they have to obey a frame parameter as well. I've proposed a simple amendment to the "Display Margins" page of the elisp manual, saying "don't use these variables to ....!". This would solve the misunderstanding I experienced earlier. > Thanks, martin -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 31 10:39:20 2019 Received: (at 37213-done) by debbugs.gnu.org; 31 Aug 2019 14:39:20 +0000 Received: from localhost ([127.0.0.1]:55867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i44X7-000092-0B for submit@debbugs.gnu.org; Sat, 31 Aug 2019 10:39:19 -0400 Received: from colin.muc.de ([193.149.48.1]:11378 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1i44X5-00008u-P1 for 37213-done@debbugs.gnu.org; Sat, 31 Aug 2019 10:39:16 -0400 Received: (qmail 13748 invoked by uid 3782); 31 Aug 2019 13:46:23 -0000 Received: from acm.muc.de (p2E5D5E4B.dip0.t-ipconnect.de [46.93.94.75]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 31 Aug 2019 15:46:22 +0200 Received: (qmail 17689 invoked by uid 1000); 31 Aug 2019 14:39:13 -0000 Date: Sat, 31 Aug 2019 14:39:13 +0000 To: 37213-done@debbugs.gnu.org Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. Message-ID: <20190831143913.GF4822@ACM> References: <20190828185352.GA4530@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37213-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Bug fixed by enhancing the documentation (elisp manual). -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 01 04:26:49 2019 Received: (at 37213) by debbugs.gnu.org; 1 Sep 2019 08:26:50 +0000 Received: from localhost ([127.0.0.1]:56177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4LCD-0005Gs-LJ for submit@debbugs.gnu.org; Sun, 01 Sep 2019 04:26:49 -0400 Received: from mout.gmx.net ([212.227.15.18]:41649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4LCB-0005Gd-4t for 37213@debbugs.gnu.org; Sun, 01 Sep 2019 04:26:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1567326398; bh=BsBNuy/AKcvT16sSKQ7x5SSez6R2fx1rUeusgwLwyis=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=HTVKbMmXkn3QdltwB7KhFaxcpR6x5NBsYFA+OshyBscON1UMa3e+M4HgKSA7tjAro SSZzKpDafzNnvHK5hsjEN5jXpSgovJddK24A3aelULqkD3YGHsYTWGuBJdFv42JIKk upzX5HQ9eDdRXAw3TLgZ+rnxFCnDgrOovu5A8+38= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([46.125.249.4]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MHH6Z-1hzAeE3Wqp-00E5nL; Sun, 01 Sep 2019 10:26:38 +0200 Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. To: Alan Mackenzie References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> <20190828195706.GB4530@ACM> <263050b1-8a57-dd39-bd49-88913935f96e@gmx.at> <20190831140736.GE4822@ACM> From: martin rudalics Message-ID: Date: Sun, 1 Sep 2019 10:26:35 +0200 MIME-Version: 1.0 In-Reply-To: <20190831140736.GE4822@ACM> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:4iKfuQzBF56nkzUenJvnHpVqmMWdIk+WvLXfu/Fnb6kvhD3u/+Y 5frLLml4bk9aBlXA9E2gZlSeep35qA0UfXIyeVcbwCHvTYNx3TAiSXWZJrKFjYXzzwOqS8m Rl2r7qmuUhQfY+oiPdLexJ84NcBjkE08HtyJOyd49bqboDI4xhuP50wp9VoN4Ad2WvfNOhs 8aGH8qsTZyyTw2mkAODJQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:xn6+m9MXkQo=:rutRyWuM/Oak8dIJAlK2Vl C7EF5aCuWGUeQcD/RW3xfXCKup6h+Qzlchk4ghTEj8HfvH0oyNOQ60Yu9Alf6nsQr4tDaRcwJ KIEMhigfe0XJjJephqhJvATkNh5mqzffj9LYIEoui+rZik+74S4frrLjV5pDNdoGxX7QcbQQI eX3QcYueugP+Q19uR51V781KpI9n7f3K9DhNLorQPtJZO/seDxIrzUOVDUnP6z59VEqJmqKJn rTHgpptrLqZNa4r0oPRuFsmokfHor2FD70ViHHAZzmthzoirZK4Nozxvqpyty1NC+Qh7QfvLs vUI7TbSRXz7sl4ZN1SRb6PdBWdfW31os4Yw/UBw0jqUJ4YQg9kxiQrbVBflpLXQYG/c9BmgE2 GAwaRThqFW2WBotSJZ1YNhxl8Nt+oATGBnub5N2J13tXkHwaC+8F2gpWh2HsFW1NlA7B/WdiD iVGeSvz7lebH7X+/SID19VOlPN/34zQaYbtBoixSAk63GJ6DtF6V4mjej055rrMDkXCQrko+Y 10BztGebzpntUYXKV5I43FJss3mq34/cQSpIqiyoooeqnn9p2fXOc30YGX3sGzltIkEAMieFG QhEdHl0iI8pRm3+GMQ4jq/zAuutKjzmrPhHguQbe8Tns0jVuBFReGSPvEtUhunOVTwCbILOkL 5ptIrnYULdBmv5urw9CZPC4DAc+7+/yqkI5LQsCIjLSlR+iq6qkxWEU6uXaCFsD9MYsgFXuCP ePKR8QRdC+dX2nzXs7hUTHtMcZVkhi/UWOqLR8wX4hvTNsfk6OeTmNNL5hhC1RcRIgjWetX/H tNjxHwpx6GvcfP69wT9PTjxZX3l2AQiVcRCivM5H2FfN8X4UiG86ZFJUFMnkHupLTjNzM2XQs ++mA7JmecBwHCNCTfqnbfJX2rxQ9tvB8dDWEsiWJ8loFPzdSaKMmcF/52HJbfo1M2P04KS9Ea qyLp9Db+r4fLakjILuRLmVPRxaCEMCO8XVOhLsA16hg3Z7O9l+hIqAfsGXLnKuIpk7auX279o C+Orgr06aPT6XB6qjUkBAql05pEcqKjctPulW0z9b0nw+LhTkzfS3wRscyWEwUOc/kl3HxN8q 7DHPNESgUUT5eMj84AzBaRYBtB/+s/KLKFEAEJuZAbcp0TbN8miNvx2L5X3d3AemwPlWL5+xb rEF76sbrR+OW5nrEIAIbyKZn0QC0k1Ts0mpwTPsNHBoXYV1g== X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Is the read value well-defined? Never having set it, the value it has > seems always to be 0. All margin-related values are zero by default. > But even if it is well-defined, is it useful for > anything? Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [46.125.249.4 listed in dnsbl.sorbs.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rudalics[at]gmx.at) X-Debbugs-Envelope-To: 37213 Cc: Eli Zaretskii , 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) > Is the read value well-defined? Never having set it, the value it has > seems always to be 0. All margin-related values are zero by default. > But even if it is well-defined, is it useful for > anything? To keep you informed about the sizes of the margins of a window whenever the buffer will be shown in it via 'set-window-buffer'. > Yes, that's the thing. We don't have "window local variables" in Emacs, > so anything specific to a window needs a function interface with the > window being one of the parameters. Right. Windows behave like frames in this regard. > I've proposed a simple amendment to the "Display Margins" page of the > elisp manual, saying "don't use these variables to ....!". This would > solve the misunderstanding I experienced earlier. Hmm... What is the "current width of the left or right margin"? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 01 05:48:50 2019 Received: (at 37213) by debbugs.gnu.org; 1 Sep 2019 09:48:50 +0000 Received: from localhost ([127.0.0.1]:56195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4MTa-0007EX-1U for submit@debbugs.gnu.org; Sun, 01 Sep 2019 05:48:50 -0400 Received: from colin.muc.de ([193.149.48.1]:18702 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1i4MTX-0007EN-KV for 37213@debbugs.gnu.org; Sun, 01 Sep 2019 05:48:48 -0400 Received: (qmail 23691 invoked by uid 3782); 1 Sep 2019 08:55:54 -0000 Received: from acm.muc.de (p2E5D5064.dip0.t-ipconnect.de [46.93.80.100]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 01 Sep 2019 10:55:53 +0200 Received: (qmail 17865 invoked by uid 1000); 1 Sep 2019 09:48:45 -0000 Date: Sun, 1 Sep 2019 09:48:45 +0000 To: martin rudalics Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. Message-ID: <20190901094844.GB16279@ACM> References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> <20190828195706.GB4530@ACM> <263050b1-8a57-dd39-bd49-88913935f96e@gmx.at> <20190831140736.GE4822@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37213 Cc: Eli Zaretskii , 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Martin. On Sun, Sep 01, 2019 at 10:26:35 +0200, martin rudalics wrote: > > Is the read value well-defined? Never having set it, the value it has > > seems always to be 0. > All margin-related values are zero by default. > > But even if it is well-defined, is it useful for > > anything? > To keep you informed about the sizes of the margins of a window > whenever the buffer will be shown in it via 'set-window-buffer'. OK. It seems there are two alternative strategies for manipulating a window's margins. One is to use set-window-margins together with window-margins, the other is to use left/right-margin-width and set-window-buffer. > > Yes, that's the thing. We don't have "window local variables" in Emacs, > > so anything specific to a window needs a function interface with the > > window being one of the parameters. > Right. Windows behave like frames in this regard. > > I've proposed a simple amendment to the "Display Margins" page of the > > elisp manual, saying "don't use these variables to ....!". This would > > solve the misunderstanding I experienced earlier. > Hmm... What is the "current width of the left or right margin"? I'm not sure I understand the question. In a given window with a left margin, there will be a maximum length of string which can be displayed in that margin. That is its "current width". The same for a right margin. What are you getting at, here? > martin -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 01 08:20:03 2019 Received: (at 37213) by debbugs.gnu.org; 1 Sep 2019 12:20:03 +0000 Received: from localhost ([127.0.0.1]:56227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Opv-0004UP-1I for submit@debbugs.gnu.org; Sun, 01 Sep 2019 08:20:03 -0400 Received: from mout.gmx.net ([212.227.15.19]:38249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4Opo-0004Tk-3h for 37213@debbugs.gnu.org; Sun, 01 Sep 2019 08:19:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1567340378; bh=7koodoukFnyrKZIJGXwcHL+Faecjp6PnHd6A5mqLfj8=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=Vh5HaCM3PjM7KdsnXh70RvhBIxffFYglS6+awnuM6khGhhkJcFRlBsElIPA30dG3j IFfQtKEa1c1NRyoLGu0T+yIWxPx1dWPFsbkGUFYWlDGqWt7AOBOcTb914CW2wDn7Xy baPvXovO43BKNQWqPHYRcK1Msye4uDvW7Cz2mZSc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.101] ([212.95.5.38]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mkpav-1iShdN1bPL-00mGoV; Sun, 01 Sep 2019 14:19:38 +0200 Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. To: Alan Mackenzie References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> <20190828195706.GB4530@ACM> <263050b1-8a57-dd39-bd49-88913935f96e@gmx.at> <20190831140736.GE4822@ACM> <20190901094844.GB16279@ACM> From: martin rudalics Message-ID: Date: Sun, 1 Sep 2019 14:19:37 +0200 MIME-Version: 1.0 In-Reply-To: <20190901094844.GB16279@ACM> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:CFz09W0nNlns07oqDd7GcSc4tMhikD0APaNAGNGKbIe2Q3010ru Pu7LgvVhjp+IyV4Kx4mAHoGlXAHAiHcA8xkxLQgKbajuk7EAvmLLDTcZOkqc4FeBU3jnNt/ 7RSArz9Sn2gt53VbJSoMtBy76E/6v+umvNzSpc8z9O4njwli7GjzHGF60/0TJEwQWqihD4K kyzjxfQyvr4D5wY0VW8+A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Ov0fJCxnW8w=:W5YVlb/W+dSLjmuXohmNCO nCqvIeXZ1sRAQFWOfr4aMzt9wrutt4zhuiq4amnxEP3vUJ2Iq3/iLKeP/GbVDrX8Z6wnQOP+Z YszHhpyeWgfWiGEST+T52kSnV9YhtEEYMVLGVQiFevJq1MmbkqzaXbfma6Q8L4NS35C+HXu9G yBRbWYdi1k6vmTfFYFr3WPKr7ZWy5G0X6Zy0H4Zk9OFa9r7a3/iF5qM1Q6SZTuXB0hInFkiHr 4YxB+bXvBo3/mTjJbFWG8f499dGtfi+XpgXXaJtZNf8mThh4DLlTsgNOXHmykFcPNV6i/RIPl CnobFAm0HmpLOgSWH2Gho7KJOrIssfFimrIPQsqTmQZJYnWwEMoCrcC7xI/Zf9dz1ozYdS3DU Hz9ubn4vWqJhNZDSKpu5LdNNwVuikhkznW3FzkUu0yBKMPe7UpkS4iiTxucERO3rJecMjk/Af y2bGTc24nK1313WSoNKq8OMfTMiZ0wBpfIM95oTr929YXxvHF+gSX0JqT8ApsSab7AKHcDl3e vmYHM/Vom3uMdEZT75y5w+e5vcZJOj19MEGpq+1FLWl+OfoTNarYXLtyEfIpdIpg07xo02N+B M1jvtg8jVYBJ7PPT2jk1TkPncDErrqUj1g3/uQHT6L+7/9CRd5W3wgVu5xtdNNtudZ3xVjWLG qt2n8YstFC2GnJudGyPy9fv1/jpEPz8QLHYaY8c+3Zcky7xTjcKVDzH0E0RJsedk8oF6r6hgX 4H6r5D7OOB4DIJl0O+eX+se/YYPqFsn8wR4QnM/31rjorZoHONiu707QZNRVywCAIediLx4nW ZquIKF4FiDbM8MX8kfT5DTuFLaO0qGncLxkfcB0YtbCU5QXUpIR9tClvF5UIz8dIJoJReCdYD ixIAbBDzv0KF78WRI4a9p7MfmV5AyFcLImqjTbkcYM4wE4ZGKYeY6OQkGQ/1Ivt56VGY03F2O dXQDvMqHHFwAV44C+DKhWUuxKVZbCgX//E0uBEqEjjjFY2R98joaE6Kkcq8ax+Ff2Ndja5axS tISRkt8TyMMkaS6RDomn+sMBHcUDvenIwdiLquh0qtP3/ZRCtZI26sqcgqlwbaxLlu85PDya8 KOI3WdyO2YKkXGn4IrEd8YhPYwv+fV35VWmsMhbZc7IipPl0LDm1QfElJ9sl+oOmXVxVWAeKo R2r/ZZXy1jFzywX3YcwtPxEyh+bQagNimlQmWv4ZUianB1Yg== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37213 Cc: Eli Zaretskii , 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > OK. It seems there are two alternative strategies for manipulating a > window's margins. One is to use set-window-margins together with > window-margins, the other is to use left/right-margin-width and > set-window-buffer. Right. With fringes and scroll bars you can additionally set a frame parameter. I know that you're not interested in the latter but any descriptions should be consistent. >> Hmm... What is the "current width of the left or right margin"? > > I'm not sure I understand the question. In a given window with a left > margin, there will be a maximum length of string which can be displayed > in that margin. That is its "current width". The same for a right > margin. What are you getting at, here? That you omitted the "In a given window" preamble in the manual. When you have a frame with two windows showing one and the same buffer, the margins of these windows can have different widths. What would be the "current width" in that case? martin From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 01 08:42:54 2019 Received: (at 37213) by debbugs.gnu.org; 1 Sep 2019 12:42:54 +0000 Received: from localhost ([127.0.0.1]:56233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4PC2-00054K-2A for submit@debbugs.gnu.org; Sun, 01 Sep 2019 08:42:54 -0400 Received: from colin.muc.de ([193.149.48.1]:13019 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1i4PBx-000549-Dn for 37213@debbugs.gnu.org; Sun, 01 Sep 2019 08:42:50 -0400 Received: (qmail 27373 invoked by uid 3782); 1 Sep 2019 11:49:56 -0000 Received: from acm.muc.de (p2E5D5064.dip0.t-ipconnect.de [46.93.80.100]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 01 Sep 2019 13:49:53 +0200 Received: (qmail 30512 invoked by uid 1000); 1 Sep 2019 12:42:45 -0000 Date: Sun, 1 Sep 2019 12:42:45 +0000 To: martin rudalics Subject: Re: bug#37213: Execute set-window-margins. left-margin-width remains 0. Message-ID: <20190901124245.GC16279@ACM> References: <20190828185352.GA4530@ACM> <83r255ayq9.fsf@gnu.org> <20190828195706.GB4530@ACM> <263050b1-8a57-dd39-bd49-88913935f96e@gmx.at> <20190831140736.GE4822@ACM> <20190901094844.GB16279@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37213 Cc: Eli Zaretskii , 37213@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Martin. On Sun, Sep 01, 2019 at 14:19:37 +0200, martin rudalics wrote: > > OK. It seems there are two alternative strategies for manipulating a > > window's margins. One is to use set-window-margins together with > > window-margins, the other is to use left/right-margin-width and > > set-window-buffer. > Right. With fringes and scroll bars you can additionally set a frame > parameter. I know that you're not interested in the latter but any > descriptions should be consistent. None of this is simple. > >> Hmm... What is the "current width of the left or right margin"? > > I'm not sure I understand the question. In a given window with a left > > margin, there will be a maximum length of string which can be displayed > > in that margin. That is its "current width". The same for a right > > margin. What are you getting at, here? > That you omitted the "In a given window" preamble in the manual. When > you have a frame with two windows showing one and the same buffer, the > margins of these windows can have different widths. What would be the > "current width" in that case? Whatever it is, you can't get it reliably from left/right-margin-width. You can get it by calling window-margins, and as window-margins takes a window as a mandatory argument, that surely answers the question. The point about the extra text I put in is to emphasise that Emacs does not update left/right-margin-width to reflect the current width (in whatever sense). The former text was not clear about this point. I don't think the current text needs further amendment. If you disagree, perhaps you could propose a specific change. > martin -- Alan Mackenzie (Nuremberg, Germany). From unknown Tue Aug 19 07:27:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 30 Sep 2019 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator