all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Writting Greek in Emacs
@ 2024-09-19 14:43 Thanos Apollo
  2024-09-19 14:57 ` Greg Farough
                   ` (2 more replies)
  0 siblings, 3 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-19 14:43 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]


Hello emacs-devel,


Emacs offers an option to write in Greek/Hellenic using
set-input-method, but it seems there is no support for the polytonic
system despite mentions of classical Greek support.

To use polytonic Greek in GNU Guix System, with Sway, I currently use
this configuration:

    input "type:keyboard" {
          xkb_layout us,gr
          xkb_options grp:win_space_toggle
          xkb_variant altgr-intl,polytonic
    }

Unless I'm missing something and there is already built in support, I
would also suggest having a greek-polytonic-mode.  This mode
automatically changes text written in Greek into polytonic Greek.

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 14:43 Writting Greek in Emacs Thanos Apollo
@ 2024-09-19 14:57 ` Greg Farough
  2024-09-19 16:12   ` Thanos Apollo
  2024-09-19 16:19 ` Eli Zaretskii
  2024-09-20 14:23 ` Max Nikulin
  2 siblings, 1 reply; 49+ messages in thread
From: Greg Farough @ 2024-09-19 14:57 UTC (permalink / raw)
  To: emacs-devel

On Thu, Sep 19 2024, Thanos Apollo <public@thanosapollo.org> wrote:

> Hello emacs-devel,
>
>
> Emacs offers an option to write in Greek/Hellenic using
> set-input-method, but it seems there is no support for the polytonic
> system despite mentions of classical Greek support.
>
> To use polytonic Greek in GNU Guix System, with Sway, I currently use
> this configuration:
>
>     input "type:keyboard" {
>           xkb_layout us,gr
>           xkb_options grp:win_space_toggle
>           xkb_variant altgr-intl,polytonic
>     }
>
> Unless I'm missing something and there is already built in support, I
> would also suggest having a greek-polytonic-mode.  This mode
> automatically changes text written in Greek into polytonic Greek.

I've always used the "greek-babel" input method, and have never
encountered any classical Greek I couldn't easily type in with that.

-g




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 14:57 ` Greg Farough
@ 2024-09-19 16:12   ` Thanos Apollo
  2024-09-19 16:49     ` Greg Farough
  0 siblings, 1 reply; 49+ messages in thread
From: Thanos Apollo @ 2024-09-19 16:12 UTC (permalink / raw)
  To: Greg Farough, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]

Greg Farough <gregf@gnu.org> writes:

> On Thu, Sep 19 2024, Thanos Apollo <public@thanosapollo.org> wrote:
>
[...]
>
> I've always used the "greek-babel" input method, and have never
> encountered any classical Greek I couldn't easily type in with that.
>

Maybe I'm missing something, it seems that it does not have support for
perispomeni (e.g ῶ) that we can do with "[" + "ω" in usual polytonic
keyboards.  Psili, dasia, different types of periods, ypogegrammeni &
varys tonos, seem to be missing as well.

e.g phrase from Mathew (Bible) in Greek.

1.1 Βίβλος γενέσεως ᾽Ιησοῦ Χριστοῦ υἱοῦ Δαυὶδ υἱοῦ ᾽Αβραάμ. 1.2
᾽Αβραὰμ ἐγέννησεν τὸν ᾽Ισαάκ, ᾽Ισαὰκ δὲ ἐγέννησεν τὸν ᾽Ιακώβ, ᾽Ιακὼβ
δὲ ἐγέννησεν τὸν ᾽Ιούδαν καὶ τοὺς ἀδελφοὺς αὐτοῦ

There is support for some accent's in greek-babel input method, as well
in other greek methods, but most of the greek accents are missing.

Maybe I'm missing something with the keybindings?

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 14:43 Writting Greek in Emacs Thanos Apollo
  2024-09-19 14:57 ` Greg Farough
@ 2024-09-19 16:19 ` Eli Zaretskii
  2024-09-19 16:32   ` Thanos Apollo
  2024-09-20 14:23 ` Max Nikulin
  2 siblings, 1 reply; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-19 16:19 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Date: Thu, 19 Sep 2024 17:43:14 +0300
> 
> Emacs offers an option to write in Greek/Hellenic using
> set-input-method, but it seems there is no support for the polytonic
> system despite mentions of classical Greek support.
> 
> To use polytonic Greek in GNU Guix System, with Sway, I currently use
> this configuration:
> 
>     input "type:keyboard" {
>           xkb_layout us,gr
>           xkb_options grp:win_space_toggle
>           xkb_variant altgr-intl,polytonic
>     }
> 
> Unless I'm missing something and there is already built in support, I
> would also suggest having a greek-polytonic-mode.  This mode
> automatically changes text written in Greek into polytonic Greek.

AFAIK, there's the greek-polytonic package on GNU ELPA.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 16:19 ` Eli Zaretskii
@ 2024-09-19 16:32   ` Thanos Apollo
  2024-09-19 16:42     ` Robert Pluim
  2024-09-19 16:44     ` Eli Zaretskii
  0 siblings, 2 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-19 16:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:


[...]

> AFAIK, there's the greek-polytonic package on GNU ELPA.

Do you have a link for this package?  I cannot seem to find it using:
<https://elpa.gnu.org/packages/> nor via list-packages.

/If/ there is a way to use greek accents in emacs, the keybindings are too
different from the usual keyboard used for Greek.

The keybindings that are being taught for Greek polytonic using non gnu
software can be found here[1].


[1]<https://e-philologist.gr/wp-content/uploads/2020/04/%CE%A0%CE%BF%CE%BB%CF%85%CF%84%CE%BF%CE%BD%CE%B9%CE%BA%CF%8C-%CE%A3%CF%8D%CF%83%CF%84%CE%B7%CE%BC%CE%B1-%CE%95%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC-%CF%83%CE%B5-%CF%80%CE%AF%CE%BD%CE%B1%CE%BA%CE%B5%CF%82.pdf>

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 16:32   ` Thanos Apollo
@ 2024-09-19 16:42     ` Robert Pluim
  2024-09-19 16:44     ` Eli Zaretskii
  1 sibling, 0 replies; 49+ messages in thread
From: Robert Pluim @ 2024-09-19 16:42 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: Eli Zaretskii, emacs-devel

>>>>> On Thu, 19 Sep 2024 19:32:31 +0300, Thanos Apollo <public@thanosapollo.org> said:

    Thanos> Eli Zaretskii <eliz@gnu.org> writes:
    Thanos> [...]

    >> AFAIK, there's the greek-polytonic package on GNU ELPA.

    Thanos> Do you have a link for this package?  I cannot seem to find it using:
    Thanos> <https://elpa.gnu.org/packages/> nor via list-packages.

Itʼs on MELPA. The source is here: https://github.com/jhanschoo/greek-polytonic

Robert
-- 



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 16:32   ` Thanos Apollo
  2024-09-19 16:42     ` Robert Pluim
@ 2024-09-19 16:44     ` Eli Zaretskii
  2024-09-19 17:05       ` Thanos Apollo
  1 sibling, 1 reply; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-19 16:44 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Cc: emacs-devel@gnu.org
> Date: Thu, 19 Sep 2024 19:32:31 +0300
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> 
> [...]
> 
> > AFAIK, there's the greek-polytonic package on GNU ELPA.
> 
> Do you have a link for this package?  I cannot seem to find it using:
> <https://elpa.gnu.org/packages/> nor via list-packages.

Sorry, you are right.  There was a discussion to add such a package to
ELPA back in 2018, but I guess that never happened.  However, you can
find a URL of the package in that discussion:

  https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00528.html
  https://github.com/jhanschoo/greek-polytonic/tree/fsf



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 16:12   ` Thanos Apollo
@ 2024-09-19 16:49     ` Greg Farough
  0 siblings, 0 replies; 49+ messages in thread
From: Greg Farough @ 2024-09-19 16:49 UTC (permalink / raw)
  To: emacs-devel

On Thu, Sep 19 2024, Thanos Apollo <public@thanosapollo.org> wrote:

> Greg Farough <gregf@gnu.org> writes:
>
>> On Thu, Sep 19 2024, Thanos Apollo <public@thanosapollo.org> wrote:
>>
> [...]
>>
>> I've always used the "greek-babel" input method, and have never
>> encountered any classical Greek I couldn't easily type in with that.
>>
>
> Maybe I'm missing something, it seems that it does not have support for
> perispomeni (e.g ῶ) that we can do with "[" + "ω" in usual polytonic
> keyboards.  Psili, dasia, different types of periods, ypogegrammeni &
> varys tonos, seem to be missing as well.
>
> e.g phrase from Mathew (Bible) in Greek.
>
> 1.1 Βίβλος γενέσεως ᾽Ιησοῦ Χριστοῦ υἱοῦ Δαυὶδ υἱοῦ ᾽Αβραάμ. 1.2
> ᾽Αβραὰμ ἐγέννησεν τὸν ᾽Ισαάκ, ᾽Ισαὰκ δὲ ἐγέννησεν τὸν ᾽Ιακώβ, ᾽Ιακὼβ
> δὲ ἐγέννησεν τὸν ᾽Ιούδαν καὶ τοὺς ἀδελφοὺς αὐτοῦ
>
> There is support for some accent's in greek-babel input method, as well
> in other greek methods, but most of the greek accents are missing.
>
> Maybe I'm missing something with the keybindings?

The keybindings are quite different than polytonic input methods in
other programs. M-x describe-input-method covers them all.

