summaryrefslogtreecommitdiffstats
path: root/2022/captions/emacsconf-2022-rde--rde-emacs-introduction--andrew-tropin--main.vtt
blob: 99a9e2018f8acff5fc8e2f549ce49fb63b75d5de (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
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
WEBVTT captioned by sachac

00:00:00.000 --> 00:00:11.480
Hello and welcome everyone at EmacsConf 2022.

00:00:11.480 --> 00:00:13.400
I'm Andrew Tropin, and today

00:00:13.400 --> 00:00:16.280
we will talk about my Emacs setup.

00:00:16.280 --> 00:00:19.360
I will tell you the story behind it.

00:00:19.360 --> 00:00:23.960
We will discuss what rde and rde Emacs are,

00:00:23.960 --> 00:00:28.760
and we'll make a small Emacs configuration.

00:00:28.760 --> 00:00:30.920
My original motivation was to have

00:00:30.920 --> 00:00:34.000
a ready for work development environment

00:00:34.000 --> 00:00:36.640
which is reliable and guaranteed to work

00:00:36.640 --> 00:00:37.840
every time I need it,

00:00:37.840 --> 00:00:42.680
preferably performant and consistent.

00:00:42.680 --> 00:00:44.160
I say development environment,

00:00:44.160 --> 00:00:45.720
but it actually applies to

00:00:45.720 --> 00:00:47.600
many other working environment,

00:00:47.600 --> 00:00:52.040
especially text-heavy.

00:00:52.040 --> 00:00:54.040
An easy and obvious solution is to

00:00:54.040 --> 00:00:57.640
pick one of existing configuration frameworks

00:00:57.640 --> 00:01:00.760
like Spacemacs, Doom Emacs, Prelude,

00:01:00.760 --> 00:01:02.520
or something else,

00:01:02.520 --> 00:01:05.040
and to get a pre-configured Emacs

00:01:05.040 --> 00:01:09.040
in a minute with all bells and whistles.

00:01:09.040 --> 00:01:12.480
But the problem is: only Emacs.

00:01:12.480 --> 00:01:16.400
In reality, your working environment consists

00:01:16.400 --> 00:01:18.680
not only from elisp packages,

00:01:18.680 --> 00:01:21.360
but also from system packages

00:01:21.360 --> 00:01:23.320
and their configurations, project libraries,

00:01:23.320 --> 00:01:27.080
compilers, building tools, etc.,

00:01:27.080 --> 00:01:31.600
and thus you already have at least

00:01:31.600 --> 00:01:34.880
three, or more likely, five things

00:01:34.880 --> 00:01:37.120
for managing your environment:

00:01:37.120 --> 00:01:39.640
configuration, Emacs configuration framework,

00:01:39.640 --> 00:01:42.880
Emacs package manager, system package manager,

00:01:42.880 --> 00:01:46.600
system/dot files configuration manager,

00:01:46.600 --> 00:01:49.080
project/language package manager

00:01:49.080 --> 00:01:51.800
and maybe something else.

00:01:51.800 --> 00:01:56.360
Even having our Emacs configuration

00:01:56.360 --> 00:01:59.800
and package manager covered by framework

00:01:59.800 --> 00:02:02.080
we still have a lot of things

00:02:02.080 --> 00:02:04.240
which we have to interact with,

00:02:04.240 --> 00:02:08.640
keep in sync, and more importantly,

00:02:08.640 --> 00:02:12.480
each of them can break.

00:02:12.480 --> 00:02:17.320
But by "works every time," I mean

00:02:17.320 --> 00:02:19.560
even if I updated my system packages,

00:02:19.560 --> 00:02:23.880
configurations, I migrated to a different machine,

00:02:23.880 --> 00:02:29.120
someone on my team updated project dependencies,

00:02:29.120 --> 00:02:31.960
I can get back to work in a matter of seconds,

00:02:31.960 --> 00:02:39.040
or maybe in some cases, minutes.

00:02:39.040 --> 00:02:40.400
If I have multiple tools

00:02:40.400 --> 00:02:43.720
for managing my environment

00:02:43.720 --> 00:02:45.720
and even one of them is broken,

00:02:45.720 --> 00:02:48.360
the whole setup is broken.

00:02:48.360 --> 00:02:51.080
Also, if one of them doesn't support

00:02:51.080 --> 00:02:53.560
deterministic rollback,

00:02:53.560 --> 00:02:58.200
I can't guarantee the reliability

00:02:58.200 --> 00:02:59.200
of my working environment.

00:02:59.200 --> 00:03:01.360
I can't be sure that I will be able to

00:03:01.360 --> 00:03:02.800
rescue or revive it.

00:03:02.800 --> 00:03:06.760
The less points of failure we have,

00:03:06.760 --> 00:03:09.720
the easier to stay sane.

00:03:09.720 --> 00:03:13.080
Imagine some late breakage notice

00:03:13.080 --> 00:03:17.880
when you did update a few hours or days ago

00:03:17.880 --> 00:03:20.920
and found it later, and you have

00:03:20.920 --> 00:03:25.320
a few different tools involved.

00:03:25.320 --> 00:03:28.280
It will be really hard to find the cause

00:03:28.280 --> 00:03:34.840
and to make everything work again.

00:03:34.840 --> 00:03:37.880
Is it possible to have one tool

00:03:37.880 --> 00:03:44.360
to cover all the needs I described above?

00:03:44.360 --> 00:03:48.520
Yes, almost. With this tool,

00:03:48.520 --> 00:03:50.320
you can get a reliable setup.

00:03:50.320 --> 00:03:57.400
Now, I talk about functional package managers.

00:03:57.400 --> 00:04:00.680
Functional package managers allow us to

00:04:00.680 --> 00:04:03.720
manage systems, users, Emacs, project/

00:04:03.720 --> 00:04:07.560
language packages, and their configurations.

00:04:07.560 --> 00:04:10.880
But more importantly, it allows to do it

00:04:10.880 --> 00:04:13.200
in a declarative and reproducible manner.

00:04:13.200 --> 00:04:16.840
That means you just define what you need,

00:04:16.840 --> 00:04:19.680
and those tools build it for you.

00:04:19.680 --> 00:04:24.320
No matter what was before, you get what you asked for.

00:04:24.320 --> 00:04:26.200
It doesn't matter what time of day,

00:04:26.200 --> 00:04:29.640
what you did before, what other packages

00:04:29.640 --> 00:04:31.680
you have installed previously.

00:04:31.680 --> 00:04:34.440
You just ask for something, and you get it.

00:04:34.440 --> 00:04:41.440
Two years ago, I did a talk at EmacsConf 2020

00:04:41.440 --> 00:04:43.840
where I demonstrated a prototype of

00:04:43.840 --> 00:04:47.480
Emacs configuration managed by Nix.

00:04:47.480 --> 00:04:50.480
Originally, I wanted to base my work on

00:04:50.480 --> 00:04:56.160
an already existing Emacs configuration framework.

00:04:56.160 --> 00:05:01.360
But later, I decided that it will be easier

00:05:01.360 --> 00:05:02.440
and a little more flexible

00:05:02.440 --> 00:05:04.920
to start from ground up.

00:05:04.920 --> 00:05:06.960
After the first prototype in Nix,

00:05:06.960 --> 00:05:12.120
I decided to switch to Guix. To make it short,

00:05:12.120 --> 00:05:14.600
Guix is another functional package manager,

00:05:14.600 --> 00:05:21.840
but more freedom- and reproducibility-oriented,

00:05:21.840 --> 00:05:24.200
and written in only one language (Guile Scheme)

00:05:24.200 --> 00:05:29.880
instead of few custom-made Nix DSL, Bash, and C++.

00:05:29.880 --> 00:05:34.240
So now I can write Lisp code, while this code

00:05:34.240 --> 00:05:37.040
writes another Lisp code. Very neat indeed.

00:05:37.040 --> 00:05:42.760
Unfortunately, at the moment, there was no tool

00:05:42.760 --> 00:05:45.400
to manage user configurations,

00:05:45.400 --> 00:05:48.400
also known as dotfiles, with Guix.

00:05:48.400 --> 00:05:52.680
So I wrote one. And now it's a part of GNU Guix

00:05:52.680 --> 00:05:54.160
and called Guix Home.

00:05:54.160 --> 00:05:58.840
What do we get from this one tool?

00:05:58.840 --> 00:06:05.240
We can use one language to describe the whole system,

00:06:05.240 --> 00:06:09.080
the home environment, the project environment,

00:06:09.080 --> 00:06:10.240
and everything else.

00:06:10.240 --> 00:06:13.000
We don't need to worry about

00:06:13.000 --> 00:06:17.000
to keep different tools in sync

00:06:17.000 --> 00:06:19.760
and to integrate them between each other.

00:06:19.760 --> 00:06:23.080
Also, using one language to describe

00:06:23.080 --> 00:06:25.440
the whole configuration makes it possible

00:06:25.440 --> 00:06:28.640
to share values between different parts of the system.

00:06:28.640 --> 00:06:32.920
For example, color scheme, fonts, and much more.

00:06:32.920 --> 00:06:39.440
To sum up the first part of the talk:

00:06:39.440 --> 00:06:43.320
I want a working environment which is ready for work,

00:06:43.320 --> 00:06:47.960
configured in minutes to almost what I want.

00:06:47.960 --> 00:06:50.800
That means it should have some batteries included.

00:06:50.800 --> 00:06:52.000
It should be reliable.

00:06:52.000 --> 00:06:54.840
I want to get back to work in seconds

00:06:54.840 --> 00:06:56.160
even if I broke something

00:06:56.160 --> 00:06:58.200
or someone else broke something.

00:06:58.200 --> 00:07:03.560
For example, using rollbacks.

00:07:03.560 --> 00:07:07.320
It would be nice if it will be performant.

00:07:07.320 --> 00:07:08.640
It's a little subjective thing,

00:07:08.640 --> 00:07:12.360
but it's nice when things are snappy.

00:07:12.360 --> 00:07:16.160
And it's cool when things are consistent.

00:07:16.160 --> 00:07:17.800
Different interfaces have

00:07:17.800 --> 00:07:20.360
the same way of interactions with them.

00:07:20.360 --> 00:07:25.920
Let's get to the next part,

00:07:25.920 --> 00:07:29.120
and let's discuss what rde is.

00:07:29.120 --> 00:07:33.360
Originally it was my dotfiles repo,

00:07:33.360 --> 00:07:35.720
but it grew into something bigger.

00:07:35.720 --> 00:07:39.320
Now, it's a set of tools on top of

00:07:39.320 --> 00:07:41.680
GNU Guix, Guix System, and Guix Home.

00:07:41.680 --> 00:07:45.800
You can treat it as a GNU/Linux distribution,

00:07:45.800 --> 00:07:48.720
system and home environment manager

00:07:48.720 --> 00:07:50.880
or configuration framework,

00:07:50.880 --> 00:07:52.920
project environment manager

00:07:52.920 --> 00:07:55.160
(like virtualenv, but on steroids),

00:07:55.160 --> 00:07:58.200
and Emacs distribution.

00:07:58.200 --> 00:08:02.840
Usually, you just pick a few features,

00:08:02.840 --> 00:08:05.654
parameterize them and ask the tool

00:08:05.655 --> 00:08:08.120
to create an operating system for you,

00:08:08.120 --> 00:08:10.280
a home environment, project environment,

00:08:10.280 --> 00:08:11.560
or Emacs configuration.

00:08:11.560 --> 00:08:15.520
That's it. That's simple.

00:08:15.520 --> 00:08:22.080
And what rde Emacs is and how it tastes...

00:08:22.080 --> 00:08:26.360
It's like an ice cream, vanilla-flavored.

00:08:26.360 --> 00:08:30.880
No fancy macros for configuration, just plain Elisp.

00:08:30.880 --> 00:08:34.954
You can find in almost every

00:08:34.955 --> 00:08:36.480
personal Emacs configuration,

00:08:36.480 --> 00:08:42.640
built-in or vanilla-flavored packages

00:08:42.640 --> 00:08:45.588
are in priority over external

00:08:45.589 --> 00:08:46.760
or very fancy packages.

00:08:46.760 --> 00:08:52.200
There is practical reason for this.

00:08:52.200 --> 00:08:55.454
Maybe sometimes you don't get the things

00:08:55.455 --> 00:08:57.720
you're used to in other text editors,

00:08:57.720 --> 00:09:01.920
or maybe even in other Emacs frameworks,

00:09:01.920 --> 00:09:05.880
but we want to keep the final result consistent,

00:09:05.880 --> 00:09:08.720
so you can apply the same interaction patterns

00:09:08.720 --> 00:09:13.480
in different situations and extend your expectations

00:09:13.480 --> 00:09:15.000
from one tool to another,

00:09:15.000 --> 00:09:16.560
from one package to another.

00:09:16.560 --> 00:09:19.400
For example, we encourage people

00:09:19.400 --> 00:09:22.600
to use the minibuffer completion

00:09:22.600 --> 00:09:26.720
with orderless and vertico for many tasks:

00:09:26.720 --> 00:09:30.680
code navigation, file navigation,

00:09:30.680 --> 00:09:32.120
looking through your emails,

00:09:32.120 --> 00:09:35.160
or just for jumping around.

00:09:35.160 --> 00:09:36.320
Let's see.

00:09:36.320 --> 00:09:39.480
First, create a new Emacs instance

00:09:39.480 --> 00:09:45.280
and open a repository with my configuration.

00:09:45.280 --> 00:09:54.040
You can see the source code.

00:09:54.040 --> 00:09:58.760
Let's open another file which contains

00:09:58.760 --> 00:09:59.960
Emacs-related features.

00:09:59.960 --> 00:10:02.280
You can see I use imenu,

00:10:02.280 --> 00:10:08.360
and I can filter the list using minibuffer.

00:10:08.360 --> 00:10:16.600
Now let's open the Magit interface,

00:10:16.600 --> 00:10:18.920
and now I want to navigate through

00:10:18.920 --> 00:10:22.240
this long list of things here.

00:10:22.240 --> 00:10:25.560
Some of them staged. Some of them are recent commits.

00:10:25.560 --> 00:10:28.400
Some of them are untracked at all.

00:10:28.400 --> 00:10:31.040
I can open imenu: the same interface,

00:10:31.040 --> 00:10:34.640
but for now, I can navigate around

00:10:34.640 --> 00:10:41.320
the Magit sections and files which are present here.

00:10:41.320 --> 00:10:45.120
If I want to navigate project files,

00:10:45.120 --> 00:10:47.520
I use almost the same interface.

00:10:47.520 --> 00:10:51.720
I can use the same patterns to filter out

00:10:51.720 --> 00:11:00.400
files in my project or items in magit-imenu.

00:11:00.400 --> 00:11:07.720
Very similar and very consistent.

00:11:07.720 --> 00:11:11.920
Also, we try to have hotkeys consistent

00:11:11.920 --> 00:11:16.680
across different packages and parts of Emacs.

00:11:16.680 --> 00:11:21.720
We usually don't provide alternatives on what to use.

00:11:21.720 --> 00:11:25.520
We provide only one package for one task.

00:11:25.520 --> 00:11:28.154
But of course this is

00:11:28.155 --> 00:11:29.880
a configuration framework after all.

00:11:29.880 --> 00:11:32.800
You can declare your own features,

00:11:32.800 --> 00:11:35.788
implement them yourself,

00:11:35.789 --> 00:11:37.440
and use whatever you want.

00:11:37.440 --> 00:11:45.240
Let's get to some real-world examples.

00:11:45.240 --> 00:11:48.221
It's always easy to show

00:11:48.222 --> 00:11:50.200
how things get appended,

00:11:50.200 --> 00:11:51.760
how things get installed,

00:11:51.760 --> 00:11:55.288
but usually people don't show

00:11:55.289 --> 00:11:56.360
how they remove things,

00:11:56.360 --> 00:11:58.800
because it's usually painful.

00:11:58.800 --> 00:12:02.120
But in our case, it's not.

00:12:02.120 --> 00:12:10.840
Let's take my configuration,

00:12:10.840 --> 00:12:12.960
let's find feature-emacs-vertico.

00:12:12.960 --> 00:12:19.821
Vertico's just used to show

00:12:19.822 --> 00:12:25.880
this fancy completion UI

00:12:25.880 --> 00:12:27.400
that you can see here.

00:12:27.400 --> 00:12:30.960
If I disable this feature

00:12:30.960 --> 00:12:43.080
and rebuild my home environment,

00:12:43.080 --> 00:12:46.360
Emacs will lack this feature.

00:12:46.360 --> 00:12:55.400
It may take some time. It was quite fast,

00:12:55.400 --> 00:13:00.400
I didn't expect it.

00:13:00.400 --> 00:13:02.880
I have Emacs. As you can see here,

00:13:02.880 --> 00:13:06.280
now it doesn't have this completion UI anymore.

00:13:06.280 --> 00:13:09.280
I just commented it out,

00:13:09.280 --> 00:13:13.320
rebuilt my home environment,

00:13:13.320 --> 00:13:15.600
and this thing disappeared from Emacs.

00:13:15.600 --> 00:13:19.960
But what if I broke something?

00:13:19.960 --> 00:13:28.440
I just call guix home roll-back command

00:13:28.440 --> 00:13:31.200
and launch Emacs again, and you see

00:13:31.200 --> 00:13:32.800
now we have vertico back.

00:13:32.800 --> 00:13:36.080
Very good.

00:13:36.080 --> 00:13:41.280
Reliability is one of the most important qualities

00:13:41.280 --> 00:13:43.920
of working environment.

00:13:43.920 --> 00:13:46.400
We can always get back to

00:13:46.400 --> 00:13:48.440
the working state of our environment

00:13:48.440 --> 00:13:52.520
and be sure that we do the things we want.

00:13:52.520 --> 00:13:57.720
Now let's see another example.

00:13:57.720 --> 00:13:59.960
Here I have a mastodon,

00:13:59.960 --> 00:14:03.600
a post which contains a gemini link.

00:14:03.600 --> 00:14:11.560
I can click it, and you see it opens emacsclient,

00:14:11.560 --> 00:14:14.480
it renders this gemini capsule,

00:14:14.480 --> 00:14:17.800
and we can read all the posts of this guy.

00:14:17.800 --> 00:14:21.000
Very cool.

00:14:21.000 --> 00:14:26.760
But what if I go back to my configuration,

00:14:26.760 --> 00:14:32.400
we'll find a feature related to elpher,

00:14:32.400 --> 00:14:36.080
the application which handles gemini links,

00:14:36.080 --> 00:14:38.320
we'll comment it out,

00:14:38.320 --> 00:14:41.720
and we'll rebuild my home environment.

00:14:41.720 --> 00:14:47.120
What I expect here is that

00:14:47.120 --> 00:14:48.440
when I will be clicking the link,

00:14:48.440 --> 00:15:02.320
emacsclient won't pop up anymore.

00:15:02.320 --> 00:15:02.720
Cool.

00:15:02.720 --> 00:15:06.600
We rebuilt it and let's click the link.

00:15:06.600 --> 00:15:08.360
Now you see, it just opens another tab

00:15:08.360 --> 00:15:10.760
which doesn't do anything useful.

00:15:10.760 --> 00:15:14.080
Cool.

00:15:14.080 --> 00:15:15.520
Why it is important?

00:15:15.520 --> 00:15:19.640
It is important because every time

00:15:19.640 --> 00:15:24.640
you install something and you want to remove it,

00:15:24.640 --> 00:15:29.320
some parts depending on it can be broken.

00:15:29.320 --> 00:15:31.840
And also important in the other way around.

00:15:31.840 --> 00:15:34.920
Sometimes you want to install something,

00:15:34.920 --> 00:15:36.640
and it requires a few steps.

00:15:36.640 --> 00:15:40.600
For example, if you want to have

00:15:40.600 --> 00:15:43.160
a docker.el in your Emacs,

00:15:43.160 --> 00:15:49.080
you need not only docker.el itself

00:15:49.080 --> 00:15:51.360
and configuration for it,

00:15:51.360 --> 00:15:55.240
you also need to add your user to the docker group.

00:15:55.240 --> 00:15:59.000
But before it, you need to create this group,

00:15:59.000 --> 00:16:00.454
and you also need to

00:16:00.455 --> 00:16:02.800
define a system service and run it.

00:16:02.800 --> 00:16:05.800
Also you need to install docker package,

00:16:05.800 --> 00:16:11.640
docker-cli package, and containerd package.

00:16:11.640 --> 00:16:15.440
You can forget every of this small step,

00:16:15.440 --> 00:16:20.480
but if it in your declarative configuration

00:16:20.480 --> 00:16:23.588
in one place, and you just ask

00:16:23.589 --> 00:16:27.821
to enable this feature, each of those steps

00:16:27.822 --> 00:16:30.880
will be performed automatically.

00:16:30.880 --> 00:16:33.200
If you don't need docker anymore,

00:16:33.200 --> 00:16:34.840
you just disable the feature,

00:16:34.840 --> 00:16:38.480
and all the effect of all those steps

00:16:38.480 --> 00:16:42.840
will be removed from your system.

00:16:42.840 --> 00:16:46.640
I won't be showing it because it probably will

00:16:46.640 --> 00:16:48.920
take more time for reconfiguring,

00:16:48.920 --> 00:16:54.400
but you can experiment with it on your own.

00:16:54.400 --> 00:17:00.840
Let's do another interesting thing.

00:17:00.840 --> 00:17:05.921
Let's construct a small

00:17:05.922 --> 00:17:07.720
Emacs configuration from scratch.

00:17:07.720 --> 00:17:10.920
Who's this?

00:17:10.920 --> 00:17:14.240
I will open a file which contains only

00:17:14.240 --> 00:17:18.720
emacs-portable feature and feature-user-info.

00:17:18.720 --> 00:17:21.120
Now I will build an environment,

00:17:21.120 --> 00:17:24.480
and inside this environment,

00:17:24.480 --> 00:17:26.640
I will launch a new Emacs instance.

00:17:26.640 --> 00:17:28.800
As you see, it's very different

00:17:28.800 --> 00:17:30.440
from what you saw previously.

00:17:30.440 --> 00:17:32.120
And it's almost barebones.

00:17:32.120 --> 00:17:39.520
It doesn't contain anything

00:17:39.520 --> 00:17:41.760
except user-mail-address

00:17:41.760 --> 00:17:45.080
which is set to my mail address,

00:17:45.080 --> 00:17:46.880
and user-full-name.

00:17:46.880 --> 00:17:50.760
How it works:

00:17:50.760 --> 00:17:54.000
In feature-user-info, I define a few values.

00:17:54.000 --> 00:18:01.120
Those values are obtained by Emacs

00:18:01.120 --> 00:18:03.280
feature-emacs-portable

00:18:03.280 --> 00:18:07.480
and set inside Emacs configuration.

00:18:07.480 --> 00:18:12.840
But let's enable a few more features.

00:18:12.840 --> 00:18:15.400
I will do it in one go

00:18:15.400 --> 00:18:22.120
because we already saw how it works overall.

00:18:22.120 --> 00:18:30.160
Let's build another Emacs with Emacs configuration.

00:18:30.160 --> 00:18:39.280
The interesting thing about this Emacs instance

00:18:39.280 --> 00:18:44.560
is that it doesn't contain anything

00:18:44.560 --> 00:18:46.520
that I have in my usual Emacs.

00:18:46.520 --> 00:18:49.360
For example, I don't have much here.

00:18:49.360 --> 00:18:55.040
I don't have make installed, and so on.

00:18:55.040 --> 00:19:06.640
But we have feature-loader-portable package

00:19:06.640 --> 00:19:09.960
which just requires a few configure packages.

00:19:09.960 --> 00:19:13.320
Let's move it to a separate workspace.

00:19:13.320 --> 00:19:21.680
First of all, configure-rde-emacs-portable

00:19:21.680 --> 00:19:23.720
which just sets a few variables.

00:19:23.720 --> 00:19:27.280
rde configure-keycast which just shows

00:19:27.280 --> 00:19:31.200
something on the modeline

00:19:31.200 --> 00:19:34.440
which demonstrates the last hotkey pressed

00:19:34.440 --> 00:19:40.080
and the command which was invoked.

00:19:40.080 --> 00:19:41.640
We can enable which-key,

00:19:41.640 --> 00:19:45.040
and now when I type a prefix,

00:19:45.040 --> 00:19:48.600
I can see all the possible continuations

00:19:48.600 --> 00:19:49.360
for this prefix.

00:19:49.360 --> 00:19:51.880
I can enable vertico,

00:19:51.880 --> 00:19:58.160
and you can see, now we have nice completion UI.

00:19:58.160 --> 00:20:03.560
We can enable completion-related improvements

00:20:03.560 --> 00:20:07.560
and now I have not only UI itself, but also

00:20:07.560 --> 00:20:15.320
some notes here near each command,

00:20:15.320 --> 00:20:17.800
and ability to use regular expressions

00:20:17.800 --> 00:20:21.480
or some orderless matching.

00:20:21.480 --> 00:20:26.400
We can enable eshell,

00:20:26.400 --> 00:20:31.320
and now I have a hotkey for invoking Emacs shell.

00:20:31.320 --> 00:20:35.920
I don't have hotkey for vterm yet,

00:20:35.920 --> 00:20:37.360
but I can enable it,

00:20:37.360 --> 00:20:40.800
and now I have a terminal inside my Emacs.

00:20:40.800 --> 00:20:43.240
As you can see my usual shell is Zsh,

00:20:43.240 --> 00:20:46.040
but here I have a plain bash.

00:20:46.040 --> 00:20:52.280
Let's enable feature-git,

00:20:52.280 --> 00:21:04.720
and now I will be able to open my project.

00:21:04.720 --> 00:21:11.488
And inside this project,

00:21:11.489 --> 00:21:14.640
I will be able to open Magit

00:21:14.640 --> 00:21:19.880
and navigate around using imenu.

00:21:19.880 --> 00:21:26.160
Let's do few more things.

00:21:26.160 --> 00:21:29.640
Let's enable Org Roam

00:21:29.640 --> 00:21:43.840
so I will be able to open my EmacsConf notes.

00:21:43.840 --> 00:21:48.240
Let's enable configure-emacs.

00:21:48.240 --> 00:21:53.320
As you can see, the way it displayed updated.

00:21:53.320 --> 00:21:59.520
Let's enable configure-appearance,

00:21:59.520 --> 00:22:03.880
and you see the appearance of Emacs changed radically.

00:22:03.880 --> 00:22:06.560
And also, let's change the faces.

00:22:06.560 --> 00:22:13.040
And now you see almost my setup

00:22:13.040 --> 00:22:14.800
that you saw previously,

00:22:14.800 --> 00:22:19.000
but we build it from small tiny pieces.

00:22:19.000 --> 00:22:27.520
A little summary:

00:22:27.520 --> 00:22:32.280
rde is the one tool that you can use

00:22:32.280 --> 00:22:34.440
to manage the whole computing experience.

00:22:34.440 --> 00:22:38.080
It consists of composable components,

00:22:38.080 --> 00:22:41.720
and actually, it provides

00:22:41.720 --> 00:22:43.240
a reliable configuration framework.

00:22:43.240 --> 00:22:46.360
You always have a rollback.

00:22:46.360 --> 00:22:49.320
You always can switch to a generation

00:22:49.320 --> 00:22:50.560
you used a week ago.

00:22:50.560 --> 00:22:57.520
And of course, it's reproducible and declarative

00:22:57.520 --> 00:22:58.680
which is also very cool.

00:22:58.680 --> 00:23:05.788
rde Emacs is a part of rde

00:23:05.789 --> 00:23:06.920
but it can be used separately.

00:23:06.920 --> 00:23:11.280
You can think of it as an Emacs distribution

00:23:11.280 --> 00:23:14.040
which is vanilla-flavored, consistent,

00:23:14.040 --> 00:23:15.960
well-integrated, and self-contained.

00:23:15.960 --> 00:23:19.560
That's it for today.

00:23:19.560 --> 00:23:22.054
Don't hesitate to contact me

00:23:22.055 --> 00:23:23.840
via email or any other way.

00:23:23.840 --> 00:23:28.154
Thank you everyone for your attention

00:23:28.155 --> 00:23:33.760
and see you in a bit.