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#65993: 29.1; emoji-insert show nothing without font settings Date: Sun, 17 Sep 2023 13:42:07 +0300 Message-ID: <83zg1lf5ds.fsf@gnu.org> References: <83led7jvni.fsf@gnu.org> <83zg1mipgi.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3782"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65993@debbugs.gnu.org To: awrhygty@outlook.com, Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 17 12:43:21 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 1qhpFJ-0000re-15 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Sep 2023 12:43:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhpEt-0007ze-Ni; Sun, 17 Sep 2023 06:42:55 -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 1qhpEs-0007zP-BZ for bug-gnu-emacs@gnu.org; Sun, 17 Sep 2023 06:42:54 -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 1qhpEs-0001ec-40 for bug-gnu-emacs@gnu.org; Sun, 17 Sep 2023 06:42:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qhpEz-00078a-KX for bug-gnu-emacs@gnu.org; Sun, 17 Sep 2023 06:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Sep 2023 10:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65993 X-GNU-PR-Package: emacs Original-Received: via spool by 65993-submit@debbugs.gnu.org id=B65993.169494734627393 (code B ref 65993); Sun, 17 Sep 2023 10:43:01 +0000 Original-Received: (at 65993) by debbugs.gnu.org; 17 Sep 2023 10:42:26 +0000 Original-Received: from localhost ([127.0.0.1]:49160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhpEQ-00077k-FO for submit@debbugs.gnu.org; Sun, 17 Sep 2023 06:42:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhpEN-00077W-VW for 65993@debbugs.gnu.org; Sun, 17 Sep 2023 06:42:25 -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 1qhpEA-0001a4-NK; Sun, 17 Sep 2023 06:42:10 -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=ocSzEISJyIyHncmE1O6KTNC82rYPyN4f8z7dU3oB1Q4=; b=YTpZN8jyeV/1 SYciBu/ivl9ucvMmYEOrgt3J1UntkkVQn08ZdYxZtfiSfFVT8ZCd6a2kMxMtBLTdoAsXvBpSdhS45 mSQn13beU3hWrVO9+mGDTcRF67599qAy2VczWL8nj4weLRUyRZUIf1rQ+SRv93IWbVNtyIcOj5j2N IQhnPIBRoFckZtkW5DtAyFdOHBkc62ufXd6LmlrtB1etrAR2KUkbRcop4kaHYl+gMnqCJZvJL6Zzb /hiR+KCNy0GR1YVBemdHI0IdrVkMa/39AyRiX1/k+m0Hkd2hd0g5JEImPVHRfPWV7wo4kt0wPIICv lAO5EFt859LNaXvu84Rvaw==; In-Reply-To: (awrhygty@outlook.com) 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:270687 Archived-At: > From: awrhygty@outlook.com > Cc: 65993@debbugs.gnu.org > Date: Sun, 17 Sep 2023 18:37:02 +0900 > > Eli Zaretskii writes: > > >> >> And once emoji-insert is called before font setting, > >> >> emoji-insert does not show emoji items after they are made visible in > >> >> emacs buffer with font settings. > >> > > >> > This is not a bug: you need to clear the font cache to get Emacs to > >> > react to newly-installed fonts without restarting Emacs. Like this: > >> > > >> > M-: (clear-font-cache) RET > >> > >> Evaluating (clear-font-cache) have no effect on emoji-insert. > >> Perhaps menu items are cached in another place. > > > > Maybe. You can also try clear-composition-cache. If that doesn't > > help either, just restart the session. Installing new fonts and > > reconfiguring fontsets while running Emacs is not fully supported, due > > to many caches we have for fonts and compositions. > > The definition of emoji-insert is as below: > (defun emoji-insert () > "Choose and insert an emoji glyph." > (interactive "*") > (emoji--init) > (unless (fboundp 'emoji--command-Emoji) > (emoji--define-transient)) > (funcall (intern "emoji--command-Emoji"))) > > The function emoji--init evaluates (require 'emoji-labels). > In the file emoji-labels.el, the variable emoji--labels is defined. > Its value is a hierarchical alist of emoji menu. > Then, inside the function emoji--init, non-displayable emojis in > emoji--labels are removed from alist. > After the function emoji--init, many functions are automatically > generated. Each of them corresponds to one item of emoji menu, > from which non-displayable emojis are already removed. > Finally emoji-insert calls the function of the top menu. > > To change the emoji menu, I need to evaluate: > (progn (load emoji-labels) (emoji--init)) > This form resets emoji--labels and redefines menu functions. > > I think the removal of non-displayable emojis is unnecessary. > If hex numbers are displayed, users can notice there are more emojis > than displayable. If it is difficult to find displayable emojis among > many non-displayable emojis, the menu classification is not > appropriate. Too many emojis in one menu node make user unable to find > the purpose emoji. Lars, any comments?