For example, small omega with perispomeni in greek-babel is: "~" +
"w" = ῶ

These can be combined. So small alpha with dasia and perispomeni would
be: "<" + "~" + "a" = ἇ

Small rho with psili: ">" + "r" = ῤ

But maybe I'm missing something?

-g




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 16:44     ` Eli Zaretskii
@ 2024-09-19 17:05       ` Thanos Apollo
  2024-09-19 17:44         ` Eli Zaretskii
                           ` (2 more replies)
  0 siblings, 3 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-19 17:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]


[...]
> Sorry, you are right.  There was a discussion to add such a package to
> ELPA back in 2018, but I guess that never happened.  However, you can
> find a URL of the package in that discussion:
>
>   https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00528.html
>   https://github.com/jhanschoo/greek-polytonic/tree/fsf

Thank you, after a quick try of this package it still does not provide
proper polytonic support.  Also, it does not follow the standard polytonic
keyboard, that is used in the education system in Greece, which is also
offered by other proprietary alternatives to emacs.  There are also some
major bugs that one might encounter, e.g stacking accents:

έ́́́́́́́́́́́́́́́́́́́́́́


Are there any plans to include proper support for the Greek language in
Emacs, similar to the support available in the rest of the GNU system
(e.g., xkb)?  I am interested in helping with this effort.

The lack of proper Greek support in Emacs, particularly polytonic Greek,
has been a significant drawback for several of my friends and
colleagues.  They need to use polytonic Greek for their school subjects,
projects & work.

This also makes emacs a non-viable option for it being taught in
schools, something that I wanted to promote in my local area.

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 17:05       ` Thanos Apollo
@ 2024-09-19 17:44         ` Eli Zaretskii
  2024-09-19 18:06           ` Thanos Apollo
  2024-09-19 18:03         ` Visuwesh
  2024-09-19 18:07         ` Eli Zaretskii
  2 siblings, 1 reply; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-19 17:44 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Cc: emacs-devel@gnu.org
> Date: Thu, 19 Sep 2024 20:05:19 +0300
> 
> Are there any plans to include proper support for the Greek language in
> Emacs, similar to the support available in the rest of the GNU system
> (e.g., xkb)?  I am interested in helping with this effort.

There are no on-going activity in this direction, AFAIK.  Patches to
add this support to Emacs are welcome, of course.

> The lack of proper Greek support in Emacs, particularly polytonic Greek,
> has been a significant drawback for several of my friends and
> colleagues.  They need to use polytonic Greek for their school subjects,
> projects & work.
> 
> This also makes emacs a non-viable option for it being taught in
> schools, something that I wanted to promote in my local area.

You don't need to convince us.  Adding input methods and support for
additional scripts is always welcome.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 17:05       ` Thanos Apollo
  2024-09-19 17:44         ` Eli Zaretskii
@ 2024-09-19 18:03         ` Visuwesh
  2024-09-19 18:13           ` Visuwesh
  2024-09-19 19:03           ` Thanos Apollo
  2024-09-19 18:07         ` Eli Zaretskii
  2 siblings, 2 replies; 49+ messages in thread
From: Visuwesh @ 2024-09-19 18:03 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: Eli Zaretskii, emacs-devel

[வியாழன் செப்டம்பர் 19, 2024] Thanos Apollo wrote:

> [...]
>> Sorry, you are right.  There was a discussion to add such a package to
>> ELPA back in 2018, but I guess that never happened.  However, you can
>> find a URL of the package in that discussion:
>>
>>   https://lists.gnu.org/archive/html/emacs-devel/2018-07/msg00528.html
>>   https://github.com/jhanschoo/greek-polytonic/tree/fsf
>
> Thank you, after a quick try of this package it still does not provide
> proper polytonic support.  Also, it does not follow the standard polytonic
> keyboard, that is used in the education system in Greece, which is also
> offered by other proprietary alternatives to emacs.  There are also some
> major bugs that one might encounter, e.g stacking accents:
>
> έ́́́́́́́́́́́́́́́́́́́́́́
>
>
> Are there any plans to include proper support for the Greek language in
> Emacs, similar to the support available in the rest of the GNU system
> (e.g., xkb)?  I am interested in helping with this effort.

Creating a Quail input method is fairly straightforward.  For the most
part, it involves writing a set of "translation rules" which are
essentially a mapping from the English text to Greek (in your case).
There are simple and easy-to-understand examples in core: have a look at
the dvorak input method.

As for disallowing accent stacking, a custom UPDATE-TRANSLATION-FUNCTION
(see `quail-define-package') for the input method would do the job
AFAIU.  I am not sure if there is a simpler way to achieve the same.
Examples of such a function can be found in the Japanese input methods,
and in malayalam-mozhi input method in Emacs.  You may also take a look
at the tamil99 input method I wrote as another example
   
    https://github.com/9viz/tamil99

where I've tried to comment the UPDATE-TRANSLATION-FUNCTION as much as
possible.

HTH.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 17:44         ` Eli Zaretskii
@ 2024-09-19 18:06           ` Thanos Apollo
  2024-09-19 18:27             ` Eli Zaretskii
  0 siblings, 1 reply; 49+ messages in thread
From: Thanos Apollo @ 2024-09-19 18:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 771 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:


[...]
>
> There are no on-going activity in this direction, AFAIK.  Patches to
> add this support to Emacs are welcome, of course.
>

Thank you, I will start working on a greek-polytonic method after I
complete my university exams at the end of this month.

I will checkout out greek.el and the rest of greek input methods.  Do
you have any advice on things to avoid & aim for when creating an emacs
input method?  I'm not a developer, just a hobbyist, any advice &
resource to study is welcome.

[...]

> You don't need to convince us.  Adding input methods and support for
> additional scripts is always welcome.

Appreciate that.


Wish you all the best,

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 17:05       ` Thanos Apollo
  2024-09-19 17:44         ` Eli Zaretskii
  2024-09-19 18:03         ` Visuwesh
@ 2024-09-19 18:07         ` Eli Zaretskii
  2024-09-19 19:02           ` Thanos Apollo
  2 siblings, 1 reply; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-19 18:07 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Cc: emacs-devel@gnu.org
> Date: Thu, 19 Sep 2024 20:05:19 +0300
> 
> There are also some major bugs that one might encounter, e.g
> stacking accents:
> 
> έ́́́́́́́́́́́́́́́́́́́́́́

Which problems do you see here?



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 18:03         ` Visuwesh
@ 2024-09-19 18:13           ` Visuwesh
  2024-09-19 19:03           ` Thanos Apollo
  1 sibling, 0 replies; 49+ messages in thread
From: Visuwesh @ 2024-09-19 18:13 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: Eli Zaretskii, emacs-devel

[வியாழன் செப்டம்பர் 19, 2024] Visuwesh wrote:

> As for disallowing accent stacking, a custom UPDATE-TRANSLATION-FUNCTION
> (see `quail-define-package') for the input method would do the job
> AFAIU.  I am not sure if there is a simpler way to achieve the same.
> Examples of such a function can be found in the Japanese input methods,
> and in malayalam-mozhi input method in Emacs.

You can set up the translation rules so that only e.g., e followed by ~
inserts epsilon with the accent.  This would avoid the problem
altogether.  (This has the disadvantage that you can no longer type ~
after an epsilon to insert the respective accent: you would need to
retype e~ to get epsilon with an accent.)  This approach is used by the
tamil99 input method in core.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 18:06           ` Thanos Apollo
@ 2024-09-19 18:27             ` Eli Zaretskii
  2024-09-19 19:04               ` Thanos Apollo
  0 siblings, 1 reply; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-19 18:27 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Cc: emacs-devel@gnu.org
> Date: Thu, 19 Sep 2024 21:06:24 +0300
> 
> > There are no on-going activity in this direction, AFAIK.  Patches to
> > add this support to Emacs are welcome, of course.
> >
> 
> Thank you, I will start working on a greek-polytonic method after I
> complete my university exams at the end of this month.
> 
> I will checkout out greek.el and the rest of greek input methods.  Do
> you have any advice on things to avoid & aim for when creating an emacs
> input method?  I'm not a developer, just a hobbyist, any advice &
> resource to study is welcome.

I think if you look at the existing input methods, you will see how
easy it is to create one, at least for the usual cases.  Feel free to
ask questions here if you encounter problems you couldn't figure out.

I would also suggest that you start your copyright assignment
paperwork now, so that we could accept your contributions without
limitations.  If you agree, I will send you the form to fill with the
instructions to go with it.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 18:07         ` Eli Zaretskii
@ 2024-09-19 19:02           ` Thanos Apollo
  2024-09-20  5:55             ` Eli Zaretskii
  0 siblings, 1 reply; 49+ messages in thread
From: Thanos Apollo @ 2024-09-19 19:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> 
>> έ́́́́́́́́́́́́́́́́́́́́́́
>
> Which problems do you see here?

It's not possible to stack accents of the same type in Greek.  There are
many grammatical rules that are ignored in most input methods that I've
checkout out, such as using specific accents in non vowels.

There are specific rules that should be followed on which accents are
used.  Depending on the structure of the word & sentence, e.g a greek
input method should not allow to have a "tonos (΄)" in a non-vowel.

Also, some input methods have include sampi instead of "!" which is not
really used in Greek since the 5th century BC (and even then it was not
common).

A greek-polytonic input method should follow the keybindings that are
already used in greek polytonic keyboards & only allow certain accents
depending on the character.

A simple guide on polytonic can be found here[1] for anyone interested.

