From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.devel Subject: Re: "bengali-probhat" input method don't work as expected (by me) Date: Wed, 10 Aug 2022 13:05:38 +0530 Message-ID: <871qtoeek5.fsf@gmail.com> References: <871qtpv5mw.fsf@disroot.org> <87fsi54e4w.fsf@gmail.com> <877d3htihc.fsf@disroot.org> 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="15279"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Eli Zaretskii To: Akib Azmain Turja Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 10 13:06:13 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oLjXQ-0003l7-SK for ged-emacs-devel@m.gmane-mx.org; Wed, 10 Aug 2022 13:06:12 +0200 Original-Received: from localhost ([::1]:55894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLjXP-0002oW-5Q for ged-emacs-devel@m.gmane-mx.org; Wed, 10 Aug 2022 07:06:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLgFx-00043g-BD for emacs-devel@gnu.org; Wed, 10 Aug 2022 03:35:59 -0400 Original-Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:44716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLgFu-0002dG-8m; Wed, 10 Aug 2022 03:35:56 -0400 Original-Received: by mail-pj1-x1044.google.com with SMTP id e8-20020a17090a280800b001f2fef7886eso1287644pjd.3; Wed, 10 Aug 2022 00:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc; bh=nuVwulEHM4+Q35vElcy8bn7rHk1hwiCc9pu7NIcaP9A=; b=eUZaCTXdMzMRdksCRmF06qpIEA0k8VNakeHDVjfpyu4xFRGuQKim3dnYmLIF4HBTGb eWfJubSd7NtgGyAQvmJ7v21HQfD+Dhqhp4Z3ziuZL/Sr8GmibGdNR9rPn0a+y/lAW/2B CI2jg3O2O+QanNq9R6aEiYLWVVG1gfLTWuzeVOeHx3tazZSUZCVJLUjRui7enMelEjbV 2hVjYGmIz1pWhPFmsQ9DQHGNEOqOPvgFNmjciufY1bK3PcOa2XCEZ1kP2suLzrWLGjTo I+LanvJ0qHUsIT/BFnKo5tigboZxTLjbKMQkDqBRIF1/ZLZPu2L1H+qGVG3Tpeq2atry Qlhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc; bh=nuVwulEHM4+Q35vElcy8bn7rHk1hwiCc9pu7NIcaP9A=; b=RePlysUQ1GMOYIhSBNcrarWCHYv/6rg02OfA8xRIU3YA6kcwMRE6HiXlbKx8dBfU5e X4zoKvWvcGBsRT1BD0mKHtss9aHe4Hk0+b2oYCAOJIISz0WsMOj4OePj+SrmCLORBdjq hlgrLX9gFeWNF+zVSU7xPTgpX6qa7n1q2fIy2zyHYgNoGp5alZTd6r6GVpKIaljULxyg V/oPeRXyvZQlNnElcaXXJKyxQPugYw0QfRAdmbEjYcOkakQtXQFh/xsSB9XyVGURA2OE 7TTeXfOoY1REHYB5GMhgHK5hVp8N9WhY/VnaBXk9losGpqH66q8VdC9isqfc6byaG1Kj xZfg== X-Gm-Message-State: ACgBeo3Cbg9lf7tOAiuQWuX4ZF1B7Shulw2QU8klOAzB+As/QN1zDyt2 YoX4dDfgLpjimfKXAZOeIBM= X-Google-Smtp-Source: AA6agR5ydKX5SSA1J8XCZ854LlC/fBcLxXspg6dS2ELxh6b3ATG6C1f/1EkTauSLQialDbcDMYcO7w== X-Received: by 2002:a17:902:db12:b0:16e:eaf9:e98d with SMTP id m18-20020a170902db1200b0016eeaf9e98dmr26697022plx.172.1660116951074; Wed, 10 Aug 2022 00:35:51 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id 127-20020a621785000000b0052d200c8040sm1146980pfx.211.2022.08.10.00.35.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 00:35:48 -0700 (PDT) In-Reply-To: <877d3htihc.fsf@disroot.org> (Akib Azmain Turja's message of "Tue, 09 Aug 2022 23:49:35 +0600") Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=visuweshm@gmail.com; helo=mail-pj1-x1044.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 10 Aug 2022 07:03:59 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293348 Archived-At: [=E0=AE=9A=E0=AF=86=E0=AE=B5=E0=AF=8D=E0=AE=B5=E0=AE=BE=E0=AE=AF=E0=AF=8D = =E0=AE=86=E0=AE=95=E0=AE=B8=E0=AF=8D=E0=AE=9F=E0=AF=8D 09, 2022] Akib Azmai= n Turja wrote: > Visuwesh writes: > >> [=E0=AE=9A=E0=AF=86=E0=AE=B5=E0=AF=8D=E0=AE=B5=E0=AE=BE=E0=AE=AF=E0=AF= =8D =E0=AE=86=E0=AE=95=E0=AE=B8=E0=AF=8D=E0=AE=9F=E0=AF=8D 09, 2022] Akib A= zmain Turja wrote: >> >>> I use Dvorak keyboard layout (actually the OS is converting QWERTY keys >>> to Dvorak). All input methods were broken for me. >>> >>> So I've added the following to quail-keyboard-layout-alist: >>> >>> ("dvorak" . " 1!2@3#4$5%6^7&8*9(0)[{]}`~\ >>> '\",<.>pPyYfFgGcCrRlL/?=3D+ aAoOeEuUiIdDhHtTnNsS-_\\| ;:qQjJk= Kx\ >>> XbBmMwWvVzZ ") >>> >>> And set quail-keyboard-layout to Dvorak using quail-set-keyboard-layout. >>> >>> After doing the above, "english-dvorak" works as expected (yeah, that's >>> not a great idea, but just to make sure it works), but still there is >>> no effect on "bengali-probhat" input method. It looks like that it >>> assumes that I'm using QWERTY and converts the keys like that. >>> >>> And by the way, why M-x describe-input-method RET english-dvorak shows >>> nice keyboard while M-x describe-input-method RET bengali-probhat shows >>> just a (translation?) table? >> >> This is because the bengali-probhat input method is not declared as a >> "keyboard layout". The quail translation stuff kicks in only for those >> input methods that have the KBD-TRANSLATE argument non-nil. Does the >> following patch work for you? >> >> diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el >> index e652f108dd..431d8369c1 100644 >> --- a/lisp/leim/quail/indian.el >> +++ b/lisp/leim/quail/indian.el >> @@ -702,7 +702,7 @@ "X" >> ;; Probhat Input Method >> (quail-define-package >> "bengali-probhat" "Bengali" "BngPB" t >> - "Probhat keyboard for Bengali/Bangla" nil t nil nil nil nil nil nil ni= l nil t) >> + "Probhat keyboard for Bengali/Bangla" nil t nil t t nil nil nil nil ni= l t) >> >> (quail-define-rules >> ("!" ?!) >> >> You can simply eval the quail-define-package and quail-define-rules >> forms after applying the patch to see the results. >> > > Thanks, that works. But how can I do this from my init file? Tracking > master is not an option for me right now. I think you can do something like, (with-temp-buffer (activate-input-method "bengali-probhat") (let ((quail-current-package (assoc "bengali-probhat" quail-package= -alist))) (setf (nth 8 quail-current-package) t))) (NOT TESTED!) Eli, it looks like the patch I posted works well. Any chance we can push it? It addresses all the points you made.