From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Box attribute in mode-line and scrolling Date: Sun, 27 Mar 2011 08:06:40 -0700 Message-ID: <32AF9E291ACC41DFA9C6A33A111F8541@us.oracle.com> References: <87zkogu6u4.fsf@gmail.com> <87tyeospbb.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1301238417 27326 80.91.229.12 (27 Mar 2011 15:06:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 27 Mar 2011 15:06:57 +0000 (UTC) To: "'Antoine Levitt'" , Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 27 17:06:52 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q3rYJ-0002vb-Bj for ged-emacs-devel@m.gmane.org; Sun, 27 Mar 2011 17:06:51 +0200 Original-Received: from localhost ([127.0.0.1]:60914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q3rYI-0003iQ-NJ for ged-emacs-devel@m.gmane.org; Sun, 27 Mar 2011 11:06:50 -0400 Original-Received: from [140.186.70.92] (port=51196 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q3rYD-0003hg-By for emacs-devel@gnu.org; Sun, 27 Mar 2011 11:06:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q3rYC-0006pD-9T for emacs-devel@gnu.org; Sun, 27 Mar 2011 11:06:45 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:54700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q3rYC-0006p7-22 for emacs-devel@gnu.org; Sun, 27 Mar 2011 11:06:44 -0400 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p2RF6eBP031187 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 27 Mar 2011 15:06:42 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p2RF6eXA021088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 Mar 2011 15:06:40 GMT Original-Received: from abhmt016.oracle.com (abhmt016.oracle.com [141.146.116.25]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p2RF6dQo028596; Sun, 27 Mar 2011 10:06:39 -0500 Original-Received: from dradamslap1 (/10.159.60.136) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 27 Mar 2011 08:06:39 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87tyeospbb.fsf@gmail.com> Thread-Index: AcvsfTHBnagJwKWzTnmf9GVC2EjNGQADfLUg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Source-IP: acsmt357.oracle.com [141.146.40.157] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090202.4D8F5280.0089,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 148.87.113.121 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:137758 Archived-At: > > That doesn't seem like a bug, but the fact that adding the box > > enlarges the size of the modeline, and likely the last line of the > > window isn't fully displayed. > > Yes, that seems to be what's happening. But how is that not a > bug? > > > Does it also happen if, instead of ":box t" you use ":box > > '(:line-width -1 :style released-button)"? > > Yup, that fixes it, and even if I don't use :style released-button. This gotcha should be pointed out more clearly in the doc, since the default behavior increases the height of the current line, which can throw off various things. The doc is clear, but it could help to explicitly point out that (a) the default value's effective :line-width of 1 increases the height of the text line containing the boxed characters, and that that (b) can automatically lead to a change the window or frame height because Emacs uses an integral number of lines. [If and when the latter is alleviated (there was some talk of making it pixel-based instead of line-based), the doc can be updated to reflect the improvement.] Another possibility, which I would support, would be to change the default :line-width to -1 instead of 1. For backward compatibility we probably should not just reinterpret `t', but we could change the default to `inside', meaning the same as `t' but with a :line-width of -1. The following information, necessary to using :box without problems, is not obvious without studying various parts of the doc (parts that do not cross reference each other): 1. You can use a negative :line-width, and a positive value always increases the effective line height. 2. Window height is based on an integral number of text lines. We would avoid making the user understand all of that just to use boxes, by changing the default :line-width to -1. In that case, a user might still wonder how to get a box with the line moved farther out (analog of #1), but we have doc for that, and that doesn't require understanding of the details about line height. Note too that underline and overline face attributes correspond to a box :line-width of -1, not 1. At least they appear to on my platform. Which is why this line-height gotcha only bites users for :box.