From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Itai Berli Newsgroups: gmane.emacs.bugs Subject: bug#27544: 25.1; Visualization of Unicode bidirectional marks Date: Sat, 1 Jul 2017 14:48:21 +0300 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1498909814 9606 195.159.176.226 (1 Jul 2017 11:50:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 1 Jul 2017 11:50:14 +0000 (UTC) To: 27544@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 01 13:50:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRGug-00026o-2M for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Jul 2017 13:50:10 +0200 Original-Received: from localhost ([::1]:53836 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRGui-0002Vl-DC for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Jul 2017 07:50:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRGub-0002T5-DS for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2017 07:50:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRGuY-00069G-D5 for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2017 07:50:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dRGuY-00068t-8M for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2017 07:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dRGuX-0006jm-RQ for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2017 07:50:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Itai Berli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2017 11:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27544 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27544-submit@debbugs.gnu.org id=B27544.149890974925829 (code B ref 27544); Sat, 01 Jul 2017 11:50:01 +0000 Original-Received: (at 27544) by debbugs.gnu.org; 1 Jul 2017 11:49:09 +0000 Original-Received: from localhost ([127.0.0.1]:46955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRGth-0006iX-Dh for submit@debbugs.gnu.org; Sat, 01 Jul 2017 07:49:09 -0400 Original-Received: from mail-vk0-f41.google.com ([209.85.213.41]:35398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRGtf-0006iJ-PL for 27544@debbugs.gnu.org; Sat, 01 Jul 2017 07:49:08 -0400 Original-Received: by mail-vk0-f41.google.com with SMTP id 191so77531886vko.2 for <27544@debbugs.gnu.org>; Sat, 01 Jul 2017 04:49:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=7pyTAhnfqY/6kcwGd8vaCnR0jLOYKSwOTc7yBir8+Cg=; b=lS23jXB4un07/JXgGOqevKks6eeESQsOi9FUHhMKgIdQJalrlazIVZZnS+A4n1UmQM nxp4IXXlntOqappJUSpiIUML7eqKNhyBUvZqF3db7x4FMiJDPw2LE/Taa516JcGRaWv4 tqIYaYDCfjd3gBd4sfOFke61TtWWaK6iEjmlAtdGwrR6d5CRDp2snt6n2LopEKRoKEew 4yJtHfBcSrcHtWOmR+bXy5s+B5SIki0djkNOUNTydY5y4XvdKdBK5J8wm6iDXS1Aq9Cs OOvH13pqmBztaiDMbHS/cQ4Ik3w64dIq4TLC6OQRrH7ze+a9VGemPoOt9uHvZGs0EDiw AnaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7pyTAhnfqY/6kcwGd8vaCnR0jLOYKSwOTc7yBir8+Cg=; b=IUKZX5NmZULNUVYzYS5KkyqFZzw49YX1NMY/7r+39iBKG+AbLKgc5+aBTgVAoa6SzA gOGgtobSwvwVaHw5DsQemA/Z6bTabDUu/CtanCc8KzBQSfwPWLi5fv7rwudA7+PKtibm LvPt0TIU9z0qApge3Xc2WOQ0GjGF0POVeblVji6ODtU93ykCb/XcbBeAgT4ofy3AVNVq J9uFwvSj/GWW8xRsI95hx+Vv5Kq+FITXXKiylNRrpJcLesuCpbY41UOJTmNLOBFB9Kju Z44QTsOAa3WWiBJfo5xa7zNN2zB+h2L/tfJeAgWIw8wruca+CIm4iemWvma75DVM4GrA 0Mmw== X-Gm-Message-State: AKS2vOzDfV0LGUgrN2Uy9joEbgmy8GKyaMWBjD0RlhVCFaonDpqDnD49 jv+gOB46QOZqQBGn3MImG91uKDtkXJICPZA= X-Received: by 10.31.108.7 with SMTP id h7mr14392662vkc.114.1498909741730; Sat, 01 Jul 2017 04:49:01 -0700 (PDT) Original-Received: by 10.176.70.85 with HTTP; Sat, 1 Jul 2017 04:48:21 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134069 Archived-At: A default should be something that aligns with the expectations of a casual user; you cannot expect a casual user to start writing elisp code or tinkering with `glyphless-char-display-control`. And how can we know what a casual user would expect? 1. We can follow established standards, particularly if we claim to conform to them, as Emacs does to the Unicode standard. The Unicode bidi algorithm 8.0.0 specifications state the following about LRM, RLM and ALM (section 2.6 Implicit Directional Marks): > they do not display or have any other semantic effect and again, in the same section: > they do not appear in the display 2. We can see how other text editors behave. The following is a sample of text editors that are bidi-aware, and none of them displays explicit bidi marks (they only support RLM and LRM), not even as a very thing space: Gmail, Google Docs, Libre Writer, MS-Word, Pages, and TextEdit. By the way, the Unicode bidi algorithm was written by three editors, two of whom work for Google, and the other one - for Microsoft, so seeing how Google docs and MS-Word implement bidirectionally is a good way of seeing how the standard should be implemented. 3. We can employ common sense. Either the Emacs user will notice the spaces introduced by the bidi marks, or he won't. If he does, then it will be visually annoying for him, and will thwart attempts to realign and position the text precisely. If he doesn't notice the spaces, then he won't understand, for instance, why he needs to press the left arrow four times to position the cursor past the first visible character of a paragraph that begins with three bidi marks. In both cases, he won't be able to see the difference between the various marks, which is a cause for confusion, frustration, and errors. 4. We can see how Emacs implements similar constructs. The bidi marks are control sequences that can be inserted into the editor using `C-x 8 RET `. Let's see how other control sequences are handled by this mechanism. If you try to insert, say, the characters Null character (U+0000), Bell character (U+0007) and Escape character (U+001B) using this method, we'll get: ILLUSTRATION: The characters Null character (U+0000), Bell character (U+0007) and Escape character (U+001B), in this order. http://imgur.com/bsJoblk We see that the output satisfies the three condition I specified in my original post: (a) Easy to notice, (b) Distinguishable from other whitespace visualization glyphs, (c) Distinct from one another. However, in light of to this example I should state that, in my opinion, unlike other control characters, Emacs should not display the bidi marks unless in `whitespace` mode. The difference is that control characters are rarely used by casual writers of alphabetic text, whereas explicit bidirectional marks are quite commonly used.