From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vladimir Lomov Newsgroups: gmane.emacs.help Subject: Weirdness with Input Method/quail : how to figure out source of it? Date: Wed, 14 Aug 2013 21:42:38 +0900 Message-ID: <20130814124238.GA722@smoon> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1376495244 22611 80.91.229.3 (14 Aug 2013 15:47:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Aug 2013 15:47:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 14 17:47:28 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V9dIF-0004HN-H6 for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Aug 2013 17:47:27 +0200 Original-Received: from localhost ([::1]:46205 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9dIF-0003Ke-6p for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Aug 2013 11:47:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9aPa-0006LS-MG for help-gnu-emacs@gnu.org; Wed, 14 Aug 2013 08:42:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9aPV-0007NC-Se for help-gnu-emacs@gnu.org; Wed, 14 Aug 2013 08:42:50 -0400 Original-Received: from mail-la0-x22f.google.com ([2a00:1450:4010:c03::22f]:38728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9aPV-0007N2-Hh for help-gnu-emacs@gnu.org; Wed, 14 Aug 2013 08:42:45 -0400 Original-Received: by mail-la0-f47.google.com with SMTP id eo20so6763931lab.20 for ; Wed, 14 Aug 2013 05:42:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:content-transfer-encoding:user-agent; bh=0nLFrBytZnXRlZHFiCiyKg1R2sCR9pINUV1mgvSt1BE=; b=x172CX6rTYvo8ZsnccoSMuyqwQ0yVsvb1Abk2XzMQo5WXTuFRPdr0SDTFjAm4O+aJb vpEoAECAN3S/OcRaNKw4qjP4DoWmwmbNUbG71c1+P46d8sH+IoqhiMpbPKjxoq9cZBNk xUQPNyxveDxZ7nE9+fI+b3aorVQuya5z3WTvz4eEF+RWkMuk0f+MPqdNi2uLOXeWCxa5 prcBPKjFHjhnN4n6blS3m/v45NVjJ4uXAm0PClXxybMU2UJWFdV8aMlM9YFofZ0JqGGS JubTuFFNXL4gea1g1Ik1OdfFjmzCd6YjiI+tocnnHhl4PGLJENjzQutyCCe1pn3b4W6i libA== X-Received: by 10.112.51.101 with SMTP id j5mr7992366lbo.17.1376484163745; Wed, 14 Aug 2013 05:42:43 -0700 (PDT) Original-Received: from smoon ([141.105.33.55]) by mx.google.com with ESMTPSA id p17sm15800586lbv.11.2013.08.14.05.42.40 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Aug 2013 05:42:42 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22f X-Mailman-Approved-At: Wed, 14 Aug 2013 11:47:16 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92887 Archived-At: Hello, I need advice how to solve or find out source of my weird problem with Input Method. I apologize for long description but I think it might help. My setup: - two languages: English and Russian; - standard QWERTY keyboard, *but* DVORAK layout for both terminal and X; - standard Russian layout (ЙЦУКЕН). Due to DVORAK layout English letters shown on screen don't coincide with letters on pressed keys, for example pressing keys with letters qwerty on keyboard gives on screen ',.pyf * Problem 0 If layout were QWERTY and one uses 'russian-computer' Input Method then letters on keys and typed symbols, both English and Russian, are coincide. For instance, some part of QWERTY keyboard: +-------+-------+-------+-------+-------+-------+ | Q | W | E | R | T | Y |... | | | | | | | | Й | Ц | У | К | Е | Н |... +-------+-------+-------+-------+-------+-------+ (Input Method 'russian-computer' is defined by leim/quail.) But if layout is DVORAK then pressing keys with letters QWERTY give ',.pyf so 'russian-computer' gives wrong result. To get correct output for Russian I decided to define new keyboard layout ('dvorak-classic') for quail (this is not my discovery I found it on emacswiki.org). So problem 0: how to enter Russian letters as they are depicted on keyboard using dvorak layout? This problem is solved by means of new keyboard layout 'dvorak-classic'. But this solution rises another weird problem. Looking ahead I must say that I notice this problem about 4-6 months ago while I use this setup (dvorak layout) for more than a year. * Problem 1 Sometimes, when writing text on Russian, pressing on keys with punctuation symbols gives (Russian) letters instead. This effect comes not always, but to get desired punctuation symbol I have to either switch twice Input Method (C-\ C-\) or move one character back or line up then return to the same point and enter the symbol (press the same key). Other oddities: - pressing in sequence the same key gives the same wrong letter; - I may press SPACE, then delete it, delete wrong letter and press the key again, and again get wrong letter; - if I don't fix wrong letter and continue to type text further (space and press keys with Russian letters), all letters are ok until next punctuation symbol. Why I call it "weird" problem: because it comes not always, it is very sporadic. It doesn't depend if I run Emacs with my settings or without any (emacs -Q), in terminal (tty) or in graphical environment (X). (The only difference I noticed when I checked Emacs running with my settings and without any is that with my settings problem comes more quickly.) The other dependency I noticed: when I type text quickly or if system is slow (one of my computer is relatively old notebook) then effect comes earlier. So the question is: how to "debug" this problem? Is there any option in Emacs to record what functions are called to figure out why symbols are changed? * Details on this problem I wasn't able to prepare small/minimal working (unworking) example (actually that's why I ask how to "debug") so I describe symptoms: when I want to enter punctuation symbols (comma [,], point [.], colon [:], semicolon [;], dash [-], single quote ['], double quote ["]) while typing Russian text I press keys with corresponding symbols (Russian layout) but instead of punctuation symbols I get: . -> у , -> ц : -> Я ; -> я ' -> й " -> Й - -> э I think there are double "tranformation" (by quail). Why I think so? For example, to get [,] I press key on QWERTY keyboard: +--------+ | ? , | | | | / . | +--------+ Q R (here Q means QWERTY keyboard and QWERTY layout, while R means Russian layout) but in DVORAK layout the same key gives zZ: +--------+ | Z , | | | | z . | +--------+ D R In quail 'dvorak' layout there is mapping (transformation): z -> . Z -> , On the other hand, these punctuation symbols on DVORAK layout comes with following Russian letters: +--------+--------+ | < Ц | > У | | | | | , ц | . у | +--------+--------+ D R D R That why I think there is double transformation: when I enter [z|Z] quail transforms it to [.|,] but (this is my suspicion) for some reason quail continues transformation taking new symbol as input. To figure out the reason why this is happening I need to know how quail works 'under the hood'. Is it possible? Page on EmacsWiki: http://www.emacswiki.org/emacs/WritingRussianWithDvorak My variant of quail 'dvorak' layout: https://raw.github.com/vp1981/scripts/master/emacs.d/misc/quail-dvorak.el P.S. Please keep me in CC, I'm not subscribed to this ML. --- WBR, Vladimir Lomov -- A father doesn't destroy his children. -- Lt. Carolyn Palamas, "Who Mourns for Adonais?", stardate 3468.1.