[1]<https://www.polytoniko.org/mathi.php?newlang=el>

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 18:03         ` Visuwesh
  2024-09-19 18:13           ` Visuwesh
@ 2024-09-19 19:03           ` Thanos Apollo
  1 sibling, 0 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-19 19:03 UTC (permalink / raw)
  To: Visuwesh; +Cc: Eli Zaretskii, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 161 bytes --]

Visuwesh <visuweshm@gmail.com> writes:


[...]
>     https://github.com/9viz/tamil99

Bookmarked, thank you
-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 18:27             ` Eli Zaretskii
@ 2024-09-19 19:04               ` Thanos Apollo
  2024-09-20  5:56                 ` Eli Zaretskii
  0 siblings, 1 reply; 49+ messages in thread
From: Thanos Apollo @ 2024-09-19 19:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:


[...]
> I think if you look at the existing input methods, you will see how
> easy it is to create one, at least for the usual cases.  Feel free to
> ask questions here if you encounter problems you couldn't figure out.
>

Okay, thank you.

> I would also suggest that you start your copyright assignment
> paperwork now, so that we could accept your contributions without
> limitations.  If you agree, I will send you the form to fill with the
> instructions to go with it.

Agreed.

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 19:02           ` Thanos Apollo
@ 2024-09-20  5:55             ` Eli Zaretskii
  2024-09-20  9:18               ` Thanos Apollo
  0 siblings, 1 reply; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-20  5:55 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Cc: emacs-devel@gnu.org
> Date: Thu, 19 Sep 2024 22:02:18 +0300
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> 
> >> έ́́́́́́́́́́́́́́́́́́́́́́
> >
> > Which problems do you see here?
> 
> It's not possible to stack accents of the same type in Greek.  There are
> many grammatical rules that are ignored in most input methods that I've
> checkout out, such as using specific accents in non vowels.

But that is a problem for the user who is typing the sequence to
solve.  Emacs allows users to type such sequences even if they are
disallowed by the script or language rules.  An input method can
decide not to support that or make it hard or impossible to type, but
I can always work around that by typing the character code directly,
e.g., using "C-x 8 RET".  And if I do, Emacs should obey.  For
example, one situation where one could want to type such "forbidden"
sequences is to document that they are forbidden.

> There are specific rules that should be followed on which accents are
> used.  Depending on the structure of the word & sentence, e.g a greek
> input method should not allow to have a "tonos (΄)" in a non-vowel.

Again, it would be hard for an input method to disallow some sequence.
The most it can do is not to provide pre-prepared sequences for such
accented characters.  But as soon as you allow to type the tonos, the
user can type it any number of times anywhere.  And even if the input
method itself doesn't provide a way to type the tonos, the user could
type it directly.

> A greek-polytonic input method should follow the keybindings that are
> already used in greek polytonic keyboards & only allow certain accents
> depending on the character.

There's no argument about that.  My point is that users have more ways
of typing characters than a single input method provides, and
therefore they can break the rules of any input method or language
quite easily.  And that is okay, from where I stand: the correctness
of the text typed by users is the responsibility of those users, not
of Emacs.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 19:04               ` Thanos Apollo
@ 2024-09-20  5:56                 ` Eli Zaretskii
  0 siblings, 0 replies; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-20  5:56 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Cc: emacs-devel@gnu.org
> Date: Thu, 19 Sep 2024 22:04:18 +0300
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I would also suggest that you start your copyright assignment
> > paperwork now, so that we could accept your contributions without
> > limitations.  If you agree, I will send you the form to fill with the
> > instructions to go with it.
> 
> Agreed.

Thanks, form sent off-list.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20  5:55             ` Eli Zaretskii
@ 2024-09-20  9:18               ` Thanos Apollo
  2024-09-20  9:47                 ` Emanuel Berg
  2024-09-20 10:40                 ` Eli Zaretskii
  0 siblings, 2 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-20  9:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 1958 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Thanos Apollo <public@thanosapollo.org>
>> Cc: emacs-devel@gnu.org
>> Date: Thu, 19 Sep 2024 22:02:18 +0300
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> 
>> >> έ́́́́́́́́́́́́́́́́́́́́́́
>> >
>> > Which problems do you see here?
>> 
>> It's not possible to stack accents of the same type in Greek.  There are
>> many grammatical rules that are ignored in most input methods that I've
>> checkout out, such as using specific accents in non vowels.
>
> But that is a problem for the user who is typing the sequence to
> solve.

Hmmm....  I guess we probably see this differently (literally).  I
understood the issue when reading this email in emacs-devel web archive.

I'm attaching an image for you to see what it usually looks like with
Iosevka Aile font.  In K9 the accents are even covering your own name, this is a bug,
most fonts do not support this and users should be able to easily type
"stacking" accents of the same type.

Depending on which greek input is used, the way to type accents is
different.  For example, in greek-polytonic that was recommended
previously, to add an oxia (΄), using ";" in us qwerty keyboards, you first
have to type the vowel & then press ";".  That's the opposite of how
Greek input methods work, we first type ";" (or the any other character
representing the accent(s) we want) and then the vowel.

You can try that by using the "greek" input method or by using
"setxkbmap gr" to see the differences with greek-polytonic in typing a
vowel with oxia.

greek-babel appears to support polytonic accents, but I haven't fully
tested it due to unfamiliarity with its keybindings.  I will start
working on a new greek-polytonic input method similar to what is
commonly used in proprietary software that most users are familiar
with. I'm attaching an image of the keybindings commonly used.



Cheers,

[-- Attachment #1.2: greek-polytonic-issue-09.png --]
[-- Type: image/png, Size: 171175 bytes --]

[-- Attachment #1.3: pliktrologio.jpg --]
[-- Type: image/png, Size: 161242 bytes --]

[-- Attachment #1.4: Type: text/plain, Size: 46 bytes --]

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20  9:18               ` Thanos Apollo
@ 2024-09-20  9:47                 ` Emanuel Berg
  2024-09-20 10:40                 ` Eli Zaretskii
  1 sibling, 0 replies; 49+ messages in thread
From: Emanuel Berg @ 2024-09-20  9:47 UTC (permalink / raw)
  To: emacs-devel

Thanos Apollo wrote:

> Depending on which greek input is used [...]

Thanos Apollo, do you have this?

(defun char-to-greek (c)
  "Convert C to the corresponding Greek char."
  (when (and (<= ?A c)
             (<= c ?Y))
    (+ c 848)))

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20  9:18               ` Thanos Apollo
  2024-09-20  9:47                 ` Emanuel Berg
@ 2024-09-20 10:40                 ` Eli Zaretskii
  2024-09-20 11:16                   ` Thanos Apollo
  2024-09-20 12:24                   ` Thanos Apollo
  1 sibling, 2 replies; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-20 10:40 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Cc: emacs-devel@gnu.org
> Date: Fri, 20 Sep 2024 12:18:40 +0300
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> It's not possible to stack accents of the same type in Greek.  There are
> >> many grammatical rules that are ignored in most input methods that I've
> >> checkout out, such as using specific accents in non vowels.
> >
> > But that is a problem for the user who is typing the sequence to
> > solve.
> 
> Hmmm....  I guess we probably see this differently (literally).  I
> understood the issue when reading this email in emacs-devel web archive.
> 
> I'm attaching an image for you to see what it usually looks like with
> Iosevka Aile font.  In K9 the accents are even covering your own name, this is a bug,
> most fonts do not support this and users should be able to easily type
> "stacking" accents of the same type.

Again, why is it our problem?  If the user wants to have this sequence
for some reason, it is up to the user to select the font that displays
this properly.  Emacs has no business preventing users from typing
nonsensical sequences of codepoints.

> Depending on which greek input is used, the way to type accents is
> different.  For example, in greek-polytonic that was recommended
> previously, to add an oxia (΄), using ";" in us qwerty keyboards, you first
> have to type the vowel & then press ";".  That's the opposite of how
> Greek input methods work, we first type ";" (or the any other character
> representing the accent(s) we want) and then the vowel.
> 
> You can try that by using the "greek" input method or by using
> "setxkbmap gr" to see the differences with greek-polytonic in typing a
> vowel with oxia.
> 
> greek-babel appears to support polytonic accents, but I haven't fully
> tested it due to unfamiliarity with its keybindings.  I will start
> working on a new greek-polytonic input method similar to what is
> commonly used in proprietary software that most users are familiar
> with. I'm attaching an image of the keybindings commonly used.

I'm not sure this is related.  As I wrote, it is okay for the input
method not to support more than one tonos following a base character.
But that does not (and should not) prevent the user from typing as
many tonos accents as he/she pleases by other means.  The only
requirement from Emacs is not to crash as result of displaying such
sequences.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 10:40                 ` Eli Zaretskii
@ 2024-09-20 11:16                   ` Thanos Apollo
  2024-09-20 12:24                   ` Thanos Apollo
  1 sibling, 0 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-20 11:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1406 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:


[...]
>
> Again, why is it our problem?  If the user wants to have this sequence
> for some reason, it is up to the user to select the font that displays
> this properly.  Emacs has no business preventing users from typing
> nonsensical sequences of codepoints.
>

Because it does not make linguistic sense, similarly to Spanish input
methods which AFAIK does not allow for multiple acute accents (acento
agudo, á) on a single letter.  I understand that Emacs has no business
preventing users from typing nonsensical keys in Greek, but those keys/characters
should exist in the Greek language.  The current implementation of "greek"
input method does not allow for stacking accents either.

