From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carsten Dominik Newsgroups: gmane.emacs.help Subject: header-line, scroll bars and fringes Date: Fri, 06 Jul 2007 10:49:32 +0200 Organization: Faculty of Science, University of Amsterdam Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183719376 7100 80.91.229.12 (6 Jul 2007 10:56:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2007 10:56:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 06 12:56:15 2007 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6lTx-0006Vl-FT for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Jul 2007 12:56:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6lTx-0005xN-4l for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Jul 2007 06:56:13 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!multikabel.net!feed20.multikabel.net!border1.nntp.ams.giganews.com!nntp.giganews.com!tudelft.nl!binfeed1.tudelft.nl!usenet.uva.nl!news.science.uva.nl!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-Distribution: world Original-NNTP-Posting-Host: nb-dominik2.science.uva.nl Original-X-Trace: info.science.uva.nl 1183711770 14254 146.50.22.167 (6 Jul 2007 08:49:30 GMT) Original-X-Complaints-To: usenet@science.uva.nl Original-NNTP-Posting-Date: Fri, 6 Jul 2007 08:49:30 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) Cancel-Lock: sha1:q1mzjW8p5ZJsM5+mgQ/6/JuioMY= Original-Xref: shelby.stanford.edu gnu.emacs.help:149910 X-Mailman-Approved-At: Fri, 06 Jul 2007 06:55:57 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45500 Archived-At: Hi, I am having the following problem: I am trying to use the header-line-format as a title line for a column, So I need to insert a string into the header-line-format, and I need to align this string with text in the buffer. The problem is that the header line starts all the way to the left in the frame, while buffer text starts only after the scroll bar and after the fringe. So what I need to do it to compute how wide these two are, and then to construct an empty string of the same width (approx is ok). So Far I have this: width of the left fringe in pixels: (or (car (window-fringes)) 0) width of the scroll bar: (* (or scroll-bar-width 11) (if (eq (car (window-current-scroll-bars)) 'left) 1 0)) Here is alredy the problem that scroll-bar-width is usually nil, and some "default" value is used, but I don't know from where this value comes. Finally, I need the width of SPACE in the current font, in pixels, and I have have no idea where I could get this from. Any ideas? Thanks. - Carsten