summaryrefslogtreecommitdiffstats
path: root/2021/captions/emacsconf-2021-bidi--perso-arabic-input-methods-and-making-more-emacs-apps-bidi-aware--mohsen-banan--main.vtt
blob: ca9a69bf1f5544d1edd9db606e79c4a9455e2660 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
WEBVTT

00:02.960 --> 00:00:10.240
Greetings. Salaam. This is Mohsen Banan. 

00:00:10.240 --> 00:00:14.080
I am an Iranian software and internet engineer.

00:14.080 --> 00:17.199
I converted to Emacs in 1986.

00:17.199 --> 00:20.480
It was Emacs version 17 then.

00:20.480 --> 00:00:23.920
By around 1988, when Emacs version 18

00:00:23.920 --> 00:00:25.680
was well in place, 

00:00:25.680 --> 00:00:28.960
I started living inside of Emacs. 

00:00:28.960 --> 00:00:31.119
My primary digital environment 

00:00:31.119 --> 00:00:33.680
has been Emacs ever since.

00:33.680 --> 00:36.559
It has been a good life.

00:36.559 --> 00:40.000
I'm a native Farsi speaker and writer.

00:40.000 --> 00:00:41.520
I'm not a linguist, 

00:00:41.520 --> 00:00:43.800
and I do not specialize in

00:43.800 --> 00:46.719
multilingualization, internationalization,

00:46.719 --> 00:48.879
and localization.

00:48.879 --> 00:52.239
My favorite programming language is Lisp,

00:52.239 --> 00:00:58.319
and I am a bit of an Emacs developer.

00:58.320 --> 01:00.719
This presentation is about use of

01:00.719 --> 01:04.000
Perso-Arabic Scripts with Emacs.

01:04.000 --> 01:06.720
It's an overview presentation.

01:06.720 --> 00:01:08.320
I won't be digging deep 

00:01:08.320 --> 00:01:11.360
in many of the mentioned topics.

01:11.360 --> 00:01:13.119
My goal is to make you aware 

00:01:13.119 --> 00:01:16.159
of what can be done with Emacs today,

01:16.159 --> 01:19.280
and the potentials that Emacs presents

01:19.280 --> 01:22.640
for Perso-Arabic writers.

01:22.640 --> 01:25.759
The main topics that i'll cover are:

01:25.759 --> 00:01:30.320
- a brief introduction to Perso-Arabic scripts

01:30.320 --> 01:35.119
- two existing Emacs Persian input methods

01:35.119 --> 00:01:36.960
- the challenges involved with

00:01:36.960 --> 00:01:42.960
making Emacs applications bidirectional-aware

01:42.960 --> 00:01:45.280
- the ultimate goal of creating 

00:01:45.280 --> 00:01:47.759
a complete digital environment 

00:01:47.759 --> 00:01:51.200
for Perso-Arabic writers

01:51.200 --> 00:01:57.679
I'll also be including various pointers.

01:57.680 --> 00:02:00.320
So first, let's make sure 

00:02:00.320 --> 00:02:02.079
that what I'm presenting 

00:02:02.079 --> 00:02:04.560
is of interest to you.

02:04.560 --> 00:02:07.040
if you are a Perso-Arabic writer 

00:02:07.040 --> 00:02:08.879
and if you use Emacs, 

00:02:08.879 --> 00:02:12.720
you're definitely my intended audience.

02:12.720 --> 00:02:15.120
If you're an Emacs developer 

00:02:15.120 --> 00:02:19.120
who wishes to make her Emacs apps

02:19.120 --> 00:02:22.000
multilingual and bidi-aware, 

00:02:22.000 --> 00:02:27.359
you're also my intended audience.

02:27.360 --> 00:02:30.480
For the purposes of this presentation, 

00:02:30.480 --> 00:02:34.160
in this slide, I'm categorizing scripts

02:34.160 --> 02:39.040
based on directionality and shaping.

02:39.040 --> 00:02:41.280
Latin letters are not shaped. 

00:02:41.280 --> 00:02:43.120
Generally speaking, 

00:02:43.120 --> 00:02:44.800
the shape of a Latin letter 

00:02:44.800 --> 00:02:49.599
is independent of its position in a word.

02:49.599 --> 00:02:53.280
Perso-Arabic letters are subject to shaping.

02:53.280 --> 02:56.319
For example the letter mim--

02:56.319 --> 02:58.800
sounding similar to M--

02:58.800 --> 03:01.840
takes three shapes depending on whether