[...]
> I'm not sure this is related.  As I wrote, it is okay for the input
> method not to support more than one tonos following a base character.
> But that does not (and should not) prevent the user from typing as
> many tonos accents as he/she pleases by other means.  The only
> requirement from Emacs is not to crash as result of displaying such
> sequences.

Polytonic input methods have hard coded accent combinations.
Combinations of accents have specific keybinding e.g "M-Shift-q" + a for
oxia and ypogegrameni with α (e.g ᾴ).  Which btw I'm not sure how I can
replicate in quail.


-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 10:40                 ` Eli Zaretskii
  2024-09-20 11:16                   ` Thanos Apollo
@ 2024-09-20 12:24                   ` Thanos Apollo
  2024-09-20 12:39                     ` Robert Pluim
  2024-09-20 13:35                     ` Eli Zaretskii
  1 sibling, 2 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-20 12:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>
> I'm not sure this is related.  As I wrote, it is okay for the input
> method not to support more than one tonos following a base character.
> But that does not (and should not) prevent the user from typing as
> many tonos accents as he/she pleases by other means.  The only
> requirement from Emacs is not to crash as result of displaying such
> sequences.

I think there is also a misunderstanding here about how we input
accents.  First we define the accent e.g "´" and then we add the vowel
"α" -> "ά".  We do not add a vowel and then "throw" accents at it, thus
it's not possible to add multiple tonos etc.

Combinations of accents have specific keybindings, usually using
modifier keys (Meta, Control).  Do you have any examples of quail or any
other input method that uses modifier keys?

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 12:24                   ` Thanos Apollo
@ 2024-09-20 12:39                     ` Robert Pluim
  2024-09-20 12:55                       ` Thanos Apollo
  2024-09-20 13:35                     ` Eli Zaretskii
  1 sibling, 1 reply; 49+ messages in thread
From: Robert Pluim @ 2024-09-20 12:39 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: Eli Zaretskii, emacs-devel

>>>>> On Fri, 20 Sep 2024 15:24:13 +0300, Thanos Apollo <public@thanosapollo.org> said:

    Thanos> Eli Zaretskii <eliz@gnu.org> writes:
    >> 
    >> I'm not sure this is related.  As I wrote, it is okay for the input
    >> method not to support more than one tonos following a base character.
    >> But that does not (and should not) prevent the user from typing as
    >> many tonos accents as he/she pleases by other means.  The only
    >> requirement from Emacs is not to crash as result of displaying such
    >> sequences.

    Thanos> I think there is also a misunderstanding here about how we input
    Thanos> accents.  First we define the accent e.g "´" and then we add the vowel
    Thanos> "α" -> "ά".  We do not add a vowel and then "throw" accents at it, thus
    Thanos> it's not possible to add multiple tonos etc.

Then thereʼs no issue. Just define "´´" -> "´" etc

    Thanos> Combinations of accents have specific keybindings, usually using
    Thanos> modifier keys (Meta, Control).  Do you have any examples of quail or any
    Thanos> other input method that uses modifier keys?

I donʼt think thatʼs currently possible in quail. "quail.el"
explicitly says "ASCII key string".


Robert
-- 



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 12:39                     ` Robert Pluim
@ 2024-09-20 12:55                       ` Thanos Apollo
  2024-09-20 13:41                         ` Robert Pluim
  0 siblings, 1 reply; 49+ messages in thread
From: Thanos Apollo @ 2024-09-20 12:55 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Eli Zaretskii, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1891 bytes --]

Robert Pluim <rpluim@gmail.com> writes:

>>>>>> On Fri, 20 Sep 2024 15:24:13 +0300, Thanos Apollo <public@thanosapollo.org> said:
>
>     Thanos> Eli Zaretskii <eliz@gnu.org> writes:
>     >> 
>     >> I'm not sure this is related.  As I wrote, it is okay for the input
>     >> method not to support more than one tonos following a base character.
>     >> But that does not (and should not) prevent the user from typing as
>     >> many tonos accents as he/she pleases by other means.  The only
>     >> requirement from Emacs is not to crash as result of displaying such
>     >> sequences.
>
>     Thanos> I think there is also a misunderstanding here about how we input
>     Thanos> accents.  First we define the accent e.g "´" and then we add the vowel
>     Thanos> "α" -> "ά".  We do not add a vowel and then "throw" accents at it, thus
>     Thanos> it's not possible to add multiple tonos etc.
>
> Then thereʼs no issue. Just define "´´" -> "´" etc
>

The issue is that some greek input methods, such as greek-polytinic
that was recommended, have that in reverse.  They first add a character
and then the user can throw unlimited accents at it, e.g

ᾴ́́́́́́́́́́́́́́́́́́́́̔̔̔̔̔̔̔̔̔̔̓̓̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈ͅͅͅͅͅͅͅͅ

This should be considered a different language, not Greek.

>     Thanos> Combinations of accents have specific keybindings, usually using
>     Thanos> modifier keys (Meta, Control).  Do you have any examples of quail or any
>     Thanos> other input method that uses modifier keys?
>
> I donʼt think thatʼs currently possible in quail. "quail.el"
> explicitly says "ASCII key string".
>

Thank you, do you have any ideas of how to approach creating an input method that
uses modifier keys?

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 12:24                   ` Thanos Apollo
  2024-09-20 12:39                     ` Robert Pluim
@ 2024-09-20 13:35                     ` Eli Zaretskii
  2024-09-20 13:54                       ` Thanos Apollo
  1 sibling, 1 reply; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-20 13:35 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Cc: emacs-devel@gnu.org
> Date: Fri, 20 Sep 2024 15:24:13 +0300
> 
> I think there is also a misunderstanding here about how we input
> accents.  First we define the accent e.g "´" and then we add the vowel
> "α" -> "ά".  We do not add a vowel and then "throw" accents at it, thus
> it's not possible to add multiple tonos etc.

What happens if you type several accents and only after that the
vowel?

Also, there could be a "postfix" input method, where you type the base
character first and the accents after that.

In any case, I have nothing against an input method disallowing
sequences with multiple accents.  My point was that users can easily
work around that, and Emacs should not prevent such workarounds.

> Combinations of accents have specific keybindings, usually using
> modifier keys (Meta, Control).  Do you have any examples of quail or any
> other input method that uses modifier keys?

Only with Shift, AFAIK.  But I don't consider myself a Quail expert.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 12:55                       ` Thanos Apollo
@ 2024-09-20 13:41                         ` Robert Pluim
  0 siblings, 0 replies; 49+ messages in thread
From: Robert Pluim @ 2024-09-20 13:41 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: Eli Zaretskii, emacs-devel

>>>>> On Fri, 20 Sep 2024 15:55:31 +0300, Thanos Apollo <public@thanosapollo.org> said:
    >> 
    >> Then thereʼs no issue. Just define "´´" -> "´" etc
    >> 

    Thanos> The issue is that some greek input methods, such as greek-polytinic
    Thanos> that was recommended, have that in reverse.  They first add a character
    Thanos> and then the user can throw unlimited accents at it, e.g

    Thanos> ᾴ́́́́́́́́́́́́́́́́́́́́̔̔̔̔̔̔̔̔̔̔̓̓̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈̈ͅͅͅͅͅͅͅͅ

    Thanos> This should be considered a different language, not Greek.

"what do you care what other people think, Mr Feynman?". If youʼre
going to define a new input method, it doesnʼt matter what the
existing ones do.

    Thanos> Combinations of accents have specific keybindings, usually using
    Thanos> modifier keys (Meta, Control).  Do you have any examples of quail or any
    Thanos> other input method that uses modifier keys?
    >> 
    >> I donʼt think thatʼs currently possible in quail. "quail.el"
    >> explicitly says "ASCII key string".
    >> 

    Thanos> Thank you, do you have any ideas of how to approach creating an input method that
    Thanos> uses modifier keys?

Iʼd take a look at input methods that have SIMPLE = nil, maybe that allows
using modifier keys.

`key-translation-map' allows it, so it should be possible with quail
as well:

    (define-prefix-command 'meta-q-map)
    (define-key key-translation-map (kbd "M-Q") meta-q-map)
    (define-key meta-q-map "a" "ᾴ")

Of course, then you get the issue that your modifier keys are likely
already bound to commands in emacs.

Robert
-- 



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 13:35                     ` Eli Zaretskii
@ 2024-09-20 13:54                       ` Thanos Apollo
  2024-09-20 14:48                         ` Emanuel Berg
  0 siblings, 1 reply; 49+ messages in thread
From: Thanos Apollo @ 2024-09-20 13:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:


[...]
>
> What happens if you type several accents and only after that the
> vowel?
>

The accent is inserted as signle character until there is a valid
character for it to "combine" e.g ΄΄΄ά.  If a valid character, such as
vowel, is inserted after the accent, they combine into one character
(ά), if the user inserts a character that takes no accents, such as
pi(π), the accent is inserted as a signle character as well (e.g ΄π).

There are no characters in Greek with multiple accents of the same type.

[...]
>
> Only with Shift, AFAIK.  But I don't consider myself a Quail expert.

Thank you, I will see if I can create something useful and I will be
contacting you.


Cheers,

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-19 14:43 Writting Greek in Emacs Thanos Apollo
  2024-09-19 14:57 ` Greg Farough
  2024-09-19 16:19 ` Eli Zaretskii
@ 2024-09-20 14:23 ` Max Nikulin
  2024-09-20 23:53   ` Thanos Apollo
  2 siblings, 1 reply; 49+ messages in thread
From: Max Nikulin @ 2024-09-20 14:23 UTC (permalink / raw)
  To: emacs-devel

On 19/09/2024 21:43, Thanos Apollo wrote:
>      input "type:keyboard" {
>            xkb_layout us,gr

I am curious what tool you are going to use to fix the "gr" layout 
specifically for Emacs windows (frames) while having both available for 
other applications? I assume that the purpose of Emacs input method is 
to have usual keybindings accessible without switching of keyboard 
layout while typing Greek.

As to input method using modifier keys, it might lead to conflicts with 
default key bindings for some commands.




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 13:54                       ` Thanos Apollo
@ 2024-09-20 14:48                         ` Emanuel Berg
  2024-09-20 22:00                           ` Thanos Apollo
  0 siblings, 1 reply; 49+ messages in thread
From: Emanuel Berg @ 2024-09-20 14:48 UTC (permalink / raw)
  To: emacs-devel

Thanos Apollo wrote:

> The accent is inserted as signle character until there is
> a valid character for it to "combine" e.g ΄΄΄ά. If a valid
> character, such as vowel, is inserted after the accent, they
> combine into one character (ά),

The compose key does this. I have it for Swedish chars in the
Linux VT. Hääj! Those I insert with compose " a. Compose o and
a is å. Very clever! Whoever came up with it (the compose
key).

But the Swedish abc cannot be compared to the Greek as that is
a whole alphabet of its own. Depending on how often you have
to do this, the compose key is not a bad solution.

It is handy not to have to change back and forth between
keyboards, if you can avoid that with the compose key, it is
all good.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 14:48                         ` Emanuel Berg
@ 2024-09-20 22:00                           ` Thanos Apollo
  2024-09-21  8:19                             ` Eli Zaretskii
  2024-09-21 15:31                             ` Emanuel Berg
  0 siblings, 2 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-20 22:00 UTC (permalink / raw)
  To: Emanuel Berg, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 3628 bytes --]

