GNU logs - #43405, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 14 Sep 2020 19:27:02 +0000
Resent-Message-ID: <handler.43405.B.160011157119873 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 43405 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.160011157119873
          (code B ref -1); Mon, 14 Sep 2020 19:27:02 +0000
Received: (at submit) by debbugs.gnu.org; 14 Sep 2020 19:26:11 +0000
Received: from localhost ([127.0.0.1]:56287 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHu79-0005AT-FM
	for submit <at> debbugs.gnu.org; Mon, 14 Sep 2020 15:26:11 -0400
Received: from lists.gnu.org ([209.51.188.17]:38544)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1kHu77-0005AK-K5
 for submit <at> debbugs.gnu.org; Mon, 14 Sep 2020 15:26:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46642)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1kHu77-0002iJ-94
 for bug-gnu-emacs@HIDDEN; Mon, 14 Sep 2020 15:26:09 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:46629)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1kHu6v-0005Tj-Uy
 for bug-gnu-emacs@HIDDEN; Mon, 14 Sep 2020 15:26:08 -0400
X-Originating-IP: 91.129.97.241
Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241])
 (Authenticated sender: juri@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id B2FB020004
 for <bug-gnu-emacs@HIDDEN>; Mon, 14 Sep 2020 19:25:51 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
Organization: LINKOV.NET
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87mu1xrjqw.fsf@HIDDEN>
 <48ed4897-356c-4669-a330-1fdb5d65402b@default>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
Date: Mon, 14 Sep 2020 22:18:33 +0300
In-Reply-To: <83d02pbhny.fsf@HIDDEN> (Eli Zaretskii's message of "Sun, 13 Sep
 2020 22:28:17 +0300")
Message-ID: <87een4qi9i.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=217.70.183.200; envelope-from=juri@HIDDEN;
 helo=relay7-d.mail.gandi.net
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/14 15:25:52
X-ACL-Warn: Detected OS   = Linux 3.11 and newer [fuzzy]
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, RCVD_IN_MSPIKE_H2=-0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

This bug report is from emacs-devel thread:

>> Anyway, there is a bug in tool-bar code that doesn't allow to use
>> align-to, whereas align-to works perfectly when used on the tab-bar.
>> 
>> Here is the test case to reproduce the bug on the tool-bar:
>> 
>> emacs -Q and eval:
>> 
>>   (define-key-after (default-value 'tool-bar-map) [global-menu-bar]
>>     `(menu-item (propertize " " 'display '(space :align-to (- right 5)))
>>                 (lambda ()
>>                   (interactive)
>>                   (popup-menu (mouse-menu-bar-map)))
>>                 :image ,(tool-bar--image-expression "newsticker/narrow")
>>                 :help "Pop up the global menu bar"))
>>   (force-mode-line-update)
>> 
>> It doesn't align the icon to the right edge of the tool-bar
>> whereas the same code aligns it on the tab-bar.
>
> Here, the above displays nothing at all on the tool bar.

The icon is displayed only after more changes in window-configuration like
switching buffers, i.e. force-mode-line-update (copied from tool-bar-local-item)
has no effect.

Another bug?  Or should this code use both (redraw-display) and
(force-mode-line-update) like in bug#43397?




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Juri Linkov <juri@HIDDEN>
Subject: bug#43405: Acknowledgement (Tool bar item doesn't align to the
 right edge)
Message-ID: <handler.43405.B.160011157119873.ack <at> debbugs.gnu.org>
References: <87een4qi9i.fsf_-_@HIDDEN>
X-Gnu-PR-Message: ack 43405
X-Gnu-PR-Package: emacs
Reply-To: 43405 <at> debbugs.gnu.org
Date: Mon, 14 Sep 2020 19:27:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 43405 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
43405: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D43405
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 14 Sep 2020 19:35:01 +0000
Resent-Message-ID: <handler.43405.B43405.160011206620816 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160011206620816
          (code B ref 43405); Mon, 14 Sep 2020 19:35:01 +0000
Received: (at 43405) by debbugs.gnu.org; 14 Sep 2020 19:34:26 +0000
Received: from localhost ([127.0.0.1]:56319 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHuF7-0005Pe-Ra
	for submit <at> debbugs.gnu.org; Mon, 14 Sep 2020 15:34:26 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41456)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kHuF5-0005PR-AO
 for 43405 <at> debbugs.gnu.org; Mon, 14 Sep 2020 15:34:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58889)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kHuEy-0006Vc-Mw; Mon, 14 Sep 2020 15:34:16 -0400
Received: from [176.228.60.248] (port=3600 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kHuEy-0003IY-6k; Mon, 14 Sep 2020 15:34:16 -0400
Date: Mon, 14 Sep 2020 22:34:21 +0300
Message-Id: <837dsw9mpu.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87een4qi9i.fsf_-_@HIDDEN> (message from Juri Linkov on
 Mon, 14 Sep 2020 22:18:33 +0300)
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87mu1xrjqw.fsf@HIDDEN>
 <48ed4897-356c-4669-a330-1fdb5d65402b@default>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Date: Mon, 14 Sep 2020 22:18:33 +0300
> 
> >> emacs -Q and eval:
> >> 
> >>   (define-key-after (default-value 'tool-bar-map) [global-menu-bar]
> >>     `(menu-item (propertize " " 'display '(space :align-to (- right 5)))
> >>                 (lambda ()
> >>                   (interactive)
> >>                   (popup-menu (mouse-menu-bar-map)))
> >>                 :image ,(tool-bar--image-expression "newsticker/narrow")
> >>                 :help "Pop up the global menu bar"))
> >>   (force-mode-line-update)
> >> 
> >> It doesn't align the icon to the right edge of the tool-bar
> >> whereas the same code aligns it on the tab-bar.
> >
> > Here, the above displays nothing at all on the tool bar.
> 
> The icon is displayed only after more changes in window-configuration like
> switching buffers, i.e. force-mode-line-update (copied from tool-bar-local-item)
> has no effect.
> 
> Another bug?  Or should this code use both (redraw-display) and
> (force-mode-line-update) like in bug#43397?

I didn't yet look into that bug report, so I cannot say.

Btw, are you trying this in a GTK build or with some other toolkit?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: spvk <caiohcs0@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 14 Sep 2020 19:54:02 +0000
Resent-Message-ID: <handler.43405.B43405.160011323931170 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160011323931170
          (code B ref 43405); Mon, 14 Sep 2020 19:54:02 +0000
Received: (at 43405) by debbugs.gnu.org; 14 Sep 2020 19:53:59 +0000
Received: from localhost ([127.0.0.1]:56369 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kHuY3-00086f-LQ
	for submit <at> debbugs.gnu.org; Mon, 14 Sep 2020 15:53:59 -0400
Received: from mail-qk1-f194.google.com ([209.85.222.194]:41418)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <caiohcs0@HIDDEN>) id 1kHuY0-00086O-Ms
 for 43405 <at> debbugs.gnu.org; Mon, 14 Sep 2020 15:53:58 -0400
Received: by mail-qk1-f194.google.com with SMTP id g72so1532819qke.8
 for <43405 <at> debbugs.gnu.org>; Mon, 14 Sep 2020 12:53:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=IHTKP9IiIENvVmoa76f5GFA3HUcyvN1c90qx0femFqI=;
 b=Zi9KiZ0jjlSuRwVDZFUI75RbapwT1q+FNQiaXvl5P22buND629hH2pnWI0ZHbryL3p
 uVztYaKB9APhkPoEQoevRUs18vHkSfEeBNYxxyYDehXTo/1wshGIIgOoDILmWxiB08fd
 M8J+E80S5dtkSWgWQTJMOr3J67AUQCk2YgyzPVfYioprXAxPEQHrYnsHfwIme3ebVcaO
 T9jFRqFrW0IjlI8UIe6FJ1tgl8OQXYGHgDi+VYVEKyIiBEpp7hvBtMJ+lE/HOzDyhv09
 CdcBjOLe8U50gaK9DBvvuP0hZmdjeXq7L9/wDQVcXgQIfl1gf2TjlwHb4XPdslhXPydT
 UHtQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=IHTKP9IiIENvVmoa76f5GFA3HUcyvN1c90qx0femFqI=;
 b=GJYOxgohWklhZ8ZSZFmW/14c9L2JcZ3oBqaOjprzfkkR1EGLDJf1JSxyHmneTG/kZX
 Yqp5p9id1FZQnjsToA+5ZNgmM7QTUiuc/S8QI9ihcuUszJV+ivdH5zjXvIRTBqsob2hR
 SkW6oAKEHYAjMpBtDkzxBeM+eYcGlZtPYx+C2VC9BwS54nGwnMHqRxJNKIhkBCutKJi/
 G5o9rGNqwlkuaHcD/FlUlYwIhBfM45UaOwpQ+2bNhnyeUYU8zq3p0SQ6eGRUnIV2h7Ql
 SDVYXIYhQEzFLGhJuC4r4n3crW28V6J0Rh9TBcZLNYQ3qj977dmZgBGKrG3nl0e0FJmC
 PoYQ==
X-Gm-Message-State: AOAM532XT5tuAX+ZJyLYKD9wTtSuPMMdZ3enzTd8cTglz+AvEFdjCZCK
 hUEPOYtixKa0q4OxxzWI0vO/hA57/yc=
X-Google-Smtp-Source: ABdhPJylnppQNqySYfJixDxwDvEGhH6VkeWWNUBlpkQSvtGyWVFz1mjkaQ0GK5dPCwHHAHye2GQTgg==
X-Received: by 2002:a37:71c6:: with SMTP id
 m189mr14692347qkc.327.1600113230957; 
 Mon, 14 Sep 2020 12:53:50 -0700 (PDT)
Received: from localhost.localdomain ([181.223.151.236])
 by smtp.gmail.com with ESMTPSA id k23sm14992684qki.98.2020.09.14.12.53.49
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 14 Sep 2020 12:53:50 -0700 (PDT)
From: spvk <caiohcs0@HIDDEN>
X-Google-Original-From: spvk <spvk@HIDDEN>
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87mu1xrjqw.fsf@HIDDEN>
 <48ed4897-356c-4669-a330-1fdb5d65402b@default>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN>
Date: Mon, 14 Sep 2020 16:53:41 -0300
In-Reply-To: <87een4qi9i.fsf_-_@HIDDEN> (Juri Linkov's message of
 "Mon, 14 Sep 2020 22:18:33 +0300")
Message-ID: <871rj4jfsq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.2 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

Juri Linkov <juri@HIDDEN> writes:

> The icon is displayed only after more changes in window-configuration like
> switching buffers, i.e. force-mode-line-update (copied from tool-bar-local-item)
> has no effect.
>
> Another bug?  Or should this code use both (redraw-display) and
> (force-mode-line-update) like in bug#43397?

I tried all related functions that I could think of
(force-mode-line-update, redraw-display, force-mode-line-update) just to 
try to understand what is happening. I.e. I don't know what the code
should use and I don't know if this is a bug.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 15 Sep 2020 18:19:02 +0000
Resent-Message-ID: <handler.43405.B43405.160019389030203 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160019389030203
          (code B ref 43405); Tue, 15 Sep 2020 18:19:02 +0000
Received: (at 43405) by debbugs.gnu.org; 15 Sep 2020 18:18:10 +0000
Received: from localhost ([127.0.0.1]:60539 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kIFWs-0007r4-GT
	for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 14:18:10 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:57773)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1kIFWr-0007qZ-2q
 for 43405 <at> debbugs.gnu.org; Tue, 15 Sep 2020 14:18:09 -0400
X-Originating-IP: 91.129.97.241
Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241])
 (Authenticated sender: juri@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 5665EC0004;
 Tue, 15 Sep 2020 18:18:01 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
Organization: LINKOV.NET
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87mu1xrjqw.fsf@HIDDEN>
 <48ed4897-356c-4669-a330-1fdb5d65402b@default>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
Date: Tue, 15 Sep 2020 21:14:45 +0300
In-Reply-To: <837dsw9mpu.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 14 Sep
 2020 22:34:21 +0300")
Message-ID: <87r1r3ncwq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Btw, are you trying this in a GTK build or with some other toolkit?

I tried both GTK and no-toolkit, and it can't align the icon to the right
on the tool-bar.

Whereas the same code nicely alights the icon on the tab-bar:

(progn
  (tab-bar-mode)
  (advice-add
   'tab-bar-make-keymap-1 :around
   (lambda (orig-fun)
     (append (funcall orig-fun)
	     `((menu-bar
		menu-item
		,(concat
		  (propertize " " 'display '(space :align-to (- right 5)))
		  (propertize " " 'display
			      '(image :type xpm
				      :file "newsticker/narrow.xpm")))
		(lambda ()
		  (interactive)
		  (popup-menu (mouse-menu-bar-map)))))))
   '((name . tab-bar-menu-bar))))




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 15 Sep 2020 18:40:01 +0000
Resent-Message-ID: <handler.43405.B43405.160019516532124 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Juri Linkov <juri@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160019516532124
          (code B ref 43405); Tue, 15 Sep 2020 18:40:01 +0000
Received: (at 43405) by debbugs.gnu.org; 15 Sep 2020 18:39:25 +0000
Received: from localhost ([127.0.0.1]:60563 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kIFrR-0008M4-4F
	for submit <at> debbugs.gnu.org; Tue, 15 Sep 2020 14:39:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57910)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kIFrO-0008Lq-Au
 for 43405 <at> debbugs.gnu.org; Tue, 15 Sep 2020 14:39:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51319)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kIFrI-0005qV-Fg; Tue, 15 Sep 2020 14:39:16 -0400
Received: from [176.228.60.248] (port=4666 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kIFrH-0004kb-Ov; Tue, 15 Sep 2020 14:39:16 -0400
Date: Tue, 15 Sep 2020 21:39:22 +0300
Message-Id: <83a6xq995x.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87r1r3ncwq.fsf@HIDDEN> (message from Juri Linkov on
 Tue, 15 Sep 2020 21:14:45 +0300)
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87mu1xrjqw.fsf@HIDDEN>
 <48ed4897-356c-4669-a330-1fdb5d65402b@default>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: 43405 <at> debbugs.gnu.org
> Date: Tue, 15 Sep 2020 21:14:45 +0300
> 
> > Btw, are you trying this in a GTK build or with some other toolkit?
> 
> I tried both GTK and no-toolkit, and it can't align the icon to the right
> on the tool-bar.
> 
> Whereas the same code nicely alights the icon on the tab-bar:
> 
> (progn
>   (tab-bar-mode)
>   (advice-add
>    'tab-bar-make-keymap-1 :around
>    (lambda (orig-fun)
>      (append (funcall orig-fun)
> 	     `((menu-bar
> 		menu-item
> 		,(concat
> 		  (propertize " " 'display '(space :align-to (- right 5)))
> 		  (propertize " " 'display
> 			      '(image :type xpm
> 				      :file "newsticker/narrow.xpm")))
> 		(lambda ()
> 		  (interactive)
> 		  (popup-menu (mouse-menu-bar-map)))))))
>    '((name . tab-bar-menu-bar))))

I think you forget how the tool bar is displayed.  In the versions of
Emacs that produce our native tool bar, the tool bar is displayed by
displaying a Lisp string made of spaces, where each space has a
display property which specifies the icon to display.  Your code puts
the :align-to properties on menu item's name, but that name is not
used at all for the display of tool bar, so it has no effect.  What
you need is to put the :align-to property on the respective space of
the Lisp string used to display the tool bar.  I don't think this can
be done in Lisp, we need support on the C level.

In the versions of Emacs that use the so-called "external tool bar",
like the GTK build, I don't see how :align-to can have any effect at
all; we need instead to use GTK facilities to arrange the buttons
(assuming that such facilities exist and are available to Emacs).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Juri Linkov <juri@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 16 Sep 2020 20:00:03 +0000
Resent-Message-ID: <handler.43405.B43405.160028640132483 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160028640132483
          (code B ref 43405); Wed, 16 Sep 2020 20:00:03 +0000
Received: (at 43405) by debbugs.gnu.org; 16 Sep 2020 20:00:01 +0000
Received: from localhost ([127.0.0.1]:36209 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kIday-0008Ro-LS
	for submit <at> debbugs.gnu.org; Wed, 16 Sep 2020 16:00:00 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:33713)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1kIdar-0008R3-9b
 for 43405 <at> debbugs.gnu.org; Wed, 16 Sep 2020 15:59:58 -0400
X-Originating-IP: 91.129.108.13
Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13])
 (Authenticated sender: juri@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id A766AC0003;
 Wed, 16 Sep 2020 19:59:45 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
Organization: LINKOV.NET
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87mu1xrjqw.fsf@HIDDEN>
 <48ed4897-356c-4669-a330-1fdb5d65402b@default>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
Date: Wed, 16 Sep 2020 22:29:54 +0300
In-Reply-To: <83a6xq995x.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 15 Sep
 2020 21:39:22 +0300")
Message-ID: <87363ies65.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> I think you forget how the tool bar is displayed.  In the versions of
> Emacs that produce our native tool bar, the tool bar is displayed by
> displaying a Lisp string made of spaces, where each space has a
> display property which specifies the icon to display.  Your code puts
> the :align-to properties on menu item's name, but that name is not
> used at all for the display of tool bar, so it has no effect.  What
> you need is to put the :align-to property on the respective space of
> the Lisp string used to display the tool bar.  I don't think this can
> be done in Lisp, we need support on the C level.

Actually, I didn't forget how the tool bar is displayed, but hoped
that maybe somehow this is still possible.

> In the versions of Emacs that use the so-called "external tool bar",
> like the GTK build, I don't see how :align-to can have any effect at
> all; we need instead to use GTK facilities to arrange the buttons
> (assuming that such facilities exist and are available to Emacs).

AFAIK, the GTK build supports 4 positions of the tool-bar:
'top', 'bottom' 'left', 'right'.  I can't imagine how the
Hamburger menu icon should be aligned for a tool-bar position
different from the default 'top'.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 17 Sep 2020 09:04:01 +0000
Resent-Message-ID: <handler.43405.B43405.160033343918011 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160033343918011
          (code B ref 43405); Thu, 17 Sep 2020 09:04:01 +0000
Received: (at 43405) by debbugs.gnu.org; 17 Sep 2020 09:03:59 +0000
Received: from localhost ([127.0.0.1]:37304 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kIppf-0004gR-4P
	for submit <at> debbugs.gnu.org; Thu, 17 Sep 2020 05:03:59 -0400
Received: from mail-wm1-f42.google.com ([209.85.128.42]:35433)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1kIppa-0004gB-Sj
 for 43405 <at> debbugs.gnu.org; Thu, 17 Sep 2020 05:03:57 -0400
Received: by mail-wm1-f42.google.com with SMTP id y15so1236068wmi.0
 for <43405 <at> debbugs.gnu.org>; Thu, 17 Sep 2020 02:03:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-transfer-encoding;
 bh=+5szUSUS+tGmIqe2UtfsYmKmTdEa/QhoC0WjIQ/5CI0=;
 b=br8g5U2JA3u3TxPzt5GN40NYKWewZfOE0EgOjidNS9qgzS7kOwVkeYg7OjLAxiuoS8
 CzX0xZKQ4opbXbvCKYJ3qc/anVjiKKpmt6JHGCrgmjDgbHAbKJvfNpXCO718DG9IMk8C
 3k8DmMC2GlwrcKERX+oTPDcCASgXIKnBenoLIVNlJ88lULmzS7L0YSPbQmJs4YsGrWxD
 0epXnIghSPYmsEDyUVbgfslq4Hfm8xiSxINpLuVc/mLOcASjLXJnKsptoSAuVEls9Qk3
 OZIlBYBGHiEQogl8+SDG3gFDFk7t163jwuSUbmdcPcutMCH1XhtEf7Z1zsdpAUfks+RH
 UYkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version:content-transfer-encoding;
 bh=+5szUSUS+tGmIqe2UtfsYmKmTdEa/QhoC0WjIQ/5CI0=;
 b=jneneDP+jsXM5f4ghBpkBuWmpxRQ3/kFdUmI7B3Pg+bDksGhCi+0+TWReM4uqLAVIA
 +NSHD133qO4NMe547l/GM11MR5/v+vYRGTmrvr1xGZfhZqHz0pDcznIme0LcSYMu+0l8
 /KgE7UEdeMHbXahuG7e/EuJpGLofhSznKqDEBJdlIeOdWeMh5gB7XmhLGT3z70wTCPqN
 /O8mK3RIkLB7tQhQVhITve8vbq2e6KhZfXLbgav8eAUJ7sVaIFomJdb27yl8HgNFpjiw
 X+xsoCg+pdD3rsjdiRTaN2QAHxSv0hUkd1MwhgNr1fX9DwoJ1lp0Hev4fj97sMiU1mnT
 GK3A==
X-Gm-Message-State: AOAM5327MGIgI7iAtcxx9m1h5Llt9mAJvcpVF90vkaoLXkgJ0jF8gzeI
 bkiwVyA6vOXuY8vSTi5+0zF3+owme4g=
X-Google-Smtp-Source: ABdhPJyHdgxpKcJlzikkrz13PZCQPvOR5fGk+r07szwBgb7i6t+Fi5w4GcY2QSGSmGsi8d4G1DILgQ==
X-Received: by 2002:a1c:e40b:: with SMTP id b11mr8257834wmh.100.1600333428435; 
 Thu, 17 Sep 2020 02:03:48 -0700 (PDT)
Received: from rpluim-mac ([2a01:e34:ecfc:a860:99bb:88d4:2cf6:2ab9])
 by smtp.gmail.com with ESMTPSA id l10sm10018811wmh.27.2020.09.17.02.03.46
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 17 Sep 2020 02:03:47 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87mu1xrjqw.fsf@HIDDEN>
 <48ed4897-356c-4669-a330-1fdb5d65402b@default>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
Date: Thu, 17 Sep 2020 11:03:46 +0200
In-Reply-To: <83a6xq995x.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 15 Sep
 2020 21:39:22 +0300")
Message-ID: <m24knw7p1p.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Tue, 15 Sep 2020 21:39:22 +0300, Eli Zaretskii <eliz@HIDDEN> said:

    Eli> In the versions of Emacs that use the so-called "external tool bar=
",
    Eli> like the GTK build, I don't see how :align-to can have any effect =
at
    Eli> all; we need instead to use GTK facilities to arrange the buttons
    Eli> (assuming that such facilities exist and are available to Emacs).

The GTK code just adds items to the toolbar in order. It=CA=BCs possible in
GTK to specify negative positions for toolbar items, but that just
means 'append', not 'align to right border' as far as I can see.

Hmm, if we were to use a 'header bar' rather than a 'tool bar', we
could use css to specify whether individual items are right or left
aligned. I=CA=BCll leave that exercise up to someone else.

Robert




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 17 Sep 2020 13:46:02 +0000
Resent-Message-ID: <handler.43405.B43405.160035031320675 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Robert Pluim <rpluim@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160035031320675
          (code B ref 43405); Thu, 17 Sep 2020 13:46:02 +0000
Received: (at 43405) by debbugs.gnu.org; 17 Sep 2020 13:45:13 +0000
Received: from localhost ([127.0.0.1]:37580 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kIuDp-0005NP-Dz
	for submit <at> debbugs.gnu.org; Thu, 17 Sep 2020 09:45:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53084)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kIuDo-0005NC-1x
 for 43405 <at> debbugs.gnu.org; Thu, 17 Sep 2020 09:45:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36327)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kIuDi-0006uA-IH; Thu, 17 Sep 2020 09:45:06 -0400
Received: from [176.228.60.248] (port=3862 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kIuDh-0007p0-E5; Thu, 17 Sep 2020 09:45:05 -0400
Date: Thu, 17 Sep 2020 16:45:16 +0300
Message-Id: <831rj07c0j.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m24knw7p1p.fsf@HIDDEN> (message from Robert Pluim on Thu, 17
 Sep 2020 11:03:46 +0200)
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87mu1xrjqw.fsf@HIDDEN>
 <48ed4897-356c-4669-a330-1fdb5d65402b@default>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: Juri Linkov <juri@HIDDEN>,  43405 <at> debbugs.gnu.org
> Date: Thu, 17 Sep 2020 11:03:46 +0200
> 
> >>>>> On Tue, 15 Sep 2020 21:39:22 +0300, Eli Zaretskii <eliz@HIDDEN> said:
> 
>     Eli> In the versions of Emacs that use the so-called "external tool bar",
>     Eli> like the GTK build, I don't see how :align-to can have any effect at
>     Eli> all; we need instead to use GTK facilities to arrange the buttons
>     Eli> (assuming that such facilities exist and are available to Emacs).
> 
> The GTK code just adds items to the toolbar in order. Itʼs possible in
> GTK to specify negative positions for toolbar items, but that just
> means 'append', not 'align to right border' as far as I can see.

Thanks.

If we cannot control the placement of icons on GTK, then I guess it
makes little sense to add features to do this in our native tool bar,
since most users will be unable to take advantage of it.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 17 Sep 2020 14:44:02 +0000
Resent-Message-ID: <handler.43405.B43405.16003538272987 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.16003538272987
          (code B ref 43405); Thu, 17 Sep 2020 14:44:02 +0000
Received: (at 43405) by debbugs.gnu.org; 17 Sep 2020 14:43:47 +0000
Received: from localhost ([127.0.0.1]:38557 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kIv8V-0000m7-51
	for submit <at> debbugs.gnu.org; Thu, 17 Sep 2020 10:43:47 -0400
Received: from mail-wr1-f46.google.com ([209.85.221.46]:44194)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1kIv8T-0000lo-KN
 for 43405 <at> debbugs.gnu.org; Thu, 17 Sep 2020 10:43:46 -0400
Received: by mail-wr1-f46.google.com with SMTP id s12so2360360wrw.11
 for <43405 <at> debbugs.gnu.org>; Thu, 17 Sep 2020 07:43:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-transfer-encoding;
 bh=FFtEHTfaRIgf8OytDQVhYmdmwY+2H/8LXcHz4oGJOjI=;
 b=r/CXkWfmvEb8byJgcClwZ541qGfRSschSsmHrVqH7z4d2bYFo4Da1It2iTOPbx4dXd
 S+PnfTkP7BTNPrpxTeOT64//RpPFiLYOx/e/Yeswo4GoX2+dic6Yr43G7NG4kSbJ4raG
 VJGTggpmYJWZCVzGCuKZkGUZC+z1uY95e9xsWiNziHbazytGvt94vdGuplu8eRvWzDvQ
 Ji1gNgLbE5aHb+Adbq2K/Es33VZl4odEqWbWLEYAjyqSnqX6hy1yfKt6vLyTT9tLj6MR
 i3NQtXikjkk/2ZAINNeDnfLRYN4OxG/0wu+NfN3cEE2csTyGpXJMBQQHGUOwD9o1Sdps
 9qYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version:content-transfer-encoding;
 bh=FFtEHTfaRIgf8OytDQVhYmdmwY+2H/8LXcHz4oGJOjI=;
 b=Ju+mqGEVLl8YnCiJW6/wNN0bL7w6REEOauWBpog6p+Pkm4hF0inOhf8RQuO3XREdi7
 ErKN3dBEmVYKpNR3BnghOOhTxdUaH6SelvhYwH2qYBfmvIW7Wl6aEbtcwfItE+XPgJ+F
 73++xaEF4Is3c3JKZF5QMAtHs3qjOJJuHZISY14fvlOp3IhhvoaxJrhz01vZqzf8mTx4
 sqDRJti4zT6hPB29UMuiT6IPkM+nj9oGFip6ejTYlXtCmPi0ommgR7pdLrhgc4oqzQbD
 tg5YEnq0ZBvuK1eazSarPRbHU3qJRKnVT2MqMGA+s5Y0WPJvYzXPdUUV8VfnQOzkuzQR
 sxXg==
X-Gm-Message-State: AOAM532ZMkb4ziShq4k2AkiXq6amqWwR/0H0V9cxqd2cG4M72xDdnlBK
 l0lg/D6Y9brU0HCspqDOfys=
X-Google-Smtp-Source: ABdhPJyagPThm/hESAQdNMzDKLq7qILtJ8cCqa27ao1eosw7UWu0nYFFoOY9fEZ3oK1PiqVj0Xg+xQ==
X-Received: by 2002:adf:81e6:: with SMTP id 93mr32395466wra.412.1600353819647; 
 Thu, 17 Sep 2020 07:43:39 -0700 (PDT)
Received: from rpluim-mac ([2a01:e34:ecfc:a860:99bb:88d4:2cf6:2ab9])
 by smtp.gmail.com with ESMTPSA id 185sm12189819wma.18.2020.09.17.07.43.37
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 17 Sep 2020 07:43:38 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
Date: Thu, 17 Sep 2020 16:43:37 +0200
In-Reply-To: <831rj07c0j.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 17 Sep
 2020 16:45:16 +0300")
Message-ID: <m2ft7g5uqu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Thu, 17 Sep 2020 16:45:16 +0300, Eli Zaretskii <eliz@HIDDEN> said:

    >> The GTK code just adds items to the toolbar in order. It=CA=BCs poss=
ible in
    >> GTK to specify negative positions for toolbar items, but that just
    >> means 'append', not 'align to right border' as far as I can see.

    Eli> Thanks.

    Eli> If we cannot control the placement of icons on GTK, then I guess it
    Eli> makes little sense to add features to do this in our native tool b=
ar,
    Eli> since most users will be unable to take advantage of it.

Actually we *can* control the placement of the icons on the GTK
toolbar, as it turns out. Buried in the fine print is this sentence:

    If the GtkToolbar child property "expand" is TRUE and the property
    "draw" is set to FALSE, the effect is to force all following items to
    the end of the toolbar.

So if you do the following, all toolbar items added after this
separator end up on the right:

      ti =3D gtk_separator_tool_item_new ();
      gtk_tool_item_set_expand (ti, true);
      gtk_separator_tool_item_set_draw (GTK_SEPARATOR_TOOL_ITEM (ti), true);
      gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j);

It does produce an ugly empty patch in the middle of the toolbar
that=CA=BCs a different colour though.

The other way to do this would be to add toolbar items at specific
positions in the toolbar, but I couldn't find an api that answered the
question "how many items of size x can I add before I reach the right
border of the window" (and then we=CA=BCd have to recalculate the positions
if the frame changes size).

Robert




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 17 Sep 2020 14:55:02 +0000
Resent-Message-ID: <handler.43405.B43405.16003544534084 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Robert Pluim <rpluim@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.16003544534084
          (code B ref 43405); Thu, 17 Sep 2020 14:55:02 +0000
Received: (at 43405) by debbugs.gnu.org; 17 Sep 2020 14:54:13 +0000
Received: from localhost ([127.0.0.1]:38575 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kIvIb-00013n-9H
	for submit <at> debbugs.gnu.org; Thu, 17 Sep 2020 10:54:13 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45392)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kIvIX-00013W-Fw
 for 43405 <at> debbugs.gnu.org; Thu, 17 Sep 2020 10:54:11 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:37832)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kIvIR-00086N-V4; Thu, 17 Sep 2020 10:54:03 -0400
Received: from [176.228.60.248] (port=4383 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kIvIR-0000EC-8G; Thu, 17 Sep 2020 10:54:03 -0400
Date: Thu, 17 Sep 2020 17:54:15 +0300
Message-Id: <83v9gc5u94.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m2ft7g5uqu.fsf@HIDDEN> (message from Robert Pluim on Thu, 17
 Sep 2020 16:43:37 +0200)
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <CAP_d_8VYOrFJ6=3boUDvdxTQkEm=ZdUtE+nm2M+kuZdoCBg48g@HIDDEN>
 <83lfhhijbl.fsf@HIDDEN> <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
 <m2ft7g5uqu.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: 43405 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Thu, 17 Sep 2020 16:43:37 +0200
> 
>     If the GtkToolbar child property "expand" is TRUE and the property
>     "draw" is set to FALSE, the effect is to force all following items to
>     the end of the toolbar.
> 
> So if you do the following, all toolbar items added after this
> separator end up on the right:
> 
>       ti = gtk_separator_tool_item_new ();
>       gtk_tool_item_set_expand (ti, true);
>       gtk_separator_tool_item_set_draw (GTK_SEPARATOR_TOOL_ITEM (ti), true);
>       gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j);
> 
> It does produce an ugly empty patch in the middle of the toolbar
> thatʼs a different colour though.

So you are saying that, while possible, doing this is not really
workable, since it produces ugly display?




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 17 Sep 2020 15:26:01 +0000
Resent-Message-ID: <handler.43405.B43405.160035630523844 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160035630523844
          (code B ref 43405); Thu, 17 Sep 2020 15:26:01 +0000
Received: (at 43405) by debbugs.gnu.org; 17 Sep 2020 15:25:05 +0000
Received: from localhost ([127.0.0.1]:38661 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kIvmT-0006CV-Ie
	for submit <at> debbugs.gnu.org; Thu, 17 Sep 2020 11:25:05 -0400
Received: from mail-wr1-f48.google.com ([209.85.221.48]:42556)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1kIvmR-0006Bx-J6
 for 43405 <at> debbugs.gnu.org; Thu, 17 Sep 2020 11:25:04 -0400
Received: by mail-wr1-f48.google.com with SMTP id c18so2517874wrm.9
 for <43405 <at> debbugs.gnu.org>; Thu, 17 Sep 2020 08:25:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-transfer-encoding;
 bh=wsp9bZIuE67jQRTepS5diwmX/xvk6OtnZSjR1p3aw9A=;
 b=JnqIi6bY0e4dygveHE2mjAL3kdVLXFRWxjjnflSFN6t27wxUms1LSSWdLDo8hOScI0
 dVcWdKzEe5d9TKPzMF7qwAjx+/5/OxpGHZCP0ZRtgWLmlmP0zOUS6/7jlsLR4tXF2qKI
 9EnsefrGnF6byg4lZLXRR2kVvJydHlT1pgxZS6qHqua7JPvHZBnvClXJE3PkrtAJXL1P
 RKHSjtgAcXwTIP8CmLoAMeWMkMurwnl83LX6KsYvP05vl2gASJt3wVxtMGn7xjsY3/7h
 05nn4Ev3NDWr0J/gK8yk/hEfxHXRt5GsLSrP04O1btGCYDrYt5pDH1JBuh0gVR1WaUNy
 TYIg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version:content-transfer-encoding;
 bh=wsp9bZIuE67jQRTepS5diwmX/xvk6OtnZSjR1p3aw9A=;
 b=PzmCj5AvDmZkD2bbgxRcWjFtQwEKQWZRvi/azZhwVUP7hXg55+2uUmcJPbsQhNxAk9
 roYrcX/iislJja9aw8F377RtTtfIY/WgMECKi1GCiPN4V44wGKG8K2L6kND7OcEKD2xI
 bkRIH4yV+guj1rL7aR6O4/YITNYIiibOfmxPIGLPZrfwLNjz05jerJsS6w4zN6q9zoYO
 ysUW6q6Yij3bjSzAnlDwocYJ7KK8nfAVVhMDj5ghcZqoOGtaJ1IE9EE+CfiziQS/zKOK
 N0e2HT6pL4NeVN8jjldp0RHGb3VUm7DmkuXG89qu/EMZ9JpwmuZicp6EKqG4XlajQOfR
 AE5A==
X-Gm-Message-State: AOAM533neXRadJiAJMAK716F1HbfFAilkGFTcFmoaWlpOxBfUEslpdG4
 RLqIkH3NesnS5mf0JRZuBvU=
X-Google-Smtp-Source: ABdhPJw3nf6h9u6y53dftE/h9GfoDokzs9sKzKcq3lm4dY2G6a1jDfjrSVM32OU2yqvtDwZWtqruuQ==
X-Received: by 2002:adf:e80b:: with SMTP id o11mr30973278wrm.118.1600356297603; 
 Thu, 17 Sep 2020 08:24:57 -0700 (PDT)
Received: from rpluim-mac ([2a01:e34:ecfc:a860:99bb:88d4:2cf6:2ab9])
 by smtp.gmail.com with ESMTPSA id m3sm39036628wrs.83.2020.09.17.08.24.56
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 17 Sep 2020 08:24:56 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
 <m2ft7g5uqu.fsf@HIDDEN> <83v9gc5u94.fsf@HIDDEN>
Date: Thu, 17 Sep 2020 17:24:55 +0200
In-Reply-To: <83v9gc5u94.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 17 Sep
 2020 17:54:15 +0300")
Message-ID: <m2bli45su0.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Thu, 17 Sep 2020 17:54:15 +0300, Eli Zaretskii <eliz@HIDDEN> said:

    >> From: Robert Pluim <rpluim@HIDDEN>
    >> Cc: 43405 <at> debbugs.gnu.org,  juri@HIDDEN
    >> Date: Thu, 17 Sep 2020 16:43:37 +0200
    >>=20
    >> If the GtkToolbar child property "expand" is TRUE and the property
    >> "draw" is set to FALSE, the effect is to force all following items to
    >> the end of the toolbar.
    >>=20
    >> So if you do the following, all toolbar items added after this
    >> separator end up on the right:
    >>=20
    >> ti =3D gtk_separator_tool_item_new ();
    >> gtk_tool_item_set_expand (ti, true);
    >> gtk_separator_tool_item_set_draw (GTK_SEPARATOR_TOOL_ITEM (ti), true=
);
    >> gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j);
    >>=20
    >> It does produce an ugly empty patch in the middle of the toolbar
    >> that=CA=BCs a different colour though.

    Eli> So you are saying that, while possible, doing this is not really
    Eli> workable, since it produces ugly display?

You know this is 2020, so truth =3D=3D lies, and lies =3D=3D truth, right?
So, once I actually follow the documentation and pass 'false' in the right
place, the toolbar looks correct :-)

