diff options
Diffstat (limited to '')
3 files changed, 2259 insertions, 2387 deletions
diff --git a/2020/info/22.md b/2020/info/22.md index 6e616cda..d6e3d717 100644 --- a/2020/info/22.md +++ b/2020/info/22.md @@ -1,8 +1,9 @@ # Powering-up Special Blocks Musa Al-hassy -[[!template id=vid src="https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy.webm"]] +[[!template id=vid vidid="mainVideo" src="https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy.webm" subtitles="/2020/subtitles/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy.vtt" video]] [Download compressed .webm video (29.2M)](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/smaller/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy--vp9-q56-video-original-audio.webm) +[View transcript](#transcript) Users will generally only make use of a few predefined \`special blocks', such as \`example, centre, quote', and will not bother with @@ -138,3 +139,537 @@ love to have it. <https://alhassy.github.io/ElispCheatSheet/CheatSheet.pdf>. - My Emacs init: <https://github.com/alhassy/emacs.d#a-life-configuring-emacs>. + +<a name="transcript"></a> +# Transcript + +[[!template text="All right, then. Well, hello everyone." start="00:00:04.080" video="mainVideo" id=subtitle]] +[[!template text="I hope you're all enjoying the EmacsConf." start="00:00:07.359" video="mainVideo" id=subtitle]] +[[!template text="My name is Musa Al-hassy, and I hope you're" start="00:00:11.519" video="mainVideo" id=subtitle]] +[[!template text="excited to learn about powering up special blocks." start="00:00:15.040" video="mainVideo" id=subtitle]] +[[!template text="Let's first off find out what these special blocks are," start="00:00:19.840" video="mainVideo" id=subtitle]] +[[!template text="and see what we can go from." start="00:00:25.574" video="mainVideo" id=subtitle]] +[[!template text="Yesterday, I saw a lot of cool talks" start="00:00:27.920" video="mainVideo" id=subtitle]] +[[!template text="and people were chatting about" start="00:00:30.240" video="mainVideo" id=subtitle]] +[[!template text="how should you present? Should you do it this way or that way?" start="00:00:33.200" video="mainVideo" id=subtitle]] +[[!template text="I thought maybe I should try a different way." start="00:00:37.200" video="mainVideo" id=subtitle]] +[[!template text="But I'm talking about special blocks" start="00:00:39.931" video="mainVideo" id=subtitle]] +[[!template text="and if I show you an Emacs, then I have to export" start="00:00:42.567" video="mainVideo" id=subtitle]] +[[!template text="the HTML so you can see what it looks like" start="00:00:45.039" video="mainVideo" id=subtitle]] +[[!template text="or export to a PDF so you can see what it looks like." start="00:00:47.840" video="mainVideo" id=subtitle]] +[[!template text="So I ended up writing in org-reveal," start="00:00:51.920" video="mainVideo" id=subtitle]] +[[!template text="and joyously, this just works." start="00:00:54.239" video="mainVideo" id=subtitle]] +[[!template text="You can just see things here." start="00:00:58.960" video="mainVideo" id=subtitle]] +[[!template text="I was worried that I'd have to take pictures" start="00:01:00.879" video="mainVideo" id=subtitle]] +[[!template text="and then insert pings, so that was a delight." start="00:01:03.452" video="mainVideo" id=subtitle]] +[[!template text="Okay. Special blocks are these things like a center small quote." start="00:01:09.760" video="mainVideo" id=subtitle]] +[[!template text="That's what a special block is," start="00:01:15.704" video="mainVideo" id=subtitle]] +[[!template text="and with a bit of Lisp, we can make" start="00:01:17.280" video="mainVideo" id=subtitle]] +[[!template text="special blocks and link types." start="00:01:19.733" video="mainVideo" id=subtitle]] +[[!template text="Right. Using a single interface." start="00:01:22.741" video="mainVideo" id=subtitle]] +[[!template text="The interface is going to be similar" start="00:01:24.799" video="mainVideo" id=subtitle]] +[[!template text="to one many people are familiar with." start="00:01:27.344" video="mainVideo" id=subtitle]] +[[!template text="In particular, Org Babel's src interface" start="00:01:29.281" video="mainVideo" id=subtitle]] +[[!template text="as well as using global header arguments for link types." start="00:01:34.712" video="mainVideo" id=subtitle]] +[[!template text="The idea is to write it once" start="00:01:37.840" video="mainVideo" id=subtitle]] +[[!template text="and generate many different kinds." start="00:01:39.450" video="mainVideo" id=subtitle]] +[[!template text="You write in Org markup and you can have HTML," start="00:01:41.200" video="mainVideo" id=subtitle]] +[[!template text="you can have PDF, and joyously, org-reveal." start="00:01:45.213" video="mainVideo" id=subtitle]] +[[!template text="That was an unexpected delight." start="00:01:49.767" video="mainVideo" id=subtitle]] +[[!template text="Here are a few that you'll just see" start="00:01:53.600" video="mainVideo" id=subtitle]] +[[!template text="in this presentation." start="00:01:57.840" video="mainVideo" id=subtitle]] +[[!template text="I won't show some of these link-only ones," start="00:02:01.759" video="mainVideo" id=subtitle]] +[[!template text="but we'll see a few of these other ones" start="00:02:05.040" video="mainVideo" id=subtitle]] +[[!template text="just to make the presentation look nice" start="00:02:06.799" video="mainVideo" id=subtitle]] +[[!template text="So the presentation is really going to" start="00:02:09.500" video="mainVideo" id=subtitle]] +[[!template text="present these blocks and the mechanism" start="00:02:11.520" video="mainVideo" id=subtitle]] +[[!template text="at the same time." start="00:02:14.000" video="mainVideo" id=subtitle]] +[[!template text="No HTML was written." start="00:02:15.120" video="mainVideo" id=subtitle]] +[[!template text="Look, Ma! No HTML, just pure Org Mode," start="00:02:18.400" video="mainVideo" id=subtitle]] +[[!template text="and you get all these beautiful boxes and things." start="00:02:21.280" video="mainVideo" id=subtitle]] +[[!template text="The motivation for this is..." start="00:02:25.840" video="mainVideo" id=subtitle]] +[[!template text="you're online, you run into a blog," start="00:02:29.120" video="mainVideo" id=subtitle]] +[[!template text="and you see something you like," start="00:02:31.200" video="mainVideo" id=subtitle]] +[[!template text="and you're like, man," start="00:02:32.120" video="mainVideo" id=subtitle]] +[[!template text="you know, I wish I could produce that." start="00:02:33.120" video="mainVideo" id=subtitle]] +[[!template text="But you check, and the author wrote raw HTML." start="00:02:36.640" video="mainVideo" id=subtitle]] +[[!template text="You know, #+HTML: everywhere." start="00:02:41.639" video="mainVideo" id=subtitle]] +[[!template text="That's going to obscure your real content." start="00:02:44.239" video="mainVideo" id=subtitle]] +[[!template text="It's going to be surrounded by all this" start="00:02:49.533" video="mainVideo" id=subtitle]] +[[!template text="styling information. That's unfortunate." start="00:02:51.200" video="mainVideo" id=subtitle]] +[[!template text="The author decides to use an Org macro." start="00:02:54.239" video="mainVideo" id=subtitle]] +[[!template text="All right, a bit better," start="00:02:57.033" video="mainVideo" id=subtitle]] +[[!template text="but then what if you decide," start="00:02:58.959" video="mainVideo" id=subtitle]] +[[!template text="hey I want to make a PDF? Not great." start="00:03:00.333" video="mainVideo" id=subtitle]] +[[!template text="And then the worst of all," start="00:03:04.667" video="mainVideo" id=subtitle]] +[[!template text="the author doesn't give you the source," start="00:03:06.000" video="mainVideo" id=subtitle]] +[[!template text="and then you have to view page source," start="00:03:07.840" video="mainVideo" id=subtitle]] +[[!template text="and learn cascading style sheets," start="00:03:10.159" video="mainVideo" id=subtitle]] +[[!template text="and sit in a corner and cry," start="00:03:14.239" video="mainVideo" id=subtitle]] +[[!template text="and decide to do other things with your life." start="00:03:15.767" video="mainVideo" id=subtitle]] +[[!template text="We want to give you Org users numerous styles" start="00:03:18.080" video="mainVideo" id=subtitle]] +[[!template text="and an extensible mechanism to add more of these" start="00:03:22.640" video="mainVideo" id=subtitle]] +[[!template text="aesthetically pleasing styles," start="00:03:27.200" video="mainVideo" id=subtitle]] +[[!template text="to have really nice things" start="00:03:28.799" video="mainVideo" id=subtitle]] +[[!template text="look one way in the HTML" start="00:03:31.200" video="mainVideo" id=subtitle]] +[[!template text="and look almost the same way in the PDF" start="00:03:33.933" video="mainVideo" id=subtitle]] +[[!template text="and other back ends." start="00:03:36.567" video="mainVideo" id=subtitle]] +[[!template text="And if by having these newer ones," start="00:03:38.667" video="mainVideo" id=subtitle]] +[[!template text="people might be encouraged to try making new ones," start="00:03:41.680" video="mainVideo" id=subtitle]] +[[!template text="especially when the interface is not so difficult," start="00:03:45.519" video="mainVideo" id=subtitle]] +[[!template text="that's the aim." start="00:03:49.040" video="mainVideo" id=subtitle]] +[[!template text="So let's have a real story to motivate this even more." start="00:03:54.159" video="mainVideo" id=subtitle]] +[[!template text="Here's three friends. I hope I don't butcher their names," start="00:03:59.120" video="mainVideo" id=subtitle]] +[[!template text="but these friends are called" start="00:04:03.533" video="mainVideo" id=subtitle]] +[[!template text="Amin, Sacha, and Corwin. They're organizing a conference," start="00:04:04.640" video="mainVideo" id=subtitle]] +[[!template text="EmacsConf 2020." start="00:04:08.720" video="mainVideo" id=subtitle]] +[[!template text="So Sacha decides to write an Org file" start="00:04:12.080" video="mainVideo" id=subtitle]] +[[!template text="and she would like some feedback." start="00:04:14.239" video="mainVideo" id=subtitle]] +[[!template text="Okay. Just to make it clear, there's no..." start="00:04:16.479" video="mainVideo" id=subtitle]] +[[!template text="just how easy this looks," start="00:04:19.840" video="mainVideo" id=subtitle]] +[[!template text="let's look at the source for this block." start="00:04:22.960" video="mainVideo" id=subtitle]] +[[!template text="Notice it's just the word "green," then a colon," start="00:04:27.280" video="mainVideo" id=subtitle]] +[[!template text="then Amin. No div style coloring," start="00:04:30.720" video="mainVideo" id=subtitle]] +[[!template text="just green:Amin." start="00:04:37.333" video="mainVideo" id=subtitle]] +[[!template text="A very pleasant Org markup." start="00:04:38.479" video="mainVideo" id=subtitle]] +[[!template text="So that's quite nice. Put some bold around it." start="00:04:41.520" video="mainVideo" id=subtitle]] +[[!template text="Not too difficult." start="00:04:44.960" video="mainVideo" id=subtitle]] +[[!template text="Hopefully, this will be useful to other people as well." start="00:04:46.433" video="mainVideo" id=subtitle]] +[[!template text="So what kind of feedback" start="00:04:49.900" video="mainVideo" id=subtitle]] +[[!template text="would Sacha expect to get?" start="00:04:52.240" video="mainVideo" id=subtitle]] +[[!template text="Maybe she would expect top-level remarks" start="00:04:55.233" video="mainVideo" id=subtitle]] +[[!template text="visible in the export." start="00:04:59.120" video="mainVideo" id=subtitle]] +[[!template text="When she makes an HTML, she can see right there a big block." start="00:05:00.833" video="mainVideo" id=subtitle]] +[[!template text="Right. Maybe Amin will suggest to Sacha," start="00:05:04.400" video="mainVideo" id=subtitle]] +[[!template text="please replace this part" start="00:05:09.533" video="mainVideo" id=subtitle]] +[[!template text="with this other part" start="00:05:11.120" video="mainVideo" id=subtitle]] +[[!template text="or replace this word" start="00:05:12.267" video="mainVideo" id=subtitle]] +[[!template text="with this other word." start="00:05:13.333" video="mainVideo" id=subtitle]] +[[!template text="This is not really possible" start="00:05:14.639" video="mainVideo" id=subtitle]] +[[!template text="with raw HTML or with even LaTeX." start="00:05:16.960" video="mainVideo" id=subtitle]] +[[!template text="You'd have to have multiple arguments:" start="00:05:21.919" video="mainVideo" id=subtitle]] +[[!template text="the first argument, and then" start="00:05:24.000" video="mainVideo" id=subtitle]] +[[!template text="the replacement argument. It's a bit clunky." start="00:05:25.360" video="mainVideo" id=subtitle]] +[[!template text="But with our setup, you just write some text," start="00:05:28.800" video="mainVideo" id=subtitle]] +[[!template text="write #+replace_with" start="00:05:32.080" video="mainVideo" id=subtitle]] +[[!template text="and then write more text, and you're good to go." start="00:05:34.367" video="mainVideo" id=subtitle]] +[[!template text="Normal Org markup." start="00:05:36.240" video="mainVideo" id=subtitle]] +[[!template text="Everyone speaks different languages." start="00:05:39.440" video="mainVideo" id=subtitle]] +[[!template text="Maybe they want to use one word," start="00:05:40.720" video="mainVideo" id=subtitle]] +[[!template text="or they're arguing about" start="00:05:43.833" video="mainVideo" id=subtitle]] +[[!template text="whether we talk about frames or windows," start="00:05:45.919" video="mainVideo" id=subtitle]] +[[!template text="so maybe they want to have some translations." start="00:05:48.000" video="mainVideo" id=subtitle]] +[[!template text="So there are different kinds of feedback." start="00:05:50.560" video="mainVideo" id=subtitle]] +[[!template text="Let's take an example." start="00:05:53.433" video="mainVideo" id=subtitle]] +[[!template text="Look at what they are." start="00:05:55.360" video="mainVideo" id=subtitle]] +[[!template text="For example, Sacha might write" start="00:05:59.360" video="mainVideo" id=subtitle]] +[[!template text="this Org Mode right here," start="00:06:02.560" video="mainVideo" id=subtitle]] +[[!template text="and then in her HTML exports, you might see this," start="00:06:06.160" video="mainVideo" id=subtitle]] +[[!template text="and her feedback might look really nicely" start="00:06:09.759" video="mainVideo" id=subtitle]] +[[!template text="from anyone who says" start="00:06:12.733" video="mainVideo" id=subtitle]] +[[!template text="let's do some Lisp instead of mathematics." start="00:06:14.560" video="mainVideo" id=subtitle]] +[[!template text="Let's just do some Lisp." start="00:06:17.400" video="mainVideo" id=subtitle]] +[[!template text="Corwin says, let's not be so silly." start="00:06:18.560" video="mainVideo" id=subtitle]] +[[!template text="Let's just say 9 a.m. and move on." start="00:06:22.479" video="mainVideo" id=subtitle]] +[[!template text="Amin likes to export to PDF," start="00:06:28.080" video="mainVideo" id=subtitle]] +[[!template text="and so he writes his top-level remarks using LaTeX." start="00:06:31.360" video="mainVideo" id=subtitle]] +[[!template text="That's how. To get this square" start="00:06:34.333" video="mainVideo" id=subtitle]] +[[!template text="Amin: please change whatever," start="00:06:36.900" video="mainVideo" id=subtitle]] +[[!template text="he might write like this: #+latex:." start="00:06:38.960" video="mainVideo" id=subtitle]] +[[!template text="But then Sacha only exports to HTML, for example," start="00:06:43.120" video="mainVideo" id=subtitle]] +[[!template text="so she doesn't look at the PDF," start="00:06:50.880" video="mainVideo" id=subtitle]] +[[!template text="and she may not see his top-level feedback" start="00:06:54.880" video="mainVideo" id=subtitle]] +[[!template text="with those nice brackets and and bold." start="00:06:57.867" video="mainVideo" id=subtitle]] +[[!template text="She might think everything's good." start="00:07:00.667" video="mainVideo" id=subtitle]] +[[!template text="That can be a bit disastrous." start="00:07:03.120" video="mainVideo" id=subtitle]] +[[!template text="So maybe Sacha will then" start="00:07:06.160" video="mainVideo" id=subtitle]] +[[!template text="make some of her own feedback." start="00:07:08.600" video="mainVideo" id=subtitle]] +[[!template text="To produce it, she might write" start="00:07:13.199" video="mainVideo" id=subtitle]] +[[!template text="HTML commands, #+html: to get that." start="00:07:16.560" video="mainVideo" id=subtitle]] +[[!template text="But then Amin will make a PDF," start="00:07:21.680" video="mainVideo" id=subtitle]] +[[!template text="and this won't stick out." start="00:07:24.100" video="mainVideo" id=subtitle]] +[[!template text="So he might think everything's okay," start="00:07:25.680" video="mainVideo" id=subtitle]] +[[!template text="even though it's not." start="00:07:28.367" video="mainVideo" id=subtitle]] +[[!template text="Then Corwin actually decides," start="00:07:30.160" video="mainVideo" id=subtitle]] +[[!template text=""Hey, let me read the exported result" start="00:07:33.100" video="mainVideo" id=subtitle]] +[[!template text="and there's all those feedback from two people" start="00:07:35.900" video="mainVideo" id=subtitle]] +[[!template text="who haven't read anything, because maybe they were in a rush," start="00:07:38.867" video="mainVideo" id=subtitle]] +[[!template text="and didn't see the top-level feedback." start="00:07:42.633" video="mainVideo" id=subtitle]] +[[!template text="So they agree. "Hey, let's have a uniform Org interface that exports" start="00:07:45.167" video="mainVideo" id=subtitle]] +[[!template text="to both HTML and PDF." start="00:07:50.000" video="mainVideo" id=subtitle]] +[[!template text="Make both of us happy."" start="00:07:52.567" video="mainVideo" id=subtitle]] +[[!template text="Okay. So they decide to use Org special blocks." start="00:07:54.080" video="mainVideo" id=subtitle]] +[[!template text="Right. To set this up," start="00:07:58.160" video="mainVideo" id=subtitle]] +[[!template text="they need to read a little bit of Lisp," start="00:08:01.300" video="mainVideo" id=subtitle]] +[[!template text="hooks, advice, macros to get all of this set up," start="00:08:04.400" video="mainVideo" id=subtitle]] +[[!template text="and then they'll use Org as the main interface." start="00:08:08.879" video="mainVideo" id=subtitle]] +[[!template text="It's a lot of work, but it's worth it, right? maybe?" start="00:08:12.319" video="mainVideo" id=subtitle]] +[[!template text="But then Corwin's a bit terse." start="00:08:16.479" video="mainVideo" id=subtitle]] +[[!template text="Corwin maybe doesn't want to write using blocks." start="00:08:19.759" video="mainVideo" id=subtitle]] +[[!template text="He thinks they're overkill." start="00:08:24.333" video="mainVideo" id=subtitle]] +[[!template text="Sacha wants HTML, and Amin wants PDF, and Corwin wants org-reveal." start="00:08:26.080" video="mainVideo" id=subtitle]] +[[!template text="So now they have to reformat all their code." start="00:08:32.560" video="mainVideo" id=subtitle]] +[[!template text="And then they need to use org link types" start="00:08:35.533" video="mainVideo" id=subtitle]] +[[!template text="to reduce the overkill," start="00:08:36.900" video="mainVideo" id=subtitle]] +[[!template text="so they can try to avoid duplication" start="00:08:38.867" video="mainVideo" id=subtitle]] +[[!template text="by factoring things out into self-contained functions." start="00:08:41.367" video="mainVideo" id=subtitle]] +[[!template text="But now, to set up our links," start="00:08:46.800" video="mainVideo" id=subtitle]] +[[!template text="we'll have to learn a new interface, org setup link." start="00:08:50.320" video="mainVideo" id=subtitle]] +[[!template text="Learn a little bit about fonts, follow links, export handlers..." start="00:08:55.467" video="mainVideo" id=subtitle]] +[[!template text="It's so much. That's so much. But then," start="00:09:02.160" video="mainVideo" id=subtitle]] +[[!template text="the friends, they learn a lot." start="00:09:05.040" video="mainVideo" id=subtitle]] +[[!template text="They learn about defun." start="00:09:06.800" video="mainVideo" id=subtitle]] +[[!template text="So these words are red." start="00:09:08.399" video="mainVideo" id=subtitle]] +[[!template text="You get a little explanation." start="00:09:11.120" video="mainVideo" id=subtitle]] +[[!template text="I think it's a bit too small for anyone to read." start="00:09:12.185" video="mainVideo" id=subtitle]] +[[!template text="This is Lisp documentation for defun." start="00:09:14.320" video="mainVideo" id=subtitle]] +[[!template text="advice-add. There's some Lisp documentation." start="00:09:18.000" video="mainVideo" id=subtitle]] +[[!template text="They learn about destructuring -let." start="00:09:21.600" video="mainVideo" id=subtitle]] +[[!template text="This is from the dash library." start="00:09:23.600" video="mainVideo" id=subtitle]] +[[!template text="Here's all that glorious," start="00:09:25.279" video="mainVideo" id=subtitle]] +[[!template text="glorious documentation with examples." start="00:09:26.959" video="mainVideo" id=subtitle]] +[[!template text="Sorry. I like that." start="00:09:28.800" video="mainVideo" id=subtitle]] +[[!template text="They might make an ad-hoc mechanism" start="00:09:30.300" video="mainVideo" id=subtitle]] +[[!template text="to simulate arguments for special blocks," start="00:09:32.467" video="mainVideo" id=subtitle]] +[[!template text="so something maybe called extract-arguments," start="00:09:35.400" video="mainVideo" id=subtitle]] +[[!template text="and then, of course, to make new link types," start="00:09:38.500" video="mainVideo" id=subtitle]] +[[!template text="they have to learn about" start="00:09:41.533" video="mainVideo" id=subtitle]] +[[!template text="org-link-set-parameters and its numerous bits and pieces." start="00:09:42.480" video="mainVideo" id=subtitle]] +[[!template text="Let's close all these ones down." start="00:09:49.920" video="mainVideo" id=subtitle]] +[[!template text="Of course they also need to be comfortable" start="00:09:53.600" video="mainVideo" id=subtitle]] +[[!template text="with loops and maps and matching and string functions." start="00:09:55.800" video="mainVideo" id=subtitle]] +[[!template text="So it's a bit of a pain." start="00:09:59.920" video="mainVideo" id=subtitle]] +[[!template text="It's probably not worth it." start="00:10:03.360" video="mainVideo" id=subtitle]] +[[!template text="Maybe I'll just rush things quickly," start="00:10:05.839" video="mainVideo" id=subtitle]] +[[!template text="or do it ad-hoc..." start="00:10:07.767" video="mainVideo" id=subtitle]] +[[!template text="We have things to do." start="00:10:10.320" video="mainVideo" id=subtitle]] +[[!template text="But maybe the squad wants to have a modular and unified interface" start="00:10:13.680" video="mainVideo" id=subtitle]] +[[!template text="so everyone's comfortable with defun to define a function" start="00:10:19.367" video="mainVideo" id=subtitle]] +[[!template text="and they say, "It would be nice if we could just define simultaneously" start="00:10:23.700" video="mainVideo" id=subtitle]] +[[!template text="both a block and the link type."" start="00:10:29.440" video="mainVideo" id=subtitle]] +[[!template text="That way, we have a single interface" start="00:10:32.959" video="mainVideo" id=subtitle]] +[[!template text="Org mode, for these things." start="00:10:36.000" video="mainVideo" id=subtitle]] +[[!template text="It would be nice if it was modular." start="00:10:37.867" video="mainVideo" id=subtitle]] +[[!template text="If I defined a one kind of block and you defined another," start="00:10:39.767" video="mainVideo" id=subtitle]] +[[!template text="we could compose them," start="00:10:44.633" video="mainVideo" id=subtitle]] +[[!template text="then get a nice bigger block, like LEGO." start="00:10:45.519" video="mainVideo" id=subtitle]] +[[!template text="That would be nice. Building blocks." start="00:10:49.360" video="mainVideo" id=subtitle]] +[[!template text="This is what we have come up with, called defblock." start="00:10:52.320" video="mainVideo" id=subtitle]] +[[!template text="It also has a long documentation string containing examples and things." start="00:10:56.240" video="mainVideo" id=subtitle]] +[[!template text="So that way, it can try to be useful." start="00:11:01.760" video="mainVideo" id=subtitle]] +[[!template text="Let's look at a solution to these friends' trilemma." start="00:11:04.800" video="mainVideo" id=subtitle]] +[[!template text="So here's a way to define a block." start="00:11:10.880" video="mainVideo" id=subtitle]] +[[!template text="It doesn't look that difficult, but this is how they can define a block" start="00:11:14.320" video="mainVideo" id=subtitle]] +[[!template text="for their top-level feedback." start="00:11:22.320" video="mainVideo" id=subtitle]] +[[!template text="Let's look at the three main parts together." start="00:11:25.920" video="mainVideo" id=subtitle]] +[[!template text="It's not that difficult, I hope." start="00:11:28.959" video="mainVideo" id=subtitle]] +[[!template text="Just six lines, and that's including a documentation string," start="00:11:31.233" video="mainVideo" id=subtitle]] +[[!template text="newlines and things." start="00:11:35.300" video="mainVideo" id=subtitle]] +[[!template text="So in line 1, we define the block just like you define a function." start="00:11:37.633" video="mainVideo" id=subtitle]] +[[!template text="We define a block." start="00:11:43.300" video="mainVideo" id=subtitle]] +[[!template text="The block name is going to be called "feedback."" start="00:11:44.880" video="mainVideo" id=subtitle]] +[[!template text="It has an author, "who."" start="00:11:47.433" video="mainVideo" id=subtitle]] +[[!template text="The author has no default value." start="00:11:49.680" video="mainVideo" id=subtitle]] +[[!template text="It has a color, and the color has a default value of red." start="00:11:54.133" video="mainVideo" id=subtitle]] +[[!template text="So just as when you define functions," start="00:11:57.760" video="mainVideo" id=subtitle]] +[[!template text="you start by define or defblock," start="00:12:01.680" video="mainVideo" id=subtitle]] +[[!template text="then the name, some mandatory argument, and some optional arguments." start="00:12:06.233" video="mainVideo" id=subtitle]] +[[!template text="Then the next stage is definition. Documentation." start="00:12:13.440" video="mainVideo" id=subtitle]] +[[!template text="The people who use this," start="00:12:18.480" video="mainVideo" id=subtitle]] +[[!template text="which are future you or future me," start="00:12:20.133" video="mainVideo" id=subtitle]] +[[!template text="might want to know what this is." start="00:12:22.880" video="mainVideo" id=subtitle]] +[[!template text="So let's get to document this." start="00:12:25.519" video="mainVideo" id=subtitle]] +[[!template text="For Corwin, who might want to use tooltips..." start="00:12:27.839" video="mainVideo" id=subtitle]] +[[!template text="When Corwin writes feedback in Emacs, they'll see a nice little tooltip," start="00:12:32.079" video="mainVideo" id=subtitle]] +[[!template text="and the tooltip will have" start="00:12:37.120" video="mainVideo" id=subtitle]] +[[!template text="this documentation string." start="00:12:38.639" video="mainVideo" id=subtitle]] +[[!template text="That'll be nice." start="00:12:41.279" video="mainVideo" id=subtitle]] +[[!template text="And then here's the third part." start="00:12:43.279" video="mainVideo" id=subtitle]] +[[!template text="The last three lines are not so difficult." start="00:12:45.980" video="mainVideo" id=subtitle]] +[[!template text="If the backend is HTML," start="00:12:48.067" video="mainVideo" id=subtitle]] +[[!template text="please use this template string." start="00:12:52.800" video="mainVideo" id=subtitle]] +[[!template text="Otherwise, use the other string." start="00:12:55.360" video="mainVideo" id=subtitle]] +[[!template text="For each of these string markers," start="00:12:57.440" video="mainVideo" id=subtitle]] +[[!template text="please put in the color, who wrote it, and then the contents" start="00:13:01.279" video="mainVideo" id=subtitle]] +[[!template text="of the special block or the link type." start="00:13:04.959" video="mainVideo" id=subtitle]] +[[!template text="So that's pretty neat. Not so difficult." start="00:13:08.160" video="mainVideo" id=subtitle]] +[[!template text="I thought that was kind of cool," start="00:13:11.600" video="mainVideo" id=subtitle]] +[[!template text="then noticed it's anaphoric." start="00:13:14.639" video="mainVideo" id=subtitle]] +[[!template text="This defblock gives you two new names." start="00:13:16.600" video="mainVideo" id=subtitle]] +[[!template text="It gives you a name called contents," start="00:13:21.033" video="mainVideo" id=subtitle]] +[[!template text="and it gives you a name called backend." start="00:13:23.433" video="mainVideo" id=subtitle]] +[[!template text="So even if you're writing a defblock" start="00:13:26.480" video="mainVideo" id=subtitle]] +[[!template text="and you intend it to be used only for links..." start="00:13:29.733" video="mainVideo" id=subtitle]] +[[!template text="Like these colors, for example." start="00:13:32.560" video="mainVideo" id=subtitle]] +[[!template text="These colors were defined using defblock." start="00:13:35.440" video="mainVideo" id=subtitle]] +[[!template text="I used them as links right here." start="00:13:38.399" video="mainVideo" id=subtitle]] +[[!template text="You don't need to worry" start="00:13:41.279" video="mainVideo" id=subtitle]] +[[!template text="where does the text come from in the link." start="00:13:43.360" video="mainVideo" id=subtitle]] +[[!template text="If I say "red:Bob," is it Bob?" start="00:13:45.300" video="mainVideo" id=subtitle]] +[[!template text="Or if I put a description, is it the description?" start="00:13:48.959" video="mainVideo" id=subtitle]] +[[!template text="So it's whatever is available will" start="00:13:52.000" video="mainVideo" id=subtitle]] +[[!template text="become the value of contents." start="00:13:54.000" video="mainVideo" id=subtitle]] +[[!template text="If you're really interested" start="00:13:56.720" video="mainVideo" id=subtitle]] +[[!template text="and you want to do some intricate stuff," start="00:13:59.199" video="mainVideo" id=subtitle]] +[[!template text="defblock also gives you something called raw-contents," start="00:14:02.433" video="mainVideo" id=subtitle]] +[[!template text="if you really want to touch" start="00:14:06.933" video="mainVideo" id=subtitle]] +[[!template text="the raw contents with all of the Org markups still there." start="00:14:08.633" video="mainVideo" id=subtitle]] +[[!template text="Let's see how everyone can communicate amongst themselves" start="00:14:12.639" video="mainVideo" id=subtitle]] +[[!template text="using this new interface." start="00:14:19.440" video="mainVideo" id=subtitle]] +[[!template text="So, Sacha speculates and she... How does" start="00:14:22.480" video="mainVideo" id=subtitle]] +[[!template text="she speculate for her Org HTML?" start="00:14:26.000" video="mainVideo" id=subtitle]] +[[!template text="She might just write. Hey look at that, no HTML, nice." start="00:14:28.399" video="mainVideo" id=subtitle]] +[[!template text="Amin wants to have some green," start="00:14:34.800" video="mainVideo" id=subtitle]] +[[!template text="and so he just says, hey here's some color green." start="00:14:36.833" video="mainVideo" id=subtitle]] +[[!template text="There you go. It looks almost the same." start="00:14:39.600" video="mainVideo" id=subtitle]] +[[!template text="Notice that the main argument is right here." start="00:14:42.959" video="mainVideo" id=subtitle]] +[[!template text="defblock took an author," start="00:14:48.267" video="mainVideo" id=subtitle]] +[[!template text="and here's the author again." start="00:14:49.680" video="mainVideo" id=subtitle]] +[[!template text="And now the optional argument" start="00:14:51.333" video="mainVideo" id=subtitle]] +[[!template text="uses the org babel source interface" start="00:14:53.920" video="mainVideo" id=subtitle]] +[[!template text="You just say :, then a key, and then the argument. Quite nice." start="00:14:57.007" video="mainVideo" id=subtitle]] +[[!template text="Corwin doesn't want to use blocks. It's a bit of an overkill." start="00:15:02.867" video="mainVideo" id=subtitle]] +[[!template text="He can just write a link." start="00:15:07.920" video="mainVideo" id=subtitle]] +[[!template text="So the main argument is now the label of the link," start="00:15:12.959" video="mainVideo" id=subtitle]] +[[!template text="and the description of the link is the contents of the feedback." start="00:15:17.440" video="mainVideo" id=subtitle]] +[[!template text="So that was quite nice." start="00:15:23.667" video="mainVideo" id=subtitle]] +[[!template text="So it looks like everyone uses the same interface on the left" start="00:15:25.680" video="mainVideo" id=subtitle]] +[[!template text="and can have varying outputs." start="00:15:29.360" video="mainVideo" id=subtitle]] +[[!template text="I think it looks quite nice," start="00:15:32.800" video="mainVideo" id=subtitle]] +[[!template text="and I hope you do too." start="00:15:34.480" video="mainVideo" id=subtitle]] +[[!template text="There's a few more." start="00:15:36.639" video="mainVideo" id=subtitle]] +[[!template text="Maybe, as you saw in some previous ones," start="00:15:38.800" video="mainVideo" id=subtitle]] +[[!template text="we had text side beside side," start="00:15:41.800" video="mainVideo" id=subtitle]] +[[!template text="or we folded some regions away." start="00:15:43.920" video="mainVideo" id=subtitle]] +[[!template text="We put some things in pretty boxes." start="00:15:47.440" video="mainVideo" id=subtitle]] +[[!template text="We had some spoilers at the very beginning that we hid some text." start="00:15:50.959" video="mainVideo" id=subtitle]] +[[!template text="We demoed some texts. Here's some Org and here's what it looks like," start="00:15:57.120" video="mainVideo" id=subtitle]] +[[!template text="and most importantly, they compose." start="00:16:01.680" video="mainVideo" id=subtitle]] +[[!template text="There's a a macro called thread-block." start="00:16:05.199" video="mainVideo" id=subtitle]] +[[!template text="thread-block call, and it lets you thread the contents" start="00:16:12.639" video="mainVideo" id=subtitle]] +[[!template text="through a number of blocks," start="00:16:17.000" video="mainVideo" id=subtitle]] +[[!template text="treating them as if they were functions." start="00:16:18.000" video="mainVideo" id=subtitle]] +[[!template text="So, really, you can think of a block" start="00:16:20.639" video="mainVideo" id=subtitle]] +[[!template text="as a string-valued function." start="00:16:23.680" video="mainVideo" id=subtitle]] +[[!template text="That's pretty neat, I think." start="00:16:25.567" video="mainVideo" id=subtitle]] +[[!template text="Thank you for listening." start="00:16:28.533" video="mainVideo" id=subtitle]] +[[!template text="I hope you've enjoyed this little" start="00:16:31.759" video="mainVideo" id=subtitle]] +[[!template text="happy fun time with the Emacs and friends." start="00:16:34.880" video="mainVideo" id=subtitle]] +[[!template text="I'll happily answer questions right now." start="00:16:38.160" video="mainVideo" id=subtitle]] +[[!template text="Someone says: "Why did you put optional arguments" start="00:16:45.360" video="mainVideo" id=subtitle]] +[[!template text="in a separate list" start="00:16:49.467" video="mainVideo" id=subtitle]] +[[!template text="rather than using cl-style argument lists?"" start="00:16:50.480" video="mainVideo" id=subtitle]] +[[!template text="So that's a very good question," start="00:16:54.560" video="mainVideo" id=subtitle]] +[[!template text="and I will answer that" start="00:16:58.399" video="mainVideo" id=subtitle]] +[[!template text="by showing you a more involved definition of feedback." start="00:17:00.000" video="mainVideo" id=subtitle]] +[[!template text="Let's look at a more involved one right here." start="00:17:05.467" video="mainVideo" id=subtitle]] +[[!template text="So, for example, this one is called rremark." start="00:17:14.567" video="mainVideo" id=subtitle]] +[[!template text="Please let me know if my text is not sufficiently big." start="00:17:19.280" video="mainVideo" id=subtitle]] +[[!template text="Here is why we have two arguments." start="00:17:23.439" video="mainVideo" id=subtitle]] +[[!template text="That takes two arguments instead of one" start="00:17:28.033" video="mainVideo" id=subtitle]] +[[!template text="for its argument list." start="00:17:30.720" video="mainVideo" id=subtitle]] +[[!template text="You have def block," start="00:17:33.360" video="mainVideo" id=subtitle]] +[[!template text="then you have the name," start="00:17:34.799" video="mainVideo" id=subtitle]] +[[!template text="then you have the first argument list" start="00:17:36.000" video="mainVideo" id=subtitle]] +[[!template text="and the second argument list." start="00:17:40.467" video="mainVideo" id=subtitle]] +[[!template text="The first argument list" start="00:17:42.880" video="mainVideo" id=subtitle]] +[[!template text="takes the text right after the begin." start="00:17:46.080" video="mainVideo" id=subtitle]] +[[!template text="The text right after the begin is the main argument." start="00:17:49.280" video="mainVideo" id=subtitle]] +[[!template text="And then the remaining key-value pairs are in the second argument list." start="00:17:53.000" video="mainVideo" id=subtitle]] +[[!template text="Now the reason we have two is because" start="00:18:00.320" video="mainVideo" id=subtitle]] +[[!template text="in order to streamline the interface to account for both special blocks" start="00:18:03.280" video="mainVideo" id=subtitle]] +[[!template text="and Org link types, what we do is we say," start="00:18:08.880" video="mainVideo" id=subtitle]] +[[!template text="in the first argument list, you can give a name to the first argument," start="00:18:13.360" video="mainVideo" id=subtitle]] +[[!template text="give it a default value," start="00:18:18.000" video="mainVideo" id=subtitle]] +[[!template text="and anything else you provide will become part of the link information." start="00:18:19.633" video="mainVideo" id=subtitle]] +[[!template text="For example, this link," start="00:18:28.800" video="mainVideo" id=subtitle]] +[[!template text="we decided to make its face angry red." start="00:18:30.861" video="mainVideo" id=subtitle]] +[[!template text="You might want to give other features to links." start="00:18:32.833" video="mainVideo" id=subtitle]] +[[!template text="So we're trying to streamline the interface" start="00:18:36.433" video="mainVideo" id=subtitle]] +[[!template text="for both special blocks and Org link types," start="00:18:39.100" video="mainVideo" id=subtitle]] +[[!template text="and we thought this way was quite nice." start="00:18:41.733" video="mainVideo" id=subtitle]] +[[!template text="That was the main reason." start="00:18:46.240" video="mainVideo" id=subtitle]] +[[!template text="Someone asks--" start="00:18:47.500" video="mainVideo" id=subtitle]] +[[!template text="if you have follow-ups, please ask--" start="00:18:52.480" video="mainVideo" id=subtitle]] +[[!template text="Someone asks, "Do you intend to try to" start="00:18:55.039" video="mainVideo" id=subtitle]] +[[!template text="upstream this amazing work into Org?"" start="00:18:57.600" video="mainVideo" id=subtitle]] +[[!template text="Well, I'm glad you like it." start="00:19:00.559" video="mainVideo" id=subtitle]] +[[!template text="I don't know how to upstream," start="00:19:02.300" video="mainVideo" id=subtitle]] +[[!template text="but I will look into it," start="00:19:04.559" video="mainVideo" id=subtitle]] +[[!template text="and any advice or guidance would be much appreciated." start="00:19:06.400" video="mainVideo" id=subtitle]] +[[!template text="Lisp is awesome. Just as defun is a macro," start="00:19:11.840" video="mainVideo" id=subtitle]] +[[!template text="defblock is a macro, and then" start="00:19:15.267" video="mainVideo" id=subtitle]] +[[!template text="source blocks are awesome." start="00:19:17.120" video="mainVideo" id=subtitle]] +[[!template text="Now maybe we can have arguments in special blocks," start="00:19:20.240" video="mainVideo" id=subtitle]] +[[!template text="and motivate and encourage more people to learn Lisp." start="00:19:22.467" video="mainVideo" id=subtitle]] +[[!template text="So another person asks," start="00:19:28.799" video="mainVideo" id=subtitle]] +[[!template text=""What is used to produce colorful" start="00:19:32.559" video="mainVideo" id=subtitle]] +[[!template text="boxes around the cursor?"" start="00:19:35.280" video="mainVideo" id=subtitle]] +[[!template text="I'm not quite sure if you're asking..." start="00:19:38.559" video="mainVideo" id=subtitle]] +[[!template text="Are you talking about my cursor right here," start="00:19:40.400" video="mainVideo" id=subtitle]] +[[!template text="or are you talking about in the slide?" start="00:19:42.559" video="mainVideo" id=subtitle]] +[[!template text="So this cursor is some application called Streambrush," start="00:19:48.400" video="mainVideo" id=subtitle]] +[[!template text="that I had to purchase." start="00:19:53.767" video="mainVideo" id=subtitle]] +[[!template text="Unfortunately, I could not find a a suitable free one." start="00:19:55.440" video="mainVideo" id=subtitle]] +[[!template text="The blocks... I can demonstrate some Emacs Lisp." start="00:19:59.039" video="mainVideo" id=subtitle]] +[[!template text="I can open up my Emacs, if people like," start="00:20:03.067" video="mainVideo" id=subtitle]] +[[!template text="and we can try some things out." start="00:20:04.467" video="mainVideo" id=subtitle]] +[[!template text="Happy to do that." start="00:20:06.320" video="mainVideo" id=subtitle]] +[[!template text="You're welcome." start="00:20:09.440" video="mainVideo" id=subtitle]] +[[!template text="Someone asks a side question about org-reveal: "How do you get" start="00:20:10.133" video="mainVideo" id=subtitle]] +[[!template text="bespoke or multiple-column layouts" start="00:20:15.520" video="mainVideo" id=subtitle]] +[[!template text="without using HTML?"" start="00:20:17.440" video="mainVideo" id=subtitle]] +[[!template text="Excellent question. That's what we do." start="00:20:19.120" video="mainVideo" id=subtitle]] +[[!template text="That's what this project is about." start="00:20:22.559" video="mainVideo" id=subtitle]] +[[!template text="So it's not org-reveal," start="00:20:25.533" video="mainVideo" id=subtitle]] +[[!template text="it's our fancy parallel block." start="00:20:27.000" video="mainVideo" id=subtitle]] +[[!template text="So we have this thing. You say, #+begin_parallel." start="00:20:30.267" video="mainVideo" id=subtitle]] +[[!template text="You say how many columns you would like." start="00:20:33.440" video="mainVideo" id=subtitle]] +[[!template text="Do you want a bar or not?" start="00:20:35.679" video="mainVideo" id=subtitle]] +[[!template text="And then you write some text," start="00:20:37.967" video="mainVideo" id=subtitle]] +[[!template text="and then you get some text, and according with the bar or not." start="00:20:39.679" video="mainVideo" id=subtitle]] +[[!template text="That's how we achieve that in our slides." start="00:20:44.400" video="mainVideo" id=subtitle]] +[[!template text="I'm not quite sure where this was." start="00:20:47.520" video="mainVideo" id=subtitle]] +[[!template text="Somewhere here, I think." start="00:20:52.880" video="mainVideo" id=subtitle]] +[[!template text="Let me try to find this for you." start="00:20:59.520" video="mainVideo" id=subtitle]] +[[!template text="I can't seem to find where the parallel blocks were. Apologies." start="00:21:06.240" video="mainVideo" id=subtitle]] +[[!template text="Let's move on to the next question, I suppose." start="00:21:10.433" video="mainVideo" id=subtitle]] +[[!template text="I'm pretty sure they're here. Ah, there they are." start="00:21:15.039" video="mainVideo" id=subtitle]] +[[!template text="So these were just instances of using" start="00:21:18.400" video="mainVideo" id=subtitle]] +[[!template text="the parallel block, and it makes things parallel." start="00:21:22.640" video="mainVideo" id=subtitle]] +[[!template text="So that's quite nice." start="00:21:26.480" video="mainVideo" id=subtitle]] +[[!template text="Another person asks," start="00:21:27.633" video="mainVideo" id=subtitle]] +[[!template text=""How does this relate to pandoc," start="00:21:33.360" video="mainVideo" id=subtitle]] +[[!template text="which is used for converting between markup formats?"" start="00:21:37.840" video="mainVideo" id=subtitle]] +[[!template text="So all we're doing is we're saying," start="00:21:40.960" video="mainVideo" id=subtitle]] +[[!template text="hey, please write Org because Org is just fantastic," start="00:21:43.919" video="mainVideo" id=subtitle]] +[[!template text="and we love it, and it's the dream," start="00:21:47.679" video="mainVideo" id=subtitle]] +[[!template text="and if you would like to view things" start="00:21:49.267" video="mainVideo" id=subtitle]] +[[!template text="in HTML, or in org-reveal, or in PDF," start="00:21:51.760" video="mainVideo" id=subtitle]] +[[!template text="that's up to the user." start="00:21:55.900" video="mainVideo" id=subtitle]] +[[!template text="Made it too small now. So here is an example." start="00:22:02.320" video="mainVideo" id=subtitle]] +[[!template text="Here's how parallel is implemented," start="00:22:06.080" video="mainVideo" id=subtitle]] +[[!template text="just as a quick example, not too long." start="00:22:10.240" video="mainVideo" id=subtitle]] +[[!template text="About half of the implementation is documentation," start="00:22:14.320" video="mainVideo" id=subtitle]] +[[!template text="so, hopefully, that speaks for for how useful this feature is." start="00:22:17.800" video="mainVideo" id=subtitle]] +[[!template text="We decide if there's a rule or not." start="00:22:22.720" video="mainVideo" id=subtitle]] +[[!template text="We look for the column break." start="00:22:25.280" video="mainVideo" id=subtitle]] +[[!template text="Here we're looking at the backend." start="00:22:28.080" video="mainVideo" id=subtitle]] +[[!template text="If the backend is LaTeX," start="00:22:30.600" video="mainVideo" id=subtitle]] +[[!template text="please use this incantation" start="00:22:31.840" video="mainVideo" id=subtitle]] +[[!template text="with multicolumns, minipages, what have you." start="00:22:34.133" video="mainVideo" id=subtitle]] +[[!template text="If the backend is something else, please do this:" start="00:22:37.679" video="mainVideo" id=subtitle]] +[[!template text="div, style and other gibberish that we don't really want to look at." start="00:22:41.600" video="mainVideo" id=subtitle]] +[[!template text="Pandoc works from Org," start="00:22:48.080" video="mainVideo" id=subtitle]] +[[!template text="so it might not work directly," start="00:22:51.760" video="mainVideo" id=subtitle]] +[[!template text="since our interface... The way we set it up is: when you try to export," start="00:22:53.633" video="mainVideo" id=subtitle]] +[[!template text="we hook in and we do a bunch of pre-processing," start="00:22:59.679" video="mainVideo" id=subtitle]] +[[!template text="so this defblock is a string-valued function." start="00:23:03.039" video="mainVideo" id=subtitle]] +[[!template text="Whenever we see these #+begin_parallel when you do an export," start="00:23:07.440" video="mainVideo" id=subtitle]] +[[!template text="I tell Emacs, hold up, look for those #+begin_parallels, please." start="00:23:13.919" video="mainVideo" id=subtitle]] +[[!template text="Oh, you found them? Grab that text." start="00:23:17.767" video="mainVideo" id=subtitle]] +[[!template text="You grabbed it. Great." start="00:23:20.320" video="mainVideo" id=subtitle]] +[[!template text="Now please apply this person's function" start="00:23:21.533" video="mainVideo" id=subtitle]] +[[!template text="onto that text, and splice in the result." start="00:23:24.080" video="mainVideo" id=subtitle]] +[[!template text="So when you export, we're performing" start="00:23:27.120" video="mainVideo" id=subtitle]] +[[!template text="arbitrary computations on your text." start="00:23:30.400" video="mainVideo" id=subtitle]] +[[!template text="Some people might not find that comforting," start="00:23:35.120" video="mainVideo" id=subtitle]] +[[!template text="to have arbitrary computations happening." start="00:23:39.633" video="mainVideo" id=subtitle]] +[[!template text="In this article, there's a few where" start="00:23:43.039" video="mainVideo" id=subtitle]] +[[!template text="we change your text upon export." start="00:23:45.039" video="mainVideo" id=subtitle]] +[[!template text="We translate it, we do other things to it." start="00:23:47.167" video="mainVideo" id=subtitle]] +[[!template text="So someone says, "If you export to LaTeX, to PDF," start="00:23:51.760" video="mainVideo" id=subtitle]] +[[!template text="does that work well with Beamer as well" start="00:23:56.500" video="mainVideo" id=subtitle]] +[[!template text="to create slides with columns?"" start="00:23:58.640" video="mainVideo" id=subtitle]] +[[!template text="I made a bunch of these changes" start="00:24:05.200" video="mainVideo" id=subtitle]] +[[!template text="earlier this morning," start="00:24:08.000" video="mainVideo" id=subtitle]] +[[!template text="and it just says LaTeX right here." start="00:24:09.200" video="mainVideo" id=subtitle]] +[[!template text="So if you want to go to beamer," start="00:24:12.320" video="mainVideo" id=subtitle]] +[[!template text="I think the back end for me," start="00:24:14.400" video="mainVideo" id=subtitle]] +[[!template text="beamer is called, well, beamer," start="00:24:15.360" video="mainVideo" id=subtitle]] +[[!template text="so instead of a pcase, what we would do is, we would say," start="00:24:17.333" video="mainVideo" id=subtitle]] +[[!template text="if it's a 'latex or it's a 'beamer, then use this." start="00:24:22.000" video="mainVideo" id=subtitle]] +[[!template text="Otherwise, it's not a LaTeX," start="00:24:27.167" video="mainVideo" id=subtitle]] +[[!template text="it will simply default to this one," start="00:24:30.267" video="mainVideo" id=subtitle]] +[[!template text="which could be dangerous for your needs." start="00:24:31.867" video="mainVideo" id=subtitle]] +[[!template text="I think it's a bad practice to put a underscore," start="00:24:34.433" video="mainVideo" id=subtitle]] +[[!template text="but I did it really quickly" start="00:24:39.167" video="mainVideo" id=subtitle]] +[[!template text="because I just wanted to show you that it works fine in org-reveal" start="00:24:40.767" video="mainVideo" id=subtitle]] +[[!template text="Contributions are more than welcome." start="00:24:44.500" video="mainVideo" id=subtitle]] +[[!template text="I happily would love any assistance." start="00:24:47.440" video="mainVideo" id=subtitle]] +[[!template text="We have a Lisp reference cheat sheet here" start="00:24:52.240" video="mainVideo" id=subtitle]] +[[!template text="to learn a little bit about Lisp, if you're not comfortable," start="00:24:58.633" video="mainVideo" id=subtitle]] +[[!template text="or to ask some questions." start="00:25:01.000" video="mainVideo" id=subtitle]] +[[!template text="Lots of helpful people." start="00:25:03.267" video="mainVideo" id=subtitle]] +[[!template text="So there's another question that says," start="00:25:06.400" video="mainVideo" id=subtitle]] +[[!template text=""Does typing in a block mess up with syntax highlighting?" start="00:25:09.440" video="mainVideo" id=subtitle]] +[[!template text="Usually, you use a single color inside an" start="00:25:13.120" video="mainVideo" id=subtitle]] +[[!template text="example block, for example." start="00:25:15.679" video="mainVideo" id=subtitle]] +[[!template text="Ah, you found my crutch." start="00:25:17.279" video="mainVideo" id=subtitle]] +[[!template text="Emacs is all encompassing," start="00:25:25.279" video="mainVideo" id=subtitle]] +[[!template text="and I'm not quite sure how fonts work." start="00:25:27.333" video="mainVideo" id=subtitle]] +[[!template text="I learned enough to get by." start="00:25:29.760" video="mainVideo" id=subtitle]] +[[!template text="Here's how links work." start="00:25:37.440" video="mainVideo" id=subtitle]] +[[!template text="They're a bit complicated." start="00:25:38.667" video="mainVideo" id=subtitle]] +[[!template text="This is a bit scary." start="00:25:40.799" video="mainVideo" id=subtitle]] +[[!template text="I don't recommend anyone read it." start="00:25:42.567" video="mainVideo" id=subtitle]] +[[!template text="Actually, let me open up an email" start="00:25:47.039" video="mainVideo" id=subtitle]] +[[!template text="and you can see what I see." start="00:25:50.559" video="mainVideo" id=subtitle]] +[[!template text="So here's an Emacs." start="00:25:52.100" video="mainVideo" id=subtitle]] +[[!template text="Let's make that a bit bigger." start="00:25:54.799" video="mainVideo" id=subtitle]] +[[!template text="Let's change this slightly." start="00:25:56.799" video="mainVideo" id=subtitle]] +[[!template text="Nope, that's worse. There you go." start="00:25:59.133" video="mainVideo" id=subtitle]] +[[!template text="Here's some words. Here's red hello." start="00:26:01.919" video="mainVideo" id=subtitle]] +[[!template text="But you're worried about preserving fontification." start="00:26:09.360" video="mainVideo" id=subtitle]] +[[!template text="Let's make an emacs-lisp block." start="00:26:15.679" video="mainVideo" id=subtitle]] +[[!template text="Let's say, (+ 1 2)." start="00:26:18.880" video="mainVideo" id=subtitle]] +[[!template text="Ah, where's the fun? Hello. Bye." start="00:26:22.840" video="mainVideo" id=subtitle]] +[[!template text="Okay. Where's the coloring?" start="00:26:31.133" video="mainVideo" id=subtitle]] +[[!template text="If we zoom in on this #+begin_src block," start="00:26:32.080" video="mainVideo" id=subtitle]] +[[!template text="you can see down here" start="00:26:36.000" video="mainVideo" id=subtitle]] +[[!template text="we have our our coloring" start="00:26:39.200" video="mainVideo" id=subtitle]] +[[!template text="when we zoom in." start="00:26:42.159" video="mainVideo" id=subtitle]] +[[!template text="If we zoom out, no coloring." start="00:26:43.279" video="mainVideo" id=subtitle]] +[[!template text="Zoom in, coloring. Zoom out, aah, no coloring." start="00:26:46.960" video="mainVideo" id=subtitle]] +[[!template text="Let's take off these bad boys, and oh, look, my coloring's back." start="00:26:50.880" video="mainVideo" id=subtitle]] +[[!template text="In a previous iteration of the system, I was able to maintain coloring." start="00:26:55.679" video="mainVideo" id=subtitle]] +[[!template text="In this new iteration, I am not." start="00:27:03.760" video="mainVideo" id=subtitle]] +[[!template text="I don't know how to do it." start="00:27:06.400" video="mainVideo" id=subtitle]] +[[!template text="I haven't had the time to implement it." start="00:27:07.400" video="mainVideo" id=subtitle]] +[[!template text="I spent a lot of time writing this 48-page documentation" start="00:27:10.333" video="mainVideo" id=subtitle]] +[[!template text="with some fun examples to try to help people learn." start="00:27:17.279" video="mainVideo" id=subtitle]] +[[!template text="But I would appreciate any help or guidance" start="00:27:21.133" video="mainVideo" id=subtitle]] +[[!template text="on how to maintain the fontification." start="00:27:23.200" video="mainVideo" id=subtitle]] +[[!template text="I really would like to keep those colors in." start="00:27:26.240" video="mainVideo" id=subtitle]] +[[!template text="Amin: Musa, we have time for maybe one more question," start="00:27:29.200" video="mainVideo" id=subtitle]] +[[!template text="one or two more questions," start="00:27:32.640" video="mainVideo" id=subtitle]] +[[!template text="and then we have to move on to the next talk." start="00:27:34.500" video="mainVideo" id=subtitle]] +[[!template text="You're more than welcome to" start="00:27:37.039" video="mainVideo" id=subtitle]] +[[!template text="continue taking the questions via IRC or the pad." start="00:27:39.120" video="mainVideo" id=subtitle]] +[[!template text="Musa: Okay. Thank you." start="00:27:42.559" video="mainVideo" id=subtitle]] +[[!template text="The final question we'll take is," start="00:27:45.760" video="mainVideo" id=subtitle]] +[[!template text=""Should packages implement" start="00:27:48.880" video="mainVideo" id=subtitle]] +[[!template text="interface to one specific format," start="00:27:52.320" video="mainVideo" id=subtitle]] +[[!template text="or attempt to be inclusive" start="00:27:53.967" video="mainVideo" id=subtitle]] +[[!template text="to all the potential output targets?"" start="00:27:55.600" video="mainVideo" id=subtitle]] +[[!template text="I think you should just make them as you go," start="00:27:57.279" video="mainVideo" id=subtitle]] +[[!template text="and add them as you need them." start="00:27:59.300" video="mainVideo" id=subtitle]] +[[!template text="We'll make Github requests for things." start="00:28:01.500" video="mainVideo" id=subtitle]] +[[!template text="We can share recipes in this document," start="00:28:05.600" video="mainVideo" id=subtitle]] +[[!template text="and then try to add other techniques," start="00:28:08.533" video="mainVideo" id=subtitle]] +[[!template text="and then we can use these blocks as a common interface" start="00:28:12.333" video="mainVideo" id=subtitle]] +[[!template text="for exporting to PDF and other things." start="00:28:19.200" video="mainVideo" id=subtitle]] +[[!template text="Since someone asked," start="00:28:22.240" video="mainVideo" id=subtitle]] +[[!template text="here what a PDF looks like." start="00:28:26.000" video="mainVideo" id=subtitle]] +[[!template text="This is the same PDF rendered." start="00:28:28.033" video="mainVideo" id=subtitle]] +[[!template text="I made no effort to make it look good," start="00:28:31.667" video="mainVideo" id=subtitle]] +[[!template text="but it surprisingly does look good." start="00:28:34.960" video="mainVideo" id=subtitle]] +[[!template text="That was nice." start="00:28:38.559" video="mainVideo" id=subtitle]] +[[!template text="That was a terrible magenta, but that is life." start="00:28:40.067" video="mainVideo" id=subtitle]] +[[!template text="Anyhow, I hope you all enjoyed this talk." start="00:28:44.320" video="mainVideo" id=subtitle]] +[[!template text="I hope you will find defblock useful to you." start="00:28:47.100" video="mainVideo" id=subtitle]] +[[!template text="It is available on MELPA." start="00:28:51.033" video="mainVideo" id=subtitle]] +[[!template text="In a rush to make it available for EmacsConf 2020," start="00:28:52.799" video="mainVideo" id=subtitle]] +[[!template text="some MELPA guidelines may not have been adhered to." start="00:28:56.367" video="mainVideo" id=subtitle]] +[[!template text="Please do not hit me." start="00:29:00.159" video="mainVideo" id=subtitle]] +[[!template text="I hope everyone enjoys the rest of the EmacsConf 2020. Thank you!" start="00:29:01.600" video="mainVideo" id=subtitle]] diff --git a/2020/subtitles/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy-autogen.vtt b/2020/subtitles/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy-autogen.vtt deleted file mode 100644 index b1831710..00000000 --- a/2020/subtitles/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy-autogen.vtt +++ /dev/null @@ -1,2386 +0,0 @@ -WEBVTT - -00:00:01.680 --> 00:00:04.080 -oh you are now muted - -00:00:04.080 --> 00:00:07.359 -all right then well uh hello everyone - -00:00:07.359 --> 00:00:09.840 -I hope uh you're all enjoying the Emacs - -00:00:09.840 --> 00:00:11.519 -conf - -00:00:11.519 --> 00:00:14.480 -my name is musa alhassi and I hope - -00:00:14.480 --> 00:00:15.040 -you're - -00:00:15.040 --> 00:00:17.920 -excited to learn about uh powering up - -00:00:17.920 --> 00:00:19.840 -special blocks - -00:00:19.840 --> 00:00:22.880 -um so let's let's first off uh find out - -00:00:22.880 --> 00:00:24.800 -what these special blocks are and - -00:00:24.800 --> 00:00:27.920 -and see what we can uh go from so - -00:00:27.920 --> 00:00:30.240 -uh yesterday I saw a lot of cool talks - -00:00:30.240 --> 00:00:32.719 -and uh people were chatting about how do - -00:00:32.719 --> 00:00:33.200 -you - -00:00:33.200 --> 00:00:35.520 -I know how should you present should you - -00:00:35.520 --> 00:00:37.200 -do it this way or that way and - -00:00:37.200 --> 00:00:38.640 -I thought maybe I should try a different - -00:00:38.640 --> 00:00:41.120 -way uh but but I'm talking about special - -00:00:41.120 --> 00:00:42.239 -blocks and if I - -00:00:42.239 --> 00:00:45.039 -show you an emax then I have to export - -00:00:45.039 --> 00:00:47.039 -the html so you can see what it looks - -00:00:47.039 --> 00:00:47.840 -like - -00:00:47.840 --> 00:00:50.800 -or export to a pdf so you can see what - -00:00:50.800 --> 00:00:51.920 -it looks like - -00:00:51.920 --> 00:00:54.239 -uh so I ended up writing an org reveal - -00:00:54.239 --> 00:00:56.399 -and - -00:00:56.399 --> 00:00:58.960 -joyously this this just works you can - -00:00:58.960 --> 00:01:00.879 -you can just see things here - -00:01:00.879 --> 00:01:02.960 -uh I was worried that I'd have to take - -00:01:02.960 --> 00:01:04.559 -pictures and then you know - -00:01:04.559 --> 00:01:07.600 -uh uh you know insert pings so that that - -00:01:07.600 --> 00:01:09.760 -was a delight - -00:01:09.760 --> 00:01:12.159 -okay uh so special blocks are these - -00:01:12.159 --> 00:01:12.960 -things like - -00:01:12.960 --> 00:01:16.000 -a center small quote uh that's what a - -00:01:16.000 --> 00:01:17.280 -special block is - -00:01:17.280 --> 00:01:19.360 -and with a bit of lisp we can we can - -00:01:19.360 --> 00:01:20.720 -make special blocks - -00:01:20.720 --> 00:01:23.200 -and link types right so uh using a - -00:01:23.200 --> 00:01:24.799 -single interface - -00:01:24.799 --> 00:01:26.720 -um and the interface is going to be - -00:01:26.720 --> 00:01:27.840 -similar to one - -00:01:27.840 --> 00:01:29.439 -many people are familiar with in - -00:01:29.439 --> 00:01:32.560 -particular org babel's - -00:01:32.560 --> 00:01:35.840 -source interface as well as using global - -00:01:35.840 --> 00:01:37.840 -header arguments for link types - -00:01:37.840 --> 00:01:39.680 -and the idea is to write it once and - -00:01:39.680 --> 00:01:41.200 -generate many different kinds - -00:01:41.200 --> 00:01:44.159 -right you write uh an org markup and you - -00:01:44.159 --> 00:01:44.720 -can have - -00:01:44.720 --> 00:01:47.680 -uh html you can have pdf and and - -00:01:47.680 --> 00:01:48.560 -joyously - -00:01:48.560 --> 00:01:51.840 -uh org reveal so that was uh that was an - -00:01:51.840 --> 00:01:53.600 -unexpected delight - -00:01:53.600 --> 00:01:56.640 -um so here is a few that you'll you'll - -00:01:56.640 --> 00:01:57.840 -just see as we - -00:01:57.840 --> 00:02:01.759 -uh in this presentation you know some uh - -00:02:01.759 --> 00:02:04.000 -uh I won't show some of these uh link - -00:02:04.000 --> 00:02:05.040 -only ones - -00:02:05.040 --> 00:02:06.799 -but we'll see a few of these other ones - -00:02:06.799 --> 00:02:08.080 -just to make the uh - -00:02:08.080 --> 00:02:09.920 -presentation look nice so the - -00:02:09.920 --> 00:02:11.520 -presentation is really going to - -00:02:11.520 --> 00:02:14.000 -present these blocks and the mechanism - -00:02:14.000 --> 00:02:15.120 -at the same time - -00:02:15.120 --> 00:02:18.400 -so uh so this no no html was written - -00:02:18.400 --> 00:02:21.280 -look ma no html just pure org mode and - -00:02:21.280 --> 00:02:22.000 -and - -00:02:22.000 --> 00:02:23.520 -you get all these beautiful boxes and - -00:02:23.520 --> 00:02:25.840 -things okay - -00:02:25.840 --> 00:02:27.680 -so the motivation for this is you know - -00:02:27.680 --> 00:02:29.120 -what uh - -00:02:29.120 --> 00:02:31.200 -you're you're online you run into a blog - -00:02:31.200 --> 00:02:32.239 -and you see something you like and - -00:02:32.239 --> 00:02:33.120 -you're like man - -00:02:33.120 --> 00:02:35.280 -you know I wish I could uh you know - -00:02:35.280 --> 00:02:36.640 -produce that - -00:02:36.640 --> 00:02:39.519 -um uh but you you check in the author - -00:02:39.519 --> 00:02:40.160 -wrote raw - -00:02:40.160 --> 00:02:44.239 -html you know plus html everywhere - -00:02:44.239 --> 00:02:46.800 -and uh that's that's you know gonna - -00:02:46.800 --> 00:02:47.840 -obscure - -00:02:47.840 --> 00:02:49.680 -your your real content it's going to be - -00:02:49.680 --> 00:02:51.200 -surrounded by all this uh - -00:02:51.200 --> 00:02:54.239 -styling information that's unfortunate - -00:02:54.239 --> 00:02:56.400 -uh the author decides to use an org - -00:02:56.400 --> 00:02:58.959 -macro all right a bit better - -00:02:58.959 --> 00:03:01.120 -but then what if you decide hey I want - -00:03:01.120 --> 00:03:03.360 -to make a - -00:03:03.360 --> 00:03:06.000 -not pdf great and then the worst of all - -00:03:06.000 --> 00:03:07.840 -the author doesn't give you the source - -00:03:07.840 --> 00:03:10.159 -and then you have to view page source - -00:03:10.159 --> 00:03:10.879 -and - -00:03:10.879 --> 00:03:13.760 -learn cascading style sheets and and you - -00:03:13.760 --> 00:03:14.239 -know - -00:03:14.239 --> 00:03:16.159 -sit in a corner and cry decide to do - -00:03:16.159 --> 00:03:18.080 -other things with your life - -00:03:18.080 --> 00:03:20.959 -so uh we want to give you org users - -00:03:20.959 --> 00:03:22.640 -numerous styles - -00:03:22.640 --> 00:03:26.000 -and uh and an extensible mechanism to - -00:03:26.000 --> 00:03:27.200 -add more of these - -00:03:27.200 --> 00:03:28.799 -aesthetically pleasing styles you know - -00:03:28.799 --> 00:03:31.200 -to have really nice things - -00:03:31.200 --> 00:03:34.720 -look one way in the html and look almost - -00:03:34.720 --> 00:03:35.599 -the same way - -00:03:35.599 --> 00:03:39.120 -in the pdf and other uh back ends and - -00:03:39.120 --> 00:03:41.680 -if by having these newer ones you know - -00:03:41.680 --> 00:03:42.159 -people - -00:03:42.159 --> 00:03:44.879 -might be encouraged to try making new - -00:03:44.879 --> 00:03:45.519 -ones - -00:03:45.519 --> 00:03:47.920 -especially when the interface is uh not - -00:03:47.920 --> 00:03:49.040 -so difficult - -00:03:49.040 --> 00:03:54.159 -uh that's the that's the aim okay - -00:03:54.159 --> 00:03:57.360 -uh so let's let's have a a real story to - -00:03:57.360 --> 00:03:59.120 -motivate this even more - -00:03:59.120 --> 00:04:02.319 -um so here's three friends uh I hope I - -00:04:02.319 --> 00:04:03.599 -don't butcher their names but these - -00:04:03.599 --> 00:04:04.640 -friends are called - -00:04:04.640 --> 00:04:07.040 -amin sasha and corwin and then they're - -00:04:07.040 --> 00:04:08.720 -organizing a conference - -00:04:08.720 --> 00:04:12.080 -uh EmacsConf 2020. - -00:04:12.080 --> 00:04:14.239 -so sasha decides to write an org file - -00:04:14.239 --> 00:04:16.479 -and and she would like some feedback - -00:04:16.479 --> 00:04:19.199 -okay and and just uh make it clear - -00:04:19.199 --> 00:04:19.840 -there's no - -00:04:19.840 --> 00:04:22.960 -uh just how easy this looks - -00:04:22.960 --> 00:04:27.280 -let's look at the source for this block - -00:04:27.280 --> 00:04:30.000 -notice it's just the word green then a - -00:04:30.000 --> 00:04:30.720 -colon - -00:04:30.720 --> 00:04:34.560 -than amine uh so no - -00:04:34.560 --> 00:04:37.759 -no div style coloring just just you know - -00:04:37.759 --> 00:04:38.479 -green color - -00:04:38.479 --> 00:04:41.520 -immune a very pleasant uh or markup - -00:04:41.520 --> 00:04:43.600 -so that's that's quite nice put some - -00:04:43.600 --> 00:04:44.960 -bold around it - -00:04:44.960 --> 00:04:47.840 -not not too difficult so hopefully uh - -00:04:47.840 --> 00:04:49.040 -this will be useful to - -00:04:49.040 --> 00:04:51.680 -other people as well so what kind of - -00:04:51.680 --> 00:04:52.240 -feedback - -00:04:52.240 --> 00:04:56.639 -uh would sasha expect to get um so maybe - -00:04:56.639 --> 00:04:59.120 -she would expect top level remarks - -00:04:59.120 --> 00:04:59.680 -visible - -00:04:59.680 --> 00:05:01.759 -in the export you know when she makes an - -00:05:01.759 --> 00:05:04.400 -html she can see right there a big block - -00:05:04.400 --> 00:05:07.840 -right maybe - -00:05:07.840 --> 00:05:09.840 -amin will suggest to sasha please - -00:05:09.840 --> 00:05:11.120 -replace this part - -00:05:11.120 --> 00:05:12.960 -with this other part or replace this - -00:05:12.960 --> 00:05:14.639 -word with this other word - -00:05:14.639 --> 00:05:16.960 -right um this is not really possible - -00:05:16.960 --> 00:05:17.680 -with raw - -00:05:17.680 --> 00:05:21.919 -html or uh yeah or with even latex - -00:05:21.919 --> 00:05:24.000 -you'd have to have multiple arguments - -00:05:24.000 --> 00:05:25.360 -the first argument and then - -00:05:25.360 --> 00:05:27.840 -the replacement argument and it's a bit - -00:05:27.840 --> 00:05:28.800 -clunky - -00:05:28.800 --> 00:05:30.960 -um but with our setup you just write - -00:05:30.960 --> 00:05:32.080 -some text - -00:05:32.080 --> 00:05:34.479 -write hashtag plus replace with and then - -00:05:34.479 --> 00:05:36.240 -write more text and you're good to go - -00:05:36.240 --> 00:05:39.440 -normal uh org markup um - -00:05:39.440 --> 00:05:40.720 -everyone speaks different languages - -00:05:40.720 --> 00:05:42.479 -maybe they want to use a - -00:05:42.479 --> 00:05:45.919 -uh one word or they're arguing about - -00:05:45.919 --> 00:05:48.000 -whether we talk about frames or windows - -00:05:48.000 --> 00:05:49.759 -um so maybe they want to have some - -00:05:49.759 --> 00:05:50.560 -translations - -00:05:50.560 --> 00:05:52.479 -right so there's different kinds of - -00:05:52.479 --> 00:05:55.360 -feedbacks uh let's let's take an example - -00:05:55.360 --> 00:05:59.360 -uh look at what they are okay - -00:05:59.360 --> 00:06:02.560 -uh so for example sasha might write - -00:06:02.560 --> 00:06:06.160 -uh this org mode right here and uh - -00:06:06.160 --> 00:06:08.319 -and then in her html exports you might - -00:06:08.319 --> 00:06:09.759 -see this - -00:06:09.759 --> 00:06:12.080 -and uh her feedback might look really - -00:06:12.080 --> 00:06:13.840 -nicely from anyone who says you know - -00:06:13.840 --> 00:06:14.560 -let's uh - -00:06:14.560 --> 00:06:16.639 -let's do some lisp instead of uh - -00:06:16.639 --> 00:06:18.560 -mathematics let's just do some list - -00:06:18.560 --> 00:06:20.960 -and and corwin says you know let's let's - -00:06:20.960 --> 00:06:22.479 -not be so silly - -00:06:22.479 --> 00:06:25.120 -maybe let's just say 9 a.m and move on - -00:06:25.120 --> 00:06:28.080 -okay - -00:06:28.080 --> 00:06:31.360 -um so amin likes to export to pdf - -00:06:31.360 --> 00:06:33.039 -and so he writes his top-level remarks - -00:06:33.039 --> 00:06:34.720 -using latex that's how - -00:06:34.720 --> 00:06:37.600 -so to get this uh square I mean please - -00:06:37.600 --> 00:06:38.960 -change whatever - -00:06:38.960 --> 00:06:41.440 -he might write like this hashtag you - -00:06:41.440 --> 00:06:43.120 -know plus latex - -00:06:43.120 --> 00:06:46.960 -hashtag plus latex right but then - -00:06:46.960 --> 00:06:50.000 -sasha only exports to p to html uh for - -00:06:50.000 --> 00:06:50.880 -example - -00:06:50.880 --> 00:06:54.880 -um and uh so she doesn't look at the pdf - -00:06:54.880 --> 00:06:57.199 -and she may not see his top-level - -00:06:57.199 --> 00:06:58.560 -feedback you know with those nice - -00:06:58.560 --> 00:06:59.440 -brackets and - -00:06:59.440 --> 00:07:02.160 -and bold right and so she might think - -00:07:02.160 --> 00:07:03.120 -everything's good - -00:07:03.120 --> 00:07:06.160 -right and that can be a bit disastrous - -00:07:06.160 --> 00:07:09.039 -um so maybe sasha will will then uh make - -00:07:09.039 --> 00:07:09.440 -some - -00:07:09.440 --> 00:07:13.199 -of her own feedback all right uh but - -00:07:13.199 --> 00:07:16.160 -and to produce it she might write html - -00:07:16.160 --> 00:07:16.560 -uh - -00:07:16.560 --> 00:07:20.639 -um html commands hashtag plus html to - -00:07:20.639 --> 00:07:21.680 -get that - -00:07:21.680 --> 00:07:24.240 -uh but then amin will make a pdf and - -00:07:24.240 --> 00:07:25.680 -this won't stick out - -00:07:25.680 --> 00:07:27.759 -and then so he might think everything's - -00:07:27.759 --> 00:07:30.160 -okay even even though it's not - -00:07:30.160 --> 00:07:33.520 -um then corwin actually decides hey - -00:07:33.520 --> 00:07:36.240 -uh let me read the exported result and - -00:07:36.240 --> 00:07:36.800 -these - -00:07:36.800 --> 00:07:38.319 -there's all those feedback from two - -00:07:38.319 --> 00:07:39.919 -people who haven't uh - -00:07:39.919 --> 00:07:42.080 -read anything because maybe they were in - -00:07:42.080 --> 00:07:43.840 -a russian and didn't - -00:07:43.840 --> 00:07:46.400 -see the top level feedback and so they - -00:07:46.400 --> 00:07:48.160 -agree hey let's have a uniform org - -00:07:48.160 --> 00:07:50.000 -interface that exports - -00:07:50.000 --> 00:07:53.280 -to both html and pdf make both of us - -00:07:53.280 --> 00:07:54.080 -happy - -00:07:54.080 --> 00:07:57.280 -okay so they decide to use org special - -00:07:57.280 --> 00:07:58.160 -blocks - -00:07:58.160 --> 00:08:01.840 -right um and to set this up they need to - -00:08:01.840 --> 00:08:04.400 -you know maybe read a little bit of lisp - -00:08:04.400 --> 00:08:04.879 -hooks - -00:08:04.879 --> 00:08:08.879 -advice macros to get all of this set up - -00:08:08.879 --> 00:08:10.840 -and then they'll use org as the main - -00:08:10.840 --> 00:08:12.319 -interface okay - -00:08:12.319 --> 00:08:14.400 -it's a lot of work but it's worth it - -00:08:14.400 --> 00:08:16.479 -right maybe - -00:08:16.479 --> 00:08:19.360 -um but then corwin corbin's a bit tears - -00:08:19.360 --> 00:08:19.759 -so - -00:08:19.759 --> 00:08:22.960 -uh corwin maybe doesn't want to write - -00:08:22.960 --> 00:08:24.800 -uh using blocks he thinks they're - -00:08:24.800 --> 00:08:26.080 -overkill and - -00:08:26.080 --> 00:08:29.360 -and sasha wants html and uh and - -00:08:29.360 --> 00:08:31.840 -I mean wants pdf and corwin wants org - -00:08:31.840 --> 00:08:32.560 -reveal - -00:08:32.560 --> 00:08:34.240 -so now they have to reformat all their - -00:08:34.240 --> 00:08:36.320 -code and then they need to use org link - -00:08:36.320 --> 00:08:37.120 -types to - -00:08:37.120 --> 00:08:39.599 -reduce the overkill all right so they - -00:08:39.599 --> 00:08:41.519 -can try to avoid duplication by - -00:08:41.519 --> 00:08:44.000 -factoring things out into self-contained - -00:08:44.000 --> 00:08:46.800 -uh defined functions or defunds - -00:08:46.800 --> 00:08:50.320 -um but now to set up or links - -00:08:50.320 --> 00:08:53.440 -uh we'll have uh to learn a new - -00:08:53.440 --> 00:08:54.399 -interface - -00:08:54.399 --> 00:08:57.040 -org setup link um learn a little bit - -00:08:57.040 --> 00:08:58.000 -about fonts - -00:08:58.000 --> 00:09:02.160 -follow links exports handles - -00:09:02.160 --> 00:09:05.040 -it's so much that's so much but but then - -00:09:05.040 --> 00:09:06.800 -you know the friends they learn a lot - -00:09:06.800 --> 00:09:08.399 -you know they learn about defund all - -00:09:08.399 --> 00:09:11.120 -right so these these words are red - -00:09:11.120 --> 00:09:12.480 -you get a little explanation I think - -00:09:12.480 --> 00:09:14.320 -it's a bit too small for anyone to read - -00:09:14.320 --> 00:09:16.720 -this is lisp documentation right for - -00:09:16.720 --> 00:09:18.000 -defund - -00:09:18.000 --> 00:09:19.680 -advice ad there's some list - -00:09:19.680 --> 00:09:21.600 -documentation right - -00:09:21.600 --> 00:09:23.600 -they learn about destructuring let's so - -00:09:23.600 --> 00:09:25.279 -this is from the dash library - -00:09:25.279 --> 00:09:26.959 -here's all that you know glorious - -00:09:26.959 --> 00:09:28.800 -glorious documentation with examples - -00:09:28.800 --> 00:09:29.360 -sorry - -00:09:29.360 --> 00:09:31.680 -I like that they might make an ad-hoc - -00:09:31.680 --> 00:09:33.760 -mechanism to simulate - -00:09:33.760 --> 00:09:36.000 -arguments for special blocks so - -00:09:36.000 --> 00:09:37.040 -something maybe called - -00:09:37.040 --> 00:09:40.399 -extract arguments and then of course to - -00:09:40.399 --> 00:09:41.920 -make new link types they have to learn - -00:09:41.920 --> 00:09:42.480 -about - -00:09:42.480 --> 00:09:45.120 -org link set parameters and then it's - -00:09:45.120 --> 00:09:46.480 -numerous uh - -00:09:46.480 --> 00:09:49.920 -bits and pieces all right so let's oh - -00:09:49.920 --> 00:09:50.720 -let's uh - -00:09:50.720 --> 00:09:53.600 -close all these ones down and and uh of - -00:09:53.600 --> 00:09:55.040 -course they also need to be uh - -00:09:55.040 --> 00:09:56.080 -comfortable with - -00:09:56.080 --> 00:09:58.720 -uh loops and maps and matching and - -00:09:58.720 --> 00:09:59.920 -string functions - -00:09:59.920 --> 00:10:02.560 -so it's it's a bit of a pain it's a bit - -00:10:02.560 --> 00:10:03.360 -of a pain - -00:10:03.360 --> 00:10:05.839 -um so it's probably not worth it so - -00:10:05.839 --> 00:10:06.560 -maybe I'll just - -00:10:06.560 --> 00:10:09.360 -rush things quickly or do an ad hoc you - -00:10:09.360 --> 00:10:10.320 -know - -00:10:10.320 --> 00:10:13.680 -we have things to do right - -00:10:13.680 --> 00:10:15.920 -so maybe maybe the squad wants to have a - -00:10:15.920 --> 00:10:17.839 -modular - -00:10:17.839 --> 00:10:21.120 -and unified interface so everyone's - -00:10:21.120 --> 00:10:23.040 -comfortable with defunct to define a - -00:10:23.040 --> 00:10:25.279 -function and they say you know what - -00:10:25.279 --> 00:10:26.480 -it would be nice if we could just you - -00:10:26.480 --> 00:10:29.440 -know define simultaneously - -00:10:29.440 --> 00:10:32.959 -both a block and the link type right - -00:10:32.959 --> 00:10:34.880 -and uh that way we have a single - -00:10:34.880 --> 00:10:36.000 -interface - -00:10:36.000 --> 00:10:38.240 -org mode for for these things and it - -00:10:38.240 --> 00:10:39.040 -would be nice was - -00:10:39.040 --> 00:10:42.079 -modular so if I defined a - -00:10:42.079 --> 00:10:43.680 -one kind of block and you defined - -00:10:43.680 --> 00:10:45.519 -another we could compose them - -00:10:45.519 --> 00:10:47.600 -right and then get a you know a nice - -00:10:47.600 --> 00:10:49.360 -bigger block like lego - -00:10:49.360 --> 00:10:52.320 -that would be nice building box okay and - -00:10:52.320 --> 00:10:54.160 -uh this is uh what we - -00:10:54.160 --> 00:10:56.240 -have come up with called death block and - -00:10:56.240 --> 00:10:57.600 -it also has a - -00:10:57.600 --> 00:11:00.240 -long documentation string containing - -00:11:00.240 --> 00:11:01.760 -examples and things - -00:11:01.760 --> 00:11:04.800 -so that way you can try to be useful - -00:11:04.800 --> 00:11:08.320 -okay um so let's let's look at a a - -00:11:08.320 --> 00:11:10.880 -solution to these friends uh trilemma - -00:11:10.880 --> 00:11:12.800 -all right so here's here's a way to - -00:11:12.800 --> 00:11:14.320 -define a block - -00:11:14.320 --> 00:11:17.040 -um it looks it's it doesn't look that - -00:11:17.040 --> 00:11:19.200 -difficult but this is how they can - -00:11:19.200 --> 00:11:22.320 -define a block for um - -00:11:22.320 --> 00:11:25.920 -for uh their top-level feedback right - -00:11:25.920 --> 00:11:27.680 -so let's let's look at the three main - -00:11:27.680 --> 00:11:28.959 -parts together - -00:11:28.959 --> 00:11:31.920 -it's not that uh difficult I hope just - -00:11:31.920 --> 00:11:33.040 -six lines - -00:11:33.040 --> 00:11:34.720 -and that's including a documentation - -00:11:34.720 --> 00:11:36.160 -string and you know - -00:11:36.160 --> 00:11:39.440 -uh new lines and things okay so in line - -00:11:39.440 --> 00:11:41.279 -one we just define the block just like - -00:11:41.279 --> 00:11:42.000 -you define - -00:11:42.000 --> 00:11:44.880 -a function we define a block the flag - -00:11:44.880 --> 00:11:46.399 -the block name is going to be called - -00:11:46.399 --> 00:11:49.680 -feedback it has an author who - -00:11:49.680 --> 00:11:53.360 -right the author has no default - -00:11:53.360 --> 00:11:56.160 -value it has a color and the color has a - -00:11:56.160 --> 00:11:57.760 -default value of red - -00:11:57.760 --> 00:12:00.560 -okay so just just as when you define - -00:12:00.560 --> 00:12:01.680 -functions they - -00:12:01.680 --> 00:12:04.880 -they uh you start by uh define - -00:12:04.880 --> 00:12:08.639 -or def block than the name some - -00:12:08.639 --> 00:12:10.720 -mandatory argument and some optional - -00:12:10.720 --> 00:12:13.440 -arguments okay - -00:12:13.440 --> 00:12:15.760 -then the next stage is well and - -00:12:15.760 --> 00:12:18.480 -definition a documentation you know - -00:12:18.480 --> 00:12:20.880 -uh the people who use this which are - -00:12:20.880 --> 00:12:22.880 -future you or future me you know - -00:12:22.880 --> 00:12:25.519 -uh might want to know what this is all - -00:12:25.519 --> 00:12:27.839 -right so let's get to document this - -00:12:27.839 --> 00:12:30.560 -uh and uh for for corwin who might want - -00:12:30.560 --> 00:12:32.079 -to use uh tooltips - -00:12:32.079 --> 00:12:34.560 -uh when corwin writes feedback whatever - -00:12:34.560 --> 00:12:35.120 -and - -00:12:35.120 --> 00:12:37.120 -Emacs they'll see a nice little tooltip - -00:12:37.120 --> 00:12:38.639 -and the tooltip will have - -00:12:38.639 --> 00:12:41.279 -this uh documentation string right so - -00:12:41.279 --> 00:12:43.279 -that'll be nice - -00:12:43.279 --> 00:12:45.200 -okay and then here's the third part the - -00:12:45.200 --> 00:12:46.480 -last three lines are - -00:12:46.480 --> 00:12:49.440 -not not so difficult if the back end is - -00:12:49.440 --> 00:12:49.680 -in - -00:12:49.680 --> 00:12:52.800 -is html the backend is html - -00:12:52.800 --> 00:12:55.360 -please use this template string - -00:12:55.360 --> 00:12:57.440 -otherwise use the other string - -00:12:57.440 --> 00:13:00.639 -okay and for each of these uh string - -00:13:00.639 --> 00:13:01.279 -markers - -00:13:01.279 --> 00:13:03.600 -please put in the color who wrote it and - -00:13:03.600 --> 00:13:04.959 -then the contents - -00:13:04.959 --> 00:13:07.279 -of the special block or the link type - -00:13:07.279 --> 00:13:08.160 -okay - -00:13:08.160 --> 00:13:10.639 -um so that's pretty neat not not so - -00:13:10.639 --> 00:13:11.600 -difficult - -00:13:11.600 --> 00:13:14.639 -so I thought that was kind of cool and - -00:13:14.639 --> 00:13:15.519 -then notice it's - -00:13:15.519 --> 00:13:18.480 -anaphoric it's it's a this this def - -00:13:18.480 --> 00:13:19.519 -block - -00:13:19.519 --> 00:13:21.760 -gives you two new names it gives you a - -00:13:21.760 --> 00:13:22.560 -name called - -00:13:22.560 --> 00:13:25.120 -uh contents and it gives you a name - -00:13:25.120 --> 00:13:26.480 -called back end - -00:13:26.480 --> 00:13:29.040 -right and so even if you're writing a - -00:13:29.040 --> 00:13:31.040 -def block and you intend it to be used - -00:13:31.040 --> 00:13:32.560 -only for links - -00:13:32.560 --> 00:13:35.440 -uh like the uh these colors for example - -00:13:35.440 --> 00:13:37.600 -uh these colors were defined using dev - -00:13:37.600 --> 00:13:38.399 -block - -00:13:38.399 --> 00:13:41.279 -uh and I used them as links right here - -00:13:41.279 --> 00:13:43.360 -and you don't need to worry - -00:13:43.360 --> 00:13:44.880 -where does the text come from in the - -00:13:44.880 --> 00:13:48.160 -link you know if I say red colon bob uh - -00:13:48.160 --> 00:13:48.959 -is it bob - -00:13:48.959 --> 00:13:50.720 -or if I put a description is it the - -00:13:50.720 --> 00:13:52.000 -description so - -00:13:52.000 --> 00:13:54.000 -it's whatever is available will will - -00:13:54.000 --> 00:13:56.720 -become uh the value of contents - -00:13:56.720 --> 00:13:59.199 -and if you're really you know interested - -00:13:59.199 --> 00:14:00.320 -and you want to do some - -00:14:00.320 --> 00:14:03.839 -intricate stuff uh def block also gives - -00:14:03.839 --> 00:14:04.959 -you something called - -00:14:04.959 --> 00:14:08.160 -raw dash contents if you really want to - -00:14:08.160 --> 00:14:09.360 -touch the raw - -00:14:09.360 --> 00:14:11.920 -uh contents with all of the org markups - -00:14:11.920 --> 00:14:12.639 -still there - -00:14:12.639 --> 00:14:16.000 -okay so let's uh let's see - -00:14:16.000 --> 00:14:18.320 -how uh everyone can uh communicate - -00:14:18.320 --> 00:14:19.440 -amongst themselves - -00:14:19.440 --> 00:14:22.480 -using this new interface okay so - -00:14:22.480 --> 00:14:26.000 -uh uh sasha speculates and she how does - -00:14:26.000 --> 00:14:28.399 -she speculate for her organ html - -00:14:28.399 --> 00:14:31.440 -she might just write hey look at that no - -00:14:31.440 --> 00:14:34.800 -no no html nice and and - -00:14:34.800 --> 00:14:37.519 -amin wants to have some green and so he - -00:14:37.519 --> 00:14:39.600 -just says hey here's some color green - -00:14:39.600 --> 00:14:42.240 -and and uh there you go it looks almost - -00:14:42.240 --> 00:14:42.959 -the same - -00:14:42.959 --> 00:14:46.560 -right uh notice that the main argument - -00:14:46.560 --> 00:14:49.680 -is right here def block took an author - -00:14:49.680 --> 00:14:52.480 -and here's the author again and now the - -00:14:52.480 --> 00:14:53.920 -optional argument - -00:14:53.920 --> 00:14:57.360 -uses the org babel source interface you - -00:14:57.360 --> 00:14:58.000 -just say - -00:14:58.000 --> 00:15:00.639 -colon and then a key and then the - -00:15:00.639 --> 00:15:01.440 -argument - -00:15:01.440 --> 00:15:05.040 -quite quite nice and and corwin doesn't - -00:15:05.040 --> 00:15:05.519 -want to - -00:15:05.519 --> 00:15:07.920 -use blocks it's a bit of an overkill and - -00:15:07.920 --> 00:15:09.760 -can just write a - -00:15:09.760 --> 00:15:12.959 -a little um right - -00:15:12.959 --> 00:15:16.000 -so the main argument is now the uh uh - -00:15:16.000 --> 00:15:17.440 -the label of the link - -00:15:17.440 --> 00:15:19.360 -all right and then the description of - -00:15:19.360 --> 00:15:21.600 -the link is the contents - -00:15:21.600 --> 00:15:24.959 -of uh of the feedback so that was quite - -00:15:24.959 --> 00:15:25.680 -nice - -00:15:25.680 --> 00:15:28.079 -so it looks like uh everyone uses the - -00:15:28.079 --> 00:15:29.360 -same interface on the left - -00:15:29.360 --> 00:15:32.800 -and can have varying uh outputs - -00:15:32.800 --> 00:15:34.480 -and it looks I think it looks quite nice - -00:15:34.480 --> 00:15:36.639 -and I hope you do too - -00:15:36.639 --> 00:15:40.000 -um and there's a few more maybe - -00:15:40.000 --> 00:15:42.160 -as you saw in some previous ones we had - -00:15:42.160 --> 00:15:43.920 -text side beside side - -00:15:43.920 --> 00:15:46.800 -right now um or we folded some regions - -00:15:46.800 --> 00:15:47.440 -away - -00:15:47.440 --> 00:15:49.360 -that was quite nice we put some things - -00:15:49.360 --> 00:15:50.959 -in pretty boxes - -00:15:50.959 --> 00:15:54.000 -um uh we had some spoilers at the very - -00:15:54.000 --> 00:15:57.120 -beginning that we we uh hit some text uh - -00:15:57.120 --> 00:15:58.160 -we demoed uh - -00:15:58.160 --> 00:15:59.600 -some texts right you know here's some - -00:15:59.600 --> 00:16:01.680 -org and here's what it looks like - -00:16:01.680 --> 00:16:04.480 -um and and most importantly uh they they - -00:16:04.480 --> 00:16:05.199 -compose - -00:16:05.199 --> 00:16:08.320 -right there's uh uh there's a - -00:16:08.320 --> 00:16:12.639 -a macro called uh uh thread block - -00:16:12.639 --> 00:16:14.720 -uh thread block a thread block call and - -00:16:14.720 --> 00:16:16.160 -it lets you thread the - -00:16:16.160 --> 00:16:18.000 -the contents through a number of blocks - -00:16:18.000 --> 00:16:20.639 -treating them as if they were functions - -00:16:20.639 --> 00:16:22.480 -and so really you can think of a block - -00:16:22.480 --> 00:16:23.680 -as a as a - -00:16:23.680 --> 00:16:26.560 -as a string valued function so that's - -00:16:26.560 --> 00:16:27.360 -pretty neat - -00:16:27.360 --> 00:16:30.959 -I I think and uh thank you for listening - -00:16:30.959 --> 00:16:31.759 -and uh - -00:16:31.759 --> 00:16:34.320 -I I hope you've uh enjoyed this little - -00:16:34.320 --> 00:16:34.880 -uh - -00:16:34.880 --> 00:16:37.600 -happy fun time with uh with the Emacs - -00:16:37.600 --> 00:16:38.160 -and friends - -00:16:38.160 --> 00:16:40.720 -and uh I'll I'm I'll happy happily - -00:16:40.720 --> 00:16:41.759 -answer questions - -00:16:41.759 --> 00:16:43.730 -uh right now um - -00:16:43.730 --> 00:16:45.360 -[Music] - -00:16:45.360 --> 00:16:48.160 -so uh someone says why did you put - -00:16:48.160 --> 00:16:50.480 -optional arguments in a separate list - -00:16:50.480 --> 00:16:53.600 -rather than using cl style argument - -00:16:53.600 --> 00:16:54.560 -lists - -00:16:54.560 --> 00:16:58.399 -um so that's a very good question - -00:16:58.399 --> 00:17:01.680 -and I will answer that by - -00:17:01.680 --> 00:17:04.400 -showing you a more involved definition - -00:17:04.400 --> 00:17:04.880 -of - -00:17:04.880 --> 00:17:08.959 -feedback so let's look at a - -00:17:08.959 --> 00:17:13.039 -a more involved one - -00:17:13.039 --> 00:17:16.079 -right right here so for example - -00:17:16.079 --> 00:17:19.280 -this one is called rural mark all right - -00:17:19.280 --> 00:17:21.760 -and uh please let me know if my text is - -00:17:21.760 --> 00:17:23.439 -not sufficiently big - -00:17:23.439 --> 00:17:26.799 -so here is here is why uh we have - -00:17:26.799 --> 00:17:29.520 -two arguments that takes two arguments - -00:17:29.520 --> 00:17:30.720 -uh instead of one - -00:17:30.720 --> 00:17:33.360 -for for its argument list right so you - -00:17:33.360 --> 00:17:34.799 -you have def block - -00:17:34.799 --> 00:17:37.679 -then you have the name right then you - -00:17:37.679 --> 00:17:38.400 -have - -00:17:38.400 --> 00:17:40.960 -the first uh argument list and the - -00:17:40.960 --> 00:17:42.880 -second argument list - -00:17:42.880 --> 00:17:46.080 -the first argument list uh takes the - -00:17:46.080 --> 00:17:49.280 -takes the text right after the begin - -00:17:49.280 --> 00:17:51.760 -right the text right after the begin is - -00:17:51.760 --> 00:17:52.320 -the main - -00:17:52.320 --> 00:17:55.760 -argument okay and then the remaining key - -00:17:55.760 --> 00:17:57.039 -value pairs - -00:17:57.039 --> 00:18:00.320 -are in the second argument list okay - -00:18:00.320 --> 00:18:03.280 -now the reason we have two is because uh - -00:18:03.280 --> 00:18:04.640 -in order to - -00:18:04.640 --> 00:18:06.799 -streamline the interface to account for - -00:18:06.799 --> 00:18:08.880 -both uh special blocks - -00:18:08.880 --> 00:18:12.320 -and or link types uh what we do is we - -00:18:12.320 --> 00:18:13.360 -say hey - -00:18:13.360 --> 00:18:16.160 -uh in the first argument list uh you can - -00:18:16.160 --> 00:18:18.000 -give a name to the first argument - -00:18:18.000 --> 00:18:21.039 -give it a default value and anything - -00:18:21.039 --> 00:18:24.240 -else you provide will become uh - -00:18:24.240 --> 00:18:27.760 -uh part of the I'll co link - -00:18:27.760 --> 00:18:30.000 -information so for example this link we - -00:18:30.000 --> 00:18:32.000 -decided to make its face - -00:18:32.000 --> 00:18:34.799 -angry red um you might want to give - -00:18:34.799 --> 00:18:35.840 -other features to - -00:18:35.840 --> 00:18:37.919 -links so we're trying to streamline the - -00:18:37.919 --> 00:18:39.679 -interface for both - -00:18:39.679 --> 00:18:42.320 -special blocks and org link types and we - -00:18:42.320 --> 00:18:42.880 -thought - -00:18:42.880 --> 00:18:46.240 -this way was quite nice um so - -00:18:46.240 --> 00:18:49.840 -that was the main reason uh someone asks - -00:18:49.840 --> 00:18:52.480 -uh so if if you uh if that's uh if you - -00:18:52.480 --> 00:18:55.039 -need if you have follow-up please ask - -00:18:55.039 --> 00:18:57.600 -someone asks do you intend to try to - -00:18:57.600 --> 00:19:00.559 -upstream this amazing work into org - -00:19:00.559 --> 00:19:03.600 -well I'm glad you like it I I don't know - -00:19:03.600 --> 00:19:04.559 -how to upstream - -00:19:04.559 --> 00:19:06.880 -but but I I will look into it and any - -00:19:06.880 --> 00:19:08.799 -advice or guidance would be - -00:19:08.799 --> 00:19:11.840 -much appreciated um you know - -00:19:11.840 --> 00:19:14.640 -lisp is awesome and just as defunded as - -00:19:14.640 --> 00:19:17.120 -a macro deathblock is a macro and then - -00:19:17.120 --> 00:19:20.240 -source blocks are awesome and then now - -00:19:20.240 --> 00:19:21.919 -maybe we can have arguments and special - -00:19:21.919 --> 00:19:24.080 -blocks and motivate and encourage more - -00:19:24.080 --> 00:19:25.280 -people to uh - -00:19:25.280 --> 00:19:28.799 -to uh learn lisp right - -00:19:28.799 --> 00:19:32.559 -so another person asks - -00:19:32.559 --> 00:19:35.280 -um what is used to produce colorful - -00:19:35.280 --> 00:19:38.559 -boxes around the cursor - -00:19:38.559 --> 00:19:40.400 -I I'm not quite sure if you're asking - -00:19:40.400 --> 00:19:41.840 -are you talking about my cursor right - -00:19:41.840 --> 00:19:42.559 -here - -00:19:42.559 --> 00:19:48.400 -or are you talking about in the slide um - -00:19:48.400 --> 00:19:50.559 -so this this this cursor is some - -00:19:50.559 --> 00:19:52.400 -application called - -00:19:52.400 --> 00:19:55.440 -a stream brush that I had to purchase uh - -00:19:55.440 --> 00:19:57.679 -unfortunately I could not find a a - -00:19:57.679 --> 00:19:59.039 -suitable free one - -00:19:59.039 --> 00:20:02.159 -um and the blocks I can demonstrate some - -00:20:02.159 --> 00:20:03.840 -Emacs list but I can open up my Emacs if - -00:20:03.840 --> 00:20:05.679 -people like and we can try some things - -00:20:05.679 --> 00:20:06.320 -out - -00:20:06.320 --> 00:20:09.440 -happy to do that uh - -00:20:09.440 --> 00:20:12.480 -you're welcome uh someone asks - -00:20:12.480 --> 00:20:14.880 -a side question about org reveal how do - -00:20:14.880 --> 00:20:15.520 -you get - -00:20:15.520 --> 00:20:17.440 -bespoke or multiple column layouts - -00:20:17.440 --> 00:20:19.120 -without using html - -00:20:19.120 --> 00:20:22.559 -ah excellent question that's what we do - -00:20:22.559 --> 00:20:24.640 -that's that's what this uh project is - -00:20:24.640 --> 00:20:26.000 -about so it's not - -00:20:26.000 --> 00:20:28.960 -org reveal it's it's our fancy parallel - -00:20:28.960 --> 00:20:29.440 -uh - -00:20:29.440 --> 00:20:32.240 -uh block so we have this thing you say - -00:20:32.240 --> 00:20:33.440 -begin parallel - -00:20:33.440 --> 00:20:35.679 -you say how many columns you would like - -00:20:35.679 --> 00:20:37.120 -uh do you want a bar - -00:20:37.120 --> 00:20:39.679 -or not and then you write some text and - -00:20:39.679 --> 00:20:40.960 -then you uh - -00:20:40.960 --> 00:20:42.480 -you get some text and according with the - -00:20:42.480 --> 00:20:44.400 -bar or not right so that's - -00:20:44.400 --> 00:20:47.520 -that's how we achieve that in our slides - -00:20:47.520 --> 00:20:50.080 -so I'm not uh I'm not quite sure where - -00:20:50.080 --> 00:20:52.880 -this was - -00:20:52.880 --> 00:20:59.520 -somewhere here I think - -00:20:59.520 --> 00:21:06.240 -let me try to find this for you - -00:21:06.240 --> 00:21:08.320 -I can't seem to find where the parallel - -00:21:08.320 --> 00:21:09.440 -blocks were - -00:21:09.440 --> 00:21:12.159 -apologies let's move on to the next - -00:21:12.159 --> 00:21:15.039 -question I suppose - -00:21:15.039 --> 00:21:17.760 -uh I'm pretty sure they're here ah there - -00:21:17.760 --> 00:21:18.400 -they are - -00:21:18.400 --> 00:21:21.360 -yes so these these uh were just - -00:21:21.360 --> 00:21:22.640 -instances of using - -00:21:22.640 --> 00:21:25.440 -uh the parallel block and it makes - -00:21:25.440 --> 00:21:26.480 -things parallel - -00:21:26.480 --> 00:21:29.600 -so that's quite nice um another person - -00:21:29.600 --> 00:21:33.360 -asks uh yes - -00:21:33.360 --> 00:21:36.720 -excellent um how does this relate to - -00:21:36.720 --> 00:21:37.840 -banda pandoc - -00:21:37.840 --> 00:21:39.360 -which is used for converting between - -00:21:39.360 --> 00:21:40.960 -markup formats - -00:21:40.960 --> 00:21:43.919 -so all we're doing is we're we're saying - -00:21:43.919 --> 00:21:44.400 -hey - -00:21:44.400 --> 00:21:46.799 -please write org because org is just - -00:21:46.799 --> 00:21:47.679 -fantastic - -00:21:47.679 --> 00:21:50.400 -and we love it and it's the dream and if - -00:21:50.400 --> 00:21:51.760 -you would like to view things - -00:21:51.760 --> 00:21:55.039 -in html or in org reveal or - -00:21:55.039 --> 00:21:58.559 -in pdf that's up to the user so - -00:21:58.559 --> 00:22:02.320 -here is a um oh - -00:22:02.320 --> 00:22:05.039 -made it too small now so here is a an - -00:22:05.039 --> 00:22:06.080 -example - -00:22:06.080 --> 00:22:08.880 -so here's an uh how here's how parallel - -00:22:08.880 --> 00:22:10.240 -is implemented - -00:22:10.240 --> 00:22:13.120 -uh just as a quick example uh not too - -00:22:13.120 --> 00:22:14.320 -long - -00:22:14.320 --> 00:22:16.880 -uh about half of the implementation is - -00:22:16.880 --> 00:22:18.400 -documentation so - -00:22:18.400 --> 00:22:20.720 -uh hopefully that speaks for for how - -00:22:20.720 --> 00:22:22.720 -useful this feature is - -00:22:22.720 --> 00:22:25.280 -uh so we decide if there's a rule or not - -00:22:25.280 --> 00:22:28.080 -um we look for the column break - -00:22:28.080 --> 00:22:29.760 -and really here we're looking at the - -00:22:29.760 --> 00:22:31.840 -back end if the back end is latex - -00:22:31.840 --> 00:22:34.960 -uh please use this uh incantation with - -00:22:34.960 --> 00:22:37.679 -multi columns mini pages what have you - -00:22:37.679 --> 00:22:38.559 -and if the - -00:22:38.559 --> 00:22:41.039 -back end is something else uh please uh - -00:22:41.039 --> 00:22:41.600 -do this - -00:22:41.600 --> 00:22:44.960 -uh div and style and uh other uh - -00:22:44.960 --> 00:22:46.640 -gibberish that we don't really wanna - -00:22:46.640 --> 00:22:48.080 -look at uh so - -00:22:48.080 --> 00:22:51.760 -uh when you pandoc works from org - -00:22:51.760 --> 00:22:55.280 -so it might not work directly since our - -00:22:55.280 --> 00:22:58.080 -interface the way we set it up is when - -00:22:58.080 --> 00:22:59.679 -you try to export - -00:22:59.679 --> 00:23:01.919 -uh we hook in and we do a bunch of - -00:23:01.919 --> 00:23:03.039 -pre-processing - -00:23:03.039 --> 00:23:05.919 -so this this uh def block is a is a - -00:23:05.919 --> 00:23:07.440 -string valued function - -00:23:07.440 --> 00:23:10.880 -and so whenever we see these uh begin - -00:23:10.880 --> 00:23:13.919 -parallel uh when you do an export - -00:23:13.919 --> 00:23:16.480 -I tell Emacs hold up look for those - -00:23:16.480 --> 00:23:16.960 -begin - -00:23:16.960 --> 00:23:19.360 -parallels please oh you found them grab - -00:23:19.360 --> 00:23:20.320 -that text - -00:23:20.320 --> 00:23:22.400 -you grabbed it great now please apply - -00:23:22.400 --> 00:23:24.080 -this person's uh function - -00:23:24.080 --> 00:23:27.120 -onto that text and splice in the result - -00:23:27.120 --> 00:23:29.760 -okay so so when you export uh we're - -00:23:29.760 --> 00:23:30.400 -performing - -00:23:30.400 --> 00:23:33.600 -arbitrary computations on your uh uh on - -00:23:33.600 --> 00:23:35.120 -your text - -00:23:35.120 --> 00:23:38.799 -so uh um some people might not find that - -00:23:38.799 --> 00:23:40.159 -comforting to have - -00:23:40.159 --> 00:23:43.039 -arbitrary uh computations happening so - -00:23:43.039 --> 00:23:45.039 -in this article there's a few where - -00:23:45.039 --> 00:23:47.520 -uh we change your text upon export we - -00:23:47.520 --> 00:23:48.320 -translate it - -00:23:48.320 --> 00:23:51.760 -we do other things to it um - -00:23:51.760 --> 00:23:55.360 -so someone says uh if you export to - -00:23:55.360 --> 00:23:57.360 -latex to pdf does that work well with - -00:23:57.360 --> 00:23:58.640 -beamer as well - -00:23:58.640 --> 00:24:00.320 -to create slides with columns for - -00:24:00.320 --> 00:24:02.080 -example for uh - -00:24:02.080 --> 00:24:05.200 -um so uh actually uh - -00:24:05.200 --> 00:24:08.000 -so uh I I made a bunch of these changes - -00:24:08.000 --> 00:24:09.200 -earlier this morning - -00:24:09.200 --> 00:24:12.320 -and it just says latex right here um - -00:24:12.320 --> 00:24:14.480 -so if you want to go to beamer I think - -00:24:14.480 --> 00:24:15.360 -the back end for me - -00:24:15.360 --> 00:24:18.240 -beamer is called well beamer so instead - -00:24:18.240 --> 00:24:18.960 -of a - -00:24:18.960 --> 00:24:21.200 -a p case what we would do is we would - -00:24:21.200 --> 00:24:22.000 -say oh - -00:24:22.000 --> 00:24:25.360 -if it's a latex or it's a beamer - -00:24:25.360 --> 00:24:29.279 -then uh use this uh otherwise - -00:24:29.279 --> 00:24:31.120 -it's not a latex it will simply default - -00:24:31.120 --> 00:24:33.039 -to this one which could be - -00:24:33.039 --> 00:24:36.400 -dangerous for your needs um I think it's - -00:24:36.400 --> 00:24:39.679 -a bad practice to put a underscore but I - -00:24:39.679 --> 00:24:41.279 -did it really quickly because I just - -00:24:41.279 --> 00:24:43.679 -wanted to show you that it works fine in - -00:24:43.679 --> 00:24:46.559 -org reveal contributions are more than - -00:24:46.559 --> 00:24:47.440 -welcome - -00:24:47.440 --> 00:24:51.039 -I I uh happily uh would love any - -00:24:51.039 --> 00:24:52.240 -assistance - -00:24:52.240 --> 00:24:56.080 -um and and I have a uh we have a - -00:24:56.080 --> 00:24:58.640 -list a reference cheat sheet here to to - -00:24:58.640 --> 00:25:00.159 -learn a little bit about lisp if you're - -00:25:00.159 --> 00:25:02.000 -not comfortable or to - -00:25:02.000 --> 00:25:04.640 -ask some questions lots of helpful - -00:25:04.640 --> 00:25:06.400 -people - -00:25:06.400 --> 00:25:09.440 -so there's another question that says uh - -00:25:09.440 --> 00:25:11.679 -does typing in a block mess up with a - -00:25:11.679 --> 00:25:13.120 -syntax highlighting - -00:25:13.120 --> 00:25:15.679 -usually you use a single color inside an - -00:25:15.679 --> 00:25:17.279 -example block for example - -00:25:17.279 --> 00:25:21.279 -ah you found my crutch you found - -00:25:21.279 --> 00:25:25.279 -my crutch um so I so there's - -00:25:25.279 --> 00:25:27.440 -emax's is all encompassing and I'm not - -00:25:27.440 --> 00:25:29.760 -quite sure how fonts work or are - -00:25:29.760 --> 00:25:32.559 -you know I I learned enough to get by I - -00:25:32.559 --> 00:25:33.840 -learned enough to get by - -00:25:33.840 --> 00:25:37.440 -so let me um but here's - -00:25:37.440 --> 00:25:39.760 -here's how links work they're they're a - -00:25:39.760 --> 00:25:40.799 -bit complicated - -00:25:40.799 --> 00:25:42.960 -this this is a bit scary I don't - -00:25:42.960 --> 00:25:43.919 -recommend anyone - -00:25:43.919 --> 00:25:47.039 -uh read it um - -00:25:47.039 --> 00:25:49.840 -but uh actually let me open up an email - -00:25:49.840 --> 00:25:50.559 -and you can - -00:25:50.559 --> 00:25:53.600 -you can see what I see uh so here's an - -00:25:53.600 --> 00:25:54.799 -Emacs - -00:25:54.799 --> 00:25:56.799 -all right let's make that a bit bigger - -00:25:56.799 --> 00:25:58.400 -uh let's change this - -00:25:58.400 --> 00:26:01.200 -slightly nope that's worse there you go - -00:26:01.200 --> 00:26:01.919 -so - -00:26:01.919 --> 00:26:05.760 -here's here's some words um so here's - -00:26:05.760 --> 00:26:09.360 -red hello um - -00:26:09.360 --> 00:26:12.000 -but you're worried about uh preserving - -00:26:12.000 --> 00:26:12.400 -uh - -00:26:12.400 --> 00:26:15.679 -uh uh um quantification - -00:26:15.679 --> 00:26:18.480 -so let's make an emax list block all - -00:26:18.480 --> 00:26:18.880 -right - -00:26:18.880 --> 00:26:22.840 -and let's say plus one two ah - -00:26:22.840 --> 00:26:28.000 -where's the fun hello - -00:26:28.000 --> 00:26:32.080 -um bye okay where's the coloring - -00:26:32.080 --> 00:26:34.880 -if we if we zoom in on this on this - -00:26:34.880 --> 00:26:36.000 -begin source block - -00:26:36.000 --> 00:26:39.200 -if we zoom in you can see down here - -00:26:39.200 --> 00:26:42.159 -uh we have our our coloring all right - -00:26:42.159 --> 00:26:43.279 -when we zoom in - -00:26:43.279 --> 00:26:46.960 -if we if we zoom out ah no coloring - -00:26:46.960 --> 00:26:50.080 -zoom in coloring it's about ah no - -00:26:50.080 --> 00:26:50.880 -coloring - -00:26:50.880 --> 00:26:53.840 -let's take off these bad boys and oh - -00:26:53.840 --> 00:26:55.679 -look my coloring's back - -00:26:55.679 --> 00:26:59.360 -so um in a previous - -00:26:59.360 --> 00:27:02.320 -uh iteration of the system I was able to - -00:27:02.320 --> 00:27:03.760 -maintain coloring - -00:27:03.760 --> 00:27:06.400 -uh in this new iteration I am not I - -00:27:06.400 --> 00:27:08.559 -don't know how to do it I haven't uh - -00:27:08.559 --> 00:27:11.039 -had the time to to implement it I spent - -00:27:11.039 --> 00:27:13.279 -a lot of time writing this uh - -00:27:13.279 --> 00:27:17.279 -48 page uh documentation uh with uh - -00:27:17.279 --> 00:27:19.679 -with some fun examples to to to try to - -00:27:19.679 --> 00:27:20.320 -help - -00:27:20.320 --> 00:27:21.760 -people learn so but but I would - -00:27:21.760 --> 00:27:23.760 -appreciate any help or guidance on - -00:27:23.760 --> 00:27:26.240 -how to uh maintain the quantification I - -00:27:26.240 --> 00:27:28.000 -I really would like to keep those colors - -00:27:28.000 --> 00:27:29.200 -in - -00:27:29.200 --> 00:27:31.840 -um musa we have time for maybe one more - -00:27:31.840 --> 00:27:32.640 -question - -00:27:32.640 --> 00:27:34.960 -um one or two more questions and then we - -00:27:34.960 --> 00:27:37.039 -have to move on to the next talk - -00:27:37.039 --> 00:27:39.120 -um but yeah you're more than welcome to - -00:27:39.120 --> 00:27:40.799 -take continue taking the questions via - -00:27:40.799 --> 00:27:42.559 -irc or the pad - -00:27:42.559 --> 00:27:45.760 -okay thank you thank you - -00:27:45.760 --> 00:27:48.480 -let's uh the final question we'll take - -00:27:48.480 --> 00:27:48.880 -is - -00:27:48.880 --> 00:27:52.320 -um should packages implement - -00:27:52.320 --> 00:27:54.399 -interface to one specific format or - -00:27:54.399 --> 00:27:55.840 -attempt to be conclusive to all the - -00:27:55.840 --> 00:27:57.279 -potential output targets - -00:27:57.279 --> 00:27:58.880 -I think you should just make them as you - -00:27:58.880 --> 00:28:01.120 -go and you know add them as you need - -00:28:01.120 --> 00:28:02.559 -them we'll make uh - -00:28:02.559 --> 00:28:05.600 -help requests or things and uh - -00:28:05.600 --> 00:28:07.840 -we can we can share recipes in this uh - -00:28:07.840 --> 00:28:09.279 -document and then - -00:28:09.279 --> 00:28:12.799 -try to add other uh techniques and then - -00:28:12.799 --> 00:28:16.000 -and we can uh use these blocks as a - -00:28:16.000 --> 00:28:19.200 -common uh interface for - -00:28:19.200 --> 00:28:22.240 -for exporting to pdf and other things - -00:28:22.240 --> 00:28:26.000 -and since someone asked here is a um - -00:28:26.000 --> 00:28:28.399 -here is uh what a pdf looks like this is - -00:28:28.399 --> 00:28:30.159 -the same pdf and - -00:28:30.159 --> 00:28:33.840 -uh rendered uh just I made no effort to - -00:28:33.840 --> 00:28:34.960 -make it look good - -00:28:34.960 --> 00:28:37.840 -but it surprisingly does look good so so - -00:28:37.840 --> 00:28:38.559 -uh that was - -00:28:38.559 --> 00:28:41.600 -uh that was nice um that was a - -00:28:41.600 --> 00:28:44.320 -terrible magenta but that is life uh - -00:28:44.320 --> 00:28:44.880 -anyhow - -00:28:44.880 --> 00:28:47.279 -I hope you all enjoyed this talk I hope - -00:28:47.279 --> 00:28:48.960 -you will find um - -00:28:48.960 --> 00:28:51.679 -death block uh useful to you it is - -00:28:51.679 --> 00:28:52.799 -available on melbourne - -00:28:52.799 --> 00:28:54.960 -uh in a rush to make it available for - -00:28:54.960 --> 00:28:57.679 -EmacsConf 2020 some melba - -00:28:57.679 --> 00:29:00.159 -guidelines may not have been in here too - -00:29:00.159 --> 00:29:00.960 -please do not - -00:29:00.960 --> 00:29:03.200 -hit me um and I hope everyone enjoys the - -00:29:03.200 --> 00:29:04.720 -rest of the EmacsConf - -00:29:04.720 --> 00:29:08.559 -2020 thank you diff --git a/2020/subtitles/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy.vtt b/2020/subtitles/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy.vtt new file mode 100644 index 00000000..46b7433f --- /dev/null +++ b/2020/subtitles/emacsconf-2020--22-powering-up-special-blocks--musa-al-hassy.vtt @@ -0,0 +1,1723 @@ +WEBVTT + +00:00:04.080 --> 00:00:07.359 +All right, then. Well, hello everyone. + +00:00:07.359 --> 00:00:11.519 +I hope you're all enjoying the EmacsConf. + +00:00:11.519 --> 00:00:15.040 +My name is Musa Al-hassy, and I hope you're + +00:00:15.040 --> 00:00:19.840 +excited to learn about powering up special blocks. + +00:00:19.840 --> 00:00:25.574 +Let's first off find out +what these special blocks are, + +00:00:25.574 --> 00:00:27.920 +and see what we can go from. + +00:00:27.920 --> 00:00:30.240 +Yesterday, I saw a lot of cool talks + +00:00:30.240 --> 00:00:33.200 +and people were chatting about + +00:00:33.200 --> 00:00:37.200 +how should you present? Should you +do it this way or that way? + +00:00:37.200 --> 00:00:39.931 +I thought maybe I should try a different way. + +00:00:39.931 --> 00:00:42.567 +But I'm talking about special blocks + +00:00:42.567 --> 00:00:45.039 +and if I show you an Emacs, then I have to export + +00:00:45.039 --> 00:00:47.840 +the HTML so you can see what it looks like + +00:00:47.840 --> 00:00:51.920 +or export to a PDF so you can see what it looks like. + +00:00:51.920 --> 00:00:54.239 +So I ended up writing in org-reveal, + +00:00:54.239 --> 00:00:58.233 +and joyously, this just works. + +00:00:58.960 --> 00:01:00.879 +You can just see things here. + +00:01:00.879 --> 00:01:03.452 +I was worried that I'd have to take pictures + +00:01:03.452 --> 00:01:09.760 +and then insert pings, so that was a delight. + +00:01:09.760 --> 00:01:15.704 +Okay. Special blocks are these things like a center small quote. + +00:01:15.704 --> 00:01:17.280 +That's what a special block is, + +00:01:17.280 --> 00:01:19.733 +and with a bit of Lisp, we can make + +00:01:19.733 --> 00:01:22.741 +special blocks and link types. + +00:01:22.741 --> 00:01:24.799 +Right. Using a single interface. + +00:01:24.799 --> 00:01:27.344 +The interface is going to be similar + +00:01:27.344 --> 00:01:29.281 +to one many people are familiar with. + +00:01:29.281 --> 00:01:34.712 +In particular, Org Babel's src interface + +00:01:34.712 --> 00:01:37.840 +as well as using global header arguments for link types. + +00:01:37.840 --> 00:01:39.450 +The idea is to write it once + +00:01:39.450 --> 00:01:41.200 +and generate many different kinds. + +00:01:41.200 --> 00:01:45.213 +You write in Org markup and you can have HTML, + +00:01:45.213 --> 00:01:49.767 +you can have PDF, and joyously, org-reveal. + +00:01:49.767 --> 00:01:53.600 +That was an unexpected delight. + +00:01:53.600 --> 00:01:57.840 +Here are a few that you'll just see + +00:01:57.840 --> 00:02:01.759 +in this presentation. + +00:02:01.759 --> 00:02:05.040 +I won't show some of these link-only ones, + +00:02:05.040 --> 00:02:06.799 +but we'll see a few of these other ones + +00:02:06.799 --> 00:02:09.500 +just to make the presentation look nice + +00:02:09.500 --> 00:02:11.520 +So the presentation is really going to + +00:02:11.520 --> 00:02:14.000 +present these blocks and the mechanism + +00:02:14.000 --> 00:02:15.120 +at the same time. + +00:02:15.120 --> 00:02:18.400 +No HTML was written. + +00:02:18.400 --> 00:02:21.280 +Look, Ma! No HTML, just pure Org Mode, + +00:02:21.280 --> 00:02:25.840 +and you get all these beautiful boxes and things. + +00:02:25.840 --> 00:02:27.680 +The motivation for this is... + +00:02:29.120 --> 00:02:31.200 +you're online, you run into a blog, + +00:02:31.200 --> 00:02:32.120 +and you see something you like, + +00:02:32.120 --> 00:02:33.120 +and you're like, man, + +00:02:33.120 --> 00:02:36.640 +you know, I wish I could produce that. + +00:02:36.640 --> 00:02:41.639 +But you check, and the author wrote raw HTML. + +00:02:41.639 --> 00:02:44.239 +You know, #+HTML: everywhere. + +00:02:44.239 --> 00:02:49.533 +That's going to obscure your real content. + +00:02:49.533 --> 00:02:51.200 +It's going to be surrounded by all this + +00:02:51.200 --> 00:02:54.239 +styling information. That's unfortunate. + +00:02:54.239 --> 00:02:57.033 +The author decides to use an Org macro. + +00:02:57.033 --> 00:02:58.959 +All right, a bit better, + +00:02:58.959 --> 00:03:00.333 +but then what if you decide, + +00:03:00.333 --> 00:03:04.667 +hey I want to make a PDF? Not great. + +00:03:04.667 --> 00:03:06.000 +And then the worst of all, + +00:03:06.000 --> 00:03:07.840 +the author doesn't give you the source, + +00:03:07.840 --> 00:03:10.159 +and then you have to view page source, + +00:03:10.159 --> 00:03:13.760 +and learn cascading style sheets, + +00:03:14.239 --> 00:03:15.767 +and sit in a corner and cry, + +00:03:15.767 --> 00:03:18.080 +and decide to do other things with your life. + +00:03:18.080 --> 00:03:22.640 +We want to give you Org users numerous styles + +00:03:22.640 --> 00:03:27.200 +and an extensible mechanism to add more of these + +00:03:27.200 --> 00:03:28.799 +aesthetically pleasing styles, + +00:03:28.799 --> 00:03:31.200 +to have really nice things + +00:03:31.200 --> 00:03:33.933 +look one way in the HTML + +00:03:33.933 --> 00:03:36.567 +and look almost the same way in the PDF + +00:03:36.567 --> 00:03:38.667 +and other back ends. + +00:03:38.667 --> 00:03:41.680 +And if by having these newer ones, + +00:03:41.680 --> 00:03:45.519 +people might be encouraged to try making new ones, + +00:03:45.519 --> 00:03:49.040 +especially when the interface is not so difficult, + +00:03:49.040 --> 00:03:54.159 +that's the aim. + +00:03:54.159 --> 00:03:59.120 +So let's have a real story to motivate this even more. + +00:03:59.120 --> 00:04:03.533 +Here's three friends. I hope I don't butcher their names, + +00:04:03.533 --> 00:04:04.640 +but these friends are called + +00:04:04.640 --> 00:04:08.720 +Amin, Sacha, and Corwin. They're organizing a conference, + +00:04:08.720 --> 00:04:12.080 +EmacsConf 2020. + +00:04:12.080 --> 00:04:14.239 +So Sacha decides to write an Org file + +00:04:14.239 --> 00:04:16.479 +and she would like some feedback. + +00:04:16.479 --> 00:04:19.840 +Okay. Just to make it clear, there's no... + +00:04:19.840 --> 00:04:22.960 +just how easy this looks, + +00:04:22.960 --> 00:04:27.280 +let's look at the source for this block. + +00:04:27.280 --> 00:04:30.720 +Notice it's just the word "green," then a colon, + +00:04:30.720 --> 00:04:37.333 +then Amin. No div style coloring, + +00:04:37.333 --> 00:04:38.479 +just green:Amin. + +00:04:38.479 --> 00:04:41.520 +A very pleasant Org markup. + +00:04:41.520 --> 00:04:44.960 +So that's quite nice. Put some bold around it. + +00:04:44.960 --> 00:04:46.433 +Not too difficult. + +00:04:46.433 --> 00:04:49.900 +Hopefully, this will be useful to other people as well. + +00:04:49.900 --> 00:04:52.240 +So what kind of feedback + +00:04:52.240 --> 00:04:55.233 +would Sacha expect to get? + +00:04:55.233 --> 00:04:59.120 +Maybe she would expect top-level remarks + +00:04:59.120 --> 00:05:00.833 +visible in the export. + +00:05:00.833 --> 00:05:04.400 +When she makes an HTML, she can see right there a big block. + +00:05:04.400 --> 00:05:09.533 +Right. Maybe Amin will suggest to Sacha, + +00:05:09.533 --> 00:05:11.120 +please replace this part + +00:05:11.120 --> 00:05:12.267 +with this other part + +00:05:12.267 --> 00:05:13.333 +or replace this word + +00:05:13.333 --> 00:05:14.639 +with this other word. + +00:05:14.639 --> 00:05:16.960 +This is not really possible + +00:05:16.960 --> 00:05:21.919 +with raw HTML or with even LaTeX. + +00:05:21.919 --> 00:05:24.000 +You'd have to have multiple arguments: + +00:05:24.000 --> 00:05:25.360 +the first argument, and then + +00:05:25.360 --> 00:05:28.800 +the replacement argument. It's a bit clunky. + +00:05:28.800 --> 00:05:32.080 +But with our setup, you just write some text, + +00:05:32.080 --> 00:05:34.367 +write #+replace_with + +00:05:34.367 --> 00:05:36.240 +and then write more text, and you're good to go. + +00:05:36.240 --> 00:05:39.440 +Normal Org markup. + +00:05:39.440 --> 00:05:40.720 +Everyone speaks different languages. + +00:05:40.720 --> 00:05:43.833 +Maybe they want to use one word, + +00:05:43.833 --> 00:05:45.919 +or they're arguing about + +00:05:45.919 --> 00:05:48.000 +whether we talk about frames or windows, + +00:05:48.000 --> 00:05:50.560 +so maybe they want to have some translations. + +00:05:50.560 --> 00:05:53.433 +So there are different kinds of feedback. + +00:05:53.433 --> 00:05:55.360 +Let's take an example. + +00:05:55.360 --> 00:05:59.360 +Look at what they are. + +00:05:59.360 --> 00:06:02.560 +For example, Sacha might write + +00:06:02.560 --> 00:06:06.160 +this Org Mode right here, + +00:06:06.160 --> 00:06:09.759 +and then in her HTML exports, you might see this, + +00:06:09.759 --> 00:06:12.733 +and her feedback might look really nicely + +00:06:12.733 --> 00:06:13.840 +from anyone who says + +00:06:14.560 --> 00:06:17.400 +let's do some Lisp instead of mathematics. + +00:06:17.400 --> 00:06:18.560 +Let's just do some Lisp. + +00:06:18.560 --> 00:06:22.479 +Corwin says, let's not be so silly. + +00:06:22.479 --> 00:06:25.120 +Let's just say 9 a.m. and move on. + +00:06:28.080 --> 00:06:31.360 +Amin likes to export to PDF, + +00:06:31.360 --> 00:06:34.333 +and so he writes his top-level remarks using LaTeX. + +00:06:34.333 --> 00:06:36.900 +That's how. To get this square + +00:06:36.900 --> 00:06:38.960 +Amin: please change whatever, + +00:06:38.960 --> 00:06:43.120 +he might write like this: #+latex:. + +00:06:43.120 --> 00:06:50.880 +But then Sacha only exports to HTML, for example, + +00:06:50.880 --> 00:06:54.880 +so she doesn't look at the PDF, + +00:06:54.880 --> 00:06:57.867 +and she may not see his top-level feedback + +00:06:57.867 --> 00:07:00.667 +with those nice brackets and and bold. + +00:07:00.667 --> 00:07:03.120 +She might think everything's good. + +00:07:03.120 --> 00:07:06.160 +That can be a bit disastrous. + +00:07:06.160 --> 00:07:08.600 +So maybe Sacha will then + +00:07:08.600 --> 00:07:13.199 +make some of her own feedback. + +00:07:13.199 --> 00:07:16.160 +To produce it, she might write + +00:07:16.560 --> 00:07:21.680 +HTML commands, #+html: to get that. + +00:07:21.680 --> 00:07:24.100 +But then Amin will make a PDF, + +00:07:24.100 --> 00:07:25.680 +and this won't stick out. + +00:07:25.680 --> 00:07:28.367 +So he might think everything's okay, + +00:07:28.367 --> 00:07:30.160 +even though it's not. + +00:07:30.160 --> 00:07:33.100 +Then Corwin actually decides, + +00:07:33.100 --> 00:07:35.900 +"Hey, let me read the exported result + +00:07:35.900 --> 00:07:38.867 +and there's all those feedback +from two people + +00:07:38.867 --> 00:07:42.633 +who haven't read anything, +because maybe they were in a rush, + +00:07:42.633 --> 00:07:45.167 +and didn't see the top-level feedback. + +00:07:45.167 --> 00:07:50.000 +So they agree. "Hey, let's have a +uniform Org interface that exports + +00:07:50.000 --> 00:07:52.567 +to both HTML and PDF. + +00:07:52.567 --> 00:07:54.080 +Make both of us happy." + +00:07:54.080 --> 00:07:58.160 +Okay. So they decide to use +Org special blocks. + +00:07:58.160 --> 00:08:01.300 +Right. To set this up, + +00:08:01.300 --> 00:08:04.400 +they need to read a little bit of Lisp, + +00:08:04.400 --> 00:08:08.879 +hooks, advice, macros to get all of this +set up, + +00:08:08.879 --> 00:08:12.319 +and then they'll use Org as the main +interface. + +00:08:12.319 --> 00:08:16.479 +It's a lot of work, but it's worth it, +right? maybe? + +00:08:16.479 --> 00:08:19.360 +But then Corwin's a bit terse. + +00:08:19.759 --> 00:08:24.333 +Corwin maybe doesn't want to +write using blocks. + +00:08:24.333 --> 00:08:26.080 +He thinks they're overkill. + +00:08:26.080 --> 00:08:32.560 +Sacha wants HTML, and Amin wants PDF, +and Corwin wants org-reveal. + +00:08:32.560 --> 00:08:35.533 +So now they have to reformat +all their code. + +00:08:35.533 --> 00:08:36.900 +And then they need to use org link types + +00:08:36.900 --> 00:08:38.867 +to reduce the overkill, + +00:08:38.867 --> 00:08:41.367 +so they can try to avoid duplication + +00:08:41.367 --> 00:08:46.800 +by factoring things out into +self-contained functions. + +00:08:46.800 --> 00:08:50.320 +But now, to set up our links, + +00:08:50.320 --> 00:08:55.467 +we'll have to learn a new interface, org +setup link. + +00:08:55.467 --> 00:09:02.160 +Learn a little bit about fonts, follow +links, export handlers... + +00:09:02.160 --> 00:09:05.040 +It's so much. That's so much. But then, + +00:09:05.040 --> 00:09:06.800 +the friends, they learn a lot. + +00:09:06.800 --> 00:09:08.399 +They learn about defun. + +00:09:08.399 --> 00:09:11.120 +So these words are red. + +00:09:11.120 --> 00:09:12.185 +You get a little explanation. + +00:09:12.185 --> 00:09:14.320 +I think it's a bit too small for anyone +to read. + +00:09:14.320 --> 00:09:18.000 +This is Lisp documentation for defun. + +00:09:18.000 --> 00:09:21.600 +advice-add. There's some Lisp +documentation. + +00:09:21.600 --> 00:09:23.600 +They learn about destructuring -let. + +00:09:23.600 --> 00:09:25.279 +This is from the dash library. + +00:09:25.279 --> 00:09:26.959 +Here's all that glorious, + +00:09:26.959 --> 00:09:28.800 +glorious documentation with examples. + +00:09:28.800 --> 00:09:30.300 +Sorry. I like that. + +00:09:30.300 --> 00:09:32.467 +They might make +an ad-hoc mechanism + +00:09:32.467 --> 00:09:35.400 +to simulate arguments for special blocks, + +00:09:35.400 --> 00:09:38.500 +so something maybe called +extract-arguments, + +00:09:38.500 --> 00:09:41.533 +and then, of course, to make +new link types, + +00:09:41.533 --> 00:09:42.480 +they have to learn about + +00:09:42.480 --> 00:09:47.400 +org-link-set-parameters and +its numerous bits and pieces. + +00:09:49.920 --> 00:09:53.600 +Let's close all these ones down. + +00:09:53.600 --> 00:09:55.800 +Of course they also need to be +comfortable + +00:09:55.800 --> 00:09:59.920 +with loops and maps and matching and +string functions. + +00:09:59.920 --> 00:10:02.560 +So it's a bit of a pain. + +00:10:03.360 --> 00:10:05.839 +It's probably not worth it. + +00:10:05.839 --> 00:10:07.767 +Maybe I'll just rush things quickly, + +00:10:07.767 --> 00:10:09.360 +or do it ad-hoc... + +00:10:10.320 --> 00:10:13.680 +We have things to do. + +00:10:13.680 --> 00:10:19.367 +But maybe the squad wants to have a +modular and unified interface + +00:10:19.367 --> 00:10:23.700 +so everyone's comfortable with defun to +define a function + +00:10:23.700 --> 00:10:29.440 +and they say, "It would be nice if we +could just define simultaneously + +00:10:29.440 --> 00:10:32.959 +both a block and the link type." + +00:10:32.959 --> 00:10:36.000 +That way, we have a single interface + +00:10:36.000 --> 00:10:37.867 +Org mode, for these things. + +00:10:37.867 --> 00:10:39.767 +It would be nice if it was modular. + +00:10:39.767 --> 00:10:44.633 +If I defined a one kind of block and +you defined another, + +00:10:44.633 --> 00:10:45.519 +we could compose them, + +00:10:45.519 --> 00:10:49.360 +then get a nice bigger block, like LEGO. + +00:10:49.360 --> 00:10:52.320 +That would be nice. Building blocks. + +00:10:52.320 --> 00:10:56.240 +This is what we have come up with, +called defblock. + +00:10:56.240 --> 00:11:01.760 +It also has a long documentation string +containing examples and things. + +00:11:01.760 --> 00:11:04.800 +So that way, it can try to be useful. + +00:11:04.800 --> 00:11:10.880 +Let's look at a solution to these +friends' trilemma. + +00:11:10.880 --> 00:11:14.320 +So here's a way to define a block. + +00:11:14.320 --> 00:11:22.320 +It doesn't look that difficult, but this +is how they can define a block + +00:11:22.320 --> 00:11:25.920 +for their top-level feedback. + +00:11:25.920 --> 00:11:28.959 +Let's look at the three main parts +together. + +00:11:28.959 --> 00:11:31.233 +It's not that difficult, I hope. + +00:11:31.233 --> 00:11:35.300 +Just six lines, and that's including a +documentation string, + +00:11:35.300 --> 00:11:37.633 +newlines and things. + +00:11:37.633 --> 00:11:43.300 +So in line 1, we define the block just +like you define a function. + +00:11:43.300 --> 00:11:44.880 +We define a block. + +00:11:44.880 --> 00:11:47.433 +The block name is going to be called +"feedback." + +00:11:47.433 --> 00:11:49.680 +It has an author, "who." + +00:11:49.680 --> 00:11:54.133 +The author has no default value. + +00:11:54.133 --> 00:11:57.760 +It has a color, and the color has a +default value of red. + +00:11:57.760 --> 00:12:01.680 +So just as when you define functions, + +00:12:01.680 --> 00:12:06.233 +you start by define or defblock, + +00:12:06.233 --> 00:12:13.440 +then the name, some mandatory argument, +and some optional arguments. + +00:12:13.440 --> 00:12:18.480 +Then the next stage is definition. +Documentation. + +00:12:18.480 --> 00:12:20.133 +The people who use this, + +00:12:20.133 --> 00:12:22.880 +which are future you or future me, + +00:12:22.880 --> 00:12:25.519 +might want to know what this is. + +00:12:25.519 --> 00:12:27.839 +So let's get to document this. + +00:12:27.839 --> 00:12:32.079 +For Corwin, who might want to use +tooltips... + +00:12:32.079 --> 00:12:37.120 +When Corwin writes feedback in Emacs, +they'll see a nice little tooltip, + +00:12:37.120 --> 00:12:38.639 +and the tooltip will have + +00:12:38.639 --> 00:12:41.279 +this documentation string. + +00:12:41.279 --> 00:12:43.279 +That'll be nice. + +00:12:43.279 --> 00:12:45.980 +And then here's the third part. + +00:12:45.980 --> 00:12:48.067 +The last three lines are not so +difficult. + +00:12:48.067 --> 00:12:52.800 +If the backend is HTML, + +00:12:52.800 --> 00:12:55.360 +please use this template string. + +00:12:55.360 --> 00:12:57.440 +Otherwise, use the other string. + +00:12:57.440 --> 00:13:01.279 +For each of these string markers, + +00:13:01.279 --> 00:13:04.959 +please put in the color, who wrote it, +and then the contents + +00:13:04.959 --> 00:13:07.279 +of the special block or the link type. + +00:13:08.160 --> 00:13:11.600 +So that's pretty neat. Not so difficult. + +00:13:11.600 --> 00:13:14.639 +I thought that was kind of cool, + +00:13:14.639 --> 00:13:16.600 +then noticed it's anaphoric. + +00:13:16.600 --> 00:13:21.033 +This defblock gives you two new names. + +00:13:21.033 --> 00:13:23.433 +It gives you a name called contents, + +00:13:23.433 --> 00:13:26.480 +and it gives you a name called backend. + +00:13:26.480 --> 00:13:29.733 +So even if you're writing a defblock + +00:13:29.733 --> 00:13:32.560 +and you intend it to be used +only for links... + +00:13:32.560 --> 00:13:35.440 +Like these colors, for example. + +00:13:35.440 --> 00:13:38.399 +These colors were defined using defblock. + +00:13:38.399 --> 00:13:41.279 +I used them as links right here. + +00:13:41.279 --> 00:13:43.360 +You don't need to worry + +00:13:43.360 --> 00:13:45.300 +where does the text come from +in the link. + +00:13:45.300 --> 00:13:48.959 +If I say "red:Bob," is it Bob? + +00:13:48.959 --> 00:13:52.000 +Or if I put a description, is it the +description? + +00:13:52.000 --> 00:13:54.000 +So it's whatever is available will + +00:13:54.000 --> 00:13:56.720 +become the value of contents. + +00:13:56.720 --> 00:13:59.199 +If you're really interested + +00:13:59.199 --> 00:14:02.433 +and you want to do some intricate stuff, + +00:14:02.433 --> 00:14:06.933 +defblock also gives you something called +raw-contents, + +00:14:06.933 --> 00:14:08.633 +if you really want to touch + +00:14:08.633 --> 00:14:12.639 +the raw contents with all of the Org +markups still there. + +00:14:12.639 --> 00:14:19.440 +Let's see how everyone can communicate +amongst themselves + +00:14:19.440 --> 00:14:22.480 +using this new interface. + +00:14:22.480 --> 00:14:26.000 +So, Sacha speculates and she... How does + +00:14:26.000 --> 00:14:28.399 +she speculate for her Org HTML? + +00:14:28.399 --> 00:14:33.733 +She might just write. Hey look at that, +no HTML, nice. + +00:14:34.800 --> 00:14:36.833 +Amin wants to have some green, + +00:14:36.833 --> 00:14:39.600 +and so he just says, hey here's some +color green. + +00:14:39.600 --> 00:14:42.959 +There you go. It looks almost the same. + +00:14:42.959 --> 00:14:48.267 +Notice that the main argument is right +here. + +00:14:48.267 --> 00:14:49.680 +defblock took an author, + +00:14:49.680 --> 00:14:51.333 +and here's the author again. + +00:14:51.333 --> 00:14:53.920 +And now the optional argument + +00:14:53.920 --> 00:14:57.007 +uses the org babel source interface + +00:14:57.007 --> 00:15:02.867 +You just say :, then a key, and then the +argument. Quite nice. + +00:15:02.867 --> 00:15:07.920 +Corwin doesn't want to use blocks. +It's a bit of an overkill. + +00:15:07.920 --> 00:15:12.959 +He can just write a link. + +00:15:12.959 --> 00:15:17.440 +So the main argument is now +the label of the link, + +00:15:17.440 --> 00:15:23.667 +and the description of the link is the +contents of the feedback. + +00:15:23.667 --> 00:15:25.680 +So that was quite nice. + +00:15:25.680 --> 00:15:29.360 +So it looks like everyone uses the same +interface on the left + +00:15:29.360 --> 00:15:32.800 +and can have varying outputs. + +00:15:32.800 --> 00:15:34.480 +I think it looks quite nice, + +00:15:34.480 --> 00:15:36.639 +and I hope you do too. + +00:15:36.639 --> 00:15:38.800 +There's a few more. + +00:15:38.800 --> 00:15:41.800 +Maybe, as you saw in some previous ones, + +00:15:41.800 --> 00:15:43.920 +we had text side beside side, + +00:15:43.920 --> 00:15:47.440 +or we folded some regions away. + +00:15:47.440 --> 00:15:50.959 +We put some things in pretty boxes. + +00:15:50.959 --> 00:15:57.120 +We had some spoilers at the very +beginning that we hid some text. + +00:15:57.120 --> 00:16:01.680 +We demoed some texts. Here's some Org +and here's what it looks like, + +00:16:01.680 --> 00:16:05.199 +and most importantly, they compose. + +00:16:05.199 --> 00:16:12.639 +There's a a macro called thread-block. + +00:16:12.639 --> 00:16:17.000 +thread-block call, and it lets you +thread the contents + +00:16:17.000 --> 00:16:18.000 +through a number of blocks, + +00:16:18.000 --> 00:16:20.639 +treating them as if they were functions. + +00:16:20.639 --> 00:16:22.480 +So, really, you can think of a block + +00:16:23.680 --> 00:16:25.567 +as a string-valued function. + +00:16:25.567 --> 00:16:28.533 +That's pretty neat, I think. + +00:16:28.533 --> 00:16:30.959 +Thank you for listening. + +00:16:31.759 --> 00:16:34.320 +I hope you've enjoyed this little + +00:16:34.880 --> 00:16:38.160 +happy fun time with the Emacs and +friends. + +00:16:38.160 --> 00:16:43.730 +I'll happily answer questions right now. + +00:16:45.360 --> 00:16:49.467 +Someone says: "Why did you put +optional arguments + +00:16:49.467 --> 00:16:50.480 +in a separate list + +00:16:50.480 --> 00:16:54.560 +rather than using cl-style argument +lists?" + +00:16:54.560 --> 00:16:58.399 +So that's a very good question, + +00:16:58.399 --> 00:17:00.000 +and I will answer that + +00:17:00.000 --> 00:17:05.467 +by showing you a more involved +definition of feedback. + +00:17:05.467 --> 00:17:14.567 +Let's look at a more involved one right +here. + +00:17:14.567 --> 00:17:19.280 +So, for example, this one is +called rremark. + +00:17:19.280 --> 00:17:23.439 +Please let me know if my text is not +sufficiently big. + +00:17:23.439 --> 00:17:28.033 +Here is why we have two arguments. + +00:17:28.033 --> 00:17:30.720 +That takes two arguments instead of one + +00:17:30.720 --> 00:17:33.360 +for its argument list. + +00:17:33.360 --> 00:17:34.799 +You have def block, + +00:17:34.799 --> 00:17:36.000 +then you have the name, + +00:17:36.000 --> 00:17:40.467 +then you have the first argument list + +00:17:40.467 --> 00:17:42.880 +and the second argument list. + +00:17:42.880 --> 00:17:46.080 +The first argument list + +00:17:46.080 --> 00:17:49.280 +takes the text right after the begin. + +00:17:49.280 --> 00:17:53.000 +The text right after the begin is the +main argument. + +00:17:53.000 --> 00:17:59.200 +And then the remaining key-value pairs +are in the second argument list. + +00:18:00.320 --> 00:18:03.280 +Now the reason we have two is because + +00:18:03.280 --> 00:18:08.880 +in order to streamline the interface to +account for both special blocks + +00:18:08.880 --> 00:18:13.360 +and Org link types, what we do is we say, + +00:18:13.360 --> 00:18:18.000 +in the first argument list, you can give +a name to the first argument, + +00:18:18.000 --> 00:18:19.633 +give it a default value, + +00:18:19.633 --> 00:18:28.800 +and anything else you provide will +become part of the link information. + +00:18:28.800 --> 00:18:30.861 +For example, this link, + +00:18:30.861 --> 00:18:32.833 +we decided to make its face +angry red. + +00:18:32.833 --> 00:18:36.433 +You might want to give other +features to links. + +00:18:36.433 --> 00:18:39.100 +So we're trying to streamline +the interface + +00:18:39.100 --> 00:18:41.733 +for both special blocks and +Org link types, + +00:18:41.733 --> 00:18:46.240 +and we thought this way was quite nice. + +00:18:46.240 --> 00:18:47.500 +That was the main reason. + +00:18:47.500 --> 00:18:52.480 +Someone asks-- + +00:18:52.480 --> 00:18:55.039 +if you have follow-ups, please ask-- + +00:18:55.039 --> 00:18:57.600 +Someone asks, "Do you intend to try to + +00:18:57.600 --> 00:19:00.559 +upstream this amazing work into Org?" + +00:19:00.559 --> 00:19:02.300 +Well, I'm glad you like it. + +00:19:02.300 --> 00:19:04.559 +I don't know how to upstream, + +00:19:04.559 --> 00:19:06.400 +but I will look into it, + +00:19:06.400 --> 00:19:09.833 +and any advice or guidance +would be much appreciated. + +00:19:11.840 --> 00:19:15.267 +Lisp is awesome. Just as +defun is a macro, + +00:19:15.267 --> 00:19:17.120 +defblock is a macro, and then + +00:19:17.120 --> 00:19:20.240 +source blocks are awesome. + +00:19:20.240 --> 00:19:22.467 +Now maybe we can have arguments in +special blocks, + +00:19:22.467 --> 00:19:28.799 +and motivate and encourage more +people to learn Lisp. + +00:19:28.799 --> 00:19:32.559 +So another person asks, + +00:19:32.559 --> 00:19:35.280 +"What is used to produce colorful + +00:19:35.280 --> 00:19:38.559 +boxes around the cursor?" + +00:19:38.559 --> 00:19:40.400 +I'm not quite sure if you're asking... + +00:19:40.400 --> 00:19:42.559 +Are you talking about my cursor +right here, + +00:19:42.559 --> 00:19:48.400 +or are you talking about in the slide? + +00:19:48.400 --> 00:19:53.767 +So this cursor is some application +called Streambrush, + +00:19:53.767 --> 00:19:55.440 +that I had to purchase. + +00:19:55.440 --> 00:19:59.039 +Unfortunately, I could not find a a +suitable free one. + +00:19:59.039 --> 00:20:03.067 +The blocks... I can demonstrate some +Emacs Lisp. + +00:20:03.067 --> 00:20:04.467 +I can open up my Emacs, if people like, + +00:20:04.467 --> 00:20:06.320 +and we can try some things out. + +00:20:06.320 --> 00:20:09.440 +Happy to do that. + +00:20:09.440 --> 00:20:10.133 +You're welcome. + +00:20:10.133 --> 00:20:15.520 +Someone asks a side question about +org-reveal: "How do you get + +00:20:15.520 --> 00:20:17.440 +bespoke or multiple-column layouts + +00:20:17.440 --> 00:20:19.120 +without using HTML?" + +00:20:19.120 --> 00:20:22.559 +Excellent question. That's what we do. + +00:20:22.559 --> 00:20:25.533 +That's what this project is about. + +00:20:25.533 --> 00:20:27.000 +So it's not org-reveal, + +00:20:27.000 --> 00:20:30.267 +it's our fancy parallel block. + +00:20:30.267 --> 00:20:33.440 +So we have this thing. You say, +#+begin_parallel. + +00:20:33.440 --> 00:20:35.679 +You say how many columns you would like. + +00:20:35.679 --> 00:20:37.967 +Do you want a bar or not? + +00:20:37.967 --> 00:20:39.679 +And then you write some text, + +00:20:39.679 --> 00:20:44.400 +and then you get some text, and +according with the bar or not. + +00:20:44.400 --> 00:20:47.520 +That's how we achieve that in our slides. + +00:20:47.520 --> 00:20:52.880 +I'm not quite sure where this was. + +00:20:52.880 --> 00:20:59.520 +Somewhere here, I think. + +00:20:59.520 --> 00:21:06.240 +Let me try to find this for you. + +00:21:06.240 --> 00:21:10.433 +I can't seem to find where the parallel +blocks were. Apologies. + +00:21:10.433 --> 00:21:15.039 +Let's move on to the next question, +I suppose. + +00:21:15.039 --> 00:21:18.400 +I'm pretty sure they're here. Ah, there +they are. + +00:21:18.400 --> 00:21:22.640 +So these were just instances of using + +00:21:22.640 --> 00:21:26.480 +the parallel block, and it makes things +parallel. + +00:21:26.480 --> 00:21:27.633 +So that's quite nice. + +00:21:27.633 --> 00:21:33.360 +Another person asks, + +00:21:33.360 --> 00:21:37.840 +"How does this relate to pandoc, + +00:21:37.840 --> 00:21:40.960 +which is used for converting between +markup formats?" + +00:21:40.960 --> 00:21:43.919 +So all we're doing is we're saying, + +00:21:43.919 --> 00:21:47.679 +hey, please write Org because Org is +just fantastic, + +00:21:47.679 --> 00:21:49.267 +and we love it, and it's the dream, + +00:21:49.267 --> 00:21:51.760 +and if you would like to view things + +00:21:51.760 --> 00:21:55.900 +in HTML, or in org-reveal, or in PDF, + +00:21:55.900 --> 00:21:58.559 +that's up to the user. + +00:22:02.320 --> 00:22:06.080 +Made it too small now. +So here is an example. + +00:22:06.080 --> 00:22:10.240 +Here's how parallel is implemented, + +00:22:10.240 --> 00:22:14.320 +just as a quick example, not too long. + +00:22:14.320 --> 00:22:17.800 +About half of the implementation is +documentation, + +00:22:17.800 --> 00:22:22.720 +so, hopefully, that speaks for for how +useful this feature is. + +00:22:22.720 --> 00:22:25.280 +We decide if there's a rule or not. + +00:22:25.280 --> 00:22:28.080 +We look for the column break. + +00:22:28.080 --> 00:22:30.600 +Here we're looking at the backend. + +00:22:30.600 --> 00:22:31.840 +If the backend is LaTeX, + +00:22:31.840 --> 00:22:34.133 +please use this incantation + +00:22:34.133 --> 00:22:37.679 +with multicolumns, minipages, +what have you. + +00:22:37.679 --> 00:22:41.600 +If the backend is something else, please +do this: + +00:22:41.600 --> 00:22:48.080 +div, style and other gibberish that we +don't really want to look at. + +00:22:48.080 --> 00:22:51.760 +Pandoc works from Org, + +00:22:51.760 --> 00:22:53.633 +so it might not work directly, + +00:22:53.633 --> 00:22:59.679 +since our interface... The way we set it +up is: when you try to export, + +00:22:59.679 --> 00:23:03.039 +we hook in and we do a bunch of +pre-processing, + +00:23:03.039 --> 00:23:07.440 +so this defblock is a +string-valued function. + +00:23:07.440 --> 00:23:13.919 +Whenever we see these #+begin_parallel +when you do an export, + +00:23:13.919 --> 00:23:17.767 +I tell Emacs, hold up, look for those +#+begin_parallels, please. + +00:23:17.767 --> 00:23:20.320 +Oh, you found them? Grab that text. + +00:23:20.320 --> 00:23:21.533 +You grabbed it. Great. + +00:23:21.533 --> 00:23:24.080 +Now please apply this person's function + +00:23:24.080 --> 00:23:27.120 +onto that text, and splice in the result. + +00:23:27.120 --> 00:23:30.400 +So when you export, we're performing + +00:23:30.400 --> 00:23:35.120 +arbitrary computations on your text. + +00:23:35.120 --> 00:23:39.633 +Some people might not find that +comforting, + +00:23:39.633 --> 00:23:43.039 +to have arbitrary computations happening. + +00:23:43.039 --> 00:23:45.039 +In this article, there's a few where + +00:23:45.039 --> 00:23:47.167 +we change your text upon export. + +00:23:47.167 --> 00:23:51.760 +We translate it, we do other things +to it. + +00:23:51.760 --> 00:23:56.500 +So someone says, "If you export to +LaTeX, to PDF, + +00:23:56.500 --> 00:23:58.640 +does that work well with Beamer as well + +00:23:58.640 --> 00:24:00.320 +to create slides with columns?" + +00:24:05.200 --> 00:24:08.000 +I made a bunch of these changes + +00:24:08.000 --> 00:24:09.200 +earlier this morning, + +00:24:09.200 --> 00:24:12.320 +and it just says LaTeX right here. + +00:24:12.320 --> 00:24:14.400 +So if you want to go to beamer, + +00:24:14.400 --> 00:24:15.360 +I think the back end for me, + +00:24:15.360 --> 00:24:17.333 +beamer is called, well, beamer, + +00:24:17.333 --> 00:24:22.000 +so instead of a pcase, what we would do +is, we would say, + +00:24:22.000 --> 00:24:27.167 +if it's a 'latex or it's a 'beamer, then +use this. + +00:24:27.167 --> 00:24:30.267 +Otherwise, it's not a LaTeX, + +00:24:30.267 --> 00:24:31.867 +it will simply default to this one, + +00:24:31.867 --> 00:24:34.433 +which could be dangerous +for your needs. + +00:24:34.433 --> 00:24:39.167 +I think it's a bad practice to put a +underscore, + +00:24:39.167 --> 00:24:40.767 +but I did it really quickly + +00:24:40.767 --> 00:24:44.500 +because I just wanted to show you that +it works fine in org-reveal + +00:24:44.500 --> 00:24:47.440 +Contributions are more than welcome. + +00:24:47.440 --> 00:24:52.240 +I happily would love any assistance. + +00:24:52.240 --> 00:24:58.633 +We have a Lisp reference +cheat sheet here + +00:24:58.633 --> 00:25:01.000 +to learn a little bit about Lisp, if +you're not comfortable, + +00:25:01.000 --> 00:25:03.267 +or to ask some questions. + +00:25:03.267 --> 00:25:06.400 +Lots of helpful people. + +00:25:06.400 --> 00:25:09.440 +So there's another question that says, + +00:25:09.440 --> 00:25:13.120 +"Does typing in a block mess up with +syntax highlighting? + +00:25:13.120 --> 00:25:15.679 +Usually, you use a single color inside an + +00:25:15.679 --> 00:25:17.279 +example block, for example. + +00:25:17.279 --> 00:25:21.279 +Ah, you found my crutch. + +00:25:25.279 --> 00:25:27.333 +Emacs is all encompassing, + +00:25:27.333 --> 00:25:29.760 +and I'm not quite sure how fonts work. + +00:25:29.760 --> 00:25:32.559 +I learned enough to get by. + +00:25:37.440 --> 00:25:38.667 +Here's how links work. + +00:25:38.667 --> 00:25:40.799 +They're a bit complicated. + +00:25:40.799 --> 00:25:42.567 +This is a bit scary. + +00:25:42.567 --> 00:25:47.039 +I don't recommend anyone read it. + +00:25:47.039 --> 00:25:49.840 +Actually, let me open up an email + +00:25:50.559 --> 00:25:52.100 +and you can see what I see. + +00:25:52.100 --> 00:25:54.799 +So here's an Emacs. + +00:25:54.799 --> 00:25:56.799 +Let's make that a bit bigger. + +00:25:56.799 --> 00:25:59.133 +Let's change this slightly. + +00:25:59.133 --> 00:26:01.200 +Nope, that's worse. There you go. + +00:26:01.919 --> 00:26:09.360 +Here's some words. Here's red hello. + +00:26:09.360 --> 00:26:15.679 +But you're worried about preserving +fontification. + +00:26:15.679 --> 00:26:18.480 +Let's make an emacs-lisp block. + +00:26:18.880 --> 00:26:22.840 +Let's say, (+ 1 2). + +00:26:22.840 --> 00:26:31.133 +Ah, where's the fun? Hello. Bye. + +00:26:31.133 --> 00:26:32.080 +Okay. Where's the coloring? + +00:26:32.080 --> 00:26:36.000 +If we zoom in on this #+begin_src block, + +00:26:36.000 --> 00:26:39.200 +you can see down here + +00:26:39.200 --> 00:26:42.159 +we have our our coloring + +00:26:42.159 --> 00:26:43.279 +when we zoom in. + +00:26:43.279 --> 00:26:46.960 +If we zoom out, no coloring. + +00:26:46.960 --> 00:26:50.880 +Zoom in, coloring. +Zoom out, aah, no coloring. + +00:26:50.880 --> 00:26:55.679 +Let's take off these bad boys, +and oh, look, my coloring's back. + +00:26:55.679 --> 00:27:03.760 +In a previous iteration of the system, +I was able to maintain coloring. + +00:27:03.760 --> 00:27:06.400 +In this new iteration, I am not. + +00:27:06.400 --> 00:27:07.400 +I don't know how to do it. + +00:27:07.400 --> 00:27:10.333 +I haven't had the time to implement it. + +00:27:10.333 --> 00:27:17.279 +I spent a lot of time writing this +48-page documentation + +00:27:17.279 --> 00:27:21.133 +with some fun examples to try to help +people learn. + +00:27:21.133 --> 00:27:23.200 +But I would appreciate any help or +guidance + +00:27:23.200 --> 00:27:26.240 +on how to maintain the fontification. + +00:27:26.240 --> 00:27:29.200 +I really would like to keep those +colors in. + +00:27:29.200 --> 00:27:32.640 +[Amin]: Musa, we have time for maybe one +more question, + +00:27:32.640 --> 00:27:34.500 +one or two more questions, + +00:27:34.500 --> 00:27:37.039 +and then we have to move on to the +next talk. + +00:27:37.039 --> 00:27:39.120 +You're more than welcome to + +00:27:39.120 --> 00:27:42.559 +continue taking the questions via +IRC or the pad. + +00:27:42.559 --> 00:27:45.760 +[Musa]: Okay. Thank you. + +00:27:45.760 --> 00:27:48.880 +The final question we'll take is, + +00:27:48.880 --> 00:27:52.320 +"Should packages implement + +00:27:52.320 --> 00:27:53.967 +interface to one specific format, + +00:27:53.967 --> 00:27:55.600 +or attempt to be inclusive + +00:27:55.600 --> 00:27:57.279 +to all the potential output targets?" + +00:27:57.279 --> 00:27:59.300 +I think you should just make them +as you go, + +00:27:59.300 --> 00:28:01.500 +and add them as you need them. + +00:28:01.500 --> 00:28:05.600 +We'll make Github requests for things. + +00:28:05.600 --> 00:28:08.533 +We can share recipes in this document, + +00:28:08.533 --> 00:28:12.333 +and then try to add other techniques, + +00:28:12.333 --> 00:28:19.200 +and then we can use these blocks as a +common interface + +00:28:19.200 --> 00:28:22.240 +for exporting to PDF and other things. + +00:28:22.240 --> 00:28:26.000 +Since someone asked, + +00:28:26.000 --> 00:28:28.033 +here what a PDF looks like. + +00:28:28.033 --> 00:28:31.667 +This is the same PDF rendered. + +00:28:31.667 --> 00:28:34.960 +I made no effort to make it look good, + +00:28:34.960 --> 00:28:37.840 +but it surprisingly does look good. + +00:28:38.559 --> 00:28:40.067 +That was nice. + +00:28:40.067 --> 00:28:44.320 +That was a terrible magenta, +but that is life. + +00:28:44.320 --> 00:28:47.100 +Anyhow, I hope you all enjoyed this talk. + +00:28:47.100 --> 00:28:51.033 +I hope you will find +defblock useful to you. + +00:28:51.033 --> 00:28:52.799 +It is available on MELPA. + +00:28:52.799 --> 00:28:56.367 +In a rush to make it available for +EmacsConf 2020, + +00:28:56.367 --> 00:29:00.159 +some MELPA guidelines may not have been +adhered to. + +00:29:00.159 --> 00:29:01.600 +Please do not hit me. + +00:29:01.600 --> 00:29:08.559 +I hope everyone enjoys the rest of the +EmacsConf 2020. Thank you! |