From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: pop-up tool-bar Date: Sun, 10 Oct 2004 12:15:01 -0700 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1097435967 19243 80.91.229.6 (10 Oct 2004 19:19:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 10 Oct 2004 19:19:27 +0000 (UTC) Cc: frasson@altair.math.leidenuniv.nl, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 10 21:19:15 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CGjDu-0003HT-00 for ; Sun, 10 Oct 2004 21:19:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CGjKo-0000Hv-Rr for ged-emacs-devel@m.gmane.org; Sun, 10 Oct 2004 15:26:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CGjKh-0000Hp-Ok for emacs-devel@gnu.org; Sun, 10 Oct 2004 15:26:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CGjKh-0000Hd-A4 for emacs-devel@gnu.org; Sun, 10 Oct 2004 15:26:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CGjKh-0000Ha-6J for emacs-devel@gnu.org; Sun, 10 Oct 2004 15:26:15 -0400 Original-Received: from [141.146.126.231] (helo=agminet04.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CGjDH-0006cd-Pz; Sun, 10 Oct 2004 15:18:36 -0400 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.191.11]) by agminet04.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i9AJFHiG016874; Sun, 10 Oct 2004 12:15:18 -0700 Original-Received: from rgmgw2.us.oracle.com (localhost [127.0.0.1]) by rgmgw2.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id i9AJFHHq014082; Sun, 10 Oct 2004 13:15:17 -0600 Original-Received: from dradamslap (dhcp-amer-csvpn-gw1-141-144-65-5.vpn.oracle.com [141.144.65.5]) by rgmgw2.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id i9AJFFIJ014040; Sun, 10 Oct 2004 13:15:16 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28190 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28190 You're right, in terms of the implementation that I sent. That uses `scroll-down', which depends on the height of the text at the top of the window (and if a line has mixed font sizes, the maximum face height in the line appears to be determinant). The `tool-bar-lines' frame property is measured in line units that correspond to the height of the font that is the `frame-font' frame property. What's really needed is to scroll this amount, regardless of the text font size. I don't know of a way to do that in Lisp. It could be done in C, I'm sure. The implementation I sent was intended as a proof of concept, to help us see if a pop-up tool-bar would be useful. In the email you quoted, I was not referring to this implementation, however (that was in a separate email of the same thread). I was speaking in terms of general principles, raising the question of which behavior is more intuitive for users. If the compensatory scroll were exactly equal to tool-bar-lines in height, then which would be preferable for a user? I probably should have posed the choice differently, because, if the current behavior for _displaying_ the tool-bar is kept, then you don't want the buffer to scroll when the tool-bar _disappears_. That is, the same mechanism, whatever it is, needs to be used for both displaying and removing the tool-bar. What I really meant was this choice: ----------------------------------- 1. When displaying the tool-bar, let it _replace_ the first few lines displayed in the window. When removing the tool-bar, _redisplay_ those displaced lines. Then, the buffer lines don't jump up and down with the appearance and disappearance of the tool-bar. The tool-bar just masks buffer lines; the lines don't move up or down. 2. When displaying the tool-bar, do as is done currently: shift the buffer text down, so that the same lines remain visible. When removing the tool-bar, move the buffer text back up. In this case, the tool-bar doesn't replace (mask) lines; it is an addition. I don't know which is preferable, in general. I would guess that it depends on how often you display & remove the tool-bar. If you don't do that often, then choice 2 is probably better. But if you display and remove the tool-bar often, as in a pop-up tool-bar, then choice 1 is probably better. I'm guessing that many (most) Emacs users will _not_ want to display the tool-bar on each and every frame all the time. Some of them will want to use the tool-bar, however (that's why we added it!), so a pop-up tool-bar that is displayed only on the selected frame is a good compromise. For a pop-up tool-bar, choice 1 may be preferable: let the temporary tool-bar _mask_ the first few buffer lines, so that the buffer text doesn't visually shift up and down for the temporary tool-bar display. - Drew -----Original Message-----From: Richard Stallman - Move the buffer text down, to compensate for the tool-bar disappearance. That is, replace the tool-bar with an equivalent number of lines of buffer text. The text then stays in the same position relative to the display. In general, line heights can vary, so this would require displaying a partial line.