Now the question is: do we want to expose this to lisp, and if so,
how? I mean, I have no idea if the macOS or MS-Windows tool bar have
a similar feature.

Robert




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 17 Sep 2020 15:34:01 +0000
Resent-Message-ID: <handler.43405.B43405.1600356801570 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Robert Pluim <rpluim@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.1600356801570
          (code B ref 43405); Thu, 17 Sep 2020 15:34:01 +0000
Received: (at 43405) by debbugs.gnu.org; 17 Sep 2020 15:33:21 +0000
Received: from localhost ([127.0.0.1]:38693 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kIvuS-000098-Ib
	for submit <at> debbugs.gnu.org; Thu, 17 Sep 2020 11:33:21 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57220)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kIvuQ-00008w-Ja
 for 43405 <at> debbugs.gnu.org; Thu, 17 Sep 2020 11:33:19 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38832)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kIvuK-0007O0-MH; Thu, 17 Sep 2020 11:33:12 -0400
Received: from [176.228.60.248] (port=2810 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kIvuE-0006cl-PX; Thu, 17 Sep 2020 11:33:11 -0400
Date: Thu, 17 Sep 2020 18:33:17 +0300
Message-Id: <83sgbg5sg2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m2bli45su0.fsf@HIDDEN> (message from Robert Pluim on Thu, 17
 Sep 2020 17:24:55 +0200)
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <871rj9uz12.fsf@HIDDEN>
 <alpine.NEB.2.22.394.2009102307230453.22593@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
 <m2ft7g5uqu.fsf@HIDDEN> <83v9gc5u94.fsf@HIDDEN>
 <m2bli45su0.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: 43405 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Thu, 17 Sep 2020 17:24:55 +0200
> 
> You know this is 2020, so truth == lies, and lies == truth, right?

Yes, I tend to forget this from time to time...

> So, once I actually follow the documentation and pass 'false' in the right
> place, the toolbar looks correct :-)

