From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Date: Tue, 10 Oct 2023 16:40:54 +0300 Message-ID: <83h6myvbmh.fsf@gnu.org> References: <865y3gq2in.fsf@lan> <83mswsvy0p.fsf@gnu.org> <87bkd7k6b8.fsf@lan> <831qe3ws6d.fsf@gnu.org> <87mswr4ntw.fsf@lan> <83wmvvus3w.fsf@gnu.org> <87cyxnoxp3.fsf@lan> <83pm1mvfw4.fsf@gnu.org> <875y3ews35.fsf@lan> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25606"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66416@debbugs.gnu.org To: Yuchen Guo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 10 15:42:03 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qqCzr-0006RB-Jo for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Oct 2023 15:42:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqCzg-0002lZ-6M; Tue, 10 Oct 2023 09:41:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqCzV-0002k1-TG for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2023 09:41:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqCzV-0007Ps-Ap for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2023 09:41:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqCzq-0004Ij-HL for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2023 09:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Oct 2023 13:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66416 X-GNU-PR-Package: emacs Original-Received: via spool by 66416-submit@debbugs.gnu.org id=B66416.169694529516498 (code B ref 66416); Tue, 10 Oct 2023 13:42:02 +0000 Original-Received: (at 66416) by debbugs.gnu.org; 10 Oct 2023 13:41:35 +0000 Original-Received: from localhost ([127.0.0.1]:34347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqCzP-0004I2-4L for submit@debbugs.gnu.org; Tue, 10 Oct 2023 09:41:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqCzM-0004Ho-FR for 66416@debbugs.gnu.org; Tue, 10 Oct 2023 09:41:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqCyu-0007A7-RI; Tue, 10 Oct 2023 09:41:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pMqujslqkKAcgrUy2CAHm0XnJE6n52w0LZiwiNnPLD4=; b=o6vp3WCFatyB URCXkPrFeaLhgd54zcAlZyI4m3UYBpl9vpRFm6Ee1WKDe3FGZu/W0yQ09r5Q1x6WYkzr2IhtJml21 4VRNmYRVpjVL9s+7EdI4O+WCpatTc1VlgUXt/RaiccbhPKQOvFHMdHlwmVR2O3HsmFtTbMlymhHmi 3qImLqc+gEnJ1Z3cecEcuixCLAnhfGiQCfcxtCcOG+6AuBx33teEDX3kIQfYGZYn9q6RUoIy8azKL 4nnoCtWbJLOjP9pWrqBOoDZ4d39x3/2q7ELIQtOS3Ayfyx76CUj64DV3SvMA3qpiRI0YFKGsnQCwL vALuJz3s7FbArU2+rgYbQw==; In-Reply-To: <875y3ews35.fsf@lan> (message from Yuchen Guo on Tue, 10 Oct 2023 12:59:58 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272217 Archived-At: > From: Yuchen Guo > Cc: 66416@debbugs.gnu.org > Date: Tue, 10 Oct 2023 12:59:58 +0000 > > > Thanks. The question is: how can Emacs distinguish between these > > fonts and decide that one of them is not suitable. > > I think this is not possible without the user explicitly specifying > which variant is needed. In HTML this is done with language tags, such > as lang="zh-Hans", but this strategy only covers a minority of cases, > because > > - the author of the HTML document has to specify this language tag > - the browser must understand this tag > - only applies to HTML documents > > In most other cases, such as the user interface of an Android phone, the > default variant is chosen during language configuration. If a non-CJK > language was chosen, such as en-US for American English (I do this), it > will behave in the same manner as Emacs. Emacs has something similar, it can access the language tags of the font. If the font specifies a language tag, we can configure the default fontset in a way that in specific language-environments the fonts with corresponding language tags are moved to the front of the fontset. Do the fonts that you want to use have such language tags? If they do, which language tags correspond to what language-environments in Emacs? > > In general, Emacs picks up the first font that matches the fontset's > > spec, so we need to come up with two things: (a) the way for Emacs to > > distinguish between these fonts, and (b) the way to encode the > > requirements for a "good" font in our default fontset. Then Emacs > > will be able to pick up the correct font automatically. > > "Good" is, in this case, defined by user. One font suitable for > Mainland China users is not suitable for Taiwan, Hong Kong or Japan > users, and vice versa. These all are different language-environments in Emacs. Type C-x RET l Chinese TAB and you will see the Chinese language-environments that Emacs supports. When Emacs starts, the initial language-environment is determined from the system locale, and the default fontset is arranged accordingly. So if certain language tags should be required from Chinese fonts in specific Chinese language-environments, we can express that in our default fontset, so that the need for configuring fonts manually is avoided in more cases. > In other words, it is impossible for Emacs to determine what variant > does a given user prefer. See above: is it really impossible? > But there's good news. I've rebuilt Emacs from latest commit (9 hours > ago) in the emacs-29 branch, with debug symbols enabled. Fresh out of > the oven! This was all made very simple and declarative thanks to the > Nix package manager: > > https://codeberg.org/m0p/dotfiles/commit/e1fb4ffc4b4ce3a914adbd4c4a49863b2a48afeb > > with the following init.el > > https://codeberg.org/m0p/dotfiles/raw/commit/eec25a4ae443de78ea3d8ea3d94541060d7861d7/imports/not-nix-config-files/emacs-init.el > > We will see if Emacs crashes again. So far with (4 hours, 43 minutes, 3 > seconds) uptime. Thanks.