Emanuel Berg <incal@dataswamp.org> writes:


[...]
> The compose key does this. I have it for Swedish chars in the
> Linux VT. Hääj! Those I insert with compose " a. Compose o and
> a is å. Very clever! Whoever came up with it (the compose
> key).
>

This is exactly what I was looking for, thank you Emanuel!

> But the Swedish abc cannot be compared to the Greek as that is
> a whole alphabet of its own. Depending on how often you have
> to do this, the compose key is not a bad solution.
>

Actually the Latin alphabet has 26 characters, the greek alphabet has
only 24, leaving 2 extra keys for accents/punctuation.

Apologies for not inputting my thoughts on the issue properly before.  I
will try to reiterate.

When creating a new Greek input method for Emacs, several issues and
goals need to be considered:
----------------------------

- Only include letters of the Greek alphabet.
  - greek-ibycus4 for example includes the character J, which is due to
    not including the letter "J" in quail-define-rules.  I believe this is
    a bug as well.
  - greek-babel includes many archaic greek letters that are not part of
    the Greek alphabet since the 5th century BC.
- Follow the Greek QWERTY layout for keybindings.
- If modifier/compose keys are not used in creating a new Greek
  polytonic input method, one could replace the characters "|", "{",
  "}", and "~" with hard-coded accent combinations, as these characters
  are not commonly used in Greek.
- Another tricky part is handling the letter Sigma ("Σ", "σ", "ς"). "Σ"
  is the capital version of sigma ("σ") while "ς" is used at the end of
  a word. In iOS, this is done automatically with one key.  Similarly,
  greek-ibycus4 attempts to implement this feature:

("j" ?ς) ("s " ["ς "]) ("s," ["ς,"]) ("s." ["ς."]) ("s?" ["ς;"]) ("s;"
["ς·"]) #line842 in greek.el


Using "j" and "s" as a keybinding as well does not make much sense.  The
commonly key usually used for sigma is "s".  Currently the "greek" input
method, which is used for monotonic greek, has duplicate keys including
("W" ?Σ) #line1208 and ("S" ?Σ)#line1220 in greek.el.  It'd be ideal to
have all 3 versions of sigma under the keybinding "s" in a new
greek-polytonic input method.

I propose a restructure/refactor of =greek.el= as follows:
----------------------------------------------------------

- Retain the "greek" input method as is.
  - It provides proper support for monotonic Greek and is familiar to most users.
- Retain "greek-postfix" as is.
  - Supports monotonic Greek with familiar postfix keybindings.
- Retain "greek-babel" as is.
  - Supports archaic Greek letters & polytonic accents.

For other input methods:

- "greek-mizuochi" and "greek-ibycus4" lack proper Greek support,
  including non-mapped keys.  Since "greek-babel" includes archaic Greek
  letters, they seem redundant.  They should be either rewritten or
  considered deprecated.
- "greek-jis" seems unique, with JIS likely standing for Japanese
  Industrial Standard.  However, it lacks support for Greek all accents
  and many Greek letters.  While this could be an interesting niche
  package, it may not belong in =greek.el= if it's not really Greek.

Introduce:
- Add "greek-polytonic".
  - This should support only the 24 letters of the Greek alphabet and
    polytonic accents, using keybindings for the standard QWERTY
    Greek keyboard as closely as possible.
- Add "greek-polytonic-postfix" _after_ establishing proper polytonic
  support.
  
-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 14:23 ` Max Nikulin
@ 2024-09-20 23:53   ` Thanos Apollo
  2024-09-21  5:40     ` Keybindings and changing keyboard layout [was: Writting Greek in Emacs] tomas
                       ` (2 more replies)
  0 siblings, 3 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-20 23:53 UTC (permalink / raw)
  To: Max Nikulin, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

Max Nikulin <manikulin@gmail.com> writes:

> As to input method using modifier keys, it might lead to conflicts with 
> default key bindings for some commands.

Yes, when I write in Greek I do not have access to emacs keybindings
(C-b etc).  That's why I would like to implement a new greek input
method in emacs.  It is even harder to use & configure Greek in emacs in
different OS, depending on how emacs was installed.

(I'm not familiar with other OS outside of the GNU ecosystem, but this
is what colleagues of mine claimed).

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Keybindings and changing keyboard layout [was: Writting Greek in Emacs]
  2024-09-20 23:53   ` Thanos Apollo
@ 2024-09-21  5:40     ` tomas
  2024-09-21 17:55       ` Juri Linkov
  2024-09-21  8:23     ` Writting Greek in Emacs Eli Zaretskii
  2024-09-23  3:28     ` Max Nikulin
  2 siblings, 1 reply; 49+ messages in thread
From: tomas @ 2024-09-21  5:40 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2253 bytes --]

On Sat, Sep 21, 2024 at 02:53:54AM +0300, Thanos Apollo wrote:
> Max Nikulin <manikulin@gmail.com> writes:
> 
> > As to input method using modifier keys, it might lead to conflicts with 
> > default key bindings for some commands.
> 
> Yes, when I write in Greek I do not have access to emacs keybindings
> (C-b etc).

Yes, this is somewhat annoying, but I haven't yet a good idea on how
to cope with that.

I like to change the keyboard layout at the X level, since then I can
also type in Greek into a terminal or into a (gasp!) browser, and the
keyboard layout stays consistent.

But Emacs (rightfully) balks at me that CTRL-β is a funny control sequence.

Surprisingly, some applications seem to magically "cope" in some way. In
Firefox, CTRL-τ opens a new tab (as CTRL-t would do under a Latin layout).
But this doesn't really count: Firefox has just a few useful keybindings
and the whole model actually discourages using them, while Emacs has
a very rich set of bindings which is at the core of its user interaction.

Given the very dense keybindings in Emacs, this seems like a daunting
task: I even guess it has some ugly fuzzy borders: just blindly going
by "places" in the keyboard brings up issues like CTRL-Z and CTRL-Y
being switched for German layouts, and Germans would expect those bindings
to "move" with the key labels instead of following "geometry". Likewise
for French ("A" "Z" where usually "Q" and "W" are, etc).

So the "problem" seems to be ill-defined and lots of careful thinking
and tinkering needed to come up with a useful solution.

>   That's why I would like to implement a new greek input
> method in emacs.  It is even harder to use & configure Greek in emacs in
> different OS, depending on how emacs was installed.

I actually want to change the keyboard layout at the X level (read: the
"OS", but that would be a lie, because I haven't yet looked at the
Linux terminal), for the above reasons.

> (I'm not familiar with other OS outside of the GNU ecosystem, but this
> is what colleagues of mine claimed).

I guess "there is no magic". I haven't yet a 100% satisfying approach.

But I'd like to know whether/if people have come up with ideas :)

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 22:00                           ` Thanos Apollo
@ 2024-09-21  8:19                             ` Eli Zaretskii
  2024-09-21 15:31                             ` Emanuel Berg
  1 sibling, 0 replies; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-21  8:19 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: incal, emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Date: Sat, 21 Sep 2024 01:00:35 +0300
> 
> - Only include letters of the Greek alphabet.
>   - greek-ibycus4 for example includes the character J, which is due to
>     not including the letter "J" in quail-define-rules.  I believe this is
>     a bug as well.

If a key is not assigned in the input method, it should produce
itself.  This is not a bug.

> I propose a restructure/refactor of =greek.el= as follows:
> ----------------------------------------------------------
> 
> - Retain the "greek" input method as is.
>   - It provides proper support for monotonic Greek and is familiar to most users.
> - Retain "greek-postfix" as is.
>   - Supports monotonic Greek with familiar postfix keybindings.
> - Retain "greek-babel" as is.
>   - Supports archaic Greek letters & polytonic accents.
> 
> For other input methods:
> 
> - "greek-mizuochi" and "greek-ibycus4" lack proper Greek support,
>   including non-mapped keys.  Since "greek-babel" includes archaic Greek
>   letters, they seem redundant.  They should be either rewritten or
>   considered deprecated.
> - "greek-jis" seems unique, with JIS likely standing for Japanese
>   Industrial Standard.  However, it lacks support for Greek all accents
>   and many Greek letters.  While this could be an interesting niche
>   package, it may not belong in =greek.el= if it's not really Greek.

