From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#43405: Tool bar item doesn't align to the right edge Date: Fri, 18 Sep 2020 10:38:18 +0200 Message-ID: References: <875z8k4wv8.fsf@posteo.net> <83pn6shjni.fsf@gnu.org> <20200911074445.GB5194@tuxteam.de> <87zh5uqdqm.fsf@mail.linkov.net> <834ko1da33.fsf@gnu.org> <87sgbloe5z.fsf@mail.linkov.net> <83een5bkja.fsf@gnu.org> <87v9ghlc5c.fsf@mail.linkov.net> <83d02pbhny.fsf@gnu.org> <87een4qi9i.fsf_-_@mail.linkov.net> <837dsw9mpu.fsf@gnu.org> <87r1r3ncwq.fsf@mail.linkov.net> <83a6xq995x.fsf@gnu.org> <831rj07c0j.fsf@gnu.org> <83v9gc5u94.fsf@gnu.org> <83sgbg5sg2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12114"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43405@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 18 10:39:15 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kJBvG-00033V-J0 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Sep 2020 10:39:14 +0200 Original-Received: from localhost ([::1]:59332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJBvF-0007hA-KN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Sep 2020 04:39:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJBv4-0007fv-OO for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2020 04:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJBv3-0007Hh-Uu for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2020 04:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJBv3-0001U1-RL for bug-gnu-emacs@gnu.org; Fri, 18 Sep 2020 04:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Sep 2020 08:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43405 X-GNU-PR-Package: emacs Original-Received: via spool by 43405-submit@debbugs.gnu.org id=B43405.16004183075656 (code B ref 43405); Fri, 18 Sep 2020 08:39:01 +0000 Original-Received: (at 43405) by debbugs.gnu.org; 18 Sep 2020 08:38:27 +0000 Original-Received: from localhost ([127.0.0.1]:40810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJBuV-0001TA-AO for submit@debbugs.gnu.org; Fri, 18 Sep 2020 04:38:27 -0400 Original-Received: from mail-wr1-f54.google.com ([209.85.221.54]:45576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJBuT-0001Sx-VU for 43405@debbugs.gnu.org; Fri, 18 Sep 2020 04:38:26 -0400 Original-Received: by mail-wr1-f54.google.com with SMTP id x14so4720648wrl.12 for <43405@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) Original-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) In-Reply-To: <83sgbg5sg2.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Sep 2020 18:33:17 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188274 Archived-At: >>>>> On Thu, 17 Sep 2020 18:33:17 +0300, Eli Zaretskii 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