From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?SsO2cmc=?= Sommer Newsgroups: gmane.emacs.help Subject: Why is `(1 . width)` zero? Date: Mon, 18 Jan 2021 09:51:13 +0100 Message-ID: <20210118085113.7rz2pnm2t5sn7y3k@jo-so.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7ipahntbntjunmxj" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40135"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 18 15:50:02 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1Vr0-000ALZ-Hy for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 18 Jan 2021 15:50:02 +0100 Original-Received: from localhost ([::1]:34710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1Vqz-0001Ht-Ie for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 18 Jan 2021 09:50:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1QG0-0005Lp-Nh for help-gnu-emacs@gnu.org; Mon, 18 Jan 2021 03:51:28 -0500 Original-Received: from jo-so.de ([2a03:4000:8:213::1]:47977 helo=s1.jo-so.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1QFv-00006h-2D for help-gnu-emacs@gnu.org; Mon, 18 Jan 2021 03:51:25 -0500 Original-Received: from mail-relay (helo=jo-so.de) by s1.jo-so.de with local-bsmtp (Exim 4.92) (envelope-from ) id 1l1QFn-0000pj-Hg for help-gnu-emacs@gnu.org; Mon, 18 Jan 2021 09:51:15 +0100 Original-Received: from joerg by zenbook.jo-so.de with local (Exim 4.94) (envelope-from ) id 1l1QFl-002eb1-SE for help-gnu-emacs@gnu.org; Mon, 18 Jan 2021 09:51:13 +0100 Content-Disposition: inline Received-SPF: pass client-ip=2a03:4000:8:213::1; envelope-from=joerg@jo-so.de; helo=s1.jo-so.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 18 Jan 2021 09:49:32 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127286 Archived-At: --7ipahntbntjunmxj Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Why is `(1 . width)` zero? MIME-Version: 1.0 Hi, I'm using GNU Emacs=C2=A027.1=C2=B9 with X and the font DejaVu Sans Mono. I= would like to align a text on the right side and thought I can use this: ```lisp (let* ((text " abcd") (len (length text)) ) (add-text-properties 0 1 `(display (space :align-to (- text (,len . width= )))) text) (insert "\n" (format "%S" text) "\n" text "\n")) ``` but it doesn't work. The text is outside the visible space. Similar with a text that should be indented: ```lisp (let ((text " abcd")) (add-text-properties 0 1 `(display (space :width (10 . width))) text) (insert "\n" (format "%S" text) "\n" text "\n")) ``` It shows up in the first column. But in the TUI it works. So, what's wrong with `width` in GUI? My main goal is to place a text on the right side that the user might scale down with face attributes: ```lisp (set-face-attribute 'lsp-ui-sideline-global nil :height 0.5) (let* ((text " abcd") (len (length text)) ) (add-text-properties 0 len '(font-lock-face (error lsp-ui-sideline-global= )) text) (add-text-properties 0 1 `(display (space :align-to (- text (,len . width= )))) text) (insert "\n" (format "%S" text) "\n" text "\n")) ``` Are there any other ways to get this? Kind regards J=C3=B6rg =C2=B9 build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.= 16.0 of 2020-11-08, modified by Debian --=20 > Definiere =E2=80=9ADemokratie=E2=80=98 =E2=80=A6 =E2=80=A6 eine Mehrheit beweist einer Minderheit, dass Widerstand zwecklos = ist. --7ipahntbntjunmxj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJMEAREIADsWIQS1pYxd0T/67YejVyF9LJoj0a6jdQUCYAVMAR0YaHR0cHM6Ly9q by1zby5kZS9wZ3Ata2V5LnR4dAAKCRB9LJoj0a6jdR+uAQCU1oWX8HPyJT0rIG1p sxnVsEV7/1H81GA0wyMoIFzuCQEAniNM3hFVWEWI+OB32WSWWOxZ5y09fnSKBDmv UPE1Zlk= =05EQ -----END PGP SIGNATURE----- --7ipahntbntjunmxj--