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: Wed, 28 Jan 2015 17:26:09 +0200 Message-ID: <83twzbncz2.fsf@gnu.org> References: <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> <83a914ozsh.fsf@gnu.org> <878ugn1vxn.fsf@building.gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1422458833 6880 80.91.229.3 (28 Jan 2015 15:27:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Jan 2015 15:27:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 28 16:27:12 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 1YGUWN-0002w0-7l for ged-emacs-devel@m.gmane.org; Wed, 28 Jan 2015 16:27:11 +0100 Original-Received: from localhost ([::1]:54184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGUWM-0008OY-KW for ged-emacs-devel@m.gmane.org; Wed, 28 Jan 2015 10:27:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGUVl-000821-QB for emacs-devel@gnu.org; Wed, 28 Jan 2015 10:26:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGUVg-0001uO-AR for emacs-devel@gnu.org; Wed, 28 Jan 2015 10:26:33 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:38995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGUVg-0001uI-2n for emacs-devel@gnu.org; Wed, 28 Jan 2015 10:26:28 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NIW00E007T96900@mtaout24.012.net.il> for emacs-devel@gnu.org; Wed, 28 Jan 2015 17:18:07 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIW008UG7U7WM40@mtaout24.012.net.il>; Wed, 28 Jan 2015 17:18:07 +0200 (IST) In-reply-to: <878ugn1vxn.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.180 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:181911 Archived-At: > From: Lars Ingebrigtsen > Cc: emacs-devel@gnu.org > Date: Wed, 28 Jan 2015 13:27:32 +1100 > > Eli Zaretskii writes: > > >> 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. > > Thanks. Does that make sense, though? I'm guessing that using > `font-at' on a string, it implicitly uses the current window for > something. `font-at' on a buffer could use the same logic, couldn't it? No, it couldn't use the same logic. But it could use something similar, if Someone(TM) cared to write code to do that. As things stand, the function uses existing infrastructure, which imposes this limitation.