unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: Akib Azmain Turja <akib@disroot.org>
Cc: emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: "bengali-probhat" input method don't work as expected (by me)
Date: Wed, 10 Aug 2022 13:05:38 +0530	[thread overview]
Message-ID: <871qtoeek5.fsf@gmail.com> (raw)
In-Reply-To: <877d3htihc.fsf@disroot.org> (Akib Azmain Turja's message of "Tue, 09 Aug 2022 23:49:35 +0600")

[செவ்வாய் ஆகஸ்ட் 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.



  reply	other threads:[~2022-08-10  7:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qtoeek5.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=akib@disroot.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).