From: awrhygty@outlook.com
To: Eli Zaretskii <eliz@gnu.org>
Cc: 65993@debbugs.gnu.org
Subject: bug#65993: 29.1; emoji-insert show nothing without font settings
Date: Sun, 17 Sep 2023 18:37:02 +0900 [thread overview]
Message-ID: <TYZPR01MB39206AD41D0D6C8E2A0CE9D9C3F4A@TYZPR01MB3920.apcprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <83zg1mipgi.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Sep 2023 02:48:03 -0400")
Eli Zaretskii <eliz@gnu.org> 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.
next prev parent reply other threads:[~2023-09-17 9:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 12:06 bug#65993: 29.1; emoji-insert show nothing without font settings awrhygty
2023-09-15 15:36 ` Eli Zaretskii
2023-09-16 6:12 ` awrhygty
2023-09-16 6:47 ` Eli Zaretskii
2023-09-17 9:37 ` awrhygty [this message]
2023-09-17 10:42 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=TYZPR01MB39206AD41D0D6C8E2A0CE9D9C3F4A@TYZPR01MB3920.apcprd01.prod.exchangelabs.com \
--to=awrhygty@outlook.com \
--cc=65993@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).