03:01.840 --> 03:04.720
it is in the beginning of a word,

03:04.720 --> 00:03:06.480
in the middle of a word, 

00:03:06.480 --> 00:03:09.200
or at the end of a word.

03:09.200 --> 00:03:12.159
I'll be showing more of how shaping works

00:03:12.159 --> 00:03:16.400
in an Emacs session screencast later.

03:16.400 --> 00:03:18.159
Shaping has ramifications 

00:03:18.159 --> 00:03:21.040
for Emacs application developers.

03:21.040 --> 00:03:23.760
For example, if you are combining

00:03:23.760 --> 00:03:26.720
initial letters to create a label,

03:26.720 --> 03:29.680
those letters can be shaped together--

03:29.680 --> 03:31.760
which is not what you want.

03:31.760 --> 03:34.000
In such cases, you would need to

03:34.000 --> 03:37.840
explicitly keep them separate.

03:37.840 --> 00:03:40.799
Latin-based scripts are always 

00:03:40.799 --> 00:03:42.560
left-to-right.

03:42.560 --> 00:03:46.560
Perso-Arabic scripts are right-to-left

03:46.560 --> 00:03:51.040
with letters, but numbers are left-to-right.

03:51.040 --> 00:03:53.040
So, Perso-Arabic scripts 

00:03:53.040 --> 00:03:56.319
are bi-directional (BIDI).

03:56.319 --> 00:03:58.879
Hebrew is also bi-directional, 

00:03:58.879 --> 00:04:02.159
but Hebrew is not shaped.

04:02.159 --> 00:04:05.680
More recently, it has become very common 

00:04:05.680 --> 00:04:10.400
to mix Perso-Arabic and Latin text.

04:10.400 --> 00:04:12.560
This can become very confusing 

00:04:12.560 --> 00:04:14.959
if paragraph directionality 

00:04:14.959 --> 00:04:17.759
is not properly observed.

04:17.759 --> 00:04:20.000
I'll be providing some examples 

00:04:20.000 --> 00:04:23.120
as screencasts.

04:23.120 --> 00:04:24.880
The Emacs display engine 

00:04:24.880 --> 00:04:27.280
now fully and well supports 

00:04:27.280 --> 00:04:32.079
both shaping and BIDI.

04:32.080 --> 00:04:37.120
Since 2012, starting with Emacs version 24,

04:37.120 --> 00:04:38.639
we can say that Emacs 

00:04:38.639 --> 00:04:43.600
is a truly multilingual-capable environment.

04:43.600 --> 00:04:45.040
Like everything else,

00:04:45.040 --> 00:04:46.880
multilingual support for Emacs 

00:04:46.880 --> 00:04:49.280
was added gradually.

04:49.280 --> 04:52.560
Unicode support was added early on.

04:52.560 --> 04:55.520
The framework for input methods evolved

04:55.520 --> 00:05:00.320
in the 1990s. But it was not till version 24 

00:05:00.320 --> 00:05:03.360
in 2012 that the display engine 

00:05:03.360 --> 00:05:06.240
could fully support BIDI.

05:06.240 --> 00:05:08.800
Hats off to Eli Zaretskii 

00:05:08.800 --> 00:05:12.960
for his work on Emacs BIDI.

05:12.960 --> 00:05:15.600
Once full BIDI support was in place

00:05:15.600 --> 00:05:19.199
in 2012, I went ahead and added

00:05:19.199 --> 00:05:24.000
two Persian input methods to Emacs 24.

05:24.000 --> 00:05:26.400
So now Emacs fully supports 

00:05:26.400 --> 00:05:30.638
Perso-Arabic scripts.

05:30.639 --> 00:05:34.080
By Perso-Arabic script, we're referring to

00:05:34.080 --> 00:05:36.320
the Arabic writing system

05:36.320 --> 00:05:38.160
with various extensions 

00:05:38.160 --> 00:05:42.240
used by a large number of languages.

05:42.240 --> 00:05:44.479
Perso-Arabic is the second most 

00:05:44.479 --> 00:05:47.520
widely used writing system in the world

05:47.520 --> 05:50.479
by the number of countries.

05:50.479 --> 05:54.000
It is the third by the number of users

05:54.000 --> 05:59.039
after the Latin and Chinese scripts.

05:59.039 --> 06:02.160
So, by well supporting Perso-Arabic,

06:02.160 --> 00:06:04.720
Emacs's potential user base 

00:06:04.720 --> 00:06:09.918
can be greatly enhanced.

06:09.919 --> 00:06:12.960
Before focusing on the Persian input methods,

