This entry has random notes that I consider useful for my emacs experience. Hope this will be useful for you too.
It's basically the way we explain/describe and show the source of a program and (optionally) its result on a document. For details check out this wikipedia entry.
To do literate programming in emacs, we use org-mode in conjunction with org-babel.
1: #include<stdio.h> 2: 3: int main(int argc, char *argv[]) 4: { 5: printf("%s\n", "Hello World"); 6: printf("Another Hello world"); 7: return 0; 8: }
Hello World Another Hello world
If you want to know what about the top line. Look at this references
const fun = (a, b) => { return a + b } const a = 7, b = 3; console.log(fun(a, b))
We can grep in emacs, grep is a tool for looking for some text or regex inside a file or directory.
Sometime when we are searching for some string that has a character like { } [ ] $, etc.
To do that we need to escape them with a $
as prefix.
So for example if I want to search to some string that contains the following text {SOME_VARIABLE}
,
I can't just write it like that, emacs will not recognize that special character, so we need to escape it with a cash symbol $
.