Great, thanks.

> Now the question is: do we want to expose this to lisp

I think so, yes.

> and if so, how?

Some attribute of the binding, similar to :image and :vert-only, I
guess?

> I mean, I have no idea if the macOS or MS-Windows tool bar have a
> similar feature.

I don't know about macOS, but MS-Windows uses the native tool bar
produced by our own code, i.e. it displays a Lisp string in a special
window.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 18 Sep 2020 08:39:01 +0000
Resent-Message-ID: <handler.43405.B43405.16004183075656 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.16004183075656
          (code B ref 43405); Fri, 18 Sep 2020 08:39:01 +0000
Received: (at 43405) by debbugs.gnu.org; 18 Sep 2020 08:38:27 +0000
Received: from localhost ([127.0.0.1]:40810 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJBuV-0001TA-AO
	for submit <at> debbugs.gnu.org; Fri, 18 Sep 2020 04:38:27 -0400
Received: from mail-wr1-f54.google.com ([209.85.221.54]:45576)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1kJBuT-0001Sx-VU
 for 43405 <at> debbugs.gnu.org; Fri, 18 Sep 2020 04:38:26 -0400
Received: by mail-wr1-f54.google.com with SMTP id x14so4720648wrl.12
 for <43405 <at> debbugs.gnu.org>; Fri, 18 Sep 2020 01:38:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-transfer-encoding;
 bh=a9Iq0kgUAIGFtGW0w7TlqlpKdbgj7ZC4j0TVoO++nzI=;
 b=mO/sNbmUkM8vkMoK2vjxyBQ8U/EGwF6gewPx2uhNiOTmSbYmH/ZZ1sq9tX85Y3vJil
 ILYop87ZXuljgG6rbD/0QpVG0B04EAgzKFO13cij2UmJKcVOxVnhdw2AoyFndaJLJIfa
 3/wtPCjnhcNFA8F0nlsevEZHZ8+lNxXw9Q5WvQPp8ODnmR2vWLsbekHumk34LC3+FLr6
 /M/f7LAD/aMm7lzXyzIW7iUsDziRxak7Bl/Ce1oM1q2wB/j3l937PVHvrSYxA0XSnLDX
 ViF+Mfx6YrBgzjXl+Ai/oPA1OPM+70Nk7H+9XR3eBQ+uDXBsMAOhACM96FLuyxRBrYx6
 uWRg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version:content-transfer-encoding;
 bh=a9Iq0kgUAIGFtGW0w7TlqlpKdbgj7ZC4j0TVoO++nzI=;
 b=kakZw94ltRtk9AwpasjyP6SKzMbx63nGXV2hSz30+tJVAd+UFvcVkhZYkIXykWFSeP
 680SP1YlA7c1gwDYSusL+7msAGzA+G0N3yjr1un5K0WgTFNrK857SSQdVCXhKz6wl/Df
 WfcoNOEE7a/P5AayBBr631eTcSIJeGqs9lcXLboHhdp8yffcy+BENCHAJBnvUO4SmJie
 uVmAMxnzoxfmBMUn2XjOeHr1Bd8U2RLbSAmB8kbnjRN8s3oXOzLebzJ5SLqCarPAx5G5
 EKMD3nTea5ctpWKE6YV9P2aEFQPTllzoXRg3il8F/GdEP2I4U41uAIcYHuyo1tLwIQ8o
 BZgA==
X-Gm-Message-State: AOAM530SQTqzsakBV1n5AEjWAebNaF4pM7MiY/kZ573rFJpYY1WlhMao
 yP+7Npqm6HoZ/9Y8LVpU/Lg=
X-Google-Smtp-Source: ABdhPJzlS4MsWlBV9BTJ9YTVUzdqFTKGfs1VM3OaDcfHB1TZJIj0OEucyLNp9ZBlLvkPNuQsZyCm6A==
X-Received: by 2002:adf:8162:: with SMTP id 89mr37894278wrm.237.1600418299994; 
 Fri, 18 Sep 2020 01:38:19 -0700 (PDT)
Received: from rpluim-mac ([2a01:e34:ecfc:a860:2902:b2ff:ec42:6baa])
 by smtp.gmail.com with ESMTPSA id u186sm3899516wmu.34.2020.09.18.01.38.18
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 18 Sep 2020 01:38:19 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
 <m2ft7g5uqu.fsf@HIDDEN> <83v9gc5u94.fsf@HIDDEN>
 <m2bli45su0.fsf@HIDDEN> <83sgbg5sg2.fsf@HIDDEN>
Date: Fri, 18 Sep 2020 10:38:18 +0200
In-Reply-To: <83sgbg5sg2.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 17 Sep
 2020 18:33:17 +0300")
Message-ID: <m2a6xnxyx1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Thu, 17 Sep 2020 18:33:17 +0300, Eli Zaretskii <eliz@HIDDEN> said:
    >> Now the question is: do we want to expose this to lisp

    Eli> I think so, yes.

    >> and if so, how?

    Eli> Some attribute of the binding, similar to :image and :vert-only, I
    Eli> guess?

    >> I mean, I have no idea if the macOS or MS-Windows tool bar have a
    >> similar feature.

    Eli> I don't know about macOS, but MS-Windows uses the native tool bar
    Eli> produced by our own code, i.e. it displays a Lisp string in a spec=
ial
    Eli> window.

OK, so I took a look, and I=CA=BCm not sure it=CA=BCs possible with the nat=
ive
tool bar. We have '(space :align-to right)', but that just inserts
space up to a specified location, everything subsequent is
appended. In order to calculate the correct location, I=CA=BCd need to know
the width of everything that came after the space, which only
redisplay can tell us, unless there=CA=BCs a function I=CA=BCve missed?
'string-width' doesn=CA=BCt take 'display properties into account.

macOS has something called a flexibleSpace toolbar item that might
serve, but I=CA=BCm utterly ignorant of how the macOS code works.

Robert




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 18 Sep 2020 08:59:01 +0000
Resent-Message-ID: <handler.43405.B43405.16004194997659 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Robert Pluim <rpluim@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.16004194997659
          (code B ref 43405); Fri, 18 Sep 2020 08:59:01 +0000
Received: (at 43405) by debbugs.gnu.org; 18 Sep 2020 08:58:19 +0000
Received: from localhost ([127.0.0.1]:40839 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kJCDj-0001zS-0Q
	for submit <at> debbugs.gnu.org; Fri, 18 Sep 2020 04:58:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33794)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kJCDh-0001zD-G3
 for 43405 <at> debbugs.gnu.org; Fri, 18 Sep 2020 04:58:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59292)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kJCDY-0001O0-HQ; Fri, 18 Sep 2020 04:58:08 -0400
