From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#31020: 27.0; Please provide a way to know about menu-bar wrapping Date: Mon, 2 Apr 2018 06:32:49 -0700 (PDT) Message-ID: <266400ad-5ec5-4bfb-9192-6e15aa0e25a2@default> References: <37c99926-a5e5-4fa8-b734-6f9c146740e9@default> <837epq6sxx.fsf@gnu.org> <5AC1EFC0.6020801@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1522675874 31831 195.159.176.226 (2 Apr 2018 13:31:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2018 13:31:14 +0000 (UTC) Cc: 31020@debbugs.gnu.org To: martin rudalics , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 02 15:31:10 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2zY9-00080l-Q4 for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Apr 2018 15:31:05 +0200 Original-Received: from localhost ([::1]:35204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2zaD-0007i4-KQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Apr 2018 09:33:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2za5-0007hI-LN for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 09:33:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2za2-00079M-Dw for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 09:33:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55113) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f2za2-00079H-90 for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 09:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f2za2-0007v7-2p for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 09:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Apr 2018 13:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31020 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31020-submit@debbugs.gnu.org id=B31020.152267597930437 (code B ref 31020); Mon, 02 Apr 2018 13:33:02 +0000 Original-Received: (at 31020) by debbugs.gnu.org; 2 Apr 2018 13:32:59 +0000 Original-Received: from localhost ([127.0.0.1]:34777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2zZz-0007ur-DE for submit@debbugs.gnu.org; Mon, 02 Apr 2018 09:32:59 -0400 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:45654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f2zZy-0007uc-77 for 31020@debbugs.gnu.org; Mon, 02 Apr 2018 09:32:58 -0400 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w32DStXc142076; Mon, 2 Apr 2018 13:32:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=bPu67b9kB4E2pRPsk3O1coiGtJ4A6/rnUEtmGTamZG4=; b=likh2wewNL/1EqnLLkVxaviHka3LprqqTpo04KyxYl72324EmSLGjLZPJxUluWlL9aMs 8pzArPTuGS99dnPzU6jj90ZvDr5v4rCa1PY4DluBA9iUx9yQYUPoY0iFcThfO5Tyadhm 8Dzt1ikWIFn1Sr5X+oPqq3lTSOAIt/NCnOlaMCJaHCkeHwORZaCugi5EwOQZzUar2LZ4 p5KPMgmQzIfHmkBH7tZY6RQd1wsdBbHtRfR5aLikZ4gBUiudfcGLMxGBJSzHWeOw88Nc W3GksmdD1K8kRnMH39aiVaMdkewjFTL1/QYbNxM+fA9Leb1xtnpCrq9k+bGRkcRgWaNt ew== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2h3neng0k8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 02 Apr 2018 13:32:52 +0000 Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w32DWpCX002432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 2 Apr 2018 13:32:51 GMT Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w32DWoD3023307; Mon, 2 Apr 2018 13:32:51 GMT In-Reply-To: <5AC1EFC0.6020801@gmx.at> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4666.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8850 signatures=668697 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=710 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804020149 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144796 Archived-At: > 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))) >=20 > 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. That's good to know; thanks. But I don't think it will help code that has only a given frame to examine, e.g., code that doesn't want to bother some user by creating or resizing frames to determine this. And anyway, the _code_ cannot, by itself, tell the _visibly wrapped_ condition. IOW, that suggestion might help a user to determine, by looking, what the situation is. But I don't see how I could use in from Lisp to know what the situation is. Let me know, if I'm missing something simple. > 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. Ah, that's just what I meant above. Thanks for confirming.