From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: HTML-Info design Date: Tue, 27 Jan 2015 20:15:42 +0200 Message-ID: <83a914ozsh.fsf@gnu.org> References: <87sig6xech.fsf@ferrier.me.uk> <83fvc5ni0u.fsf@gnu.org> <87k31fwwyv.fsf@ferrier.me.uk> <87bnmq9ibf.fsf@ferrier.me.uk> <87lhlrx5fc.fsf@building.gnus.org> <878uhrcr5l.fsf@building.gnus.org> <83sifzjflk.fsf@gnu.org> <87fvbyagaw.fsf@building.gnus.org> <83iogujvbq.fsf@gnu.org> <87tx0ee7rf.fsf@building.gnus.org> <83egricpvg.fsf@gnu.org> <87zj97vic8.fsf@building.gnus.org> <83wq4argjp.fsf@gnu.org> <87iofui8vo.fsf@building.gnus.org> <838ugqqczp.fsf@gnu.org> <877fw9dndz.fsf@building.gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1422382900 11751 80.91.229.3 (27 Jan 2015 18:21:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 27 Jan 2015 18:21:40 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 27 19:21:37 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YGAlc-00024U-C7 for ged-emacs-devel@m.gmane.org; Tue, 27 Jan 2015 19:21:36 +0100 Original-Received: from localhost ([::1]:49099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGAiB-00054L-0s for ged-emacs-devel@m.gmane.org; Tue, 27 Jan 2015 13:18:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGAgL-0002vb-C9 for emacs-devel@gnu.org; Tue, 27 Jan 2015 13:16:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGAgG-0005LR-4s for emacs-devel@gnu.org; Tue, 27 Jan 2015 13:16:09 -0500 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:40749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGAgF-0005Ks-U8 for emacs-devel@gnu.org; Tue, 27 Jan 2015 13:16:04 -0500 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NIU00100LBSOF00@mtaout26.012.net.il> for emacs-devel@gnu.org; Tue, 27 Jan 2015 20:15:49 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIU00GTBLECRN90@mtaout26.012.net.il>; Tue, 27 Jan 2015 20:15:49 +0200 (IST) In-reply-to: <877fw9dndz.fsf@building.gnus.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181847 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Tue, 27 Jan 2015 12:26:48 +1100 > > `font-at' doesn't seem to like to be called in buffers that aren't > displayed in a window: > > (with-temp-buffer > (insert (propertize "foo" 'face 'variable-pitch)) > (font-at (point-min))) > > => > > Debugger entered--Lisp error: (error "Specified window is not displaying the current buffer") Yes, you need to arrange for the buffer to be current and displayed in the window you pass to the function. See the function's doc string. > shr uses temporary buffers to format various bits, so this doesn't seem > to be a practical approach when determining the pixel widths of text. You can invoke font-at on a string instead of buffer.