* "bengali-probhat" input method don't work as expected (by me)
@ 2022-08-09 14:44 Akib Azmain Turja
2022-08-09 15:42 ` Visuwesh
2022-08-09 16:15 ` Eli Zaretskii
0 siblings, 2 replies; 11+ messages in thread
From: Akib Azmain Turja @ 2022-08-09 14:44 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
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:
--8<---------------cut here---------------start------------->8---
("dvorak" . " 1!2@3#4$5%6^7&8*9(0)[{]}`~\
'\",<.>pPyYfFgGcCrRlL/?=+ aAoOeEuUiIdDhHtTnNsS-_\\| ;:qQjJkKx\
XbBmMwWvVzZ ")
--8<---------------cut here---------------end--------------->8---
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?
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social.
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-09 14:44 "bengali-probhat" input method don't work as expected (by me) Akib Azmain Turja
@ 2022-08-09 15:42 ` Visuwesh
2022-08-09 17:49 ` Akib Azmain Turja
2022-08-09 16:15 ` Eli Zaretskii
1 sibling, 1 reply; 11+ messages in thread
From: Visuwesh @ 2022-08-09 15:42 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: emacs-devel
[செவ்வாய் ஆகஸ்ட் 09, 2022] Akib Azmain 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/?=+ aAoOeEuUiIdDhHtTnNsS-_\\| ;:qQjJkKx\
> 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 nil nil t)
+ "Probhat keyboard for Bengali/Bangla" nil t nil t t nil nil nil nil nil 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.
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-09 15:42 ` Visuwesh
@ 2022-08-09 17:49 ` Akib Azmain Turja
2022-08-10 7:35 ` Visuwesh
0 siblings, 1 reply; 11+ messages in thread
From: Akib Azmain Turja @ 2022-08-09 17:49 UTC (permalink / raw)
To: Visuwesh; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]
Visuwesh <visuweshm@gmail.com> writes:
> [செவ்வாய் ஆகஸ்ட் 09, 2022] Akib Azmain 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/?=+ aAoOeEuUiIdDhHtTnNsS-_\\| ;:qQjJkKx\
>> 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 nil nil t)
> + "Probhat keyboard for Bengali/Bangla" nil t nil t t nil nil nil nil nil 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.
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social.
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-09 17:49 ` Akib Azmain Turja
@ 2022-08-10 7:35 ` Visuwesh
2022-08-10 12:26 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Visuwesh @ 2022-08-10 7:35 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: emacs-devel, Eli Zaretskii
[செவ்வாய் ஆகஸ்ட் 09, 2022] Akib Azmain Turja wrote:
> Visuwesh <visuweshm@gmail.com> writes:
>
>> [செவ்வாய் ஆகஸ்ட் 09, 2022] Akib Azmain 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/?=+ aAoOeEuUiIdDhHtTnNsS-_\\| ;:qQjJkKx\
>>> 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 nil nil t)
>> + "Probhat keyboard for Bengali/Bangla" nil t nil t t nil nil nil nil nil 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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-10 7:35 ` Visuwesh
@ 2022-08-10 12:26 ` Eli Zaretskii
2022-08-10 12:36 ` Visuwesh
2022-08-12 15:40 ` Akib Azmain Turja
0 siblings, 2 replies; 11+ messages in thread
From: Eli Zaretskii @ 2022-08-10 12:26 UTC (permalink / raw)
To: Visuwesh; +Cc: akib, emacs-devel
> From: Visuwesh <visuweshm@gmail.com>
> Cc: emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
> Date: Wed, 10 Aug 2022 13:05:38 +0530
>
> Eli, it looks like the patch I posted works well. Any chance we can
> push it? It addresses all the points you made.
Thanks, I installed it.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-10 12:26 ` Eli Zaretskii
@ 2022-08-10 12:36 ` Visuwesh
2022-08-12 15:40 ` Akib Azmain Turja
1 sibling, 0 replies; 11+ messages in thread
From: Visuwesh @ 2022-08-10 12:36 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: akib, emacs-devel
[புதன் ஆகஸ்ட் 10, 2022] Eli Zaretskii wrote:
>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
>> Date: Wed, 10 Aug 2022 13:05:38 +0530
>>
>> Eli, it looks like the patch I posted works well. Any chance we can
>> push it? It addresses all the points you made.
>
> Thanks, I installed it.
Great, thanks!
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-10 12:26 ` Eli Zaretskii
2022-08-10 12:36 ` Visuwesh
@ 2022-08-12 15:40 ` Akib Azmain Turja
2022-08-12 17:52 ` Eli Zaretskii
1 sibling, 1 reply; 11+ messages in thread
From: Akib Azmain Turja @ 2022-08-12 15:40 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Visuwesh, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 599 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
>> Date: Wed, 10 Aug 2022 13:05:38 +0530
>>
>> Eli, it looks like the patch I posted works well. Any chance we can
>> push it? It addresses all the points you made.
>
> Thanks, I installed it.
Thanks, works good. How about adding a NEWS entry?
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social.
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-12 15:40 ` Akib Azmain Turja
@ 2022-08-12 17:52 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2022-08-12 17:52 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: visuweshm, emacs-devel
> From: Akib Azmain Turja <akib@disroot.org>
> Cc: Visuwesh <visuweshm@gmail.com>, emacs-devel@gnu.org
> Date: Fri, 12 Aug 2022 21:40:18 +0600
>
> >> Eli, it looks like the patch I posted works well. Any chance we can
> >> push it? It addresses all the points you made.
> >
> > Thanks, I installed it.
>
> Thanks, works good. How about adding a NEWS entry?
It's basically a bugfix. We don't describe bugfixes in NEWS.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-09 14:44 "bengali-probhat" input method don't work as expected (by me) Akib Azmain Turja
2022-08-09 15:42 ` Visuwesh
@ 2022-08-09 16:15 ` Eli Zaretskii
2022-08-10 8:41 ` Akib Azmain Turja
1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-08-09 16:15 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: emacs-devel
> From: Akib Azmain Turja <akib@disroot.org>
> Date: Tue, 09 Aug 2022 20:44:07 +0600
>
> I use Dvorak keyboard layout (actually the OS is converting QWERTY keys
> to Dvorak). All input methods were broken for me.
I don't think our input methods automatically support Dvorak keyboard
layouts, except the one(s) that is/are explicitly written to support
it.
> 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?
Because no one wrote the code to produce the nice display for
bengali-probhat. It isn't automatic. Patches welcome.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-09 16:15 ` Eli Zaretskii
@ 2022-08-10 8:41 ` Akib Azmain Turja
2022-08-10 12:12 ` Visuwesh
0 siblings, 1 reply; 11+ messages in thread
From: Akib Azmain Turja @ 2022-08-10 8:41 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1038 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Akib Azmain Turja <akib@disroot.org>
>> Date: Tue, 09 Aug 2022 20:44:07 +0600
>>
>> I use Dvorak keyboard layout (actually the OS is converting QWERTY keys
>> to Dvorak). All input methods were broken for me.
>
> I don't think our input methods automatically support Dvorak keyboard
> layouts, except the one(s) that is/are explicitly written to support
> it.
Why? Why customizing quail-keyboard-layout isn't enough?
>
>> 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?
>
> Because no one wrote the code to produce the nice display for
> bengali-probhat. It isn't automatic. Patches welcome.
>
What files needs to be changed?
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social.
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: "bengali-probhat" input method don't work as expected (by me)
2022-08-10 8:41 ` Akib Azmain Turja
@ 2022-08-10 12:12 ` Visuwesh
0 siblings, 0 replies; 11+ messages in thread
From: Visuwesh @ 2022-08-10 12:12 UTC (permalink / raw)
To: Akib Azmain Turja; +Cc: Eli Zaretskii, emacs-devel
[புதன் ஆகஸ்ட் 10, 2022] Akib Azmain Turja wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Akib Azmain Turja <akib@disroot.org>
>>> Date: Tue, 09 Aug 2022 20:44:07 +0600
>>>
>>> I use Dvorak keyboard layout (actually the OS is converting QWERTY keys
>>> to Dvorak). All input methods were broken for me.
>>
>> I don't think our input methods automatically support Dvorak keyboard
>> layouts, except the one(s) that is/are explicitly written to support
>> it.
>
> Why? Why customizing quail-keyboard-layout isn't enough?
It isn't enough because the KBD-TRANSLATE for the bengali-probhat input
method was set to nil so Quail does not care about
quail-keyboard-layout.
[ KBD-TRANSLATE=nil is good for bengali-itrans which is phonetic but not
so for bengali-probhat which is a keyboard layout akin to QWERTY. ]
>>
>>> 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?
>>
>> Because no one wrote the code to produce the nice display for
>> bengali-probhat. It isn't automatic. Patches welcome.
>>
>
> What files needs to be changed?
There is no need for that. Quail takes care of it when we give it the
right argument when defining the input method.
TL;DR: We simply need to change two arguments to quail-define-package to
get the desired behaviour. There's nothing more to do (other than
perhaps having pixel perfect alignment of the keyboard layout in the
*Help* buffer).
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-08-12 17:52 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-09 14:44 "bengali-probhat" input method don't work as expected (by me) Akib Azmain Turja
2022-08-09 15:42 ` Visuwesh
2022-08-09 17:49 ` Akib Azmain Turja
2022-08-10 7:35 ` Visuwesh
2022-08-10 12:26 ` Eli Zaretskii
2022-08-10 12:36 ` Visuwesh
2022-08-12 15:40 ` Akib Azmain Turja
2022-08-12 17:52 ` Eli Zaretskii
2022-08-09 16:15 ` Eli Zaretskii
2022-08-10 8:41 ` Akib Azmain Turja
2022-08-10 12:12 ` Visuwesh
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.