00:06:12.960 --> 00:06:14.960
let me quickly summarize 

00:06:14.960 --> 00:06:18.319
Emacs's input methods model.

06:18.319 --> 00:06:21.360
Input methods allow you to enter characters 

00:06:21.360 --> 00:06:25.120
that are not supported by your keyboard.

06:25.120 --> 00:06:29.280
With Quail maps, we can map ASCII key strings 

00:06:29.280 --> 00:06:31.919
to multilingual characters.

06:31.919 --> 00:06:34.080
So we can input any text 

00:06:34.080 --> 00:06:36.960
from an ASCII keyboard.

06:36.960 --> 00:06:38.960
You select an input method 

00:06:38.960 --> 00:06:44.400
with C-x RET C-\ .

06:44.400 --> 00:06:49.918
We'll try that in a screencast shortly.

06:49.919 --> 00:06:53.919
Since version 24, Emacs comes loaded with

00:06:53.919 --> 00:06:56.880
two Persian input methods:

06:56.880 --> 00:07:01.520
farsi-isiri-9147 is the standard

00:07:01.520 --> 00:07:04.960
traditional Iranian keyboard.

07:04.960 --> 00:07:09.199
farsi-transliterate-banan is an intuitive

00:07:09.199 --> 00:07:12.319
transliteration keyboard for Farsi

00:07:12.319 --> 00:07:16.960
which requires near-zero training for use.

07:16.960 --> 00:07:18.960
I'll be mostly focused on 

00:07:18.960 --> 00:07:21.520
farsi-transliterate-banan 

00:07:21.520 --> 00:07:23.919
in this presentation.

07:23.919 --> 00:07:27.839
So let's try this out.

07:27.840 --> 07:30.319
In this gif-cast, we're going to select

07:30.319 --> 00:07:32.240
a Persian input method 

00:07:32.240 --> 00:07:35.280
and write a few simple sentences.

07:35.280 --> 07:38.160
With no training and no documentation,

07:38.160 --> 00:07:41.360
any Farsi writer familiar with Emacs 

00:07:41.360 --> 00:07:45.440
can write these, as farsi-transliterate-banan 

00:07:45.440 --> 00:07:48.560
input method is intuitive.

07:48.560 --> 00:07:50.400
I'll be using keycast 

00:07:50.400 --> 00:07:54.160
to show you keys as they are used.

07:54.160 --> 07:56.560
Let me first describe as to what we have

07:56.560 --> 07:58.720
on the screen.

07:58.720 --> 08:01.520
There are three windows in one frame.

08:01.520 --> 00:08:04.639
Keycast will show commands and keys 

00:08:04.639 --> 00:08:06.319
on the mode line.

08:06.319 --> 00:08:08.639
The leftmost window is showing 

00:08:08.639 --> 00:08:10.879
logs of keycast.

08:10.879 --> 08:14.639
Transformed individual unshaped letters

08:14.639 --> 08:17.360
will appear here.

08:17.360 --> 00:08:21.120
The middle window is running a tail -f 

00:08:21.120 --> 00:08:27.440
on the dribble file piped to fold -w1.

08:27.440 --> 00:08:30.720
This lets you see the raw ASCII characters

00:08:30.720 --> 00:08:34.479
as I type them.

08:34.479 --> 00:08:37.839
The right window is the empty buffer 

00:08:37.839 --> 00:08:41.680
on the ex.fa file.

08:41.680 --> 00:08:44.560
Anything that I described here 

00:08:44.560 --> 00:08:49.040
can be done with virgin Emacs distribution

08:49.040 --> 08:51.360
with nothing added,

08:51.360 --> 08:53.760
but I'm using Blee

08:53.760 --> 08:57.120
(By* Libre-Halaal Emacs Environment)

08:57.120 --> 00:09:02.720
to show things. You don't need to have blee

00:09:02.720 --> 00:09:07.600
for writing the equivalent of the text 

00:09:07.600 --> 00:09:10.800
in this gif-cast.

09:10.800 --> 00:09:13.440
First, I'm going to select 

00:09:13.440 --> 00:09:16.800
the farsi-transliterate-banan.

09:16.800 --> 00:09:22.080
I'm entering C-x RET C-\ .

09:22.080 --> 00:09:23.839
Notice the mode -ine 

00:09:23.839 --> 00:09:27.040
and the prompt at mini-buffer.

09:27.040 --> 09:30.399
With completion, I'm going to select

09:30.399 --> 09:34.000
farsi-transliterate-banan.

