unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eduardo Ochs <eduardoochs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: A question about emojis - like \N{HEAVY BLACK HEART}
Date: Sat, 4 Feb 2023 06:00:41 -0300	[thread overview]
Message-ID: <CADs++6hokJJ0MP0gbkX9AyRHvpL+xpZ8a6bzAv-+C-6dsKs9yA@mail.gmail.com> (raw)
In-Reply-To: <83a61tvs8j.fsf@gnu.org>

On Sat, 4 Feb 2023 at 03:51, Eli Zaretskii <eliz@gnu.org> wrote:
>
> Append u+FE0F to each one of those.
>
> These characters are not by default considered Emoji, because that's
> what Unicode says about them.  If you evaluate, for example,
>
>    M-: (aref char-script-table ?❤) RET
>
> you will see that it yields 'symbol', not 'emoji'.  To ask Emacs to
> display the Emoji appearance of these two characters, you must follow
> them with u+FE0F.  The other characters yield 'emoji' from the above
> expression, so they are displayed as Emoji by default.
>
> The reason for this behavior is that many symbol characters have dual
> purpose, both as "normal" symbol and as Emoji, and we don't want them
> to display as Emoji by default, which will surprise and perhaps annoy
> when this happens in plain text.  Emacs behaves here as Unicode
> mandates, by displaying each symbol according to its default
> appearance, and by supporting the alternate appearance when the
> character sequence requests that.

Hi Eli! Perfect, thanks! =)
Here is the fixed code, with the u+FE0F in two different syntaxes:

  (defun find-estring-mini (string)
    (switch-to-buffer "*string*")
    (kill-region (point-min) (point-max))
    (insert string))

  (defun my-emojis ()
    (interactive)
    (find-estring-mini "
  Slightly smiling face:    \N{SLIGHTLY SMILING FACE}
  Slightly frowning face:   \N{SLIGHTLY FROWNING FACE}
  Face without mouth:       \N{FACE WITHOUT MOUTH}
  Neutral face:             \N{NEUTRAL FACE}
  Upside-down face:         \N{UPSIDE-DOWN FACE}
  Confused face:            \N{CONFUSED FACE}
  Flushed face:             \N{FLUSHED FACE}
  Grimacing face:           \N{GRIMACING FACE}
  Thumbs up sign:           \N{THUMBS UP SIGN}
  Dog face:                 \N{DOG FACE}
  Pile of poo:              \N{PILE OF POO}
  Japanese ogre:            \N{JAPANESE OGRE}
  Thinking face:            \N{THINKING FACE}
  Face with stuck-out...:   \N{FACE WITH STUCK-OUT TONGUE}
  Grinning face with...:    \N{GRINNING FACE WITH ONE LARGE AND ONE SMALL EYE}
  Face with stuck-out...:   \N{FACE WITH STUCK-OUT TONGUE AND
TIGHTLY-CLOSED EYES}

  Crying face:              \N{CRYING FACE}
  Disappointed but...:      \N{DISAPPOINTED BUT RELIEVED FACE}
  Loudly crying face:       \N{LOUDLY CRYING FACE}
  Face screaming in fear:   \N{FACE SCREAMING IN FEAR}
  Confounded face:          \N{CONFOUNDED FACE}
  Angry face:               \N{ANGRY FACE}
  Pouting face:             \N{POUTING FACE}
  Serious face with...:     \N{SERIOUS FACE WITH SYMBOLS COVERING MOUTH}
  Orange heart:             \N{ORANGE HEART}
  Yellow heart:             \N{YELLOW HEART}
  Green heart:              \N{GREEN HEART}
  Blue heart:               \N{BLUE HEART}
  Purple heart:             \N{PURPLE HEART}
  Brown heart:              \N{BROWN HEART}

  Heavy black heart:        \N{HEAVY BLACK HEART}\N{VARIATION SELECTOR-16}
  White frowning face:      \N{WHITE FROWNING FACE}\uFE0F
    "))

Cheers,
  Eduardo



      reply	other threads:[~2023-02-04  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04  2:15 A question about emojis - like \N{HEAVY BLACK HEART} Eduardo Ochs
2023-02-04  6:50 ` Eli Zaretskii
2023-02-04  9:00   ` Eduardo Ochs [this message]

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=CADs++6hokJJ0MP0gbkX9AyRHvpL+xpZ8a6bzAv-+C-6dsKs9yA@mail.gmail.com \
    --to=eduardoochs@gmail.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@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.
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).