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#28771: 26.0.60; A couple space display property feature requests Date: Tue, 10 Oct 2017 22:12:39 +0300 Message-ID: <83k202q0k8.fsf@gnu.org> References: <87fuarc0px.fsf@gmail.com> <83efqbqz1n.fsf@gnu.org> <87tvz6dh26.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507662854 5016 195.159.176.226 (10 Oct 2017 19:14:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 10 Oct 2017 19:14:14 +0000 (UTC) Cc: 28771@debbugs.gnu.org To: Alex Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 10 21:14: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 1e1zyd-0008R0-C5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Oct 2017 21:14:03 +0200 Original-Received: from localhost ([::1]:36732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1zyk-0003Rj-NT for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Oct 2017 15:14:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1zyf-0003RZ-EB for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2017 15:14:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1zyc-0006LP-6h for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2017 15:14:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52250) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1zyc-0006LL-3O for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2017 15:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e1zyb-0005rb-RC for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2017 15:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Oct 2017 19:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28771 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28771-submit@debbugs.gnu.org id=B28771.150766279722461 (code B ref 28771); Tue, 10 Oct 2017 19:14:01 +0000 Original-Received: (at 28771) by debbugs.gnu.org; 10 Oct 2017 19:13:17 +0000 Original-Received: from localhost ([127.0.0.1]:60931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1zxs-0005qD-Rg for submit@debbugs.gnu.org; Tue, 10 Oct 2017 15:13:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1zxq-0005q0-4L for 28771@debbugs.gnu.org; Tue, 10 Oct 2017 15:13:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1zxh-0005zI-IZ for 28771@debbugs.gnu.org; Tue, 10 Oct 2017 15:13:08 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1zxh-0005zC-F6; Tue, 10 Oct 2017 15:13:05 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2671 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e1zxf-00079Z-NT; Tue, 10 Oct 2017 15:13:05 -0400 In-reply-to: <87tvz6dh26.fsf@gmail.com> (message from Alex on Tue, 10 Oct 2017 11:54:41 -0600) 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:138191 Archived-At: > From: Alex > Cc: 28771@debbugs.gnu.org > Date: Tue, 10 Oct 2017 11:54:41 -0600 > > 1. There is currently no robust way to specify a pixel width to the > center or left/right edge of the text area in the 'space' display spec. There's some kind of miscommunication here. For starters, what do you mean by "text area"? For me, "text area" is the area of the window inside the fringes, see the definition in "(elisp)Frame Layout". But you must mean something else, because with my interpretation, specifying pixel width of the text area makes no sense: it is determined by the window dimensions. > This is because there's no way to tell what's before the left edge of > the text area. If there's a left-side scroll-bar, then its width > should be included; but if it's on the right, its width shouldn't be. This is only true for a header-line and mode-line, right? Because the rest of the window lines don't change their alignment when the scroll bar switches sides, as their pixel count starts where the left fringe ends, whether or not there's a scroll bar to the left of the fringe. > As for an example, try this in a graphical emacs -Q: > > (setq header-line-format > (propertize > (concat (propertize " " > 'display > '(space :align-to 0)) > "Test" > (propertize " " > 'display > '(space :width (+ left-fringe left-margin)))) > 'face 'highlight)) > > > By default, the spaces before and after test are equally sized. Again, there's some misunderstanding here, because this example shows "Text" in the header-line flushed all the way to the left, with only one space before "Test", to account for the left fringe (if I turn off fringe-mode, that space disappears). That's not what you are describing, so I guess the example needs some change? > if you disable fringe-mode or enable margins (e.g. linum-mode), the > spaces are equal. However, try setting the scroll-bar to appear on > the left. Now, the left space is noticeably bigger than the right. And again, this is limited to header-line, right? > 2. Suppose you want to align a string to the right edge of the window. What is "the right edge of the window" in this context? > Can you put overlays in the header-line? No, header-line (as any other Lisp string) can only have text properties. > That's my use-case at the moment. If you are talking only about header lines, maybe the solution (if we need one) doesn't have to be such a general one. Are there similar problems with other lines in a window? > Is there currently no display spec that allows for appending/prepending > (or would it be hard to add)? Appending/prepending what and to what kind of text/object? Sorry, maybe it's too late, but I have trouble following your descriptions :-(