09:34.000 --> 00:09:38.560
Notice that farsi-isiri-9147

09:38.560 --> 09:43.360
was also provided as a choice.

09:43.360 --> 00:09:47.440
Also notice that the letter 'b' appears

00:09:47.440 --> 00:09:51.760
in the left of the mode line of ex.fa.

09:51.760 --> 00:09:54.000
This indicates which input method 

00:09:54.000 --> 00:09:56.320
has been selected.

09:56.320 --> 00:09:58.560
Also notice that cursor is on 

00:09:58.560 --> 00:10:04.399
the top left corner of ex.fa.

10:04.399 --> 10:08.800
Next, I'm going to enter the 's' character.

10:08.800 --> 10:12.000
Notice the cursor moved to the right,

10:12.000 --> 00:10:15.120
and unshaped ’seen’ appeared 

00:10:15.120 --> 00:10:20.079
in the ex.fa buffer, on the mode-line,

10:20.079 --> 10:23.760
and in the keycast log buffer.

10:23.760 --> 00:10:28.000
Next, I'm going to enter 'l'.

10:28.000 --> 00:10:32.800
Notice ل in the mode-line,

10:32.800 --> 00:10:39.920
and notice how س was subjected to shaping.

10:39.920 --> 10:42.640
Next I'm going to write the letter

10:42.640 --> 10:44.640
to write the following:

10:44.640 --> 10:50.560
 سلام –حال شما چه طوره؟ –با ایمکس همه کار میشه کرد

10:50.560 --> 10:52.480
"Hello, how are you?"

10:52.480 --> 00:10:56.720
You can do everything with Emacs.

10:56.720 --> 11:00.000
Generally, same-sounding Latin characters

11:00.000 --> 00:11:03.920
are used. As usual, vowels are ignored

00:11:03.920 --> 00:11:06.720
unless called for.

11:06.720 --> 11:10.800
Notice that in order to get ح,

11:10.800 --> 11:14.560
i repeated 'h' twice.

11:14.560 --> 11:15.440
ش

11:15.440 --> 11:18.560
is the obvious 'sh'.

11:18.560 --> 11:19.519
چ

11:19.519 --> 11:22.480
is the obvious 'ch'.

11:22.480 --> 00:11:28.640
t, that's the ط  is upper case T.

11:28.640 --> 00:11:29.439
 ت 

00:11:29.439 --> 00:11:31.839
is lowercase t.

11:31.839 --> 11:34.880
That's it. We managed to write in Farsi

11:34.880 --> 11:38.640
with a QWERTY keyboard, intuitively.

11:38.640 --> 11:40.959
Next, we are going to switch back to

11:40.959 --> 00:11:45.680
globish and write "back to globish".

11:45.680 --> 00:11:47.920
Notice that the globish sentence

00:11:47.920 --> 00:11:50.959
started from the left side.

11:50.959 --> 00:11:53.279
This is due to proper detection 

00:11:53.279 --> 00:12:00.159
of paragraph directionality by Emacs.

12:00.160 --> 00:12:05.600
For the most part, Emacs is self-documenting.

12:05.600 --> 12:07.920
Here we are pointing you to some

12:07.920 --> 12:12.880
relevant self-contained Emacs resources.

12:12.880 --> 00:12:15.680
The BIDI documentation applies to

00:12:15.680 --> 00:12:18.000
all BIDI scripts,

12:18.000 --> 12:22.079
not just Perso-Arabic scripts.

12:22.079 --> 00:12:23.279
Referring to the code 

00:12:23.279 --> 00:12:27.999
can also be useful for some.

12:28.000 --> 12:30.079
Here are some pointers.

12:30.079 --> 00:12:32.399
The Quail translation code 

00:12:32.399 --> 00:12:35.519
for Persian input methods: 

00:12:35.519 --> 00:12:39.120
the persian.el file has full details 

00:12:39.120 --> 00:12:43.999
of the mapping and some documentation.

12:44.000 --> 00:12:46.639
Next, we'll show the keyboard layouts 

00:12:46.639 --> 00:12:51.519
as a gif-cast. You can get

00:12:51.519 --> 00:12:55.519
relevant documentation for any input method

12:55.519 --> 00:13:00.320
with the describe-input-method command.

13:00.320 --> 00:13:05.920
So, let's try that for farsi-transliterate-banan.

00:13:05.920 --> 00:13:09.360
We are back in the ex.fa buffer 

00:13:09.360 --> 00:13:11.279
as one window.

