From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aura Kelloniemi Newsgroups: gmane.emacs.bugs Subject: bug#50865: 28.0.50; Emoji with emoji modifier in Linux console garbles emacs display Date: Tue, 28 Sep 2021 17:11:22 +0300 Message-ID: <87o88chjsl.fsf@sange.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18452"; mail-complaints-to="usenet@ciao.gmane.io" To: 50865@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 28 16:12:25 2021 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 1mVDqK-0004cN-I6 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Sep 2021 16:12:24 +0200 Original-Received: from localhost ([::1]:49994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVDqI-0005mz-Rz for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Sep 2021 10:12:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVDpz-0005mj-DF for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2021 10:12:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVDpz-00036z-18 for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2021 10:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVDpy-00025L-Iv for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2021 10:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Aura Kelloniemi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Sep 2021 14:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50865 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16328382987984 (code B ref -1); Tue, 28 Sep 2021 14:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Sep 2021 14:11:38 +0000 Original-Received: from localhost ([127.0.0.1]:46594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVDpZ-00024h-T4 for submit@debbugs.gnu.org; Tue, 28 Sep 2021 10:11:38 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVDpY-00024Y-Nn for submit@debbugs.gnu.org; Tue, 28 Sep 2021 10:11:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVDpY-0005lU-JG for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2021 10:11:36 -0400 Original-Received: from oiva.sange.fi ([2a03:e581:4:200:aa51::150]:34408 helo=smtp.sange.fi) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVDpV-0002bK-OU for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2021 10:11:36 -0400 Original-Received: from 88-114-110-12.elisa-laajakaista.fi ([88.114.110.12] helo=solaria) by oiva.sange.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1mVDpM-0005mE-Op for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2021 17:11:27 +0300 Received-SPF: pass client-ip=2a03:e581:4:200:aa51::150; envelope-from=kaura.dev@sange.fi; helo=smtp.sange.fi X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:215775 Archived-At: Hello, I'm running emacs in the Linux virtual console. Showing text that contains Unicode emoji characters with modifiers causes wrong output. The problem may be related to the fact that Linux basically does not understand Unicode composition, multi-column charactes or anything fancy. Anyhow, here are the instructions to reproduce this: Run emacs -Q In the scratch buffer on an empty line: Type C-x 8 RET PERSON WITH FOLDED HANDS RET =F0=9F=99=8F appears followed by the cursor. This is what I expect. (In the= TTY screen only a black diamond is shown, but I can verify from /de/vcsu that the character really is an emoji.) Then type C-x 8 RET EMOJI MODIFIER FITZPATRICK TYPE-3 RET Now the emoji modifier appears (again as a diamond), but it is followed by a space character. So now the line looks like: _cursor_ I think that the space there should not be added. My guess is that the space is actually not written to the terminal, but that emacs misplaces the curso= r. Now if a press backspace to delete the last typed character (the emoji modifier), only the space disappears. If I then press backspace again, both= the emoji and the modifier disapper at the same time. Interestingly, if I repeat the process of adding the above mentioned emoji = and the modifier characters on a line two times (starting again from an empty line), the line looks like this: _cursor_ If I now run M-x redraw-display RET, the line looks like this: _cursor_ So for some reason there are now three spaces before the cursor. I tried this on Debian version of Emacs 26.1, and the results were similar, but not exactly identical. Why do I care? If I use a Linux console, and it cannot display emoji, why d= oes this matter? Because if there is any other text on the same line, it often gets very garbled, especially if Emacs decides to only update the line partially. I cannot stop other people from using emojis nowadays, and that's why I'd l= ike Emacs to tolerate them. I will gladly provide more detail. I'm also interested in any (dirty) hacks that could be used to work around this issue, as it disturbs my emacs usage all the time (I use Telegram from within Emacs). If I run emacs within GNU screen (that itself runs in a Linux VT), this problem does not seem to appear. There are other issues with some Unicode characters in screen, but I haven't yet found a clear way to reproduce these issues. Below is the data produced by M-x report-emacs-bug RET In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, c= airo version 1.17.4) of 2021-09-26 built on solaria Repository revision: 43ae8c828d853382bbc2a27b9e14b9fff6ba18b6 Repository branch: makepkg System Description: Arch Linux Configured using: 'configure --prefix=3D/usr --sysconfdir=3D/etc --libexecdir=3D/usr/lib --localstatedir=3D/var --with-native-compilation --with-x-toolkit=3Dgtk3 --with-xft --with-wide-int --with-modules --with-gameuser=3D:games --with-sound=3Dalsa --with-cairo --with-harfbuzz --enable-link-time-optimization 'CFLAGS=3D-march=3Dnative -mtune=3Dnative = -O2 -pipe -fno-plt -fuse-ld=3Dgold -flto -fuse-ld=3Dgold -flto' LDFLAGS=3D-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now CPPFLAGS=3D-D_FORTIFY_SOURCE=3D2' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB Important settings: value of $LANG: fi_FI.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/d Minor modes in effect: gpm-mouse-mode: t leaf-key-override-global-mode: t shell-dirtrack-mode: t savehist-mode: t minibuffer-electric-default-mode: t icomplete-mode: t desktop-save-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: linux auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t Load-path shadows: /home/aura/.config/emacs/elpa/magit-20210925.1143/magit-section-pkg hides /= home/aura/.config/emacs/elpa/magit-section-20210829.1849/magit-section-pkg /home/aura/.config/emacs/elpa/transient-20210919.1006/transient hides /usr/= share/emacs/28.0.50/lisp/transient Features: (shadow sort mail-extr emacsbug sendmail cursor-sensor t-mouse term/linux desktop+ haskell-mode haskell-cabal haskell-utils haskell-font-lock haskell-indentation haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports haskell-complete-module haskell-ghc-support flymake-p= roc flymake warnings dabbrev haskell-customize python tramp-sh autorevert filenotify conf-mode cargo cargo-process markdown-mode color racer f s dash company-oddmuse company-keywords company-etags etags fileloop xref project company-gtags company-dabbrev-code company-dabbrev company-files company-cl= ang company-capf company-cmake company-semantic company-template company-bbdb vc-git vc-dispatcher rust-utils rust-mode rx rust-rustfmt rust-playpen rust-compile compile rust-cargo yaml-mode org-element avl-tree generator ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-search eieio-opt cl-extra help-mode speedbar ezimage dframe gnus-art mm-uu mml2015 gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 net= rc nnoo gnus-spec gnus-int gnus-range gnus-win gnus nnheader ol-docview doc-vi= ew jka-compr image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat advice org-m= acs org-loaddefs find-func recentf tree-widget notmuch notmuch-tree notmuch-jump notmuch-hello notmuch-show notmuch-print notmuch-crypto notmuch-mua notmuch-message notmuch-draft notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser notmuch-wash diff-mode easy-mmode coolj notmuch-query goto-addr thingatpt icalendar diary-lib diary-loaddefs cal-me= nu calendar cal-loaddefs notmuch-tag crm notmuch-lib notmuch-version notmuch-compat hl-line message rmc puny dired dired-loaddefs rfc822 mml mailabbrev gmm-utils mailheader mm-view mml-smime mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs mail-utils text-property-search smime dig mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr server leaf-keywords leaf finder-inf package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap url-handlers url-parse url-vars cus-edit pp wid-edit tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat shell pcomplete comint ansi-color ri= ng parse-time iso8601 time-date ls-lisp format-spec auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map savehist minibuf-eldef keypad ido seq byte-opt gv bytecomp byte-compile cconv icompl= ete company edmacro kmacro pcase subr-x desktop frameset cl-loaddefs cl-lib cus-load info iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomm= ent text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-l= ang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loadde= fs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 541107 17966) (symbols 48 48459 2) (strings 32 220875 3286) (string-bytes 1 6213483) (vectors 16 57360) (vector-slots 8 1387450 51457) (floats 8 484 304) (intervals 56 910 2) (buffers 992 39)) --=20 Aura