From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: What is a default font? Date: Thu, 5 Dec 2019 08:50:46 +0100 Message-ID: <49f627ce-69c1-6456-68aa-57659e7cb7ca@gmx.at> References: <4c86b07f-175d-f6cf-171a-b58474ab717a@gmx.at> <83tv6ghxxk.fsf@gnu.org> <87h82f6fv1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="112427"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , emacs-devel@gnu.org To: =?UTF-8?B?xaB0xJtww6FuIE7Em21lYw==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 05 08:51:39 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iclvF-000T44-6v for ged-emacs-devel@m.gmane.org; Thu, 05 Dec 2019 08:51:37 +0100 Original-Received: from localhost ([::1]:51148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iclvD-0003w2-At for ged-emacs-devel@m.gmane.org; Thu, 05 Dec 2019 02:51:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43405) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iclud-0003vw-3Y for emacs-devel@gnu.org; Thu, 05 Dec 2019 02:51:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icluX-0007vd-Al for emacs-devel@gnu.org; Thu, 05 Dec 2019 02:50:57 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:60723) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icluT-0007kM-HR; Thu, 05 Dec 2019 02:50:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1575532247; bh=nlHn9WnTfWBCD3YzsUrgGmArjKyCOiUMWzKjwuQhd0Y=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=TcDYryW+6sQA8iZKQ5RwYsDj8gCEtO9yDs/EGBWbWeWrjRLUEFDQLhoqxN0iNPGZo s8/bdxLhecrSL6nqR4BQT+r15Y2jx/Gm9wjHccH4W8etHBDQ85bDerYUlgdCfMiQ3c 9RMW1ZjtCFHCaAnaEIp7jsmCH9asGHBdWTvZ11sc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([212.95.5.161]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MbirE-1i2t7w3Z4Y-00dIP3; Thu, 05 Dec 2019 08:50:46 +0100 In-Reply-To: <87h82f6fv1.fsf@gmail.com> Content-Language: de-AT X-Provags-ID: V03:K1:IpEQ2O3POz/egwvWqkYuAldi1NJ5BhkRdXcly8jLAwrw17eA9C8 8DQnKi5S63Zrgns1Vw+BaLd2IKwwHw8zlOjYqThOVH6nbUxY9Z9cuXDEFXoTR/5WaL7sGky JLXfZPYBqRCG8PCtOfnjDvrk/vHlMiIrSNXbikgpyHL8sWaPGk9YYM9qapHDAf8/WREeu4N MPX5OS5aqqUPIvyvTDFVw== X-UI-Out-Filterresults: notjunk:1;V03:K0:QKwbBy2+ECw=:vCNSzcqcGJivVYwo75BIXS adsHKGOQrJ3LIUPIJu/oytLGdNxv/hZ1JOI4uD3TnExVdtfaNGZ8sAAgoxKeIlXYMD5mqaHRb jupQJO+23LOYUW6TT+CXW6h9SxN+BVe5/PRzYC44hWgb24F7Z1qCIMvogbLuxa0WU+KmEjAaQ F/x8jaj8AlDWsRNVbui/+gzAtKPRK3aXCl8bMlOrY5YQ5/bBjK1+nUzs++kq1amCIPmkPW2Ev +2AMtg4wnJbcMbeiQZHdrTXHFcG3/2Nkt7PlwhzV3bJlqlACRhGdUU4B72Kn1U8kZsZbPf+e0 EpAvlNDuA8w9ARyYBw27mOwjhLB6V+bTz5HKfd2J/MDMr7nspfyAj736+StXYcD2YxaB30nhu OA2Gz/auh7ffJoLSOw7XGx0xc3BhdFuJ8bnvFkmh4fjdsBzDEhY3O4gN2zm28FJHutmPrU+oh gWaJX0PNcfgNDSVpq/4sVMnzDycIkdlSKPRDIQmrM1VNZ5592a8NEZB9BzcU0vC96Ox7fbu8B HAgBOuVIEvud27qXsRHKVuyQLgG7+T+IavXawgNLXvRb9Nu3zYakU6mUdJGoPVeqDS5c+H7/V 3mwLDefL/bFXdgrhOyHXYl2VrEfZ4f1j6QOHy8cYmOu7pYzRkXxovAp73ltpvlJo1o8yze8h1 3mOTkguodUb5A7FvKEyOAXFLI7z4L+2JmldT5OVKAzuKD9u6Yj4c2Z08K1RErEv7VhJWbIQ7V 5ZBDOPBAFEhytewaJiyWaamvXuc1CjTWMWbAOI8+91OwKL0M/WlPUHJiSJp1sWAOqKIGrew/ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:243145 Archived-At: > Indeed, FWIW I've been bitten by this recently, too, and have been > meaning to submit the patch attached, although now seeing this > discussion, more clarification (and from a more knowledgeable person) > might be needed. I simply corrected what seemed to be obvious errors, > but maybe it can at least serve as another evidence of the confusion. I think I got the idea now. Many parts of the display engine don't care about reality - this is one of them. You have only to trick her into believing that an arbitrary buffer is displayed in the selected window of the selected frame and she will start to work on it. So (let ((buffer (current-buffer))) (with-selected-window window (with-current-buffer buffer ... should get her telling us the default font, including remapping, for the current buffer if it were displayed in WINDOW. If WINDOW doesn't exist yet, some workaround could be used to pass 'face-font' a t FRAME argument. But the innards of 'face-font' are, in fact, irrelevant: This function just takes whatever has been set up by the caller, regardless of whether the current buffer is shown in the selected window or not. The problem is, that this concept contrasts with that of other Emacs functions that require, for example, that a buffer is really a window's buffer in order to work correctly. And it strikes back when the display engine shows her innards, for example, when she temporarily selects a window for drawing its mode line and the user has no idea what the "really selected window" is. martin