Please don't make any changes in existing Greek input methods except
if you find clear bugs.  In particular, we don't want to remove any
existing input methods, as the mere fact that they exist does no harm.
Deprecating input methods is meaningless (since we will not remove
them); instead, we can say in NEWS that this-and-that new input
methods should be used instead.  We can also add to the input method's
doc string some text which describes the its disadvantages and
deficiencies, or the special situations which the input method is
designed to support, and advises to use other input methods instead.

> Introduce:
> - Add "greek-polytonic".
>   - This should support only the 24 letters of the Greek alphabet and
>     polytonic accents, using keybindings for the standard QWERTY
>     Greek keyboard as closely as possible.
> - Add "greek-polytonic-postfix" _after_ establishing proper polytonic
>   support.

This is fine, thanks.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 23:53   ` Thanos Apollo
  2024-09-21  5:40     ` Keybindings and changing keyboard layout [was: Writting Greek in Emacs] tomas
@ 2024-09-21  8:23     ` Eli Zaretskii
  2024-09-23  3:28     ` Max Nikulin
  2 siblings, 0 replies; 49+ messages in thread
From: Eli Zaretskii @ 2024-09-21  8:23 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: manikulin, emacs-devel

> From: Thanos Apollo <public@thanosapollo.org>
> Date: Sat, 21 Sep 2024 02:53:54 +0300
> 
> Max Nikulin <manikulin@gmail.com> writes:
> 
> > As to input method using modifier keys, it might lead to conflicts with 
> > default key bindings for some commands.
> 
> Yes, when I write in Greek I do not have access to emacs keybindings
> (C-b etc).  That's why I would like to implement a new greek input
> method in emacs.  It is even harder to use & configure Greek in emacs in
> different OS, depending on how emacs was installed.
> 
> (I'm not familiar with other OS outside of the GNU ecosystem, but this
> is what colleagues of mine claimed).

On MS-Windows, turning on an input method does not affect C-<KEY> and
M-<KEY> combinations, they still produce their previous keys.  But I
know that this is not so on X.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 22:00                           ` Thanos Apollo
  2024-09-21  8:19                             ` Eli Zaretskii
@ 2024-09-21 15:31                             ` Emanuel Berg
  1 sibling, 0 replies; 49+ messages in thread
From: Emanuel Berg @ 2024-09-21 15:31 UTC (permalink / raw)
  To: emacs-devel

Thanos Apollo wrote:

> This is exactly what I was looking for, thank you Emanuel!

My pleasure, and however you solve this, you can post it here
if your countrymen in the future will google it.

> Actually the Latin alphabet has 26 characters

Okay, but it is not the total number but the number of chars
that would involve the compose key, and how often they
are used.

Too much compose key can a little annoying so better think of
a clever way to set it up. The rule is (1) it should work, and
(2) you should do it as not as often as possible. Other than
that, yeah, good solution.

> the greek alphabet has only 24, leaving 2 extra keys for
> accents/punctuation.

Swedish alphabet has the Latin ones and å ä and ö, so that
should (+ 26 3) 29.

The Norwegians use the Danish alphabet, maybe by now it is
Norwegian as well, This also has three extra chars at the end
so 29 again but their chars and ours are similar but not
identical. No idea what they do with their keyboards, here,
I've not heard that the compose key is so commonly in use.

Bulgarian  30
Russian    32 (or 33)
Serbian    30
Ukrainian  32

Are those similar to the Greek alphabet? Maybe to some
superficial extent but it is more beneficial to think of them
as different/distinct alphabets, or am I wrong?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Keybindings and changing keyboard layout [was: Writting Greek in Emacs]
  2024-09-21  5:40     ` Keybindings and changing keyboard layout [was: Writting Greek in Emacs] tomas
@ 2024-09-21 17:55       ` Juri Linkov
  2024-09-22  6:47         ` tomas
  0 siblings, 1 reply; 49+ messages in thread
From: Juri Linkov @ 2024-09-21 17:55 UTC (permalink / raw)
  To: tomas; +Cc: emacs-devel

>> > As to input method using modifier keys, it might lead to conflicts with 
>> > default key bindings for some commands.
>>
>> Yes, when I write in Greek I do not have access to emacs keybindings
>> (C-b etc).
>
> Yes, this is somewhat annoying, but I haven't yet a good idea on how
> to cope with that.
>
> I like to change the keyboard layout at the X level, since then I can
> also type in Greek into a terminal or into a (gasp!) browser, and the
> keyboard layout stays consistent.
>
> But Emacs (rightfully) balks at me that CTRL-β is a funny control sequence.
>
> Surprisingly, some applications seem to magically "cope" in some way. In
> Firefox, CTRL-τ opens a new tab (as CTRL-t would do under a Latin layout).
> But this doesn't really count: Firefox has just a few useful keybindings
> and the whole model actually discourages using them, while Emacs has
> a very rich set of bindings which is at the core of its user interaction.
>
> Given the very dense keybindings in Emacs, this seems like a daunting
> task: I even guess it has some ugly fuzzy borders: just blindly going
> by "places" in the keyboard brings up issues like CTRL-Z and CTRL-Y
> being switched for German layouts, and Germans would expect those bindings
> to "move" with the key labels instead of following "geometry". Likewise
> for French ("A" "Z" where usually "Q" and "W" are, etc).

This is bug#43830.  Patches welcome.



^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Keybindings and changing keyboard layout [was: Writting Greek in Emacs]
  2024-09-21 17:55       ` Juri Linkov
@ 2024-09-22  6:47         ` tomas
  2024-09-22 11:29           ` Max Nikulin
  0 siblings, 1 reply; 49+ messages in thread
From: tomas @ 2024-09-22  6:47 UTC (permalink / raw)
  To: Juri Linkov; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

On Sat, Sep 21, 2024 at 08:55:15PM +0300, Juri Linkov wrote:
> >> > As to input method using modifier keys, it might lead to conflicts with 
> >> > default key bindings for some commands.
> >>
> >> Yes, when I write in Greek I do not have access to emacs keybindings
> >> (C-b etc).
> >
> > Yes, this is somewhat annoying, but I haven't yet a good idea on how
> > to cope with that.

[...]

> This is bug#43830.  Patches welcome.

Oh, thanks for the pointer. Some reading ahead :)

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Keybindings and changing keyboard layout [was: Writting Greek in Emacs]
  2024-09-22  6:47         ` tomas
@ 2024-09-22 11:29           ` Max Nikulin
  2024-09-23  5:54             ` tomas
  0 siblings, 1 reply; 49+ messages in thread
From: Max Nikulin @ 2024-09-22 11:29 UTC (permalink / raw)
  To: emacs-devel

>>>> Yes, when I write in Greek I do not have access to emacs keybindings
>>>> (C-b etc).

> On Sat, Sep 21, 2024 at 08:55:15PM +0300, Juri Linkov wrote:
>> This is bug#43830.  Patches welcome.

I am unsure if it is possible to use one character for 
self-insert-command, but another one to lookup in keymaps.

In my notes from 2020 I have
<https://searchfox.org/mozilla-central/source/widget/gtk/NativeKeyBindings.cpp>
see GetEditCommands

On 22/09/2024 13:47, tomas@tuxteam.de wrote:
> Oh, thanks for the pointer. Some reading ahead :)

 From my point of view, reverse-im is no go. Perhaps it might be 
suitable when single keyboard layout is in use, but it can not react to 
frequent layout changes, so e.g. "," jumps from one key to another.

For GNOME users I have seen a package that reacts on D-Bus events. By 
the way, this approach might work even for terminal Emacs frames.

As a workaround, I have a tiny tool that is invoked in response to 
ISO_<First|Last|Prev|Next>_Group as global shortcuts and if the active 
window is Emacs then it forces "us" layout and sends another unique key 
(to switch Emacs input method) using XTest extension. Kwin supports 
keyboard layout per window out of the box, fluxbox requires xxkb.

It has some caveats and I have no idea if something similar is possible 
in Wayland. On the other hand, other attempts to solve the issue, I have 
seen, are even more ugly.




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-20 23:53   ` Thanos Apollo
  2024-09-21  5:40     ` Keybindings and changing keyboard layout [was: Writting Greek in Emacs] tomas
  2024-09-21  8:23     ` Writting Greek in Emacs Eli Zaretskii
@ 2024-09-23  3:28     ` Max Nikulin
  2024-09-23 14:02       ` Thanos Apollo
  2 siblings, 1 reply; 49+ messages in thread
From: Max Nikulin @ 2024-09-23  3:28 UTC (permalink / raw)
  To: emacs-devel

On 21/09/2024 06:53, Thanos Apollo wrote:
> 
>> As to input method using modifier keys, it might lead to conflicts with
>> default key bindings for some commands.
> 
> Yes, when I write in Greek I do not have access to emacs keybindings
> (C-b etc).

I am sorry for my ignorance, I may confuse something since I have never 
tried to type Greek using "gr" keyboard layout. Writing on possible 
conflicts I have in mind mostly M-something keybindings. I am looking 
into /usr/share/X11/xkb/symbols/gr polytonic symbols. AltGr+s in Greek 
layout (<AC02> levels 3 and 4) are used to type "Ϛ ϛ STIGMATA". On the 
other hand the "us" layout does not have level 3 and 4 symbols for 
<AC02> "s" qwerty key. So I am not sure if it is possible for Emacs 
input method to add more variants to sigma using XKB AltGr key while 
"us" keyboard layout is active. On the other hand M-s is busy in Emacs, 
so using [Alt+s] to type "Ϛ" means issues with regular bindings.

[AltGr+"{"] and [AltGr+"}"] are defined as dead keys for accents, so it 
may cause similar issues.




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Keybindings and changing keyboard layout [was: Writting Greek in Emacs]
  2024-09-22 11:29           ` Max Nikulin
