WEBVTT
00:00.480 --> 00:00:02.639
Hello, everyone. My name is Ahmed
00:00:02.639 --> 00:00:05.279
and I am very happy to be here.
00:05.279 --> 00:00:07.359
Today I'll talk about
00:00:07.359 --> 00:00:12.160
my academic workflow inside Emacs.
00:12.160 --> 00:00:14.880
So the main needs that I have
00:00:14.880 --> 00:00:16.880
is to keep up with the current research
00:00:16.880 --> 00:00:19.760
in my field, and to be able
00:00:19.760 --> 00:00:23.920
to take notes, and write,
00:00:23.920 --> 00:00:25.359
and use these notes later
00:00:25.359 --> 00:00:29.439
in writing my papers inside Emacs.
00:00:29.439 --> 00:00:31.119
Emacs is a great program for this
00:00:31.119 --> 00:00:32.880
because it is very extendable
00:00:32.880 --> 00:00:36.960
and we can basically write
00:00:36.960 --> 00:00:39.440
whatever we are missing.
00:39.440 --> 00:00:41.360
It replaced my earlier
00:00:41.360 --> 00:00:42.559
proprietary workflow
00:00:42.559 --> 00:00:44.320
that involved using Mendeley
00:44.320 --> 00:00:46.320
and Visual Studio Code
00:00:46.320 --> 00:00:47.760
and many other tools
00:00:47.760 --> 00:00:49.760
in order to do the things
00:00:49.760 --> 00:00:51.759
that I'll show today.
00:51.760 --> 00:00:54.480
So the first concern that I have
00:00:54.480 --> 00:00:57.280
is to keep up with new papers.
00:00:57.280 --> 00:01:02.399
To do that, I use this package called elfeed.
01:02.399 --> 00:01:05.760
Elfeed is basically just an RSS reader,
01:05.760 --> 00:01:09.600
and here I fetch all the papers that I need
00:01:09.600 --> 00:01:12.159
from arXiv, which is the main source
00:01:12.159 --> 00:01:14.080
of papers in my field
00:01:14.080 --> 00:01:16.720
and many other scientific fields.
01:16.720 --> 00:01:22.640
It allows me to view these papers
00:01:22.640 --> 00:01:27.680
with the abstracts and so on.
01:27.680 --> 00:01:32.159
In order to simplify viewing
00:01:32.159 --> 00:01:34.799
and searching for relevant papers,
00:01:34.799 --> 00:01:36.400
I used this other package called
00:01:36.400 --> 00:01:41.600
elfeed-score, and elfeed-score enables me
00:01:41.600 --> 00:01:44.560
to assign a numerical score like this
00:01:44.560 --> 00:01:47.600
to each of the arXiv entries.
00:01:47.600 --> 00:01:49.200
This numerical score is very simple.
00:01:49.200 --> 00:01:52.560
It's just based on matching things.
00:01:52.560 --> 00:01:59.200
So, for example, we can ask elfeed
01:59.200 --> 00:02:05.040
to explain this. So if we say = x,
02:05.040 --> 00:02:08.720
then this just says that
00:02:08.720 --> 00:02:10.000
this matches three rules
00:02:10.000 --> 00:02:12.720
for a score of 76. This paper.
00:02:12.720 --> 00:02:14.959
This is simply because I am searching
00:02:14.959 --> 00:02:16.800
for these keywords
00:02:16.800 --> 00:02:19.040
that are very interesting to me,
00:02:19.040 --> 00:02:20.879
such as neural networks
00:02:20.879 --> 00:02:22.879
or federated learning.
00:02:22.879 --> 00:02:28.959
And now, if I see a paper here
00:02:28.959 --> 00:02:30.238
that I am interested in...
00:02:30.239 --> 00:02:32.720
Let's say I'm interested in this paper
00:02:32.720 --> 00:02:35.040
about Gaussian Process Inference,
02:35.040 --> 00:02:36.640
then I want to store it
00:02:36.640 --> 00:02:40.160
in my local library. So I want the PDF
00:02:40.160 --> 00:02:41.920
and I want to be able to cite it
00:02:41.920 --> 00:02:44.000
in the future. To do that,
00:02:44.000 --> 00:02:46.080
I use a package called org-ref
00:02:46.080 --> 00:02:54.640
that allows me to fetch papers from arXiv.
00:02:54.640 --> 00:02:56.720
So here I wrote a helper function,
00:02:56.720 --> 00:02:59.200
this elfeed-entry-to-arxiv
02:59.200 --> 00:03:02.480
that automatically gets this paper.
00:03:02.480 --> 00:03:03.840
It asks me where to put it,
00:03:03.840 --> 00:03:07.840
it completes with my default libraries,
03:07.840 --> 00:03:13.360
and then it fetches the paper from arXiv
03:13.360 --> 00:03:16.159
and places it in this folder,
00:03:16.159 --> 00:03:20.000
and also places it in my bibliography file
00:03:20.000 --> 00:03:23.280
which is written in BibLaTex.
03:23.280 --> 00:03:30.239
So here, if we search for this paper now,
03:30.239 --> 00:03:35.200
we find that it is in our library.
03:35.200 --> 00:03:38.000
This library interface
00:03:38.000 --> 00:03:41.280
is from a package called citar,
00:03:41.280 --> 00:03:44.000
and I have customized it quite a bit
00:03:44.000 --> 00:03:48.879
to display all of the papers in my library
03:48.879 --> 00:03:50.559
in this format.
03:50.560 --> 00:03:55.439
This just reads from a BibLaTeX file.
00:03:55.439 --> 00:03:59.519
So if we open it like this,
03:59.519 --> 00:04:02.879
you'll see that this is the
04:02.879 --> 00:04:06.640
the entry that it placed.
04:06.640 --> 00:04:10.959
One of the interesting things here is that
04:10.959 --> 00:04:13.519
org-ref actually doesn't really fetch
00:04:13.519 --> 00:04:16.079
all of the entries in this format.
00:04:16.079 --> 00:04:18.639
Moreover, I want all the entries in my file
00:04:18.639 --> 00:04:20.160
to look quite similar,
04:20.160 --> 00:04:23.520
and to have this very similar look,
04:23.520 --> 00:04:25.440
and the way I accomplish that is by
00:04:25.440 --> 00:04:28.960
using several tools and chaining them.
04:28.960 --> 00:04:37.280
So in order to see this...
04:37.280 --> 00:04:39.600
So here, this is the function
04:39.600 --> 00:04:41.680
that I used to...
04:41.680 --> 00:04:46.720
This is basically run as a hook after each time
04:46.720 --> 00:04:49.680
Emacs modifies the bibliography file,
04:49.680 --> 00:04:52.320
and it runs rebiber
00:04:52.320 --> 00:04:56.479
which gets the conference versions
00:04:56.479 --> 00:04:58.320
of papers that I fetch from arXiv,
00:04:58.320 --> 00:05:00.800
because arXiv is a preprint directory,
05:00.800 --> 00:05:05.360
and then biber normalizes the arXiv file
05:05.360 --> 00:05:07.919
to have a consistent look,
00:05:07.919 --> 00:05:10.320
and then I apply just some substitutions
00:05:10.320 --> 00:05:12.960
which I like more.
05:12.960 --> 00:05:14.560
Finally, I have the whole thing
00:05:14.560 --> 00:05:16.639
under version control.
05:16.639 --> 00:05:20.000
This function, reformat-bib-library,
00:05:20.000 --> 00:05:21.840
I make it into a hook
00:05:21.840 --> 00:05:24.720
and I run it every time after I save.
05:24.720 --> 00:05:27.039
It just checks if the current buffer
05:27.039 --> 00:05:29.039
is the main bib library.
00:05:29.039 --> 00:05:31.840
We will just reformat the library.
00:05:31.840 --> 00:05:33.680
This allows me to keep the library
00:05:33.680 --> 00:05:37.199
looking all consistent like this.
05:37.199 --> 00:05:39.120
By the way, all of the code is available.
05:39.120 --> 00:05:40.880
You don't have to get it from the video.
05:40.880 --> 00:05:44.479
I will attach it as a GitHub gist.
05:48.720 --> 00:05:49.919
One of the things
00:05:49.919 --> 00:05:51.520
that are really important
00:05:51.520 --> 00:05:54.080
is that I want to be able to keep notes
00:05:54.080 --> 00:05:56.160
on papers that I read.
05:56.160 --> 00:05:58.479
For example, here are some of
00:05:58.479 --> 00:06:00.319
my existing notes.
06:00.319 --> 00:06:04.720
Now, let's add a note to the paper
00:06:04.720 --> 00:06:06.080
that we just got.
00:06:06.080 --> 00:06:08.800
So the the pipeline here is that
00:06:08.800 --> 00:06:12.080
I use citar with embark,
06:12.080 --> 00:06:13.199
which is another library,
00:06:13.199 --> 00:06:15.600
but you can use any other library
00:06:15.600 --> 00:06:17.039
just for completion
00:06:17.039 --> 00:06:19.600
and acting upon completion, like ivy,
06:19.600 --> 00:06:21.360
and I ask it to open notes
00:06:21.360 --> 00:06:23.680
and then it asks me how to capture it.
00:06:23.680 --> 00:06:25.120
So these capture templates
00:06:25.120 --> 00:06:27.440
are handled by the org-roam package,
00:06:27.440 --> 00:06:30.400
which is a very, very interesting package
00:06:30.400 --> 00:06:32.560
for note-taking.
06:32.560 --> 00:06:36.160
org-roam, among other things, allows us
00:06:36.160 --> 00:06:38.800
to write linkable notes in Org mode,
06:38.800 --> 00:06:42.400
and moreover, it is very extensible.
06:42.400 --> 00:06:45.600
There is another package called org-roam-bibtex
00:06:45.600 --> 00:06:47.840
that allows us to attach these nodes
00:06:47.840 --> 00:06:50.000
to bibliography files,
00:06:50.000 --> 00:06:51.919
which is what I'm doing right now.
06:51.919 --> 00:06:54.800
For example, I set up the capture template
00:06:54.800 --> 00:06:57.680
such that when I press s
00:06:57.680 --> 00:07:01.440
for short bibliography reference,
07:01.440 --> 00:07:04.800
it will make a new headline
07:04.800 --> 00:07:08.479
in my "Reference Notes" note,
07:08.479 --> 00:07:10.479
and I can write things here
00:07:10.479 --> 00:07:14.960
(so, for example, "seems interesting")
07:14.960 --> 00:07:18.000
and then note here that it added this paper
00:07:18.000 --> 00:07:24.319
to ROAM_REFS, so this means that
07:24.319 --> 00:07:26.720
when I look at these papers using citar,
07:26.720 --> 00:07:30.319
it will be able to find this note.
07:30.319 --> 00:07:34.000
Similarly, we can also add long-form notes.
00:07:34.000 --> 00:07:37.199
For example, if I do this and I add r,
07:37.199 --> 00:07:39.840
it will create an entirely new file
00:07:39.840 --> 00:07:48.000
that I can take detailed notes in.
07:48.000 --> 00:07:50.639
The strengths of org-roam is that
00:07:50.639 --> 00:07:53.520
I can do things like linking papers.
07:53.520 --> 00:07:55.360
For example, here are several books
07:55.360 --> 00:08:00.000
that I am reading. This file just collects
00:08:00.000 --> 00:08:02.319
these books so that I can find them
00:08:02.319 --> 00:08:03.919
for easy reference.
08:03.919 --> 00:08:07.599
Of course, I can link these files from inside.
08:07.599 --> 00:08:13.759
You can see here that I also use org-cite
08:13.759 --> 00:08:18.720
to cite other files, and I can act upon this
08:18.720 --> 00:08:21.199
and open the notes corresponding to
00:08:21.199 --> 00:08:28.240
this other book.
08:28.240 --> 00:08:30.319
So I'm a little short on time.
00:08:30.319 --> 00:08:32.719
I cannot go into detail on everything,
00:08:32.719 --> 00:08:34.560
but I will share my configuration,
00:08:34.560 --> 00:08:37.919
and I hope that this will inspire other people
00:08:37.919 --> 00:08:43.919
to also use Emacs for their academic workflows.
08:43.919 --> 00:08:44.919
Thank you so much.
00:08:44.919 --> 00:08:47.279
[captions by sachac]