summaryrefslogtreecommitdiffstats
path: root/2021/captions/emacsconf-2021-eaf--emacs-application-framework-a-2021-update--matthew-zeng--main.vtt
blob: a31b712b73ae500bfb25a68fcb7644b97fc26bc8 (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
WEBVTT

00:03.040 -->00:00:05.206
Hi, my name is Matthew Zeng, 

00:00:05.206 --> 00:00:07.526
aka MT or Mingde.

00:00:07.526 --> 00:00:10.766
Welcome to EmacsConf2021.

00:00:10.766 --> 00:00:12.846
I hope everyone is enjoying

00:00:12.846 --> 00:00:14.286
the conference so far.

00:00:14.286 --> 00:00:16.766
I am one of the maintainers

00:00:16.766 --> 00:00:18.566
of the Emacs Application Framework.

00:00:18.566 --> 00:00:22.606
I was also here last year during EmacsConf2020

00:00:22.606 --> 00:00:24.366
and did a 20 minute presentation

00:00:24.366 --> 00:00:26.606
on the overall architecture of EAF

00:00:26.606 --> 00:00:28.486
as well as a small demo.

00:00:28.486 --> 00:00:31.966
A lot of things had changed since 2020,

00:00:31.966 --> 00:00:34.406
and that's why today I'm here to present:

00:00:34.406 --> 00:00:38.045
Emacs Application Framework, A 2021 Update.

00:00:38.046 --> 00:00:41.086
So we all know Emacs,

00:00:41.086 --> 00:00:42.326
and we definitely know that

00:00:42.326 --> 00:00:44.486
Emacs is not just a text editor,

00:00:44.486 --> 00:00:46.926
but a text-centric work environment,

00:00:46.926 --> 00:00:48.606
and it lacks *efficient*

00:00:48.606 --> 00:00:50.686
multimedia rendering capabilities

00:00:50.686 --> 00:00:53.126
such as website, PDF, and video rendering.

00:00:53.126 --> 00:00:55.361
We all want that, right?

00:00:55.361 --> 00:00:58.366
Therefore the EAF project wants to

00:00:58.366 --> 00:01:00.286
solve this problem while also

00:01:00.286 --> 00:01:02.806
retaining the rich Emacs ecosystem

00:01:02.806 --> 00:01:06.046
and its customizability and extensibility.

00:01:06.046 --> 00:01:10.726
The solution is to outsource the hard part

00:01:10.726 --> 00:01:12.486
to Python and NodeJS

00:01:12.486 --> 00:01:14.366
by bridging Elisp with them

00:01:14.366 --> 00:01:16.126
so that Python and JavaScript

00:01:16.126 --> 00:01:17.926
can do the hard work

00:01:17.926 --> 00:01:20.126
and minimize the Elisp workload,

00:01:20.126 --> 00:01:21.926
which ultimately speeds up

00:01:21.926 --> 00:01:24.446
our end-user experience using Emacs.

00:01:24.446 --> 00:01:27.646
Do note that Python and JavaScript

00:01:27.646 --> 00:01:30.406
already have a very mature ecosystem

00:01:30.406 --> 00:01:32.206
that provides a foundation

00:01:32.206 --> 00:01:34.366
to modern multimedia applications,

00:01:34.366 --> 00:01:38.006
so basically, EAF enables Emacs to extend

00:01:38.006 --> 00:01:40.406
to Python and JavaScript ecosystems,

00:01:40.406 --> 00:01:42.286
therefore extending to

00:01:42.286 --> 00:01:44.366
modern multimedia apps too.

00:01:44.366 --> 00:01:47.606
As we're on a tight schedule today,

00:01:47.606 --> 00:01:49.726
I can't go into every detail

00:01:49.726 --> 00:01:51.486
about how EAF achieves this.

00:01:51.486 --> 00:01:53.606
I did go through a lot of things

00:01:53.606 --> 00:01:54.886
during last year's presentation,

00:01:54.886 --> 00:01:57.326
so I highly recommend anyone interested

00:01:57.326 --> 00:01:59.206
to check out that presentation,

00:01:59.206 --> 00:02:01.686
and the project repository itself.

00:02:01.686 --> 00:02:05.725
Today we're focusing on *what changed*.

00:02:05.726 --> 00:02:09.606
Now the first change

00:02:09.606 --> 00:02:10.926
that you'll definitely notice

00:02:10.926 --> 00:02:12.686
is that we have a new logo!

00:02:12.686 --> 00:02:15.926
This logo uses gearwheels

00:02:15.926 --> 00:02:18.486
to symbolize how EAF extends Emacs

00:02:18.486 --> 00:02:20.886
to web and multimedia applications

00:02:20.886 --> 00:02:23.286
that bring new possibilities to Emacs.

00:02:23.286 --> 00:02:28.726
Since last year, EAF has replaced

00:02:28.726 --> 00:02:30.886
the DBus communication technology

00:02:30.886 --> 00:02:33.446
with the cross-platform EPC,

00:02:33.446 --> 00:02:35.286
the Emacs RPC stack,

00:02:35.286 --> 00:02:37.526
which has an Elisp implementation

00:02:37.526 --> 00:02:39.246
and a Python implementation,

00:02:39.246 --> 00:02:41.006
exactly what we need.

02:42.160 --> 00:02:43.760
This and some other changes

00:02:43.760 --> 00:02:46.080
enable EAF to support Windows, 

00:02:46.080 --> 00:02:49.519
Windows 10 and Windows Subsystem for Linux,

00:02:49.519 --> 00:02:51.840
as well as all distros that support 

00:02:51.840 --> 00:02:54.319
pacman, apt, dnf, pkg, 

00:02:54.319 --> 00:02:56.959
zypper package installer commands,

02:56.959 --> 00:02:59.840
which includes Arch-based, Debian, 

00:02:59.840 --> 00:03:04.720
or Ubuntu-based, Fedora, etc.

03:04.720 --> 00:03:08.239
However, do note that the maOS support

03:08.239 --> 00:03:10.319
works with some known issues. 

00:03:10.319 --> 00:03:15.359
Have a look if you want to try out.

03:15.360 --> 00:03:18.400
Previously, EAF was able to make Elisp

03:18.400 --> 00:03:20.720
communicate with Python, as well as

00:03:20.720 --> 00:03:23.280
Python to communicate with JavaScript,

03:23.280 --> 00:03:24.959
meaning that Elisp can call 

00:03:24.959 --> 00:03:27.280
Python functions and vice versa, 

00:03:27.280 --> 00:03:29.680
and Python can call JavaScript functions

00:03:29.680 --> 00:03:32.560
and vice versa, but if you want Elisp

00:03:32.560 --> 00:03:34.720
to communicate with JavaScript,

00:03:34.720 --> 00:03:36.239
you have to go through Python,

00:03:36.239 --> 00:03:38.879
which is rather troublesome.

03:38.879 --> 00:03:41.120
Now, thanks to the EPC, 

00:03:41.120 --> 00:03:42.400
Elisp can communicate 

00:03:42.400 --> 00:03:43.840
with JavaScript directly

03:43.840 --> 00:03:45.519
using =eval_js= function 

00:03:45.519 --> 00:03:47.040
and =eval_emacs_function= 

00:03:47.040 --> 00:03:49.840
in Elisp and Python respectively.

03:49.840 --> 00:03:51.840
This greatly simplifies the code 

00:03:51.840 --> 00:03:52.640
that will be needed 

00:03:52.640 --> 00:03:56.958
to write a web app in EAF.

03:56.959 --> 00:03:59.120
Speaking of web applications, 

00:03:59.120 --> 00:04:01.200
VueJS is a web framework 

00:04:01.200 --> 00:04:03.840
that's been gaining a lot of popularity 

00:04:03.840 --> 00:04:04.720
in recent years 

00:04:04.720 --> 00:04:08.959
for its simplicity and functionality.

04:08.959 --> 00:04:11.840
In the past, you were only able to write

04:11.840 --> 00:04:14.319
simple JavaScript and HTML web apps 

00:04:14.319 --> 00:04:17.280
for EAF. It was quite some work

04:17.280 --> 00:04:20.880
to create a full-featured web application.

04:20.880 --> 00:04:23.360
Now you can write new apps using EAF

04:23.360 --> 00:04:27.919
that work seamlessly with Emacs and Elisp.

00:04:27.919 --> 00:04:30.880
There are a few existing EAF apps

04:30.880 --> 00:04:32.800
written with Vue already

04:32.800 --> 00:04:34.639
to demonstrate the possibilities

00:04:34.639 --> 00:04:38.720
of Vue-based extensions in Emacs.

04:38.720 --> 00:04:41.520
The first one is the EAF File Manager,

04:41.520 --> 00:04:44.160
written by ManateeLazycat himself, 

00:04:44.160 --> 00:04:46.400
as an alternative option to dired, 

00:04:46.400 --> 00:04:47.919
as he found dired's performance 

00:04:47.919 --> 00:04:49.280
to lag considerably

04:49.280 --> 00:04:52.240
when there are way too many files.

04:52.240 --> 00:04:56.080
It supports wdired and fd functionality, 

00:04:56.080 --> 00:05:01.600
and let me demonstrate that to you.

05:01.600 --> 00:05:06.160
See? And this is the app.

05:06.160 --> 00:05:08.639
Go back here.

05:08.639 --> 00:05:12.240
Another one is the EAF RSS Reader,

05:12.240 --> 00:05:15.039
written by our Summer of Code 2021 student

00:05:15.039 --> 00:05:18.240
ShaoChenHeng. It is a fast RSS reader

00:05:18.240 --> 00:05:21.600
that uses the EAF browser for previews,

05:21.600 --> 00:05:32.479
and let me demo that to you as well.

05:32.479 --> 00:05:35.039
Pragmatic Emacs.

05:35.039 --> 00:05:37.199
And you can view every site 

00:05:37.199 --> 00:05:45.359
in the EAF Browser.

05:45.360 --> 00:05:46.880
To ease the process 

00:05:46.880 --> 00:05:49.840
of creating a new EAF application,

00:05:49.840 --> 00:05:52.880
we've separated the EAF core and its apps,

00:05:52.880 --> 00:05:54.479
so that EAF apps now have 

00:05:54.479 --> 00:05:56.800
their individual repositories. 

00:05:56.800 --> 00:05:58.000
You can find them under 

00:05:58.000 --> 00:06:02.000
the emacs-eaf GitHub organization.

06:02.000 --> 00:06:04.560
Because of the number of EAF apps

00:06:04.560 --> 00:06:05.840
and their dependencies

00:06:05.840 --> 00:06:08.319
that vary from system to system,

06:08.319 --> 00:06:10.080
we've also introduced a new 

00:06:10.080 --> 00:06:12.639
=M-x eaf-install-and-update= command

00:06:12.639 --> 00:06:14.560
which is a wrapper around the new

00:06:14.560 --> 00:06:17.039
install-eaf python script

00:06:17.039 --> 00:06:19.280
dedicated to installing, updating, 

00:06:19.280 --> 00:06:20.720
and maintaining EAF apps 

00:06:20.720 --> 00:06:21.680
and their dependencies 

00:06:21.680 --> 00:06:24.160
for the end user.

06:24.160 --> 00:06:25.600
Now it is very easy

00:06:25.600 --> 00:06:27.440
to create a new EAF app. 

00:06:27.440 --> 00:06:29.039
You just need to do it. 

00:06:29.039 --> 00:06:31.120
You can just do it in your own repository,

00:06:31.120 --> 00:06:34.720
such as in GitHub, GitLab, or wherever.

06:34.720 --> 00:06:36.160
The first thing to do is 

00:06:36.160 --> 00:06:39.520
to fork the eaf-demo or the eaf-vue-demo

00:06:39.520 --> 00:06:41.280
as a starting template, 

00:06:41.280 --> 00:06:43.520
then update the dependencies.json file

00:06:43.520 --> 00:06:46.400
to list the new dependencies you introduced

06:46.400 --> 00:06:48.560
on various systems.

06:48.560 --> 00:06:51.199
Afterwards, once your app is finished, 

00:06:51.199 --> 00:06:53.039
you simply need to submit a PR 

00:06:53.039 --> 00:06:54.000
to the EAF core

06:54.000 --> 00:06:56.720
that modifies the applications.json list

06:56.720 --> 00:07:03.039
to include your new app. And that's it.

07:03.039 --> 00:07:04.720
Come try it out and write your own 

00:07:04.720 --> 00:07:09.598
EAF extensions today!

07:09.599 --> 00:07:11.840
There are many other new updates. 

00:07:11.840 --> 00:07:13.919
To list a few: we reached 

00:07:13.919 --> 00:07:17.199
more than 60 contributors, hooray!

07:17.199 --> 00:07:19.759
And also, you can now use the familiar

07:19.759 --> 00:07:22.160
Control s and Control r isearch 

00:07:22.160 --> 00:07:23.280
for real-time search, 

00:07:23.280 --> 00:07:24.560
functioning very similar 

00:07:24.560 --> 00:07:27.039
to the Emacs isearch,

07:27.039 --> 00:07:29.759
in the EAF Browser, PDF Viewer, 

00:07:29.759 --> 00:07:32.080
and many other applications.

07:32.080 --> 00:07:34.000
Additionally, you can also create 

00:07:34.000 --> 00:07:35.680
EAF PDF annotations

00:07:35.680 --> 00:07:44.318
either inline or as a pop-up, etc. etc. etc.

07:44.319 --> 00:07:47.680
Finally, let's talk about Popweb.

07:47.680 --> 00:07:50.080
Popweb is a very, very new project

00:07:50.080 --> 00:07:52.639
that started like exactly two weeks ago,

00:07:52.639 --> 00:07:55.199
that focuses particularly on the

00:07:55.199 --> 00:07:55.919
multimedia pop-up functionality in Emacs. 

00:07:55.919 --> 00:08:02.080
Pop is considered to be a sister project

00:08:02.080 --> 00:08:04.879
and lightweight version of EAF.

08:04.879 --> 00:08:07.039
They both share a very similar design

08:07.039 --> 00:08:09.039
and some code, and they are maintained 

00:08:09.039 --> 00:08:10.080
by the same people, 

00:08:10.080 --> 00:08:13.680
which is me and ManateeLazycat.

08:13.680 --> 00:08:15.599
Here's a quick demo to see the

08:15.599 --> 00:08:23.840
responsiveness of its preview.

08:23.840 --> 00:08:27.919
Here we go. On the right, see... 

00:08:27.919 --> 00:08:30.720
Oh, here we go. Yes.

08:30.720 --> 00:08:32.560
And these are the LaTeX preview. 

00:08:32.560 --> 00:08:44.800
I can quickly show the next one.

08:44.800 --> 00:08:48.160
So this is the end of my presentation.

08:48.160 --> 00:08:50.000
Feel free to post questions 

00:08:50.000 --> 00:08:52.160
on the collaborative pad, IRC, 

00:08:52.160 --> 00:08:53.519
or directly send me an email. 

00:08:53.519 --> 00:08:55.680
I'll be around all this, 

00:08:55.680 --> 00:08:57.839
at all these places,

08:57.839 --> 00:08:59.519
and if you found any issue, 

00:08:59.519 --> 00:09:01.200
please submit an issue 

00:09:01.200 --> 00:09:04.160
to the EAF official issues,

00:09:04.160 --> 00:09:08.880
and don't forget to check out the wiki.

09:08.880 --> 00:09:10.160
Thank you and enjoy 

00:09:10.160 --> 00:09:13.680
the rest of EmacsConf 2021.

00:09:13.680 --> 00:09:14.680
[captions by sachac]