From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Pixel-based display functions Date: Sun, 01 Feb 2015 23:31:04 +1100 Message-ID: <87ioflq0dz.fsf@building.gnus.org> References: <87k306pfi9.fsf@building.gnus.org> <87egqekrd7.fsf@building.gnus.org> <877fw53eat.fsf@building.gnus.org> <877fw4zsdv.fsf@building.gnus.org> <831tmcn4k4.fsf@gnu.org> <87386szq1w.fsf@building.gnus.org> <83wq44ljm9.fsf@gnu.org> <87vbjowlqv.fsf@building.gnus.org> <83oapglbx6.fsf@gnu.org> <83lhkkl23i.fsf@gnu.org> <83bnlgkl1s.fsf@gnu.org> <837fw3l7uz.fsf@gnu.org> <54CD4B27.4080201@gmx.at> <874mr6qvi5.fsf@building.gnus.org> <87sieqpfxh.fsf@building.gnus.org> <54CDE908.7050908@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1422793923 20282 80.91.229.3 (1 Feb 2015 12:32:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Feb 2015 12:32:03 +0000 (UTC) Cc: Eli Zaretskii , Stefan Monnier , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 01 13:31:58 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 1YHtgz-00077R-NM for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2015 13:31:57 +0100 Original-Received: from localhost ([::1]:50243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHtgz-0006NH-0H for ged-emacs-devel@m.gmane.org; Sun, 01 Feb 2015 07:31:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHtgk-0006N1-Cx for emacs-devel@gnu.org; Sun, 01 Feb 2015 07:31:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHtgh-0003VN-6k for emacs-devel@gnu.org; Sun, 01 Feb 2015 07:31:42 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:53478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHtgg-0003VC-Vi; Sun, 01 Feb 2015 07:31:39 -0500 Original-Received: from diaman3.lnk.telstra.net ([203.45.116.145] helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1YHtgG-0001pW-F3; Sun, 01 Feb 2015 13:31:13 +0100 In-Reply-To: <54CDE908.7050908@gmx.at> (martin rudalics's message of "Sun, 01 Feb 2015 09:51:20 +0100") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-MailScanner-ID: 1YHtgG-0001pW-F3 MailScanner-NULL-Check: 1423398674.05578@Qqh5Ge6DfazaZYU2bRYUdw X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 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:182172 Archived-At: martin rudalics writes: >> The main problem with it is that it has to >> work in a window, and much of the computation in shr takes place in >> temporary buffers. But perhaps that can be worked around somehow. > > No. Display can be affected by the window the text is displayed in, for > example, if you use something like an overlay with a window property. > In addition, you have to account for the default face of the window's > frame. So you have to, at least temporarily, associate the text with > the window where you eventually want to show it to get these applied. Yes, that's what I meant by "worked around somehow". :-) If the eww buffer is visible in a window (and it usually should be), I can insert text I want to know the width of there, call the function, and then delete it again. However, if the eww buffer isn't visible, that approach won't be possible... But the other things you mention here (default window faces and overlays and stuff) doesn't apply to eww at all, so it kinda sounds like I could just do all this in a buffer that's even more likely to be associated with a window, like the echo area. Or is that too hacky to contemplate? I think it might be... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/