From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David De La Harpe Golden Newsgroups: gmane.emacs.devel Subject: Re: How to recognize keyboard insertion? Date: Sat, 31 Oct 2009 16:58:45 +0000 Message-ID: <4AEC6CC5.3010009@harpegolden.net> References: <83vdhvd096.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1257008359 23738 80.91.229.12 (31 Oct 2009 16:59:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2009 16:59:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 31 17:59:12 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N4HIF-0005OR-CR for ged-emacs-devel@m.gmane.org; Sat, 31 Oct 2009 17:59:11 +0100 Original-Received: from localhost ([127.0.0.1]:43684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4HIE-00088d-VY for ged-emacs-devel@m.gmane.org; Sat, 31 Oct 2009 12:59:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4HI6-00086a-7h for emacs-devel@gnu.org; Sat, 31 Oct 2009 12:59:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4HI1-00084Y-7j for emacs-devel@gnu.org; Sat, 31 Oct 2009 12:59:01 -0400 Original-Received: from [199.232.76.173] (port=38218 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4HI1-00084U-2O for emacs-devel@gnu.org; Sat, 31 Oct 2009 12:58:57 -0400 Original-Received: from harpegolden.net ([65.99.215.13]:49095) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N4HHz-0004KD-2L; Sat, 31 Oct 2009 12:58:55 -0400 Original-Received: from [87.198.54.205] (87-198-54-205.ptr.magnet.ie [87.198.54.205]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "David De La Harpe Golden", Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK)) by harpegolden.net (Postfix) with ESMTP id F1D0781CB; Sat, 31 Oct 2009 16:58:52 +0000 (GMT) User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) In-Reply-To: <83vdhvd096.fsf@gnu.org> X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116514 Archived-At: Eli Zaretskii wrote: > I'm asking because, in bidirectional editing, characters that are > mirrored at display time need to be mirrored at keyboard input time. > For example, when typing right-to-left text, the character `)' should > be mirrored so that what ends up in the buffer is `(', because what > the user means is to produce an open parenthesis. (Displaying this > text will then mirror again, and display `)'; this last part already > works in the bidi Emacs I'm working on). >=20 Do you? I'm not really knowledgeable about RtL, but reason I ask is=20 because when I switch on an arabic OS-level keyboard layout, Shift-9=20 actually generates a ) parenright keysym and shift-0 a ( parenleft,=20 which I think is then displayed mirrored as per the last bit of your=20 post in RtL contexts. =D8=AB=D8=AB=D8=AB=D8=AB(321)=D8=AB=D8=AB=D8=AB You can see the transposition in /usr/share/X11/xkb/symbols on typical gnu+linux distros So the right place to do such keyboard mirroring intra-emacs might be=20 in quail, i.e. for when people are trying to work RtL only intra-emacs still with a western os-level keymap. And indeed, the transposition is shown in the commentary in emacs/leim/quail/arabic.el , though I think it's missing from the actual map at present (possibly because emacs lacks RtL until you're done!) So, since one can assume either the OS keymap or quail will be=20 pre-mirrroing in practice, you probably don't need to distinguish keyboard vs. paste here. N.B. I could be quite wrong here, not expert by any means.