Received: from [176.228.60.248] (port=3038 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kJCDX-0003IC-QO; Fri, 18 Sep 2020 04:58:08 -0400
Date: Fri, 18 Sep 2020 11:58:21 +0300
Message-Id: <83v9gb4g2a.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m2a6xnxyx1.fsf@HIDDEN> (message from Robert Pluim on Fri, 18
 Sep 2020 10:38:18 +0200)
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <E1kGaUK-0004lt-IG@HIDDEN> <875z8k4wv8.fsf@HIDDEN>
 <83pn6shjni.fsf@HIDDEN> <20200911074445.GB5194@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
 <m2ft7g5uqu.fsf@HIDDEN> <83v9gc5u94.fsf@HIDDEN>
 <m2bli45su0.fsf@HIDDEN> <83sgbg5sg2.fsf@HIDDEN>
 <m2a6xnxyx1.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: 43405 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Fri, 18 Sep 2020 10:38:18 +0200
> 
>     Eli> Some attribute of the binding, similar to :image and :vert-only, I
>     Eli> guess?
> 
>     >> I mean, I have no idea if the macOS or MS-Windows tool bar have a
>     >> similar feature.
> 
>     Eli> I don't know about macOS, but MS-Windows uses the native tool bar
>     Eli> produced by our own code, i.e. it displays a Lisp string in a special
>     Eli> window.
> 
> OK, so I took a look, and Iʼm not sure itʼs possible with the native
> tool bar. We have '(space :align-to right)', but that just inserts
> space up to a specified location, everything subsequent is
> appended. In order to calculate the correct location, Iʼd need to know
> the width of everything that came after the space, which only
> redisplay can tell us, unless thereʼs a function Iʼve missed?

The support for doing this with the native tool bar must be in C, and
should indeed be part of the display engine.  So everything redisplay
knows should be at your fingertips.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
In-Reply-To: <87een4qi9i.fsf_-_@HIDDEN>
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 21 Sep 2020 18:32:01 +0000
Resent-Message-ID: <handler.43405.B43405.160071306718102 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160071306718102
          (code B ref 43405); Mon, 21 Sep 2020 18:32:01 +0000
Received: (at 43405) by debbugs.gnu.org; 21 Sep 2020 18:31:07 +0000
Received: from localhost ([127.0.0.1]:56165 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKQah-0004hu-3C
	for submit <at> debbugs.gnu.org; Mon, 21 Sep 2020 14:31:07 -0400
Received: from mail-wr1-f52.google.com ([209.85.221.52]:40465)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1kKQad-0004hN-5s
 for 43405 <at> debbugs.gnu.org; Mon, 21 Sep 2020 14:31:05 -0400
Received: by mail-wr1-f52.google.com with SMTP id j2so13851518wrx.7
 for <43405 <at> debbugs.gnu.org>; Mon, 21 Sep 2020 11:31:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:message-id:mime-version
 :content-transfer-encoding;
 bh=dKivQwyIoDm5ZAOn2ck/M610if8BmSQ1xDrewDPPwOM=;
 b=ul0ZY1P5+0YIU9rGW4utaOpIPL0OANn8d7/Rwy9MN14N+Ft8Mg5j0Zh5daAWxbLkdO
 D2BnDOQz+GF97PVNzTOsb+if4Ef0zmp/JEystBBUyUGqn7oOg++PBoJDDOmsfg+mxn7Y
 RmYfgXQuhQYnoCORO4F4hrqIWaM+V357++FZ5feaLUp9lzXOQs3evhoSl8tQHUUyiG+P
 V1Tr7tUIxJOCjBlSSo9evsBkgiEgMoZAZ9hXiB14J8RoX//OokB970RGgYsh7PH4sl43
 hhqKbIvlp/MSnrXD4RTOdgbgsfknSKlX6TGGXnK8n26dw24LJLrayEEyumKd2k0DADxV
 4gJQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:message-id
 :mime-version:content-transfer-encoding;
 bh=dKivQwyIoDm5ZAOn2ck/M610if8BmSQ1xDrewDPPwOM=;
 b=iS3W0NIvMpqxefd3JBbc7Zaw9xHxgvc6NS7VxJX1NC2pZkK3UfQKDfCdkylGt6UBlf
 M8IwYrKxMfa5Dgc4YI22mJ1p0hJuhdupIrEDRkuI3YKmbVkl727o0o83us3NGHPjCYgS
 mLcVZc71CZMzkHjaeJldUdTFqkcpvrk8Bc8PE6UDGIv/bcRASdGCFyNzeeUnEAcbPv/1
 ZN/Y0xlS5cn40UybjYe4M2LJu/txciNE1sFoIqTPMx56D3QLNXWb7/RYNJeUVlQR2O6z
 N6Kc8KcWVBGmMaNwu2NFGESaXBrnPSVhii5Ir59s/qoeeLWhInePm3FgbT7OqegaTULJ
 WgtA==
X-Gm-Message-State: AOAM5334nZ4mQFHhAN4mrdUPiKOrXWm2xygZOM37v94kw+3fP8DLB+3y
 G9iWw+Yv2Fj3YfhlfVzSK64=
X-Google-Smtp-Source: ABdhPJwte1ThvikqJ1dKO4+upHQ0dgG6UB/sN/FrTv3EUnOTcUbTdGTNqoxa5ewFmXRNzZBErWifqQ==
X-Received: by 2002:adf:9124:: with SMTP id j33mr1107627wrj.272.1600713057106; 
 Mon, 21 Sep 2020 11:30:57 -0700 (PDT)
Received: from rpluim-mac ([2a01:e34:ecfc:a860:90b8:9745:bf3d:1ff5])
 by smtp.gmail.com with ESMTPSA id 9sm589471wmf.7.2020.09.21.11.30.55
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 21 Sep 2020 11:30:55 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN> <83pn6shjni.fsf@HIDDEN>
 <20200911074445.GB5194@HIDDEN> <87zh5uqdqm.fsf@HIDDEN>
 <834ko1da33.fsf@HIDDEN> <87sgbloe5z.fsf@HIDDEN>
 <83een5bkja.fsf@HIDDEN> <87v9ghlc5c.fsf@HIDDEN>
 <83d02pbhny.fsf@HIDDEN> <87een4qi9i.fsf_-_@HIDDEN>
 <837dsw9mpu.fsf@HIDDEN> <87r1r3ncwq.fsf@HIDDEN>
 <83a6xq995x.fsf@HIDDEN> <m24knw7p1p.fsf@HIDDEN>
 <831rj07c0j.fsf@HIDDEN> <m2ft7g5uqu.fsf@HIDDEN>
 <83v9gc5u94.fsf@HIDDEN> <m2bli45su0.fsf@HIDDEN>
 <83sgbg5sg2.fsf@HIDDEN> <m2a6xnxyx1.fsf@HIDDEN>
 <83v9gb4g2a.fsf@HIDDEN>
Date: Mon, 21 Sep 2020 20:30:53 +0200
Message-ID: <m2blhz3rtu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Fri, 18 Sep 2020 11:58:21 +0300, Eli Zaretskii <eliz@HIDDEN> said:

    >> OK, so I took a look, and I=CA=BCm not sure it=CA=BCs possible with =
the native
    >> tool bar. We have '(space :align-to right)', but that just inserts
    >> space up to a specified location, everything subsequent is
    >> appended. In order to calculate the correct location, I=CA=BCd need =
to know
    >> the width of everything that came after the space, which only
    >> redisplay can tell us, unless there=CA=BCs a function I=CA=BCve miss=
ed?

    Eli> The support for doing this with the native tool bar must be in C, =
and
    Eli> should indeed be part of the display engine.  So everything redisp=
lay
    Eli> knows should be at your fingertips.

Your fingertips maybe, not mine :-)

So let's assume we do this by exending the display spec to allow

'(:right-justify t)

which would mean to move everything on this line as far to the right
in the window as possible.

At some point we=CA=BCd end up in 'gui_produce_glyphs' with a 'struct
iter' pointing at the char with that property set. Then:

remember it->current_x
loop over the iters until we hit eol or max_x, calling PRODUCE_GLPYHS
The final it->current_x minus the remembered one is the width of the remain=
ing
glyphs on the line.
Now set it->current_x to the window right edge minus the width.

Does that sound like it would work? Is there a more direct way of
calculating that width? (I got lost in all the various move_to
functions).

Robert




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 21 Sep 2020 19:05:01 +0000
Resent-Message-ID: <handler.43405.B43405.160071508529403 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Robert Pluim <rpluim@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160071508529403
          (code B ref 43405); Mon, 21 Sep 2020 19:05:01 +0000
Received: (at 43405) by debbugs.gnu.org; 21 Sep 2020 19:04:45 +0000
Received: from localhost ([127.0.0.1]:56216 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKR7F-0007eA-A1
	for submit <at> debbugs.gnu.org; Mon, 21 Sep 2020 15:04:45 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58452)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kKR7A-0007dv-CJ
 for 43405 <at> debbugs.gnu.org; Mon, 21 Sep 2020 15:04:43 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34618)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kKR74-0002Fp-Mz; Mon, 21 Sep 2020 15:04:34 -0400