13:11.279 --> 13:13.839
We don't need the keycast logging

13:13.839 --> 13:17.040
and the dribble windows any more.

13:17.040 --> 13:20.320
With the C-\, I reactivate

13:20.320 --> 13:23.360
the farsi input method.

13:23.360 --> 00:13:26.399
Notice that keycast is still active 

00:13:26.399 --> 00:13:29.360
on the mode line.

13:29.360 --> 00:13:34.240
Next, with the C-h C-\ , 

00:13:34.240 --> 00:13:38.560
I get the input methods documentation.

13:38.560 --> 00:13:40.639
I then delete other windows 

00:13:40.639 --> 00:13:45.440
and keep the help buffer visible.

13:45.440 --> 00:13:47.279
Notice that beh 

00:13:47.279 --> 00:13:52.720
in this input methods identifier.

13:52.720 --> 13:55.920
Here is the URL for full documentation

13:55.920 --> 00:14:00.639
on the web. The keyboard layout itself

00:14:00.639 --> 00:14:03.760
is a one-to-one mapping, but towards

00:14:03.760 --> 00:14:07.360
making transliteration intuitive.

14:07.360 --> 14:10.240
Multiple keys are sometimes mapped to

14:10.240 --> 14:12.079
the same letter.

14:12.079 --> 00:14:19.760
For example, both 'i' and 'y' produce yeh.

14:19.760 --> 14:22.959
The usual two letter transliterations

14:22.959 --> 00:14:29.600
ending with 'h' -- zh, ch, sh, and kh

00:14:29.600 --> 00:14:34.160
are provided. The ampersand prefix 

00:14:34.160 --> 00:14:37.440
is used to support often invisible

14:37.440 --> 00:14:41.600
BIDI markings. In addition to this

00:14:41.600 --> 00:14:43.920
internal documentation, 

00:14:43.920 --> 00:14:48.958
full documentation is also available.

14:48.959 --> 00:14:50.560
Complete documentation 

00:14:50.560 --> 00:14:52.240
for Persian input methods

00:14:52.240 --> 00:14:58.560
is available as PLPC-120036.

14:58.560 --> 00:15:00.880
Next, we'll take a quick look at this 

00:15:00.880 --> 00:15:03.600
on the web.

15:03.600 --> 00:15:05.440
You can click on links 

00:15:05.440 --> 00:15:07.440
in the reveal web-based form

00:15:07.440 --> 00:15:09.839
of this presentation.

15:09.839 --> 15:15.440
So let's visit PLPC-120036.

15:15.440 --> 00:15:17.600
This document fully describes 

00:15:17.600 --> 00:15:20.560
Persian input methods.

15:20.560 --> 00:15:22.320
In addition to HTML, 

00:15:22.320 --> 00:15:26.079
you can also obtain it in PDF. 

00:15:26.079 --> 00:15:30.079
Let's do that. Of particular interest 

00:15:30.079 --> 00:15:33.120
in this document are various tables

15:33.120 --> 00:15:35.839
that enumerate lists of letters 

00:15:35.839 --> 00:15:37.120
with their association 

00:15:37.120 --> 00:15:41.839
to both Persian input methods.

15:41.839 --> 15:46.240
Let's take a look at a few of these.

15:46.240 --> 00:15:51.360
Table 3, mapping of isiri-6219

15:51.360 --> 15:53.680
(the Farsi character set)

15:53.680 --> 00:15:55.680
to Emacs version input methods 

00:15:55.680 --> 00:15:58.720
could be of interest to you,

15:58.720 --> 16:01.040
as well as table 8

16:01.040 --> 16:04.720
for BIDI-related control markups,

16:04.720 --> 00:16:17.518
and table 9, for vowels and other signs.

16:17.519 --> 00:16:19.759
Having covered input methods, 

00:16:19.759 --> 00:16:21.279
let's turn our attention 

00:16:21.279 --> 00:16:25.199
to ramifications of BIDI and Perso-Arabic

00:16:25.199 --> 00:16:28.480
on various Emacs applications.

16:28.480 --> 00:16:32.160
Since 2012, I have been using Persian text

00:16:32.160 --> 00:16:35.839
in various Emacs applications.

16:35.839 --> 00:16:38.079
In short, my experience has been 

00:16:38.079 --> 00:16:42.399
that most Emacs apps are usable,

16:42.399 --> 16:44.880
but they all have glitches

16:44.880 --> 00:16:47.279
that could at a minimum 

00:16:47.279 --> 00:16:51.279
annoy Perso-Arabic users.

