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#29279: Sharing the margins Date: Mon, 13 Nov 2017 20:29:42 +0200 Message-ID: <83o9o6kp61.fsf@gnu.org> References: <0a54e927-cab1-1f1d-4996-85bb36949a33@yandex.ru> <83375imbaa.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1510597816 27915 195.159.176.226 (13 Nov 2017 18:30:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2017 18:30:16 +0000 (UTC) Cc: 29279@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 13 19:30:11 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 1eEJUl-0006u1-SY for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Nov 2017 19:30:07 +0100 Original-Received: from localhost ([::1]:55858 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEJUt-0004yl-89 for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Nov 2017 13:30:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEJUl-0004uh-Tl for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 13:30:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEJUh-0006GE-9c for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 13:30:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58371) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEJUh-0006Fj-5b for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 13:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eEJUg-0004ID-U6 for bug-gnu-emacs@gnu.org; Mon, 13 Nov 2017 13:30: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: Mon, 13 Nov 2017 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29279 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29279-submit@debbugs.gnu.org id=B29279.151059778816454 (code B ref 29279); Mon, 13 Nov 2017 18:30:02 +0000 Original-Received: (at 29279) by debbugs.gnu.org; 13 Nov 2017 18:29:48 +0000 Original-Received: from localhost ([127.0.0.1]:38819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEJUR-0004HG-Rl for submit@debbugs.gnu.org; Mon, 13 Nov 2017 13:29:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:60017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEJUP-0004H4-UI for 29279@debbugs.gnu.org; Mon, 13 Nov 2017 13:29:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEJUG-0005w8-6H for 29279@debbugs.gnu.org; Mon, 13 Nov 2017 13:29:40 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEJUG-0005vy-2n; Mon, 13 Nov 2017 13:29:36 -0500 Original-Received: from [176.228.60.248] (port=2044 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eEJUF-0008Mt-H0; Mon, 13 Nov 2017 13:29:35 -0500 In-reply-to: (message from Dmitry Gutov on Mon, 13 Nov 2017 19:54:45 +0200) 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:139838 Archived-At: > Cc: 29279@debbugs.gnu.org > From: Dmitry Gutov > Date: Mon, 13 Nov 2017 19:54:45 +0200 > > > ORDINAL is the optional ordinal number of the requested area, counted > > from left to right. Negative ordinal numbers count from right to > > left. Zero means the value of COLS is the maximum width of the > > marginal area, and no separate allocation is requested. > > ORDINAL meaning the same as "order priority"? Yes. > And the lower the value is, the more "left" the column should be > positioned? Sounds OK to me. Yes. > I'm not sure I understand the "Zero means ..." passage, though. That's your "total width" thing, for margin users that just want to set the overall width of the margins without displaying anything there. Like Joost Kramer's visual-fill-column and similar packages. > In addition to signifying a neutral position, does it supposed to switch > the meaning of this function into something that > set-right-margin/set-left-margin can call, for backward compatibility? Yes, set-window-margins will most probably be reimplemented by calling the above. > Seems like a wart, using ORDINAL this way. And what's going to happen > when somebody else calls window-margin-add with non-zero ORDINAL? Will > the end result depend on which call happens first? Yes. And the result is returned, so the caller knows that. If you have better ideas for requesting a particular position in the margin, let's hear them. > > Value is the actual positive ordinal number of the allocated area." > > Return value? Yes. > > If the stuff (text, image, etc.) to be displayed in a specified > > portion of the marginal area is too wide and doesn't fit the width of > > the portion, it will be truncated; if it is narrower, it will be > > padded. > > Padded from the left or from the right? :) On the right. > Here's an interesting question: after such an API is added, will it be > feasible to re-implement display-line-numbers-mode using a margin > column, instead of the special separate area? Yes. But using margins from Emacs internals means that the window-parameters which hold the column specs will change behind the back of the Lisp applications, which I'm not sure is a Good Thing. It will also be somewhat slower.