GNU bug report logs - #31020
27.0; Please provide a way to know about menu-bar wrapping

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Mon, 2 Apr 2018 03:04:01 UTC

Severity: wishlist

Tags: wontfix

Found in version 27.0

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 31020 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#31020: 27.0; Please provide a way to know about menu-bar wrapping
Date: Sat, 28 Sep 2019 20:42:35 +0200
tags 31020 + wontfix
close 31020
quit

martin rudalics <rudalics <at> gmx.at> writes:

>> I don't understand why you think that the menu-bar-lines parameter
>> should not be it.  AFAIU, the problem with setting it (or any other
>> frame parameter) to the actual value is that with many toolkits Emacs
>> simply doesn't know the correct value.  But maybe Martin will have
>> some trick up his sleeves.
>
> I am not aware of any toolkit telling us that number or whether the
> current menu bar was wrapped at all.  It's nowhere in the various API
> descriptions and I suppose the information usually gets lost somewhere
> in between calculations of which font the user's theme wants for the
> menu bar and how that affects wrapping.  I'm not even sure whether
> some toolkit would deliberately truncate our menu bar when it doesn't
> fit into one line.  And lets not talk about GTK auto-resizing our
> frame when the menu bar gets too long.
>
> So what you can do is the following: Make a frame with a _visibly
> unwrapped_ menu bar, get the menu bar height via
>
> (cddr (assq 'menu-bar-size (frame-geometry)))
>
> Do the same for a frame with a _visibly wrapped_ two-lines menu bar.
> You can now derive the height of the single-line and any additional
> menu bar line and use these values together with 'frame-geometry' for
> getting the actual number of lines.
>
> Obviously, this will work only as long as you do not change themes,
> the menu bar height of the current theme or the resolution of your
> screen or whatever else could affect this.  And since you have to
> visuallly check the "wrappedness" of the menu bar, this work cannot be
> reasonably done from within Emacs.

It seems like the conclusion here is that the feature suggestion is not
practical, so I'm closing it as wontfix.

If this is incorrect, please reopen the bug.

Best regards,
Stefan Kangas




This bug report was last modified 5 years and 278 days ago.

Previous Next


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