16:51.279 --> 16:54.639
In this slide, I'm presenting a summary.

16:54.639 --> 00:16:56.399
The glitches with Gnus 

00:16:56.399 --> 00:17:00.079
are not all that significant for me.

17:00.079 --> 17:04.240
BBDB glitches can easily be fixed.

17:04.240 --> 00:17:07.679
For Calendar, I have customized my own setup

00:17:07.679 --> 00:17:10.799
to support Persian and Islamic dates

00:17:10.799 --> 00:17:14.079
in Perso-Arabic. Perhaps they should be

00:17:14.079 --> 00:17:17.039
merged upstream, instead of 

00:17:17.039 --> 00:17:19.679
dealing with apps one at a time.

00:17:19.679 --> 00:17:21.439
I think it's more reasonable 

00:17:21.439 --> 00:17:25.279
to consider them collectively.

17:25.280 --> 00:17:26.880
The glitches that I mentioned 

00:17:26.880 --> 00:17:28.799
in the previous slide

17:28.799 --> 17:30.480
have two routes:

17:30.480 --> 17:32.480
some are BIDI-specific

17:32.480 --> 17:35.919
and some are Perso-Arabic-specific.

17:35.919 --> 00:17:36.720
In this slide, 

00:17:36.720 --> 00:17:39.280
I have classified them as such

17:39.280 --> 17:42.960
and have made some general suggestions,

17:42.960 --> 00:17:45.679
but all of these at best amount to

00:17:45.679 --> 00:17:47.679
tactical approaches.

17:47.679 --> 00:17:50.160
I think a more strategic approach 

00:17:50.160 --> 00:17:53.519
is called for.

17:53.520 --> 17:56.240
The right way to address BIDI-awareness

17:56.240 --> 17:58.559
and other awarenesses

17:58.559 --> 00:18:00.559
is to build them in frameworks 

00:18:00.559 --> 00:18:04.160
that Emacs apps can then use.

18:04.160 --> 00:18:08.480
So, I'm proposing that we first create ENML, 

00:18:08.480 --> 00:18:11.520
the Emacs Native Markup Language, 

00:18:11.520 --> 00:18:16.880
as a Lisp-ish (perhaps even not fully secure)

18:16.880 --> 18:20.320
super-set of HTML5.

18:20.320 --> 18:22.960
With that in place, we can then build on

18:22.960 --> 00:18:25.360
the two decades of experience 

00:18:25.360 --> 00:18:27.600
that have produced various 

00:18:27.600 --> 00:18:31.039
web application development frameworks

18:31.039 --> 18:33.919
by mimicking one of them.

18:33.919 --> 00:18:35.679
I don't have any running code 

00:18:35.679 --> 00:18:39.440
for any of these, but discussing strategy 

00:18:39.440 --> 00:18:44.639
need not always be futile.

18:44.640 --> 18:47.679
Emacs has immense potentials,

18:47.679 --> 18:51.120
but those potentials cannot be realized

18:51.120 --> 00:18:54.640
unless we integrate Emacs in the totality

00:18:54.640 --> 00:18:59.840
of a specific complete digital ecosystem.

18:59.840 --> 19:02.000
Over the past two decades, I've been

19:02.000 --> 00:19:03.440
building the contours 

00:19:03.440 --> 00:19:06.240
of The Libre-Halaal By* (ByStar) 

00:19:06.240 --> 00:19:10.240
digital ecosystem.

19:10.240 --> 19:13.039
Emacs can then be fully integrated into

19:13.039 --> 00:19:16.799
ByStar. It's through such integration 

00:19:16.799 --> 00:19:19.679
that full conviviality of Emacs

00:19:19.679 --> 00:19:24.239
can be experienced.

19:24.240 --> 00:19:26.640
Blee, the ByStar Libre-Halaal 

00:19:26.640 --> 00:19:30.000
Emacs environment is Emacs 

00:19:30.000 --> 00:19:32.720
plus a whole lot of Emacs apps

00:19:32.720 --> 00:19:34.880
integrated with Debian,

00:19:34.880 --> 00:19:38.320
With ByStar services and with BISOS, 

00:19:38.320 --> 00:19:42.480
the ByStar Internet Services OS.

19:42.480 --> 00:19:43.600
Perhaps this could be 

00:19:43.600 --> 00:19:45.840
the topic of a presentation

00:19:45.840 --> 00:19:46.840
for the 2022 Emacs Conference.

00:19:46.840 --> 00:19:51.559
[captions by Mohsen Banan]