@ 2024-09-23  5:54             ` tomas
  2024-09-24  4:22               ` Max Nikulin
  0 siblings, 1 reply; 49+ messages in thread
From: tomas @ 2024-09-23  5:54 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]

On Sun, Sep 22, 2024 at 06:29:17PM +0700, Max Nikulin wrote:
> > > > > Yes, when I write in Greek I do not have access to emacs keybindings
> > > > > (C-b etc).
> 
> > On Sat, Sep 21, 2024 at 08:55:15PM +0300, Juri Linkov wrote:
> > > This is bug#43830.  Patches welcome.
> 
> I am unsure if it is possible to use one character for self-insert-command,
> but another one to lookup in keymaps.

I don't know either -- to be honest I didn't even know what options are
"out there", so your pointer is very welcome.

I haven't yet found the time to read into bug#43830, on the road ATM.
But I'll sure do.

> In my notes from 2020 I have
> <https://searchfox.org/mozilla-central/source/widget/gtk/NativeKeyBindings.cpp>
> see GetEditCommands
> 
> On 22/09/2024 13:47, tomas@tuxteam.de wrote:
> > Oh, thanks for the pointer. Some reading ahead :)
> 
> From my point of view, reverse-im is no go. Perhaps it might be suitable
> when single keyboard layout is in use, but it can not react to frequent
> layout changes, so e.g. "," jumps from one key to another.
> 
> For GNOME users I have seen a package that reacts on D-Bus events. By the
> way, this approach might work even for terminal Emacs frames.
> 
> As a workaround, I have a tiny tool that is invoked in response to
> ISO_<First|Last|Prev|Next>_Group as global shortcuts and if the active
> window is Emacs then it forces "us" layout and sends another unique key (to
> switch Emacs input method) using XTest extension. Kwin supports keyboard
> layout per window out of the box, fluxbox requires xxkb.
> 
> It has some caveats and I have no idea if something similar is possible in
> Wayland. On the other hand, other attempts to solve the issue, I have seen,
> are even more ugly.

Ugh. They all don't feel pretty. I'm tempted to just put that into my muscle
memory and just switch keyboard layout when necessary. It's just one keystroke
more, and people with some vi experience have a "mode switch" place in their
brains anyway :-)

After reading your answers, my guess is that the only non-ugly approach would
be at the X level.

Thanks & cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-23  3:28     ` Max Nikulin
@ 2024-09-23 14:02       ` Thanos Apollo
  2024-09-24  3:53         ` Max Nikulin
  2024-09-24 13:54         ` tomas
  0 siblings, 2 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-23 14:02 UTC (permalink / raw)
  To: Max Nikulin, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]

Max Nikulin <manikulin@gmail.com> writes:

[...]
>
> I am sorry for my ignorance, I may confuse something since I have never 
> tried to type Greek using "gr" keyboard layout. Writing on possible 
> conflicts I have in mind mostly M-something keybindings. I am looking 
> into /usr/share/X11/xkb/symbols/gr polytonic symbols. AltGr+s in Greek 
> layout (<AC02> levels 3 and 4) are used to type "Ϛ ϛ STIGMATA". On the 
> other hand the "us" layout does not have level 3 and 4 symbols for 
> <AC02> "s" qwerty key. 

Stigmata refers to bodily marks, it's not a letter.  =Stigma= is a
ligature letter (meaning a combination of 2 letters, similar to "æ",
but was used _only_ in minuscule manuscripts to save space by combining
sigma (σ) + tau (τ).  Stigma is not part of the Greek alphabet.

All letters of the Greek alphabet are currently supported both in Emacs
and in the GNU system.  Only the polytonic system is lacking (᾿ ` ῾ ῀ ͺ).

> [AltGr+"{"] and [AltGr+"}"] are defined as dead keys for accents, so
> it may cause similar issues.

Thanks to quail there is no need for dead keys or using Meta/Control
key.  My current implementations is almost 1:1 with the greek keyboard
(monotonic implementation) from greek.el, just removed duplicated keys
(e.g W=Σ & S=Σ) to make space for the polytonic accents.

I will be typing a couple of greek texts for a personal project of mine,
testing what feels most fluid to type & upon completion I will be
sharing it with emacs-devel.

P.S Polytonic Greek is the same as the current Greek monotonic
implementation, just with 5 more accent/diacritical marks (᾿ ` ῾ ῀ ͺ).
Not sure what is going on with some implementations of it.

-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-23 14:02       ` Thanos Apollo
@ 2024-09-24  3:53         ` Max Nikulin
  2024-09-24 14:37           ` Thanos Apollo
  2024-09-24 13:54         ` tomas
  1 sibling, 1 reply; 49+ messages in thread
From: Max Nikulin @ 2024-09-24  3:53 UTC (permalink / raw)
  To: emacs-devel

On 23/09/2024 21:02, Thanos Apollo wrote:
> Max Nikulin writes:
>> I am looking
>> into /usr/share/X11/xkb/symbols/gr polytonic symbols. AltGr+s in Greek
>> layout (<AC02> levels 3 and 4) are used to type "Ϛ ϛ STIGMATA". On the
>> other hand the "us" layout does not have level 3 and 4 symbols for
>> <AC02> "s" qwerty key.
[...]
> but was used _only_ in minuscule manuscripts to save space by combining
> sigma (σ) + tau (τ).  Stigma is not part of the Greek alphabet.

Thanks for explanation. I just had impression that you are going to 
achieve typing experience as close to other applications as possible. 
Perhaps there is really no point in support of some symbols.

>> [AltGr+"{"] and [AltGr+"}"] are defined as dead keys for accents, so
>> it may cause similar issues.
> 
> Thanks to quail there is no need for dead keys or using Meta/Control
> key.

My primary point was not dead keys, but several keys having level3 and 
level4 symbols. Just shift allows to have 2 symbols per key. Another 
modifier is required to get more.

However M-{ and M-} are not best examples, <AD11> and <AD12> have no 4th 
level, just 3rd one. An example for all 4 levels:

     key <AC11> { type[Group1]="FOUR_LEVEL",
                  [ dead_grave, dead_dasia, apostrophe, quotedbl  ] };

On 21/09/2024 05:00, Thanos Apollo wrote:
> "Σ" is the capital version of sigma ("σ") while "ς" is used at the end of
>  a word. In iOS, this is done automatically with one key.

I am curious if this specific feature is provided by input method or by 
the "autoreplace" feature of some applications (similar to "--" → "—")




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Keybindings and changing keyboard layout [was: Writting Greek in Emacs]
  2024-09-23  5:54             ` tomas
@ 2024-09-24  4:22               ` Max Nikulin
  2024-09-24 14:10                 ` tomas
  0 siblings, 1 reply; 49+ messages in thread
From: Max Nikulin @ 2024-09-24  4:22 UTC (permalink / raw)
  To: emacs-devel

On 23/09/2024 12:54, tomas@tuxteam.de wrote:
> I haven't yet found the time to read into bug#43830, on the road ATM.

<https://lists.gnu.org/archive/html/emacs-devel/2005-11/msg01237.html>
"wish: right alt/meta to switch keyboard layout while pressed"
linked from this bug is a more detailed discussion.

Earlier I was aware only of

<https://lists.gnu.org/archive/html/emacs-devel/2009-05/msg00031.html>
"Keybindings in non-Latin layout"

Another thread from 2021 for completeness:
<https://yhetil.org/emacs-devel/sgqeci$en3$1@ciao.gmane.io/>
"not quite understanding input methods"

> On Sun, Sep 22, 2024 at 06:29:17PM +0700, Max Nikulin wrote:
>> As a workaround, I have a tiny tool that is invoked in response to
>> ISO_<First|Last|Prev|Next>_Group as global shortcuts and if the active
>> window is Emacs then it forces "us" layout and sends another unique key (to
>> switch Emacs input method) using XTest extension.

> Ugh. They all don't feel pretty. I'm tempted to just put that into my muscle
> memory and just switch keyboard layout when necessary. It's just one keystroke
> more, and people with some vi experience have a "mode switch" place in their
> brains anyway :-)

A similar problem exists in Vim as well. It has its own "keyboard 
layout" switch C-^ (:set keymap), :set langmap to alleviate the issue 
with alternative layout active at the XKB layer, and various tricks to 
change XKB layout on switch from insert to normal mode
<https://github.com/lyokha/vim-xkbswitch>

My perception is that heavy usage of modifiers and multikey bindings in 
Emacs outweighs necessity to escape from insert mode in Vim, so 
switching keyboard for any command is more annoying.

On 21/09/2024 12:40, tomas@tuxteam.de wrote:
> Surprisingly, some applications seem to magically "cope" in some way. In
> Firefox, CTRL-τ opens a new tab (as CTRL-t would do under a Latin layout).
> But this doesn't really count: Firefox has just a few useful keybindings
> and the whole model actually discourages using them, while Emacs has
> a very rich set of bindings which is at the core of its user interaction.

Most of applications, including Firefox, use Alt+something to access 
menus and accelerator keys for selecting menu items. It requires 
switching keyboard layout to match application locale and it is pain. 
Only some hotkeys work with both keyboard layouts.




^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-23 14:02       ` Thanos Apollo
  2024-09-24  3:53         ` Max Nikulin
@ 2024-09-24 13:54         ` tomas
  1 sibling, 0 replies; 49+ messages in thread
From: tomas @ 2024-09-24 13:54 UTC (permalink / raw)
  To: Thanos Apollo; +Cc: Max Nikulin, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]

