summaryrefslogtreecommitdiffstats
path: root/2022/captions/emacsconf-2022-eev--bidirectional-links-with-eev--eduardo-ochs--main.vtt
blob: da9fcff77a54ea1e057e7f3de53a2f764f971745 (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
WEBVTT

00:00.000 --> 00:06.159
Hi, my name is Eduard Oxt, I'm the author of an MX package called EEV, and the name

00:06.160 --> 00:11.439
of this presentation is Bidirectional Links in EEV.

00:11.440 --> 00:16.279
Let me present things in a weird order, starting by the new feature and then I'm going to

00:16.280 --> 00:20.799
explain the whole context.

00:20.800 --> 00:25.839
One of the main features that we are going to see here is this function here, MetaX Cla,

00:25.840 --> 00:29.279
and Cla is a mnemonic for Q-link to anchor.

00:29.280 --> 00:33.159
Let me explain, let me demonstrate how it works.

00:33.160 --> 00:40.239
This thing here with the green angle brackets is an anchor, this thing between the green

00:40.240 --> 00:48.279
angle brackets is a tag of an anchor, and if I type MetaX Cla here, it highlights this

00:48.280 --> 00:53.719
tag for a second and it says copied to the Q-link blah blah blah, and this thing here

00:53.720 --> 00:55.079
is a link.

00:55.080 --> 01:02.759
I can insert the link here, I can insert the link in my notes, and if I execute this link,

01:02.760 --> 01:08.319
this link here, it goes to this anchor in this file.

01:08.320 --> 01:16.119
If you have a recent version of EEV installed, then trying this feature should be very easy.

01:16.120 --> 01:21.679
You just need to open this file here in which everything is defined, and then go to this

01:21.680 --> 01:27.479
section at the beginning of the file, and then run the three blocks of tests that are

01:27.480 --> 01:29.299
there.

01:29.300 --> 01:34.439
This block corresponds roughly to what we have just done.

01:34.440 --> 01:43.519
This other block is slightly different because it shows some variants of Cla.

01:43.520 --> 01:47.959
One is with F instead of an A here.

01:47.960 --> 01:49.559
Let me show how it works.

01:49.560 --> 02:00.519
If we type MetaX eKlf or just MetaX klf, we get a link to this file that does not point

02:00.520 --> 02:08.399
to an anchor, and if we type MetaX klt, we get another kind of link that is linked to

02:08.400 --> 02:11.719
an anchor in the same file.

02:11.720 --> 02:21.199
The third block is more interesting because it lets people create links to files that

02:21.200 --> 02:26.439
are elsewhere and that do not have anchors pointing to them.

02:26.440 --> 02:28.799
Let me execute this.

02:28.800 --> 02:36.319
This will run this extra here and display the target at the window at the right.

02:36.320 --> 02:41.679
This is one of the source files of MX.

02:41.680 --> 02:45.519
Let's imagine that I want to create a link to this string here.

02:45.520 --> 02:53.399
Then I can type MetaX klfs, and this will create a link to a file in a string in that

02:53.400 --> 02:54.399
file.

02:54.400 --> 03:00.959
If I type enter here, it says copy to the kil ring, and this is a link to this file

03:00.960 --> 03:11.479
here and to the first occurrence of this string in this file.

03:11.480 --> 03:14.399
Notice this work inside.

03:14.400 --> 03:19.239
When I was trying to write the documentation of this, I tried to write a summary of how

03:19.240 --> 03:25.359
the algorithm works, and I failed, and I tried again, and I failed again several times, and

03:25.360 --> 03:33.419
then I gave up and I decided to write an intro, a tutorial, this one, that explains everything

03:33.420 --> 03:40.959
but lots of details and lots of sections with try it that have examples that you can run

03:40.960 --> 03:48.719
to understand things, to examine how some functions work, how the data structures work,

03:48.720 --> 03:51.599
and so on.

03:51.600 --> 03:57.399
The problem is that sometimes we have several hyperlinks that point to the same file.

03:57.400 --> 03:59.359
Let me give an example.

03:59.360 --> 04:08.399
In the configuration in which I am now, in this file here, the old way of generating

04:08.400 --> 04:14.519
hyperlinks to this file with find here links, which generate a temporary buffer like this,

04:14.520 --> 04:20.239
and then I would have to choose which one of these hyperlinks I find best, which one

04:20.240 --> 04:24.359
I prefer, and then copy it to my notes.

04:24.360 --> 04:31.079
So instead of choosing a hyperlink, this thing here shows all the options.

04:31.080 --> 04:38.639
And in the new way, in MetaX and Friends, there's an algorithm that chooses the best

04:38.640 --> 04:40.879
short hyperlink by itself.

04:40.880 --> 04:44.159
And this algorithm is a bit hard to explain.

04:44.160 --> 04:46.639
Let me demonstrate it here.

04:46.640 --> 04:56.359
Again, we have all these options here of hyperlinks to this file, and if I type MetaX klf, it

04:56.360 --> 04:58.839
chooses one of them.

04:58.840 --> 05:02.599
And of course, I can copy it to my notes, it's going to work, it's going to point to

05:02.600 --> 05:04.799
here and so on.

05:04.800 --> 05:11.199
Well, the title of this presentation was Bidirectional Links with EEV.

05:11.200 --> 05:17.559
Let me show what I mean by bidirectional hyperlinks and how we can use this thing to create bidirectional

05:17.560 --> 05:20.519
hyperlinks very quickly.

05:20.520 --> 05:22.259
I will have to use a smaller font.

05:22.260 --> 05:24.999
Let me open these two files here.

05:25.000 --> 05:31.999
This one at the left is a program in Haskell, and this one is a file with my notes on Haskell.

05:32.000 --> 05:41.559
How do I create a link to this file in Haskell to put it in this file here?

05:41.560 --> 05:49.719
I can put the cursor here in any position after this anchor here and type MetaX klf.

05:49.720 --> 05:56.359
It copies this link here to the kill ring, and then I can go here and either insert it

05:56.360 --> 06:08.039
with Ctrl Y, yank, or insert it with MetaX klf that adds a comment prefix here.

06:08.040 --> 06:16.559
So this is a way to create a link from here to there in which every comment has to be

06:16.560 --> 06:19.359
given explicitly.

06:19.360 --> 06:23.719
But I also implemented a way to create the two links at the same time.

06:23.720 --> 06:24.719
I don't use it much.

06:24.720 --> 06:27.399
It is mostly for demos because it is impressive.

06:27.400 --> 06:29.919
I wanted to show that in this presentation.

06:29.920 --> 06:33.079
Anyway, let me show it here.

06:33.080 --> 06:41.339
Note that in this file here the point is here, in this file the point is here.

06:41.340 --> 06:47.599
My trick is going to create a link to this anchor and put it in this file, and it is

06:47.600 --> 06:51.479
going to create a link to this anchor and put it in this file.

06:51.480 --> 06:58.599
So here it goes, MetaX klhu, ta-da!

06:58.600 --> 07:03.159
It highlighted the two anchors for a second and then it created these things here and

07:03.160 --> 07:11.479
inserted them with the right comment prefixes.

07:11.480 --> 07:15.519
And that's it.

07:15.520 --> 07:17.319
So that's it.

07:17.320 --> 07:26.039
If you found these things interesting, just install a recent version of VEV and run the

07:26.040 --> 07:32.159
tutorial either with this thing here, MetaX client client intro, or by running this exp,

07:32.160 --> 07:39.599
or open this file here in the iv directory and follow the tutorials.

07:39.600 --> 07:46.919
And most things there are well documented, but the thing that I don't use much and that

07:46.920 --> 07:52.559
is mostly for demos, which is the thing that creates bidirectional hyperlinks, is not yet

07:52.560 --> 07:55.119
well documented, but the rest is.

07:55.120 --> 07:56.119
So that's it.

07:56.120 --> 08:17.400
Have fun.