Received: from [176.228.60.248] (port=1290 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kKR73-0000vi-Tf; Mon, 21 Sep 2020 15:04:34 -0400
Date: Mon, 21 Sep 2020 22:04:36 +0300
Message-Id: <83a6xjx86z.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m2blhz3rtu.fsf@HIDDEN> (message from Robert Pluim on Mon, 21
 Sep 2020 20:30:53 +0200)
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN> <83pn6shjni.fsf@HIDDEN>
 <20200911074445.GB5194@HIDDEN> <87zh5uqdqm.fsf@HIDDEN>
 <834ko1da33.fsf@HIDDEN> <87sgbloe5z.fsf@HIDDEN>
 <83een5bkja.fsf@HIDDEN> <87v9ghlc5c.fsf@HIDDEN>
 <83d02pbhny.fsf@HIDDEN> <87een4qi9i.fsf_-_@HIDDEN>
 <837dsw9mpu.fsf@HIDDEN> <87r1r3ncwq.fsf@HIDDEN>
 <83a6xq995x.fsf@HIDDEN> <m24knw7p1p.fsf@HIDDEN>
 <831rj07c0j.fsf@HIDDEN> <m2ft7g5uqu.fsf@HIDDEN>
 <83v9gc5u94.fsf@HIDDEN> <m2bli45su0.fsf@HIDDEN>
 <83sgbg5sg2.fsf@HIDDEN> <m2a6xnxyx1.fsf@HIDDEN>
 <83v9gb4g2a.fsf@HIDDEN> <m2blhz3rtu.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: 43405 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Mon, 21 Sep 2020 20:30:53 +0200
> 
> So let's assume we do this by exending the display spec to allow
> 
> '(:right-justify t)
> 
> which would mean to move everything on this line as far to the right
> in the window as possible.
> 
> At some point weʼd end up in 'gui_produce_glyphs' with a 'struct
> iter' pointing at the char with that property set. Then:
> 
> remember it->current_x
> loop over the iters until we hit eol or max_x, calling PRODUCE_GLPYHS
> The final it->current_x minus the remembered one is the width of the remaining
> glyphs on the line.
> Now set it->current_x to the window right edge minus the width.
> 
> Does that sound like it would work? Is there a more direct way of
> calculating that width? (I got lost in all the various move_to
> functions).

I'd first try to repeat what we do for :align-to support: insert a
stretch glyph of a suitable width, computed using it->last_visible_x
and the width of the image for the button that has to be
right-justified.  See produce_stretch_glyph (except that most of it is
not relevant, since :align-to supports a lot of functionalities).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 21 Sep 2020 20:09:01 +0000
Resent-Message-ID: <handler.43405.B43405.160071888128567 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160071888128567
          (code B ref 43405); Mon, 21 Sep 2020 20:09:01 +0000
Received: (at 43405) by debbugs.gnu.org; 21 Sep 2020 20:08:01 +0000
Received: from localhost ([127.0.0.1]:56446 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKS6S-0007Qc-9N
	for submit <at> debbugs.gnu.org; Mon, 21 Sep 2020 16:08:01 -0400
Received: from mail-wm1-f54.google.com ([209.85.128.54]:39229)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1kKS6R-0007QQ-6n
 for 43405 <at> debbugs.gnu.org; Mon, 21 Sep 2020 16:07:59 -0400
Received: by mail-wm1-f54.google.com with SMTP id b79so698794wmb.4
 for <43405 <at> debbugs.gnu.org>; Mon, 21 Sep 2020 13:07:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version; bh=1mdlhmeaB5/mPPXbailym9iXR2fPfNigylAq5LmEMxM=;
 b=pltG/WcAmEgAHOviATXwc2YmdHeU9mk0h/4feZjtg/Ai+RTqa0ch0ZRDdLB0Z926BT
 5ufN+fz0PdgaQXT3GsHBb795hW92TIl7bQ66/SQ7sT7Qrio7/R+acNPmnr+5VnXRGMPX
 aaJ7Mq14SdEiHva74z8ZDd8h9fPSSiDaEfOW9VufZ6BVvkXCNjW5vnfzD6SJjAJj7bfX
 i1RCFaCEpzjnH1N5kwQNpZz+RDP1PoGWeOvdHH9sjp8wpIVbT7M6oRGH4xZKF+Zs/z77
 JJ8AMSxu9VJbga1IuEsW4Q23uLDYGj4nHdYaprfH88/n5MLbHkZTQMaR5t3XC2p/S/X+
 tzLg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version;
 bh=1mdlhmeaB5/mPPXbailym9iXR2fPfNigylAq5LmEMxM=;
 b=X523Y3zlz/r2DbLcSDz37tQd84K81RizMf+dwtY7vkp3z6goF8pEtVtD5Y3u2VLQnr
 OUPCiCH6n4Aw33XiggqzuRBT8pHOUlAlRFGZilr10M4W1ib0b55dLLKIjfkSyaqdqfq/
 8BdKpOZiMpoKnzyOJAncMvG3RAtoGpBM7eXV6DzORfiqFBMAlkNo1MZZH+V5iY76aDVv
 EJhYjqojBjeomi/fWA4+1W/c6Bzmow3hQGbuPFT8cycrk6xJIUxhLVgEaQMiDlJr+O7z
 UkjikEgs+6mrUodjN2FA6yE7uYWXzk0kfoSRG657TVyhTAz/EFVBkGe0xseMKZQLJlOp
 eXSQ==
X-Gm-Message-State: AOAM531PjFo8tjSlpmT5WAKs2yHSJu5oT5EDPPYB2bU3/8WXq7wenVhY
 fH2Db2mNqEdbcWJ5Ne6S4kw=
X-Google-Smtp-Source: ABdhPJz2tgQjVeo/0tiqdCYL3BoQOZ3Hb+Erada4Y++OXOjpww852g0dtUKdCioPUZLR/ymSyzTOAQ==
X-Received: by 2002:a1c:4054:: with SMTP id n81mr932255wma.81.1600718873364;
 Mon, 21 Sep 2020 13:07:53 -0700 (PDT)
Received: from rpluim-mac ([2a01:e34:ecfc:a860:90b8:9745:bf3d:1ff5])
 by smtp.gmail.com with ESMTPSA id i11sm23137767wre.32.2020.09.21.13.07.52
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 21 Sep 2020 13:07:52 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
 <m2ft7g5uqu.fsf@HIDDEN> <83v9gc5u94.fsf@HIDDEN>
 <m2bli45su0.fsf@HIDDEN> <83sgbg5sg2.fsf@HIDDEN>
 <m2a6xnxyx1.fsf@HIDDEN> <83v9gb4g2a.fsf@HIDDEN>
 <m2blhz3rtu.fsf@HIDDEN> <83a6xjx86z.fsf@HIDDEN>
Date: Mon, 21 Sep 2020 22:07:51 +0200
In-Reply-To: <83a6xjx86z.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 21 Sep
 2020 22:04:36 +0300")
Message-ID: <m27dsm51wo.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Mon, 21 Sep 2020 22:04:36 +0300, Eli Zaretskii <eliz@HIDDEN> said:
    >> Does that sound like it would work? Is there a more direct way of
    >> calculating that width? (I got lost in all the various move_to
    >> functions).

    Eli> I'd first try to repeat what we do for :align-to support: insert a
    Eli> stretch glyph of a suitable width, computed using it->last_visible_x
    Eli> and the width of the image for the button that has to be
    Eli> right-justified.  See produce_stretch_glyph (except that most of it is
    Eli> not relevant, since :align-to supports a lot of functionalities).

OK, that would work, but then you could only right justify a single
item, which would be different from what you can do with the GTK tool
bar (and I see no reason to restrict this to tool bar buttons, I see
at least org-mode wants to right-justify headline tags)

Robert




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 22 Sep 2020 14:40:02 +0000
Resent-Message-ID: <handler.43405.B43405.1600785569664 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Robert Pluim <rpluim@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.1600785569664
          (code B ref 43405); Tue, 22 Sep 2020 14:40:02 +0000
Received: (at 43405) by debbugs.gnu.org; 22 Sep 2020 14:39:29 +0000
Received: from localhost ([127.0.0.1]:32818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKjS4-0000Ae-MR
	for submit <at> debbugs.gnu.org; Tue, 22 Sep 2020 10:39:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45612)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kKjS1-0000AQ-Os
 for 43405 <at> debbugs.gnu.org; Tue, 22 Sep 2020 10:39:27 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:50963)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kKjRv-0000Ml-HK; Tue, 22 Sep 2020 10:39:19 -0400
Received: from [176.228.60.248] (port=1345 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kKjRu-0005Hb-Nl; Tue, 22 Sep 2020 10:39:19 -0400
Date: Tue, 22 Sep 2020 17:39:23 +0300
Message-Id: <83r1qtx4dg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m27dsm51wo.fsf@HIDDEN> (message from Robert Pluim on Mon, 21
 Sep 2020 22:07:51 +0200)
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87zh5uqdqm.fsf@HIDDEN> <834ko1da33.fsf@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
 <m2ft7g5uqu.fsf@HIDDEN> <83v9gc5u94.fsf@HIDDEN>
 <m2bli45su0.fsf@HIDDEN> <83sgbg5sg2.fsf@HIDDEN>
 <m2a6xnxyx1.fsf@HIDDEN> <83v9gb4g2a.fsf@HIDDEN>
 <m2blhz3rtu.fsf@HIDDEN> <83a6xjx86z.fsf@HIDDEN>
 <m27dsm51wo.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: 43405 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Mon, 21 Sep 2020 22:07:51 +0200
> 
>     Eli> I'd first try to repeat what we do for :align-to support: insert a
>     Eli> stretch glyph of a suitable width, computed using it->last_visible_x
>     Eli> and the width of the image for the button that has to be
>     Eli> right-justified.  See produce_stretch_glyph (except that most of it is
>     Eli> not relevant, since :align-to supports a lot of functionalities).
> 
> OK, that would work, but then you could only right justify a single
> item, which would be different from what you can do with the GTK tool
> bar

No, it will work with more than one as well, you just need to loop
twice over all the buttons and keep track of all those which should be
right-justified.

> (and I see no reason to restrict this to tool bar buttons, I see
> at least org-mode wants to right-justify headline tags)

What are "headline tags" in Org, and how are they related?

Your original description said:

> So let's assume we do this by exending the display spec to allow
> 
> '(:right-justify t)
> 
> which would mean to move everything on this line as far to the right
> in the window as possible.

"Everything on this line" on which line?

Do you mean you want to display an entire screen line justified to the
right?  Then we already do something like that with R2L lines
(although there we also reorder display elements, something you don't
need here).




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Robert Pluim <rpluim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 22 Sep 2020 15:15:01 +0000
Resent-Message-ID: <handler.43405.B43405.160078767112308 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160078767112308
          (code B ref 43405); Tue, 22 Sep 2020 15:15:01 +0000
Received: (at 43405) by debbugs.gnu.org; 22 Sep 2020 15:14:31 +0000
Received: from localhost ([127.0.0.1]:32887 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKjzy-0003CR-Me
	for submit <at> debbugs.gnu.org; Tue, 22 Sep 2020 11:14:31 -0400
Received: from mail-wm1-f48.google.com ([209.85.128.48]:52814)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1kKjzv-0003CC-6Q
 for 43405 <at> debbugs.gnu.org; Tue, 22 Sep 2020 11:14:30 -0400
Received: by mail-wm1-f48.google.com with SMTP id q9so3731213wmj.2
 for <43405 <at> debbugs.gnu.org>; Tue, 22 Sep 2020 08:14:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :mime-version:content-transfer-encoding;
 bh=6ULw1i12T7tD+JTSsr3EHsdMYQxMv24hsEZEnUJKVWE=;
 b=ZFA4dpVPo6IL0QYiCp4joYyD/zH7uf6f5roa0SdegMqG+yFBMF0xUkGAJXr2w/Nfhb
 a9LMmv1HaugZ15XvhC5g4Oo3AVkfVaGEGIAWx6aP8X+DN+/k/SucdGkU+7JdlYJOo9oS
 izo0G7HGKKUItknUrOT8//URziD9UVWAXOu5PhpvNIBqegUxxUY2MCwClv7W54zNHEme
 PCdY6CYitV/nX2d+affd0LPXgc7c3T4p6/bZXyXAvtE9/3fRHZKOkdPJ7DUtgLvdsrzr
 qaMIFZd+1uzeQddWc4IUqY2RRPHsepw4cJNzZ+6/6D4vUOheUZdj6OGqM0Xk/vlrAth7
 7DrA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:mime-version:content-transfer-encoding;
 bh=6ULw1i12T7tD+JTSsr3EHsdMYQxMv24hsEZEnUJKVWE=;
 b=VT2OyKLzXxtsfdQ0P/hmp2451WVMgrO8MRwmQPsfLEb7Ar5U8CY7LcyQlTnSQ/zLig
 WM8eS9Nr3FWPXFEK37BKDbOrR6bWi8Ld86VP2idb6Sl9mlyAuY2BOFjaGzAi9iVb6m+v
 Ti/sZhapMHAtOQUsf9DHax0hTDZWh+gCdqPRwBTj9ncEyY3OR/Xj5ownLeY3XW9v7I9l
 N9uZo6t/YYwaB9wMjtw+3unfB7GhNIoTBb7qQ2LXzCcQ3Wld1te56oyJNFn+gsSVci4h
 prVm8UK3xsmOOTKsc2rP81FQuUKABCp3QdQEEuxUAHGrXg1pBKNl+PFI/l5UpZ0+qKO4
 j/xw==
X-Gm-Message-State: AOAM531Wvx89462+ehQkD2NgSgDnr4pp0pjgmbMs+qIGL3Uysm5/n7+r
 JvcdmUZ3opFsdCcJRz455Nc=
X-Google-Smtp-Source: ABdhPJyK/4OtZqtPwgUN9XibnijERT73lky+hmQDjRIROFzWdn37VItyOuk5UZMxS3VIocm9+KGN5A==
X-Received: by 2002:a1c:66c4:: with SMTP id a187mr1521339wmc.148.1600787661099; 
 Tue, 22 Sep 2020 08:14:21 -0700 (PDT)
Received: from rpluim-mac ([2a01:e34:ecfc:a860:90b8:9745:bf3d:1ff5])
 by smtp.gmail.com with ESMTPSA id d18sm27002538wrm.10.2020.09.22.08.14.19
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 22 Sep 2020 08:14:19 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
 <m2ft7g5uqu.fsf@HIDDEN> <83v9gc5u94.fsf@HIDDEN>
 <m2bli45su0.fsf@HIDDEN> <83sgbg5sg2.fsf@HIDDEN>
 <m2a6xnxyx1.fsf@HIDDEN> <83v9gb4g2a.fsf@HIDDEN>
 <m2blhz3rtu.fsf@HIDDEN> <83a6xjx86z.fsf@HIDDEN>
 <m27dsm51wo.fsf@HIDDEN> <83r1qtx4dg.fsf@HIDDEN>
Date: Tue, 22 Sep 2020 17:14:18 +0200
In-Reply-To: <83r1qtx4dg.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 22 Sep
 2020 17:39:23 +0300")
Message-ID: <m2zh5h3ktx.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Tue, 22 Sep 2020 17:39:23 +0300, Eli Zaretskii <eliz@HIDDEN> said:

    >> From: Robert Pluim <rpluim@HIDDEN>
    >> Cc: 43405 <at> debbugs.gnu.org,  juri@HIDDEN
    >> Date: Mon, 21 Sep 2020 22:07:51 +0200
    >>=20
    Eli> I'd first try to repeat what we do for :align-to support: insert a
    Eli> stretch glyph of a suitable width, computed using it->last_visible=
_x
    Eli> and the width of the image for the button that has to be
    Eli> right-justified.  See produce_stretch_glyph (except that most of i=
t is
    Eli> not relevant, since :align-to supports a lot of functionalities).
    >>=20
    >> OK, that would work, but then you could only right justify a single
    >> item, which would be different from what you can do with the GTK tool
    >> bar

    Eli> No, it will work with more than one as well, you just need to loop
    Eli> twice over all the buttons and keep track of all those which shoul=
d be
    Eli> right-justified.

OK, we=CA=BCre saying the same thing with different words: everything to
the right of this stretch glyph needs its width calculated (and its
x-coordinate adjusted)

    >> (and I see no reason to restrict this to tool bar buttons, I see
    >> at least org-mode wants to right-justify headline tags)

    Eli> What are "headline tags" in Org, and how are they related?

Org headlines look like this:

* This is a headline                       :tag1:tag2:tag3

The tags are right justified by default, but this is done by inserting
spaces, which fails with non-monospace fonts. There=CA=BCs a patch to
org-mode to do this by instead inserting a space with an :align-to
property, but that code has to calculate the value to specify in lisp,
which I strongly suspect will turn out to be slow, hence doing it in
redisplay would be better (and perhaps more likely to be accurate).

    Eli> Your original description said:

    >> So let's assume we do this by exending the display spec to allow
    >>=20
    >> '(:right-justify t)
    >>=20
    >> which would mean to move everything on this line as far to the right
    >> in the window as possible.

    Eli> "Everything on this line" on which line?

Sorry, everything on this line after whatever element has that display
spec. Everything before stays where it is (and only the first
:right-justify property found in the line is acted upon).

    Eli> Do you mean you want to display an entire screen line justified to=
 the
    Eli> right?  Then we already do something like that with R2L lines
    Eli> (although there we also reorder display elements, something you do=
n't
    Eli> need here).

No, I just want to be able to produce:

This is text                          This is right justified

And have the "This is right justified" stay right justified as the
window size and line content changes (unless the user deletes that
stretch glyph in the middle).

If the line became longer than could be displayed in the available
window width, then I think the stretch glyph in the middle would just
be treated as a single space (and hence line continuation/truncation
would work as normal).

Robert




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#43405: Tool bar item doesn't align to the right edge
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 22 Sep 2020 15:27:02 +0000
Resent-Message-ID: <handler.43405.B43405.160078841821822 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 43405
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Robert Pluim <rpluim@HIDDEN>
Cc: 43405 <at> debbugs.gnu.org, juri@HIDDEN
Received: via spool by 43405-submit <at> debbugs.gnu.org id=B43405.160078841821822
          (code B ref 43405); Tue, 22 Sep 2020 15:27:02 +0000
Received: (at 43405) by debbugs.gnu.org; 22 Sep 2020 15:26:58 +0000
Received: from localhost ([127.0.0.1]:32915 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kKkC2-0005fu-CJ
	for submit <at> debbugs.gnu.org; Tue, 22 Sep 2020 11:26:58 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58006)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1kKkC0-0005fg-JK
 for 43405 <at> debbugs.gnu.org; Tue, 22 Sep 2020 11:26:57 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51796)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1kKkBu-0007d5-8V; Tue, 22 Sep 2020 11:26:50 -0400
Received: from [176.228.60.248] (port=4234 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1kKkBs-0002Yn-TY; Tue, 22 Sep 2020 11:26:49 -0400
Date: Tue, 22 Sep 2020 18:26:52 +0300
Message-Id: <83o8lxx26b.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <m2zh5h3ktx.fsf@HIDDEN> (message from Robert Pluim on Tue, 22
 Sep 2020 17:14:18 +0200)
References: <jwvd02uygtp.fsf-monnier+emacs@HIDDEN>
 <87sgbloe5z.fsf@HIDDEN> <83een5bkja.fsf@HIDDEN>
 <87v9ghlc5c.fsf@HIDDEN> <83d02pbhny.fsf@HIDDEN>
 <87een4qi9i.fsf_-_@HIDDEN> <837dsw9mpu.fsf@HIDDEN>
 <87r1r3ncwq.fsf@HIDDEN> <83a6xq995x.fsf@HIDDEN>
 <m24knw7p1p.fsf@HIDDEN> <831rj07c0j.fsf@HIDDEN>
 <m2ft7g5uqu.fsf@HIDDEN> <83v9gc5u94.fsf@HIDDEN>
 <m2bli45su0.fsf@HIDDEN> <83sgbg5sg2.fsf@HIDDEN>
 <m2a6xnxyx1.fsf@HIDDEN> <83v9gb4g2a.fsf@HIDDEN>
 <m2blhz3rtu.fsf@HIDDEN> <83a6xjx86z.fsf@HIDDEN>
 <m27dsm51wo.fsf@HIDDEN> <83r1qtx4dg.fsf@HIDDEN>
 <m2zh5h3ktx.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Robert Pluim <rpluim@HIDDEN>
> Cc: 43405 <at> debbugs.gnu.org,  juri@HIDDEN
> Date: Tue, 22 Sep 2020 17:14:18 +0200
> 
> No, I just want to be able to produce:
> 
> This is text                          This is right justified
> 
> And have the "This is right justified" stay right justified as the
> window size and line content changes (unless the user deletes that
> stretch glyph in the middle).
> 
> If the line became longer than could be displayed in the available
> window width, then I think the stretch glyph in the middle would just
> be treated as a single space (and hence line continuation/truncation
> would work as normal).

Then the way to do this is to set some flag on the first glyph after
the stretch, lay out the glyphs on the screen line as usual, then go
back to that marked glyph and recompute the width of the stretch.  It
will complicate the likes of display_line a bit, and will need to
disable some redisplay optimizations (so there should be some easy way
of knowing that such lines are in the buffer).





Last modified: Tue, 22 Sep 2020 15:30:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.