On Mon, Sep 23, 2024 at 05:02:13PM +0300, Thanos Apollo wrote:
> Max Nikulin <manikulin@gmail.com> writes:
> 
> [...]
> >
> > I am sorry for my ignorance, I may confuse something since I have never 
> > tried to type Greek using "gr" keyboard layout. Writing on possible 
> > conflicts I have in mind mostly M-something keybindings. I am looking 
> > into /usr/share/X11/xkb/symbols/gr polytonic symbols. AltGr+s in Greek 
> > layout (<AC02> levels 3 and 4) are used to type "Ϛ ϛ STIGMATA". On the 
> > other hand the "us" layout does not have level 3 and 4 symbols for 
> > <AC02> "s" qwerty key. 
> 
> Stigmata refers to bodily marks, it's not a letter.  =Stigma= is a
> ligature letter (meaning a combination of 2 letters, similar to "æ",
> but was used _only_ in minuscule manuscripts to save space by combining
> sigma (σ) + tau (τ).  Stigma is not part of the Greek alphabet.
> 
> All letters of the Greek alphabet are currently supported both in Emacs
> and in the GNU system.  Only the polytonic system is lacking (᾿ ` ῾ ῀ ͺ).

For the X11 keymaps, this [1] friendly person seems to have made
something. Perhaps you can build on it.

Cheers
[1] https://frame-poythress.org/keyboard-entry-of-polytonic-greek-and-biblical-hebrew-in-gnulinux-2014/
-- 
tomás

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Keybindings and changing keyboard layout [was: Writting Greek in Emacs]
  2024-09-24  4:22               ` Max Nikulin
@ 2024-09-24 14:10                 ` tomas
  0 siblings, 0 replies; 49+ messages in thread
From: tomas @ 2024-09-24 14:10 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2282 bytes --]

On Tue, Sep 24, 2024 at 11:22:12AM +0700, Max Nikulin wrote:
> On 23/09/2024 12:54, tomas@tuxteam.de wrote:

[...]

> A similar problem exists in Vim as well. It has its own "keyboard layout"
> switch C-^ (:set keymap), :set langmap to alleviate the issue with
> alternative layout active at the XKB layer, and various tricks to change XKB
> layout on switch from insert to normal mode
> <https://github.com/lyokha/vim-xkbswitch>
> 
> My perception is that heavy usage of modifiers and multikey bindings in
> Emacs outweighs necessity to escape from insert mode in Vim, so switching
> keyboard for any command is more annoying.

:-)

I share your perception: it weighs more. But currently, to me, swithching
the layout feels the least ugly alternative. Input strategy changes, and
tends to batch command actions while typing. 

> On 21/09/2024 12:40, tomas@tuxteam.de wrote:
> > Surprisingly, some applications seem to magically "cope" in some way. In
> > Firefox, CTRL-τ opens a new tab (as CTRL-t would do under a Latin layout).
> > But this doesn't really count: Firefox has just a few useful keybindings
> > and the whole model actually discourages using them, while Emacs has
> > a very rich set of bindings which is at the core of its user interaction.
> 
> Most of applications, including Firefox, use Alt+something to access menus
> and accelerator keys for selecting menu items. It requires switching
> keyboard layout to match application locale and it is pain. Only some
> hotkeys work with both keyboard layouts.

Cοntrol sequences /sometimes/ work in the browser [1] and sometimes not
(which is what I've come to expect from that kind of application:
inconsistency keeps users humble). For example, C-w to close a tab (which
would be C-ς in the Greek layout) works, whereas C-q (Greek layout: C-;)
to close the whole frame doesn't. 

Of note is that C-q doesn't work on Windows at all (and whines a lot on
Linux [2]), so perhaps we are seeing through several archeological UI
layers. But perhaps there's just someone editing C- mappings for every
possible keyboard layout under the sun and has forgotten that one.

Cheers
[1] browser == firefox, current Debian stable
[2] You sure you want to close me? Oooooh!
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

* Re: Writting Greek in Emacs
  2024-09-24  3:53         ` Max Nikulin
@ 2024-09-24 14:37           ` Thanos Apollo
  0 siblings, 0 replies; 49+ messages in thread
From: Thanos Apollo @ 2024-09-24 14:37 UTC (permalink / raw)
  To: Max Nikulin, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1847 bytes --]

Max Nikulin <manikulin@gmail.com> writes:

> On 23/09/2024 21:02, Thanos Apollo wrote:
>> Max Nikulin writes:
[...]
>> but was used _only_ in minuscule manuscripts to save space by combining
>> sigma (σ) + tau (τ).  Stigma is not part of the Greek alphabet.
>
> Thanks for explanation. I just had impression that you are going to 
> achieve typing experience as close to other applications as possible. 
> Perhaps there is really no point in support of some symbols.
>

As close as possible to what someone that types & knows Greek is used
to.

>>> [AltGr+"{"] and [AltGr+"}"] are defined as dead keys for accents, so
>>> it may cause similar issues.
>> 
>> Thanks to quail there is no need for dead keys or using Meta/Control
>> key.
>
> My primary point was not dead keys, but several keys having level3 and 
> level4 symbols. Just shift allows to have 2 symbols per key. Another 
> modifier is required to get more.
>
> However M-{ and M-} are not best examples, <AD11> and <AD12> have no 4th 
> level, just 3rd one. An example for all 4 levels:
>
>      key <AC11> { type[Group1]="FOUR_LEVEL",
>                   [ dead_grave, dead_dasia, apostrophe, quotedbl  ] };
>

Indeed, that's a bad design.  To implement a Greek polytonic keyboard just
copy the commonly used greek monotonic/basic one & add the extra
"tonos" & "spirits".  No need for extra modifier keys, I'm not sure what
the authors wanted to achieve when creating those keyboards.

Currently I'm using the keys "q" "w" ";" for spirits & tonos.  Combined
with shift it provides 6 keys, the exact amount that we need to
implement the polytonic system.  This is done without making any major
changes to the commonly used greek monotonic/basic keyboard, that most
users are familiar with.


-- 
Thanos Apollo
https://thanosapollo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 865 bytes --]

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2024-09-24 14:37 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-19 14:43 Writting Greek in Emacs Thanos Apollo
2024-09-19 14:57 ` Greg Farough
2024-09-19 16:12   ` Thanos Apollo
2024-09-19 16:49     ` Greg Farough
2024-09-19 16:19 ` Eli Zaretskii
2024-09-19 16:32   ` Thanos Apollo
2024-09-19 16:42     ` Robert Pluim
2024-09-19 16:44     ` Eli Zaretskii
2024-09-19 17:05       ` Thanos Apollo
2024-09-19 17:44         ` Eli Zaretskii
2024-09-19 18:06           ` Thanos Apollo
2024-09-19 18:27             ` Eli Zaretskii
2024-09-19 19:04               ` Thanos Apollo
2024-09-20  5:56                 ` Eli Zaretskii
2024-09-19 18:03         ` Visuwesh
2024-09-19 18:13           ` Visuwesh
2024-09-19 19:03           ` Thanos Apollo
2024-09-19 18:07         ` Eli Zaretskii
2024-09-19 19:02           ` Thanos Apollo
2024-09-20  5:55             ` Eli Zaretskii
2024-09-20  9:18               ` Thanos Apollo
2024-09-20  9:47                 ` Emanuel Berg
2024-09-20 10:40                 ` Eli Zaretskii
2024-09-20 11:16                   ` Thanos Apollo
2024-09-20 12:24                   ` Thanos Apollo
2024-09-20 12:39                     ` Robert Pluim
2024-09-20 12:55                       ` Thanos Apollo
2024-09-20 13:41                         ` Robert Pluim
2024-09-20 13:35                     ` Eli Zaretskii
2024-09-20 13:54                       ` Thanos Apollo
2024-09-20 14:48                         ` Emanuel Berg
2024-09-20 22:00                           ` Thanos Apollo
2024-09-21  8:19                             ` Eli Zaretskii
2024-09-21 15:31                             ` Emanuel Berg
2024-09-20 14:23 ` Max Nikulin
2024-09-20 23:53   ` Thanos Apollo
2024-09-21  5:40     ` Keybindings and changing keyboard layout [was: Writting Greek in Emacs] tomas
2024-09-21 17:55       ` Juri Linkov
2024-09-22  6:47         ` tomas
2024-09-22 11:29           ` Max Nikulin
2024-09-23  5:54             ` tomas
2024-09-24  4:22               ` Max Nikulin
2024-09-24 14:10                 ` tomas
2024-09-21  8:23     ` Writting Greek in Emacs Eli Zaretskii
2024-09-23  3:28     ` Max Nikulin
2024-09-23 14:02       ` Thanos Apollo
2024-09-24  3:53         ` Max Nikulin
2024-09-24 14:37           ` Thanos Apollo
2024-09-24 13:54         ` tomas

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.