diff options
Diffstat (limited to '2026/captions')
12 files changed, 6189 insertions, 0 deletions
diff --git a/2026/captions/emacsconf-2026-anju--revisiting-emacs-mouse-interactions-with-anju--charles-y-choi--main--chapters.vtt b/2026/captions/emacsconf-2026-anju--revisiting-emacs-mouse-interactions-with-anju--charles-y-choi--main--chapters.vtt new file mode 100644 index 00000000..64abbf80 --- /dev/null +++ b/2026/captions/emacsconf-2026-anju--revisiting-emacs-mouse-interactions-with-anju--charles-y-choi--main--chapters.vtt @@ -0,0 +1,86 @@ +WEBVTT + + +00:00:00.405 --> 00:00:33.700 +Introduction + +00:00:35.221 --> 00:00:45.569 +Why Anju? + +00:00:47.951 --> 00:01:41.937 +Over-committed to the middle mouse button + +00:01:45.478 --> 00:02:14.320 +Menus feel more like inventories + +00:02:18.233 --> 00:02:45.273 +Surprising single vs. double-click behavior + +00:02:48.602 --> 00:03:07.827 +Erratic context menu design + +00:03:14.489 --> 00:03:59.086 +What does Anju do? + +00:04:02.068 --> 00:04:31.752 +Who is Anju for? + +00:04:36.091 --> 00:04:53.505 +Design principles: Making a calmer mouse experience + +00:04:55.606 --> 00:05:34.688 +Menus should be organized + +00:05:37.550 --> 00:05:55.248 +Concision is achieved with context + +00:05:58.030 --> 00:06:42.938 +Example context criteria + +00:06:45.567 --> 00:06:59.615 +Anju demo + +00:07:03.558 --> 00:07:34.640 +Direct manipulation: Window splitting + +00:07:40.508 --> 00:07:53.892 +Window swapping + +00:07:58.233 --> 00:08:38.740 +Mode line + +00:08:46.300 --> 00:09:13.050 +Menu bar + +00:09:16.823 --> 00:10:24.344 +Edit menu + +00:10:30.338 --> 00:11:18.165 +Registers menu + +00:11:22.168 --> 00:11:36.175 +Bookmarks + +00:11:41.258 --> 00:11:52.708 +Text formatting + +00:12:12.998 --> 00:12:42.422 +Macro recorder menu + +00:13:25.882 --> 00:13:46.567 +Context menus + +00:13:49.881 --> 00:14:06.857 +Dired context menu + +00:14:12.815 --> 00:16:19.236 +Elisp context menu + +00:16:25.837 --> 00:16:47.508 +Org Mode context menu + +00:16:56.073 --> 00:17:30.392 +Menu item introspection + +00:17:33.994 --> 00:18:08.695 +Anju summary diff --git a/2026/captions/emacsconf-2026-anju--revisiting-emacs-mouse-interactions-with-anju--charles-y-choi--main.vtt b/2026/captions/emacsconf-2026-anju--revisiting-emacs-mouse-interactions-with-anju--charles-y-choi--main.vtt new file mode 100644 index 00000000..8ffce76f --- /dev/null +++ b/2026/captions/emacsconf-2026-anju--revisiting-emacs-mouse-interactions-with-anju--charles-y-choi--main.vtt @@ -0,0 +1,928 @@ +WEBVTT captioned by sachac + + +NOTE Introduction + +00:00:00.405 --> 00:00:03.606 +Hello, my name is Charles Choi and welcome to my talk, + +00:00:03.607 --> 00:00:06.590 +Revisiting Emacs Mouse Interactions with Anju. + +00:00:08.010 --> 00:00:10.633 +Anju is a project to provide a better point and + +00:00:10.673 --> 00:00:12.794 +click experience for Emacs. + +00:00:13.795 --> 00:00:16.958 +Motivating Anju is the desire to align Emacs + +00:00:16.998 --> 00:00:19.279 +mouse interactions with what I think most mouse + +00:00:19.419 --> 00:00:21.721 +users would expect in 2026. + +00:00:22.882 --> 00:00:25.884 +This talk will be opinionated and hopefully not + +00:00:25.964 --> 00:00:26.705 +too triggering. + +00:00:28.215 --> 00:00:30.657 +For reference, Anju is a Korean word whose + +00:00:30.737 --> 00:00:33.700 +translation is food eaten alongside alcohol. + +NOTE Why Anju? + +00:00:35.221 --> 00:00:36.202 +So why make Anju? + +00:00:37.363 --> 00:00:39.244 +Let me start with a strong assertion. + +00:00:40.365 --> 00:00:42.907 +It's really weird to use a mouse with Emacs out + +00:00:42.927 --> 00:00:43.468 +of the box. + +00:00:44.549 --> 00:00:45.569 +This is why I think that. + +NOTE Over-committed to the middle mouse button + +00:00:47.951 --> 00:00:50.494 +The first one is a fixation on maintaining the + +00:00:50.554 --> 00:00:51.855 +middle mouse button event. + +00:00:52.475 --> 00:00:54.757 +This affects things like the mode line, scroll + +00:00:54.797 --> 00:00:56.899 +bars, dividers, and pasting text. + +00:00:57.911 --> 00:01:00.372 +Arguably this banding was made at a time when + +00:01:00.432 --> 00:01:03.552 +most mice looked like the Sun optical mice that + +00:01:03.572 --> 00:01:04.973 +you see here from the 90s. + +00:01:05.613 --> 00:01:06.593 +Times change though. + +00:01:07.834 --> 00:01:10.514 +For many decades now this is the baseline design + +00:01:10.554 --> 00:01:14.095 +of a mouse which is emulated with trackpads on laptops. + +00:01:16.036 --> 00:01:18.596 +The middle button has been replaced by a scroll + +00:01:18.636 --> 00:01:21.017 +wheel which does double duty as a button. + +00:01:22.404 --> 00:01:24.625 +That said, pressing this scroll wheel button is + +00:01:24.666 --> 00:01:27.427 +an unpleasant experience compared to the left and + +00:01:27.487 --> 00:01:29.529 +right buttons next to it. + +00:01:31.150 --> 00:01:33.691 +Given a standard right-handed configuration, the + +00:01:33.752 --> 00:01:38.154 +left button is used for primary selection and the + +00:01:38.214 --> 00:01:41.937 +right button is commonly used to raise a context menu. + +NOTE Menus feel more like inventories + +00:01:45.478 --> 00:01:48.540 +A lot of menus in Emacs feel ad-hoc design, which + +00:01:48.600 --> 00:01:51.463 +results in a chaotic experience for users. + +00:01:52.443 --> 00:01:55.005 +Often menus feel more like inventories than an + +00:01:55.065 --> 00:01:56.366 +information architecture. + +00:01:57.267 --> 00:01:59.909 +Consider, for example, Dired, which has no less + +00:01:59.949 --> 00:02:03.111 +than 5 separate top-level menus, whose design is + +00:02:03.211 --> 00:02:04.752 +best described as mid. + +00:02:05.913 --> 00:02:09.196 +Picking apart this design is another talk, but + +00:02:09.276 --> 00:02:12.098 +I'll ask, why does bytecompile in the operate + +00:02:12.138 --> 00:02:14.320 +menu show up for files other than Elisp? + +NOTE Surprising single vs. double-click behavior + +00:02:18.233 --> 00:02:21.656 +Another irritant is how Emacs handles single vs. + +00:02:21.716 --> 00:02:22.876 +double click behavior. + +00:02:24.117 --> 00:02:27.100 +Typical file managers like Microsoft Explorer and + +00:02:29.341 --> 00:02:33.504 +macOS Finder treat single click as a selection action. + +00:02:34.325 --> 00:02:37.427 +However, Dired and Ibuffer both treat single + +00:02:37.487 --> 00:02:40.409 +click as an open action like a hypertext document. + +00:02:41.310 --> 00:02:45.273 +This makes for a very twitchy and anxious experience. + +NOTE Erratic context menu design + +00:02:48.602 --> 00:02:51.563 +The adoption of context menu mode introduced in + +00:02:51.663 --> 00:02:54.464 +Emacs 28 has been uneven at best. + +00:02:55.744 --> 00:02:58.425 +Many modes implement their context menu by just + +00:02:58.465 --> 00:03:00.805 +dumping their mode map into its contents. + +00:03:01.926 --> 00:03:04.546 +Such an approach fails to take advantage of + +00:03:04.646 --> 00:03:07.827 +building a genuinely context-sensitive interface. + +NOTE What does Anju do? + +00:03:14.489 --> 00:03:17.870 +Anju makes opinionated changes to mouse behavior in Emacs. + +00:03:19.078 --> 00:03:22.320 +First is to enhance direct manipulation, as the + +00:03:22.360 --> 00:03:24.922 +mouse is intrinsically a pointing device. + +00:03:26.263 --> 00:03:29.545 +Second is to revisit how content is organized in + +00:03:29.585 --> 00:03:33.328 +menus for both the menu bar and context menus. + +00:03:34.789 --> 00:03:37.571 +And finally is to stop using the middle button. + +00:03:41.238 --> 00:03:43.779 +My opinions on application user interfaces are + +00:03:43.819 --> 00:03:46.460 +strongly informed by macOS and Windows. + +00:03:47.241 --> 00:03:52.323 +Guiding their design is the HIG and CUA, respectively. + +00:03:53.424 --> 00:03:56.944 +In building Anju, I've tried to make design decisions + +00:03:56.945 --> 00:03:59.086 +that are conventional to those platforms. + +NOTE Who is Anju for? + +00:04:02.068 --> 00:04:02.748 +Who's this for? + +00:04:04.603 --> 00:04:07.444 +While this meme is shown in jest, there is truth + +00:04:08.844 --> 00:04:11.705 +that pointing tasks are more efficiently done + +00:04:11.785 --> 00:04:12.326 +with a mouse. + +00:04:15.026 --> 00:04:17.527 +More seriously though, Anju is for everybody. + +00:04:18.408 --> 00:04:21.108 +I contend that Emacs is capable of good mouse + +00:04:21.148 --> 00:04:24.770 +support and those who insist on using a keyboard + +00:04:24.830 --> 00:04:25.910 +alone are missing out. + +00:04:26.710 --> 00:04:29.691 +With Anju, Emacs users can have both a great + +00:04:29.791 --> 00:04:31.752 +keyboard and mouse experience. + +NOTE Design principles: Making a calmer mouse experience + +00:04:36.091 --> 00:04:39.514 +Aspirationally, Anju tries to make using the mouse + +00:04:39.874 --> 00:04:41.375 +a calmer experience. + +00:04:42.736 --> 00:04:44.718 +Let's detail how this is achieved. + +00:04:47.260 --> 00:04:49.481 +First is to recognize that the mouse is a + +00:04:49.542 --> 00:04:50.342 +pointing device. + +00:04:50.943 --> 00:04:52.944 +With it, you can directly act on what you're + +00:04:52.964 --> 00:04:53.505 +pointing at. + +NOTE Menus should be organized + +00:04:55.606 --> 00:04:57.408 +Second is menu organization. + +00:04:58.627 --> 00:05:01.349 +Menus surface actionable commands to the user. + +00:05:01.830 --> 00:05:04.031 +Ideally, there is an information architecture + +00:05:04.071 --> 00:05:06.013 +that gives structure and relevance to the + +00:05:06.053 --> 00:05:07.634 +commands presented to the user. + +00:05:09.196 --> 00:05:12.318 +Two competing objectives in organizing commands + +00:05:12.498 --> 00:05:14.720 +is discoverability versus concision. + +00:05:15.741 --> 00:05:18.883 +Discoverability wants to maximize choice, whereas + +00:05:18.944 --> 00:05:21.946 +concision seeks to minimize it. + +00:05:24.924 --> 00:05:27.245 +Anju takes the opinion that the menu bar should + +00:05:27.265 --> 00:05:32.387 +be optimized for discoverability, and that + +00:05:32.447 --> 00:05:34.688 +context menus are all about concision. + +NOTE Concision is achieved with context + +00:05:37.550 --> 00:05:40.851 +To get concision, you need to take into account context. + +00:05:41.732 --> 00:05:42.692 +What is context? + +00:05:43.452 --> 00:05:46.073 +It is the set of circumstances that give meaning + +00:05:46.334 --> 00:05:47.014 +to an event. + +00:05:48.543 --> 00:05:51.946 +In general, for a context menu, the event is the + +00:05:51.986 --> 00:05:55.248 +place on the screen where the context menu is raised. + +NOTE Example context criteria + +00:05:58.030 --> 00:06:00.652 +Different criteria can determine when a command + +00:06:00.712 --> 00:06:02.433 +is shown in a context menu. + +00:06:03.794 --> 00:06:06.456 +These include the position of the mouse, whether + +00:06:06.516 --> 00:06:09.138 +text is selected, what mode is active. + +00:06:09.539 --> 00:06:12.121 +A whole host of different criteria can be + +00:06:12.301 --> 00:06:15.003 +generated and this is just only a subset here. + +00:06:16.144 --> 00:06:18.825 +Combinatorial logic on this criteria determines + +00:06:19.046 --> 00:06:21.847 +if and how a command is displayed in the menu. + +00:06:24.588 --> 00:06:29.471 +Other menu design concerns include nesting menus + +00:06:29.511 --> 00:06:33.033 +so they don't go no more than two deep, surfacing + +00:06:33.113 --> 00:06:37.015 +relevant commands as shelf space is limited, and + +00:06:37.075 --> 00:06:39.436 +minimizing switching between the mouse and + +00:06:39.496 --> 00:06:42.938 +keyboard to keep your hands in one place. + +NOTE Anju demo + +00:06:45.567 --> 00:06:47.408 +So, let's show Anju in action. + +00:06:48.409 --> 00:06:51.070 +Note that in the videos, a black circle overlay + +00:06:51.150 --> 00:06:53.752 +is a left mouse button press and a green circle + +00:06:53.852 --> 00:06:54.552 +is for the right. + +00:06:55.513 --> 00:06:57.714 +By default, clicking on the right mouse button + +00:06:57.794 --> 00:06:59.615 +will raise a context menu. + +NOTE Direct manipulation: Window splitting + +00:07:03.558 --> 00:07:07.460 +Anju uses direct manipulation to support managing windows. + +00:07:10.586 --> 00:07:14.388 +From a context menu, a submenu for window + +00:07:14.428 --> 00:07:16.229 +management is provided. + +00:07:16.309 --> 00:07:19.391 +As the demo illustrates, this submenu provides + +00:07:19.431 --> 00:07:22.913 +commands to split the current window to the side + +00:07:22.973 --> 00:07:23.473 +and below. + +00:07:24.774 --> 00:07:27.776 +Note how the new window boundary corresponds to + +00:07:27.856 --> 00:07:29.617 +where the mouse position is. + +00:07:31.498 --> 00:07:33.959 +This submenu also supports deletion of the + +00:07:33.999 --> 00:07:34.640 +current window. + +NOTE Window swapping + +00:07:40.508 --> 00:07:42.989 +When multiple windows are displayed, the window + +00:07:43.029 --> 00:07:46.970 +management menu provides a submenu for swapping windows. + +00:07:48.130 --> 00:07:51.151 +This menu is designed to only show possible swap + +00:07:51.331 --> 00:07:53.892 +directions, as it is context-sensitive. + +NOTE Mode line + +00:07:58.233 --> 00:08:01.254 +Support for direct manipulation is already in the + +00:08:01.314 --> 00:08:03.855 +mode line, which can resize a window both + +00:08:03.995 --> 00:08:05.736 +vertically and horizontally. + +00:08:06.705 --> 00:08:09.827 +Anju modifies the mode line to let the user + +00:08:09.907 --> 00:08:12.367 +maximize the window from it + +00:08:12.368 --> 00:08:14.189 +with a left double-click event. + +00:08:14.829 --> 00:08:17.270 +The double-click must occur on a blank space on + +00:08:17.290 --> 00:08:20.632 +the mode line as other text on the mode line can + +00:08:20.692 --> 00:08:22.013 +accept mouse events. + +00:08:23.323 --> 00:08:26.406 +After maximizing a window, the user can return + +00:08:26.466 --> 00:08:29.109 +back to the earlier window configuration by + +00:08:29.169 --> 00:08:32.472 +repeating the same left double-click event again. + +00:08:33.614 --> 00:08:35.876 +Another change to the mode line is binding the + +00:08:35.917 --> 00:08:38.740 +window management menu to the right mouse button. + +NOTE Menu bar + +00:08:46.300 --> 00:08:48.661 +Anju changes the menu bar to enhance + +00:08:48.721 --> 00:08:49.641 +discoverability. + +00:08:50.262 --> 00:08:53.562 +In particular, Anju tries to surface + +00:08:53.563 --> 00:08:55.943 +Emacs-specific features that distinguish it + +00:08:55.944 --> 00:08:58.304 +from less capable editors. + +00:08:59.065 --> 00:09:01.746 +I strongly feel that usage of these features is + +00:09:01.866 --> 00:09:04.307 +why you would want to use Emacs in the first place. + +00:09:05.067 --> 00:09:07.028 +The catch is that many of these features are + +00:09:07.208 --> 00:09:07.988 +undiscoverable. + +00:09:08.888 --> 00:09:11.289 +Anju tries to remedy this by making them + +00:09:11.569 --> 00:09:13.050 +prominent in the menu bar. + +NOTE Edit menu + +00:09:16.823 --> 00:09:20.166 +Anju has many special case commands for editing + +00:09:20.226 --> 00:09:21.607 +text of different sizes. + +00:09:22.308 --> 00:09:25.110 +Such commands work on text extents ranging from + +00:09:25.210 --> 00:09:27.372 +words to sentences to paragraphs. + +00:09:28.753 --> 00:09:31.075 +Anju adds such commands to the edit menu. + +00:09:31.975 --> 00:09:35.318 +Commands to duplicate, align, and delete text are + +00:09:35.398 --> 00:09:36.960 +also added. + +00:09:36.980 --> 00:09:39.822 +This demo here offers a glimpse into the editing + +00:09:39.882 --> 00:09:41.023 +powers of Emacs. + +00:09:42.495 --> 00:09:45.337 +Duplicating text can be done in one step with a + +00:09:45.397 --> 00:09:46.398 +duplicate command. + +00:09:47.259 --> 00:09:50.381 +Same for text alignment to a regular expression. + +00:09:51.502 --> 00:09:54.985 +Rectangle commands are a powerful editing feature of Emacs. + +00:09:55.686 --> 00:09:59.629 +Using C-M-mouse-1, you can select a rectangle. + +00:10:00.770 --> 00:10:03.992 +The rectangle submenu will then be enabled in the edit menu. + +00:10:05.453 --> 00:10:09.497 +Multiple spaces can be reduced to one with the + +00:10:09.577 --> 00:10:10.918 +Just One Space command. + +00:10:16.855 --> 00:10:19.678 +And then here we can see flush-lines at work, + +00:10:20.700 --> 00:10:23.683 +flushing all lines that contain an instance of + +00:10:23.703 --> 00:10:24.344 +the word pair. + +NOTE Registers menu + +00:10:30.338 --> 00:10:33.579 +Registers are an Emacs feature to store different + +00:10:33.619 --> 00:10:35.879 +kinds of runtime information such as text + +00:10:35.919 --> 00:10:39.340 +clippings, position, window configuration, and + +00:10:39.380 --> 00:10:40.460 +keyboard macros. + +00:10:41.060 --> 00:10:44.241 +In this demo, we'll store two different text + +00:10:44.261 --> 00:10:47.342 +selections into two different registers and then + +00:10:47.422 --> 00:10:49.282 +insert each stored register. + +00:10:58.348 --> 00:11:01.311 +Here we'll insert register 1. + +00:11:03.913 --> 00:11:06.375 +And in this demo, we'll insert register 2. + +00:11:10.679 --> 00:11:12.160 +That concludes that demo. + +00:11:12.460 --> 00:11:14.482 +I'm of the opinion that registers are so + +00:11:14.542 --> 00:11:17.484 +important that I've made them a top-level menu in + +00:11:17.504 --> 00:11:18.165 +the menu bar. + +NOTE Bookmarks + +00:11:22.168 --> 00:11:24.809 +Another feature that I think is important enough + +00:11:24.869 --> 00:11:26.529 +to put in the menu bar is bookmarks, + +00:11:26.530 --> 00:11:29.811 +which lets you keep track of different documents + +00:11:29.812 --> 00:11:30.792 +for later recall. + +00:11:31.393 --> 00:11:33.614 +Once you start using them, you'll quickly learn + +00:11:33.734 --> 00:11:36.175 +what an essential feature they are to Emacs. + +NOTE Text formatting + +00:11:41.258 --> 00:11:43.819 +For text modes, a text formatting menu is + +00:11:43.899 --> 00:11:45.380 +provided by the menu bar. + +00:11:46.437 --> 00:11:48.781 +Anju enhances this by adding menus for + +00:11:48.821 --> 00:11:52.708 +transforming, styling, and filling in selected text. + +NOTE Macro recorder menu + +00:12:12.998 --> 00:12:16.061 +Emacs has the ability to record user actions for + +00:12:16.121 --> 00:12:17.061 +playback later. + +00:12:17.662 --> 00:12:20.364 +This is called a keyboard macro, but despite its + +00:12:20.444 --> 00:12:25.869 +naming, such macros can also record mouse events. + +00:12:25.909 --> 00:12:28.611 +Anju adds a macro recorder menu to the Tools + +00:12:28.651 --> 00:12:31.173 +menu, providing access to both creating and + +00:12:31.273 --> 00:12:32.214 +editing macros. + +00:12:33.074 --> 00:12:35.777 +This demo shows the creation of a macro with a + +00:12:35.837 --> 00:12:40.841 +counter and shows how the macro can be edited and + +00:12:41.121 --> 00:12:42.422 +the counter adjusted. + +NOTE Context menus + +00:13:25.882 --> 00:13:29.083 +Anju builds off context menu mode to provide many + +00:13:29.183 --> 00:13:31.483 +enhancements to many different modes. + +00:13:32.124 --> 00:13:35.144 +These menus test multiple criteria to offer a + +00:13:35.184 --> 00:13:38.665 +concise set of context-sensitive commands. + +00:13:38.705 --> 00:13:41.346 +Anju also provides context menus that are + +00:13:41.426 --> 00:13:43.066 +non-mode specific as well. + +00:13:44.026 --> 00:13:46.567 +Let's see a couple of these context menus in action. + +NOTE Dired context menu + +00:13:49.881 --> 00:13:53.404 +Anju provides a simplified context menu for Dired + +00:13:54.125 --> 00:13:56.727 +that focuses on basic commands + +00:13:56.728 --> 00:13:58.890 +for a selected file or directory. + +00:13:59.991 --> 00:14:02.752 +The context menu supports creating, hiding, + +00:14:02.753 --> 00:14:05.655 +and removing subviews, which enables work + +00:14:05.656 --> 00:14:06.857 +on a directory hierarchy. + +NOTE Elisp context menu + +00:14:12.815 --> 00:14:15.537 +Dig deep enough and you'll find Elisp everywhere + +00:14:15.637 --> 00:14:16.217 +in Emacs. + +00:14:16.958 --> 00:14:20.080 +Anji offers a way to evaluate and debug Elisps + +00:14:20.140 --> 00:14:21.381 +through a context menu. + +00:14:22.142 --> 00:14:24.924 +In this demo, we'll debug a command that copies + +00:14:25.084 --> 00:14:28.326 +all the notes blocks in an Org file into the kill ring. + +00:14:29.367 --> 00:14:31.588 +As part of the debugging, we'll set up a + +00:14:31.648 --> 00:14:34.329 +watchlist to keep track of variables + +00:14:34.330 --> 00:14:35.471 +and set some breakpoints. + +00:14:36.612 --> 00:14:38.814 +Note how everything here is mouse driven. + +00:14:39.154 --> 00:14:42.116 +There's no need to recall arcane key bindings. + +00:14:44.230 --> 00:14:45.511 +We'll set some breakpoints. + +00:14:46.291 --> 00:14:49.752 +The first one on the loop, the while loop in + +00:14:49.792 --> 00:14:52.513 +there, and then the one right after the loop + +00:14:53.834 --> 00:14:57.875 +completes, which is the kill new statement on + +00:14:57.995 --> 00:14:59.576 +lines 13 and 20. + +00:15:02.337 --> 00:15:04.278 +And then we'll do a little step through. + +00:15:11.270 --> 00:15:15.693 +Get to our first breakpoint and we'll watch some variables. + +00:15:15.773 --> 00:15:18.854 +We'll watch the start variable and the end variable. + +00:15:18.954 --> 00:15:23.857 +Those are two variables that keep track of the + +00:15:24.378 --> 00:15:29.040 +start of a region and the end of a region for + +00:15:29.100 --> 00:15:37.665 +where a notes block is in the Org file that is. + +00:15:37.685 --> 00:15:40.307 +We'll see that the value of start is + +00:15:40.953 --> 00:15:44.396 +changed to 153 if we step through again. + +00:15:49.261 --> 00:15:53.645 +We'll see that the end variable has updated at + +00:15:53.685 --> 00:15:57.168 +the end of that loop to 258. + +00:15:57.449 --> 00:16:01.152 +Then we'll remove those breakpoints on loop and + +00:16:01.212 --> 00:16:03.815 +advance always so that we get out of it. + +00:16:05.355 --> 00:16:11.004 +And here we'll want to inspect a list of strings + +00:16:11.064 --> 00:16:12.005 +called buflist. + +00:16:13.087 --> 00:16:17.073 +We can see that all of the contents of the + +00:16:17.173 --> 00:16:19.236 +Org file have been extracted. + +NOTE Org Mode context menu + +00:16:25.837 --> 00:16:28.698 +Anju's context menu for Org Mode takes advantage + +00:16:28.799 --> 00:16:30.980 +of structural information about the Org file. + +00:16:31.500 --> 00:16:34.061 +The context menu can test what kind of section + +00:16:34.101 --> 00:16:36.662 +the point is in and adjust itself accordingly. + +00:16:37.323 --> 00:16:39.564 +For example, if the point is on a heading, + +00:16:40.464 --> 00:16:42.525 +commands relevant to a heading are shown. + +00:16:44.346 --> 00:16:47.508 +Similar treatment is done for other structural elements. + +NOTE Menu item introspection + +00:16:56.073 --> 00:16:58.895 +In Emacs, nearly everything is introspectable, + +00:16:59.095 --> 00:17:01.116 +and that includes menu items. + +00:17:01.176 --> 00:17:03.677 +In this demo, we can find out the command + +00:17:03.817 --> 00:17:06.979 +underlying the jump command in the registers menu. + +00:17:08.819 --> 00:17:10.281 +Let's see the demo in action. + +00:17:10.421 --> 00:17:13.522 +So, we'll first go to the help menu in the menu + +00:17:13.563 --> 00:17:17.805 +bar, click on describe key or mouse, and then + +00:17:17.925 --> 00:17:20.746 +select the jump item in the registers menu. + +00:17:21.327 --> 00:17:23.588 +You'll see a help buffer pop up. + +00:17:24.186 --> 00:17:26.669 +Showing that it is the command jump to register + +00:17:26.909 --> 00:17:30.392 +pressing S will then show the source code. + +NOTE Anju summary + +00:17:33.994 --> 00:17:36.935 +In summary, Anju updates mouse interactions + +00:17:36.936 --> 00:17:39.998 +in Emacs to be familiar to users more accustomed to + +00:17:40.058 --> 00:17:41.439 +a point-and-click experience. + +00:17:41.900 --> 00:17:44.762 +Anju does so by enhancing the mode line, + +00:17:46.959 --> 00:17:49.501 +the menu bar and context menus. + +00:17:50.342 --> 00:17:53.144 +Only a subset of the menus provided by Anju have + +00:17:53.164 --> 00:17:54.745 +been demonstrated here. + +00:17:55.505 --> 00:17:58.127 +Viewers are welcome to try Anju out to discover + +00:17:58.267 --> 00:18:01.129 +all of its offerings. + +00:18:01.209 --> 00:18:04.132 +Anju is available on MELPA and you can get its + +00:18:04.172 --> 00:18:05.533 +source code on GitHub. + +00:18:06.233 --> 00:18:07.594 +Feedback is always welcome. + +00:18:08.295 --> 00:18:08.695 +Thank you. diff --git a/2026/captions/emacsconf-2026-dnd--dnd-and-org-roam-becoming-a-better-dm-with-emacs--james-r-stoup--main--chapters.vtt b/2026/captions/emacsconf-2026-dnd--dnd-and-org-roam-becoming-a-better-dm-with-emacs--james-r-stoup--main--chapters.vtt new file mode 100644 index 00000000..e0527980 --- /dev/null +++ b/2026/captions/emacsconf-2026-dnd--dnd-and-org-roam-becoming-a-better-dm-with-emacs--james-r-stoup--main--chapters.vtt @@ -0,0 +1,56 @@ +WEBVTT + + +00:00:03.389 --> 00:00:33.089 +Introduction + +00:00:33.129 --> 00:01:00.615 +What is Org Mode? + +00:01:02.317 --> 00:01:40.756 +Dungeons and Dragons + +00:01:41.097 --> 00:02:25.347 +Speed is the key + +00:02:27.652 --> 00:03:39.291 +Overview of this talk + +00:03:40.503 --> 00:04:09.107 +Capture + +00:04:09.127 --> 00:05:27.420 +Tags + +00:05:28.782 --> 00:05:48.087 +Game notes + +00:05:48.147 --> 00:07:04.689 +NPCs: non-player characters + +00:07:04.829 --> 00:07:59.708 +Locations + +00:07:59.868 --> 00:09:20.929 +Items + +00:09:21.530 --> 00:10:35.766 +Familiars + +00:10:36.269 --> 00:12:36.387 +Lists + +00:12:37.469 --> 00:14:10.312 +Session 1 + +00:14:11.800 --> 00:15:18.412 +Adding more notes on the fly + +00:15:19.716 --> 00:15:51.598 +Going back + +00:15:51.578 --> 00:19:01.795 +Visualizations + +00:19:01.815 --> 00:19:16.377 +Wrapping up diff --git a/2026/captions/emacsconf-2026-dnd--dnd-and-org-roam-becoming-a-better-dm-with-emacs--james-r-stoup--main.vtt b/2026/captions/emacsconf-2026-dnd--dnd-and-org-roam-becoming-a-better-dm-with-emacs--james-r-stoup--main.vtt new file mode 100644 index 00000000..80a6473d --- /dev/null +++ b/2026/captions/emacsconf-2026-dnd--dnd-and-org-roam-becoming-a-better-dm-with-emacs--james-r-stoup--main.vtt @@ -0,0 +1,976 @@ +WEBVTT captioned by sachac + +NOTE Introduction + +00:00:03.389 --> 00:00:06.876 +Hello, my name is James Stoup and I am going to + +00:00:06.916 --> 00:00:10.483 +be presenting D&D and Org Roam become a better DM + +00:00:10.543 --> 00:00:14.972 +with Emacs. + +00:00:14.992 --> 00:00:21.164 +So this talk is about using Org Roam custom + +00:00:21.204 --> 00:00:22.326 +caption templates, + +00:00:23.909 --> 00:00:28.740 +and some of the features of Org Mode to make + +00:00:29.762 --> 00:00:33.089 +DMing much easier. + +NOTE What is Org Mode? + +00:00:33.129 --> 00:00:35.774 +For those of you who've never used Org Roam, + +00:00:35.775 --> 00:00:38.701 +Org Roam is a layer that sits on top of Org Mode. + +00:00:39.062 --> 00:00:43.993 +Basically, it facilitates creating links between files, + +00:00:45.188 --> 00:00:49.155 +and essentially creates a graph database of all + +00:00:49.195 --> 00:00:54.244 +of your linked Org files so that you can then + +00:00:55.005 --> 00:00:58.951 +traverse those links and visualize them easier + +00:00:58.952 --> 00:01:00.615 +to make connections with your data. + +NOTE Dungeons and Dragons + +00:01:02.317 --> 00:01:04.480 +For those of you who've never played D&D before, + +00:01:05.182 --> 00:01:07.507 +it's a tabletop RPG. + +00:01:08.368 --> 00:01:10.813 +You have one person, the DM, the Dungeon Master, + +00:01:10.853 --> 00:01:12.936 +who creates a world. + +00:01:12.956 --> 00:01:15.501 +And then you have a bunch of players who come in, + +00:01:15.661 --> 00:01:17.625 +sit down, and interact with the world. + +00:01:19.715 --> 00:01:23.018 +This process produces tons of little data points + +00:01:23.819 --> 00:01:28.103 +that can easily be lost in the moment because + +00:01:28.224 --> 00:01:30.326 +typically when you're DMing, you're not focused + +00:01:30.446 --> 00:01:32.568 +on taking a huge amount of notes. + +00:01:33.068 --> 00:01:34.910 +You're in the flow, you're talking, you're doing + +00:01:34.970 --> 00:01:37.933 +things, and you don't have time to write a couple + +00:01:37.973 --> 00:01:40.756 +paragraphs about everything that's happening. + +NOTE Speed is the key + +00:01:41.097 --> 00:01:44.880 +What you need is a way to quickly create + +00:01:45.381 --> 00:01:49.485 +relevant, properly tagged, sorted information + +00:01:49.465 --> 00:01:52.233 +that you can come back to later and fill out, + +00:01:52.265 --> 00:01:57.480 +without that being an overwhelmingly time-consuming task. + +00:01:57.481 --> 00:01:59.967 +You don't want the session to grind to a halt + +00:01:59.968 --> 00:02:02.500 +while you say, hold on, and then you do a bunch of typing. + +00:02:02.501 --> 00:02:04.033 +That's not what we're going for. + +00:02:04.034 --> 00:02:05.667 +It should be seamless. + +00:02:05.668 --> 00:02:07.315 +It should be as you're speaking, you reach a + +00:02:07.415 --> 00:02:09.359 +logical pause, you ask your players for a + +00:02:09.439 --> 00:02:11.322 +question, or you say something. + +00:02:11.302 --> 00:02:13.766 +Then you fire off a command, open up a + +00:02:13.807 --> 00:02:16.391 +capture template, save some information, link it, + +00:02:16.411 --> 00:02:18.654 +and then you can come back to it later + +00:02:18.655 --> 00:02:20.419 +and revise it as needed. + +00:02:20.439 --> 00:02:24.245 +But speed is the key. + +00:02:24.265 --> 00:02:25.347 +Speed over completeness. + +NOTE Overview of this talk + +00:02:27.652 --> 00:02:28.953 +So that's what we're going to be doing + +00:02:28.954 --> 00:02:30.517 +during this talk. + +00:02:30.537 --> 00:02:35.065 +I'm including all of the relevant files for this. + +00:02:37.019 --> 00:02:40.626 +We can look briefly at the Org Roam setup and + +00:02:40.646 --> 00:02:45.695 +you're going to see this in the link to my GitHub page. + +00:02:45.855 --> 00:02:49.381 +All of these configurations for Org Mode, for Org + +00:02:49.401 --> 00:02:54.731 +Roam, as well as all of the various entries that + +00:02:54.871 --> 00:02:56.935 +make up these capture templates, + +00:02:57.826 --> 00:03:02.811 +and the files that Org Roam is reading in + +00:03:02.812 --> 00:03:03.833 +as a template. + +00:03:05.035 --> 00:03:07.298 +All this is going to be included and you can go + +00:03:08.059 --> 00:03:10.822 +look at it at your heart's content later. + +00:03:13.526 --> 00:03:15.588 +For this talk, what I'm going to do instead of + +00:03:15.628 --> 00:03:17.289 +trying to go line by line to my config, + +00:03:17.290 --> 00:03:18.571 +I'm just going to show you + +00:03:18.572 --> 00:03:22.737 +how I would set up a brand new game. + +00:03:23.493 --> 00:03:25.137 +I'm going to walk you through the process and + +00:03:25.578 --> 00:03:28.966 +things that I think about and how I handle things + +00:03:29.648 --> 00:03:31.773 +because I have found this to be the fastest and + +00:03:31.833 --> 00:03:38.650 +most reliable way of creating shared links to all + +00:03:38.690 --> 00:03:39.291 +of my data. + +NOTE Capture + +00:03:40.503 --> 00:03:44.131 +So we are going to open up the Org Roam capture + +00:03:44.171 --> 00:03:44.792 +template. + +00:03:44.812 --> 00:03:48.379 +We always get this showing all my nodes. + +00:03:48.399 --> 00:03:49.702 +We're going to type in the name of a node + +00:03:49.722 --> 00:03:51.005 +that doesn't exist. + +00:03:51.065 --> 00:03:56.436 +And this is the Adventures in Gnuland. + +00:03:57.631 --> 00:03:58.232 +It doesn't exist. + +00:03:58.272 --> 00:03:58.873 +We hit RET. + +00:03:58.933 --> 00:04:02.258 +Now we get the capture template that gets brought up. + +00:04:02.278 --> 00:04:05.342 +I'm going to hit `d` for a D&D entry, and then `g` + +00:04:05.442 --> 00:04:09.107 +because I'm creating a new game or campaign. + +NOTE Tags + +00:04:09.127 --> 00:04:12.232 +I want to tag it with gnuland, and we're going + +00:04:12.272 --> 00:04:14.555 +to reuse gnuland for our tag. + +00:04:14.575 --> 00:04:15.977 +You can call it anything, but it's meant to be a + +00:04:16.117 --> 00:04:18.321 +short little identifier that all of our pages are + +00:04:18.361 --> 00:04:22.086 +going to ultimately have. + +00:04:22.065 --> 00:04:26.150 +Then we write a little bit of information in + +00:04:26.170 --> 00:04:34.898 +the campaign info, such as Welcome to Gnuland, + +00:04:34.899 --> 00:04:41.046 +an exciting realm of danger and mystery. + +00:04:45.851 --> 00:04:46.892 +Then we save it. + +00:04:48.712 --> 00:04:52.136 +Now when we type in gnuland, we find it. + +00:04:53.638 --> 00:04:57.623 +This tag has dnd, so we can easily sort on just + +00:04:57.683 --> 00:04:58.584 +our dnd entries. + +00:04:58.604 --> 00:05:02.970 +It has a root tag for showing you that this is + +00:05:03.010 --> 00:05:05.733 +the root node from which all other relevant nodes + +00:05:06.514 --> 00:05:08.657 +in this adventure are going to spring, and then + +00:05:09.117 --> 00:05:12.762 +the custom tag for this particular adventure. + +00:05:13.957 --> 00:05:17.383 +I have another game that I'm running and the tag + +00:05:17.443 --> 00:05:19.847 +is Island Adventures because they're all + +00:05:20.568 --> 00:05:22.872 +one-shots that are connected loosely and they all + +00:05:22.912 --> 00:05:23.834 +appear on different islands. + +00:05:25.056 --> 00:05:27.420 +So we've got our root level here. + +NOTE Game notes + +00:05:28.782 --> 00:05:29.243 +Game notes. + +00:05:29.263 --> 00:05:31.145 +This is where you write in any of your + +00:05:31.146 --> 00:05:35.914 +custom rules, homebrew things, anything of consequence. + +00:05:35.894 --> 00:05:38.717 +For players, you add all of your players. + +00:05:38.897 --> 00:05:41.139 +If you have a tiefling rogue + +00:05:41.140 --> 00:05:42.660 +and a dwarven cleric, + +00:05:42.661 --> 00:05:44.142 +this is where you would add that information + +00:05:44.143 --> 00:05:45.364 +so you can keep track of them. + +00:05:46.465 --> 00:05:48.087 +But we're not going to do that for the moment. + +NOTE NPCs: non-player characters + +00:05:48.147 --> 00:05:52.752 +We are going to make an NPC. + +00:05:54.133 --> 00:05:59.239 +Let's create a wizard that the players can talk + +00:05:59.279 --> 00:06:00.400 +to in the first session. + +00:06:01.696 --> 00:06:06.481 +We are going to create Sacha the Lightning Lord. + +00:06:07.462 --> 00:06:11.386 +She is a character. + +00:06:11.406 --> 00:06:13.568 +And we want Gnuland. + +00:06:13.908 --> 00:06:15.410 +We want to tag it with Gnuland, + +00:06:16.751 --> 00:06:19.334 +and then we want to tag it with Wizard. + +00:06:21.916 --> 00:06:30.505 +Her name is Sacha Borealis Wizard. + +00:06:34.990 --> 00:06:41.427 +Wizard of Storm Tower. + +00:06:42.449 --> 00:06:46.400 +She is a tall wood elf. + +00:06:48.706 --> 00:06:50.029 +For a background... + +00:06:51.983 --> 00:06:52.845 +Let's see. + +00:06:52.885 --> 00:06:56.091 +We mentioned she lives in Storm Tower, so let's put that. + +00:06:57.394 --> 00:06:59.579 +She lives in Storm Tower. + +00:06:59.819 --> 00:07:01.642 +Well, we haven't created a Storm Tower yet, + +00:07:01.643 --> 00:07:04.689 +so let's do that now. + +NOTE Locations + +00:07:04.829 --> 00:07:05.932 +Storm Tower. + +00:07:08.176 --> 00:07:11.443 +It is a location this time. + +00:07:13.280 --> 00:07:14.321 +Tagging it with gnuland. + +00:07:14.581 --> 00:07:17.705 +It is a location name. + +00:07:20.248 --> 00:07:22.751 +Storm Tower. + +00:07:22.771 --> 00:07:28.898 +A tall tower that overlooks the bay. + +00:07:30.419 --> 00:07:31.020 +Details. + +00:07:33.863 --> 00:07:39.810 +It is perched on a high cliff. + +00:07:41.545 --> 00:07:47.212 +It can only be reached during a storm. + +00:07:50.616 --> 00:07:54.381 +It is a magical tower. + +00:07:55.622 --> 00:07:56.043 +And that's it. + +00:07:56.063 --> 00:07:57.365 +We're going to save that. + +00:07:57.385 --> 00:07:59.708 +Now we have a link. + +NOTE Items + +00:07:59.868 --> 00:08:01.169 +What else about Sacha? + +00:08:02.451 --> 00:08:04.253 +She needs a wizard staff. + +00:08:04.333 --> 00:08:05.314 +All wizards have a staff. + +00:08:05.955 --> 00:08:15.797 +So she has the Staff of Frozen Lightning. + +00:08:16.198 --> 00:08:17.178 +That sounds exciting. + +00:08:19.541 --> 00:08:20.822 +And that's going to be an item. + +00:08:22.083 --> 00:08:25.225 +And once again, we're going to stick it in there + +00:08:26.106 --> 00:08:28.128 +in the gnuland tag. + +00:08:28.849 --> 00:08:35.835 +And the item name is Staff of Frozen Lightning. + +00:08:37.096 --> 00:08:37.775 +Item description: + +00:08:38.597 --> 00:08:44.660 +A glass staff that crackles with power. + +00:08:46.843 --> 00:08:47.524 +What's it do? + +00:08:47.984 --> 00:08:55.033 +We'll say it's a +2 staff, + +00:08:55.053 --> 00:08:56.115 ++2 to hit staff. + +00:08:57.256 --> 00:08:57.677 +What else? + +00:08:58.378 --> 00:09:03.685 +It deals 3d10 lightning damage. + +00:09:03.745 --> 00:09:06.068 +That sounds reasonable. Let's make it special. + +00:09:07.990 --> 00:09:16.223 +You can cast Thunderwave three times a day. + +00:09:18.506 --> 00:09:19.927 +Okay, so now we have + +00:09:19.928 --> 00:09:20.929 +Staff of Frozen Lightning. + +NOTE Familiars + +00:09:21.530 --> 00:09:23.272 +Finally, we're going to give her a familiar. + +00:09:24.814 --> 00:09:33.385 +She has a cat named Mr. Whiskers. + +00:09:33.405 --> 00:09:35.748 +Of course, they're going to ask about the cat, + +00:09:35.768 --> 00:09:37.851 +so we need to + +00:09:41.628 --> 00:09:44.905 +create a character for Mr. Whiskers. + +00:09:47.821 --> 00:09:54.309 +Anyone who's ever run a D&D campaign knows + +00:09:54.310 --> 00:09:57.074 +your players will always latch on to the character + +00:09:57.154 --> 00:09:58.495 +that you have given the least thought to, + +00:09:58.496 --> 00:10:00.559 +and that will become their favorite character. + +00:10:00.579 --> 00:10:02.622 +So we're just heading that off at the past. + +00:10:05.105 --> 00:10:05.726 +Background. + +00:10:05.746 --> 00:10:06.187 +Let's see. + +00:10:06.727 --> 00:10:12.175 +The cat is actually her demon familiar. + +00:10:14.551 --> 00:10:20.560 +Cat likes belly rubs + +00:10:20.561 --> 00:10:25.209 +and eating the souls of the damned. + +00:10:25.229 --> 00:10:25.489 +Okay. + +00:10:25.970 --> 00:10:26.571 +There you go. + +00:10:26.591 --> 00:10:27.072 +There's your cat. + +00:10:27.853 --> 00:10:32.260 +And this completes our notes on Sacha Borealis, + +00:10:32.300 --> 00:10:34.945 +Wizard of Storm Tower. + +00:10:34.965 --> 00:10:35.766 +And now she's in here. + +NOTE Lists + +00:10:36.269 --> 00:10:40.396 +Now you might say, well, we need some locations. + +00:10:40.496 --> 00:10:41.838 +Well, we have a location. + +00:10:42.098 --> 00:10:46.425 +Let's insert the tower. + +00:10:47.888 --> 00:10:49.751 +Yep, Storm Tower. + +00:10:49.771 --> 00:10:50.432 +That's what we want. + +00:10:52.155 --> 00:10:56.601 +We might want to have a list of magic items + +00:10:56.602 --> 00:10:58.825 +so we can keep track of their properties + +00:10:58.826 --> 00:10:59.847 +in one central place. + +00:11:00.488 --> 00:11:05.922 +Well, once again, we insert Magic items, + +00:11:05.942 --> 00:11:10.289 +and you can search magic items. + +00:11:10.309 --> 00:11:13.274 +Here are a bunch of magic items that I have created. + +00:11:13.414 --> 00:11:18.582 +We want the Staff of Frozen Lightning. + +00:11:18.602 --> 00:11:21.786 +If we wanted to insert another one, + +00:11:23.910 --> 00:11:26.634 +this is one I had created previously. + +00:11:26.654 --> 00:11:27.796 +We wanted the Spice of Life. + +00:11:28.977 --> 00:11:30.019 +What does that do? + +00:11:31.585 --> 00:11:34.349 +So now we can see this is one I made previously + +00:11:34.529 --> 00:11:41.259 +and these are all of the fun properties of that. + +00:11:44.463 --> 00:11:49.731 +So we have an NPC, we have a location, and some magic items. + +00:11:49.771 --> 00:11:56.683 +Of course you can go back, and edit these as needed. + +00:11:58.188 --> 00:12:01.336 +You can say, now that we've created our + +00:12:01.397 --> 00:12:08.376 +character, you can say Sacha the Lightning Lord lives here. + +00:12:13.334 --> 00:12:17.345 +And Staff of Frozen Lightning. + +00:12:18.348 --> 00:12:19.833 +We could make a link. + +00:12:19.853 --> 00:12:21.457 +Wait, no, we don't need that. + +00:12:21.477 --> 00:12:22.218 +Because we already said, + +00:12:22.219 --> 00:12:24.887 +we already linked that in here. + +00:12:26.291 --> 00:12:27.715 +Okay, so now... + +00:12:29.652 --> 00:12:34.563 +Now we have created this rudimentary NPC and a + +00:12:34.623 --> 00:12:36.387 +location and some magic items. + +NOTE Session 1 + +00:12:37.469 --> 00:12:39.554 +And now you begin to run your first session, + +00:12:39.574 --> 00:12:40.175 +session [1]. + +00:12:40.396 --> 00:12:43.683 +So let's start our capture template again. + +00:12:44.104 --> 00:12:49.095 +And we're just going to call this Welcome to the Adventure. + +00:12:50.780 --> 00:12:53.464 +It is a session. + +00:12:53.844 --> 00:12:54.886 +Oh, round one. + +00:12:56.148 --> 00:12:57.570 +We want to tag it with gnuland. + +00:12:57.910 --> 00:13:02.015 +Starting locale: a grubby tavern, + +00:13:02.016 --> 00:13:03.318 +as these things are wont to be. + +00:13:04.259 --> 00:13:08.365 +Now we're just going to record important + +00:13:09.226 --> 00:13:10.909 +pieces of information that are just sentence + +00:13:10.949 --> 00:13:14.654 +fragments that our characters care about. + +00:13:14.995 --> 00:13:16.737 +So we might say + +00:13:19.028 --> 00:13:21.491 +they are in a tavern. + +00:13:22.673 --> 00:13:33.668 +The bartender, Bob, tells them of Sacha the + +00:13:33.688 --> 00:13:34.209 +Lightning Lord. + +00:13:35.951 --> 00:13:42.500 +He gives them directions to the Storm Tower. + +00:13:45.204 --> 00:14:00.000 +They steal from an NPC and get kicked out of the bar. + +00:14:01.840 --> 00:14:05.787 +Okay. And this is what you do. + +00:14:05.808 --> 00:14:08.590 +You just record little sentence fragments or notes. + +00:14:08.871 --> 00:14:10.312 +You throw in links when appropriate. + +NOTE Adding more notes on the fly + +00:14:11.800 --> 00:14:14.656 +If, in the middle of this, Bob the bartender + +00:14:14.877 --> 00:14:18.279 +becomes a critical character, once again, + +00:14:18.280 --> 00:14:20.322 +you can highlight his name, + +00:14:22.040 --> 00:14:24.902 +and you can insert a node for Bob. + +00:14:24.903 --> 00:14:27.325 +We can create another character + +00:14:27.326 --> 00:14:32.973 +and call him Bob the Bartender. + +00:14:35.356 --> 00:14:43.466 +He is a one-eyed dwarf with a red beard. + +00:14:46.289 --> 00:14:47.811 +He tends bar. + +00:14:48.592 --> 00:14:49.874 +There you go. + +00:14:50.034 --> 00:14:51.135 +Now we have a link for Bob. + +00:14:51.858 --> 00:14:54.422 +Let's say they finally get to the tower, and + +00:14:54.462 --> 00:14:57.687 +they finally meet her, and one of your players + +00:14:57.768 --> 00:15:00.272 +gets attacked by the cat. + +00:15:00.332 --> 00:15:08.945 +We can say the cat Mr. Whiskers + +00:15:08.946 --> 00:15:17.309 +has marked Alice for death. + +00:15:17.329 --> 00:15:18.412 +And then that ends session one. + +NOTE Going back + +00:15:19.716 --> 00:15:22.605 +Now we can go back and insert it. + +00:15:22.625 --> 00:15:23.527 +Session one. + +00:15:25.012 --> 00:15:25.593 +Gnuland. + +00:15:25.774 --> 00:15:26.556 +Welcome to the Adventure. + +00:15:28.274 --> 00:15:30.057 +This is all incredibly handy. + +00:15:30.077 --> 00:15:33.324 +It allows us to network things together and link + +00:15:33.344 --> 00:15:38.073 +them together in a useful and coherent way. + +00:15:38.814 --> 00:15:40.197 +Later, you can go back. + +00:15:40.557 --> 00:15:42.621 +Once the session is over, you can go back and + +00:15:42.661 --> 00:15:44.384 +clean up your notes, add more information. + +00:15:44.945 --> 00:15:51.598 +You might add Bob to here. + +NOTE Visualizations + +00:15:51.578 --> 00:15:54.363 +Now one thing you can do that is a really handy + +00:15:54.423 --> 00:15:58.850 +tool is visualize where all of these things come + +00:15:58.911 --> 00:16:06.083 +from. By that, I mean if we go here and we look + +00:16:06.103 --> 00:16:09.769 +at the backlinks, we can see these are all of the + +00:16:09.949 --> 00:16:15.379 +pages that contain any reference to this + +00:16:15.439 --> 00:16:17.282 +particular page Sacha the Lightning Lord. + +00:16:18.663 --> 00:16:20.225 +You can of course hit RET and it'll + +00:16:20.325 --> 00:16:23.469 +immediately take you to the correct page. + +00:16:23.970 --> 00:16:30.459 +But there is... This is filtering on on gnuland + +00:16:30.519 --> 00:16:35.385 +so we can find out what all of our pages have + +00:16:35.405 --> 00:16:36.086 +been tagged as. + +00:16:36.266 --> 00:16:37.288 +Let's go back to the root here. + +00:16:38.029 --> 00:16:40.131 +But there's a better way of viewing + +00:16:40.191 --> 00:16:45.919 +things and that is to pull up the... + +00:16:47.384 --> 00:16:50.127 +Sorry, I'm launching it in a different window. + +00:16:50.148 --> 00:16:55.134 +Let me drag it over. + +00:16:55.154 --> 00:16:56.255 +Yes, so doing this. + +00:16:56.355 --> 00:17:00.621 +This is a visual representation of all of the + +00:17:01.482 --> 00:17:06.608 +various games that I have played and run. + +00:17:07.429 --> 00:17:12.376 +Here we see the adventures of Gnuland and how + +00:17:12.415 --> 00:17:13.577 +they relate. + +00:17:14.238 --> 00:17:15.720 +Sacha the Lightning Lord. + +00:17:16.595 --> 00:17:20.522 +The storm tower has various links. + +00:17:20.742 --> 00:17:26.093 +You can edit this. + +00:17:26.233 --> 00:17:28.738 +Any edits you make here will be reflected in the + +00:17:28.778 --> 00:17:29.981 +files and vice versa. + +00:17:31.263 --> 00:17:32.906 +You can colorize them differently. + +00:17:32.987 --> 00:17:35.852 +You can change the behavior. + +00:17:35.832 --> 00:17:39.880 +It's a really wonderful way of tracing through + +00:17:40.140 --> 00:17:44.469 +information and constructing your story and + +00:17:44.629 --> 00:17:48.657 +linking data together and then visualizing all of + +00:17:48.717 --> 00:17:49.639 +those changes. + +00:17:51.087 --> 00:17:55.476 +This is invaluable when you're running a long + +00:17:55.536 --> 00:17:59.404 +game and you're six months in and your players + +00:17:59.444 --> 00:18:01.168 +have moved on and done all of this stuff and then + +00:18:02.009 --> 00:18:05.316 +someone mentions Sacha the Lightning Lord and you + +00:18:05.917 --> 00:18:08.623 +now have to remember where did I... + +00:18:09.447 --> 00:18:11.310 +where did I see that? When did we do that? + +00:18:11.390 --> 00:18:13.192 +What... You know, you start asking questions and... + +00:18:13.193 --> 00:18:17.498 +Well, now you can just type in "the Lightning Lord" + +00:18:17.499 --> 00:18:22.486 +and read up on her and see all the links. + +00:18:22.487 --> 00:18:24.971 +Where did she get mentioned? Well, she's at the + +00:18:25.011 --> 00:18:30.198 +root. She lives in the Storm Tower. + +00:18:30.199 --> 00:18:32.923 +Oh yeah, that's right. Where did she get mentioned? + +00:18:34.709 --> 00:18:42.921 +She got mentioned in this particular location, + +00:18:42.922 --> 00:18:43.723 +in this session. + +00:18:46.467 --> 00:18:46.808 +It's easy. + +00:18:46.828 --> 00:18:49.111 +You remember Mr. Whiskers now, but six months + +00:18:49.151 --> 00:18:56.583 +from now, will you remember that this is where the + +00:18:56.623 --> 00:18:59.788 +character was named? + +00:19:01.253 --> 00:19:01.795 +That's it. + +NOTE Wrapping up + +00:19:01.815 --> 00:19:05.405 +That's just a brief overview of how to find + +00:19:05.445 --> 00:19:08.996 +information and link it together in Org Roam and + +00:19:09.036 --> 00:19:10.219 +apply it to your D&D game. + +00:19:10.480 --> 00:19:11.643 +I hope you guys enjoyed this. + +00:19:11.683 --> 00:19:13.930 +This is a phenomenal tool that I have really + +00:19:13.970 --> 00:19:16.016 +enjoyed using and I hope you find some use out of + +00:19:16.076 --> 00:19:16.377 +it too. diff --git a/2026/captions/emacsconf-2026-local--local-file-history-possibilities-in-emacs--wouter-groeneveld--main--chapters.vtt b/2026/captions/emacsconf-2026-local--local-file-history-possibilities-in-emacs--wouter-groeneveld--main--chapters.vtt new file mode 100644 index 00000000..1ff67004 --- /dev/null +++ b/2026/captions/emacsconf-2026-local--local-file-history-possibilities-in-emacs--wouter-groeneveld--main--chapters.vtt @@ -0,0 +1,29 @@ +WEBVTT + + +00:00:01.887 --> 00:00:51.852 +Introduction + +00:00:51.892 --> 00:01:59.617 +The problem + +00:01:59.618 --> 00:02:32.938 +Local history in IntelliJ + +00:02:33.796 --> 00:04:40.328 +Emacs + +00:04:40.882 --> 00:06:01.480 +Vundo + +00:06:01.797 --> 00:06:43.463 +undo-fu-session + +00:06:43.464 --> 00:07:07.606 +Timestamps + +00:07:07.626 --> 00:10:38.331 +Configuration + +00:10:40.758 --> 00:11:10.242 +Wrapping up diff --git a/2026/captions/emacsconf-2026-local--local-file-history-possibilities-in-emacs--wouter-groeneveld--main.vtt b/2026/captions/emacsconf-2026-local--local-file-history-possibilities-in-emacs--wouter-groeneveld--main.vtt new file mode 100644 index 00000000..f24ce659 --- /dev/null +++ b/2026/captions/emacsconf-2026-local--local-file-history-possibilities-in-emacs--wouter-groeneveld--main.vtt @@ -0,0 +1,655 @@ +WEBVTT captioned by sachac, verified by wouter + +NOTE Introduction + +00:00:01.887 --> 00:00:04.610 +Hi everyone, my name is Wouter and I want to + +00:00:04.730 --> 00:00:08.795 +share something silly I've made with Emacs. + +00:00:08.855 --> 00:00:09.755 +But as you can see, + +00:00:09.756 --> 00:00:11.218 +I'm not starting with Emacs. + +00:00:11.238 --> 00:00:15.302 +So my day job as a lecturer + +00:00:15.303 --> 00:00:16.780 +in applied computing science + +00:00:16.781 --> 00:00:19.588 +means unfortunately I have to work a lot + +00:00:19.728 --> 00:00:23.332 +in Java environments, hence IntelliJ. + +00:00:23.873 --> 00:00:25.794 +I know LSPs are also there in Emacs, + +00:00:25.795 --> 00:00:28.491 +but they're not there yet. + +00:00:28.912 --> 00:00:33.780 +And something in IntelliJ and the really awesome + +00:00:33.820 --> 00:00:35.622 +tools of the Jetbrains people, + +00:00:38.006 --> 00:00:40.911 +That's a functionality that's there I want to + +00:00:40.991 --> 00:00:43.475 +show you which is called Local History and that + +00:00:43.535 --> 00:00:46.520 +was something I was really missing in Emacs. + +00:00:46.540 --> 00:00:47.942 +So I made my own. + +00:00:48.547 --> 00:00:50.630 +I'm not really sure if it's the best version, but + +00:00:50.690 --> 00:00:51.852 +let's first see. + +NOTE The problem + +00:00:51.892 --> 00:00:54.716 +So I've been working all morning on some silly + +00:00:54.756 --> 00:00:57.200 +example projects, how to show students how to + +00:00:57.240 --> 00:01:00.024 +write unit tests for Spring Boot projects. + +00:01:00.044 --> 00:01:02.407 +And what if I made a silly mistake and I want to + +00:01:02.588 --> 00:01:06.253 +look back at something I've written and take that + +00:01:06.313 --> 00:01:07.435 +back out of the history? + +00:01:07.915 --> 00:01:10.940 +The problem is that this thing is not yet on a + +00:01:11.000 --> 00:01:13.984 +version control, so I can't do a git log, git + +00:01:14.044 --> 00:01:15.246 +history, blah, blah, blah. + +00:01:15.985 --> 00:01:19.752 +So I can't take this out of version control. + +00:01:21.314 --> 00:01:23.217 +Even if I would have committed something, + +00:01:23.218 --> 00:01:27.065 +suppose I did something like this: + +00:01:27.085 --> 00:01:30.290 +I added a single line, blah, blah, + +00:01:30.952 --> 00:01:33.797 +and then went on about my day, ran a unit test, + +00:01:33.817 --> 00:01:36.081 +and then was like, okay, now maybe I don't need + +00:01:36.101 --> 00:01:37.002 +that line after all, + +00:01:37.343 --> 00:01:38.004 +and then commit. + +00:01:38.485 --> 00:01:40.288 +So that line would + +00:01:40.690 --> 00:01:43.433 +never reach it inside version control, + +00:01:43.434 --> 00:01:46.037 +so I would not be able to get that back. + +00:01:46.038 --> 00:01:48.420 +Of course, in my case, because this is a Mac, + +00:01:48.421 --> 00:01:53.207 +`Cmd-z` for undoing will just get this thing back, + +00:01:53.208 --> 00:01:56.392 +but what if I need persistent undo history, + +00:01:56.393 --> 00:01:59.617 +and that will be gone forever. + +NOTE Local history in IntelliJ + +00:01:59.618 --> 00:02:00.858 +Unless you do something like this: + +00:02:00.859 --> 00:02:03.844 +local history, show history, and then you + +00:02:03.884 --> 00:02:06.748 +can see exactly what I did + +00:02:08.145 --> 00:02:12.632 +and which changes I made for this particular file. + +00:02:12.652 --> 00:02:14.093 +So I added `jsonPath` + +00:02:14.094 --> 00:02:16.637 +instead of using the `expectBody` here. + +00:02:17.618 --> 00:02:20.502 +The exact content does not matter for this talk at all. + +00:02:20.522 --> 00:02:27.651 +But the idea is that I want to preserve that local history. + +00:02:27.671 --> 00:02:28.813 +All right. + +00:02:28.833 --> 00:02:32.938 +So let me kill IntelliJ for now. + +NOTE Emacs + +00:02:33.796 --> 00:02:36.520 +How do I do this in Emacs? + +00:02:36.540 --> 00:02:39.443 +So this is a part of the Dutch course I've been + +00:02:39.463 --> 00:02:42.127 +writing related to the exercise that you just saw. + +00:02:43.128 --> 00:02:46.993 +I wrote a simple function in Emacs Lisp that + +00:02:47.034 --> 00:02:47.995 +does exactly that. + +00:02:48.015 --> 00:02:55.365 +If I get my file history, `h` for history, then + +00:02:55.385 --> 00:02:58.409 +you can see more or less the same thing. + +00:02:58.449 --> 00:03:02.554 +So now this is a diff for recent versions. + +00:03:02.821 --> 00:03:09.478 +For instance, if I select this one, this is a + +00:03:09.538 --> 00:03:10.601 +consult mini-buffer. + +00:03:11.242 --> 00:03:14.170 +If I select this one, then you can see I opened + +00:03:14.210 --> 00:03:16.375 +up another buffer and split the screen + +00:03:17.080 --> 00:03:21.065 +next to it, which is a simple diff using the + +00:03:21.105 --> 00:03:24.710 +built-in Emacs version . If I just press `n` for + +00:03:24.750 --> 00:03:27.674 +next, next, next, you can see the differences. + +00:03:27.734 --> 00:03:30.638 +Now, for each chunk, I can decide to revert + +00:03:30.678 --> 00:03:34.524 +something, or at least see whatever the hell it + +00:03:34.584 --> 00:03:38.429 +was that I did in the past few hours. If I'm + +00:03:38.469 --> 00:03:40.652 +not interested in this at all, then I just press `q` + +00:03:41.433 --> 00:03:44.337 +and this thing is completely gone. + +00:03:44.873 --> 00:03:47.636 +The same problem here applies as well, or problem, + +00:03:48.037 --> 00:03:50.179 +maybe it's a feature. This thing is not yet on + +00:03:50.239 --> 00:03:50.920 +version control. + +00:03:50.960 --> 00:03:53.102 +So this particular file, + +00:03:53.103 --> 00:03:55.525 +I have not yet committed this in Git. + +00:03:55.545 --> 00:03:57.187 +So it relies on something else. + +00:03:57.327 --> 00:03:59.189 +And that something, of course, + +00:03:59.190 --> 00:04:04.816 +is still Emacs's built-in functionality to backup files. + +00:04:06.678 --> 00:04:09.081 +The first thing you would probably say is why + +00:04:09.141 --> 00:04:12.585 +don't you just use the many + +00:04:13.055 --> 00:04:17.360 +built-in undo versions or + +00:04:17.540 --> 00:04:21.604 +functionality stuff or visual undo, vundo, + +00:04:21.605 --> 00:04:22.707 +which I do use. + +00:04:23.287 --> 00:04:26.430 +But if you work a lot in the same file, + +00:04:26.431 --> 00:04:29.314 +as you can see, + +00:04:29.315 --> 00:04:34.500 +this file is a Markdown file that's 5,400 words long, + +00:04:34.501 --> 00:04:38.406 +so it can be a bit cumbersome to work with. + +00:04:38.866 --> 00:04:40.328 +So let's see. + +NOTE Vundo + +00:04:40.882 --> 00:04:45.227 +What happens if I just call vundo or use my + +00:04:45.287 --> 00:04:47.610 +shortcut? That would make things a bit more + +00:04:47.670 --> 00:04:49.993 +difficult for you guys to follow. + +00:04:50.013 --> 00:04:51.634 +So I'll just press `RET` + +00:04:51.635 --> 00:04:54.118 +and start a vundo mini-buffer. + +00:04:55.440 --> 00:04:59.084 +Now I can try to make sense of all this. + +00:04:59.104 --> 00:05:01.066 +Somehow, maybe I need... + +00:05:01.067 --> 00:05:03.970 +let's see the version on the second row. + +00:05:04.928 --> 00:05:07.392 +Maybe this one, and then I can see the + +00:05:07.452 --> 00:05:09.754 +differences by pressing `d`, + +00:05:09.755 --> 00:05:13.921 +and then vundo opens another similar diff + +00:05:13.922 --> 00:05:16.085 +as the one that I made myself. + +00:05:16.145 --> 00:05:17.466 +You can see I was typing + +00:05:17.467 --> 00:05:21.933 +`als je controller een object`, + +00:05:21.934 --> 00:05:27.082 +which is Dutch, and I was starting a sentence. + +00:05:27.102 --> 00:05:29.746 +That's okay for small edits or for small files, + +00:05:29.826 --> 00:05:32.370 +but... Even if you increase the history, + +00:05:32.603 --> 00:05:36.307 +those bullets will only get more unwieldy, + +00:05:36.308 --> 00:05:39.111 +so it was not really interesting for me to just + +00:05:39.191 --> 00:05:42.475 +increase the kept version history + +00:05:42.476 --> 00:05:44.617 +and use vundo as an alternative + +00:05:44.618 --> 00:05:47.242 +to the IntelliJ local history thing. + +00:05:49.685 --> 00:05:51.828 +There are of course multiple existing + +00:05:51.888 --> 00:05:53.630 +packages that do more or less the same. + +00:05:54.030 --> 00:05:55.813 +The only thing that I did was write a single + +00:05:55.853 --> 00:05:58.196 +function, so it's not really a package at all. + +00:05:58.596 --> 00:06:01.480 +I'll show you in a bit what it's like. + +NOTE undo-fu-session + +00:06:01.797 --> 00:06:06.306 +You have stuff like undo sessions that are + +00:06:06.366 --> 00:06:08.329 +persistent, like this thing. + +00:06:09.431 --> 00:06:11.816 +This is an interesting plugin which saves and + +00:06:11.836 --> 00:06:14.621 +recovers undo steps between Emacs sessions. + +00:06:14.822 --> 00:06:17.206 +I initially thought it was interesting enough to + +00:06:17.847 --> 00:06:23.518 +take a look at, especially if combined with vundo. + +00:06:24.477 --> 00:06:26.082 +The problem only gets worse + +00:06:26.083 --> 00:06:31.441 +because the vundo bullets showing different edits + +00:06:31.442 --> 00:06:33.610 +will only increase in size. + +00:06:34.568 --> 00:06:37.272 +And combined with undo-fu-session, + +00:06:37.273 --> 00:06:40.599 +I just couldn't really find anything at all anymore + +00:06:41.741 --> 00:06:43.463 +compared to... + +NOTE Timestamps + +00:06:43.464 --> 00:06:44.566 +The thing in the local history + +00:06:44.567 --> 00:06:47.251 +in IntelliJ is there are timestamps. + +00:06:47.272 --> 00:06:51.660 +Normally I know, for example, around 10 + +00:06:51.700 --> 00:06:53.964 +o'clock this morning, I made an interesting edit + +00:06:54.545 --> 00:06:56.188 +that was just before lunch break. + +00:06:56.472 --> 00:06:58.294 +Or just before I went to the bathroom, after + +00:06:58.314 --> 00:07:00.297 +that, I don't know any more what I did. + +00:07:00.617 --> 00:07:03.120 +So I want to focus on that specific part. + +00:07:03.140 --> 00:07:07.606 +So I timestamped my stuff instead. + +NOTE Configuration + +00:07:07.626 --> 00:07:10.990 +Digging a bit deeper into the Emacs + +00:07:11.030 --> 00:07:13.854 +configuration, the things that I did to alter is + +00:07:14.695 --> 00:07:17.839 +the first thing, of course, some basic settings, + +00:07:18.123 --> 00:07:21.586 +which is the backup and the autosave directory. + +00:07:21.606 --> 00:07:23.848 +These two I will be needing. + +00:07:24.008 --> 00:07:27.592 +As you can see, like I wrote here, I like backups. + +00:07:28.092 --> 00:07:30.334 +So I enabled as much stuff as possible. + +00:07:31.395 --> 00:07:33.577 +Version control, of course, that's the one that + +00:07:33.897 --> 00:07:35.038 +you will be needing. + +00:07:35.319 --> 00:07:37.781 +But also `vc-make-backup-files`. + +00:07:37.821 --> 00:07:39.002 +What does this thing do? + +00:07:40.924 --> 00:07:46.729 +If we take a look at the symbol beneath it. + +00:07:47.131 --> 00:07:49.755 +You can see: if non-nil, backups of registered + +00:07:49.815 --> 00:07:51.757 +files are made with other files. + +00:07:52.058 --> 00:07:55.022 +If nil, default, files covered by version control + +00:07:55.082 --> 00:07:55.783 +don't get backups. + +00:07:55.803 --> 00:07:58.246 +So if Emacs thinks this file is already covered + +00:07:58.306 --> 00:08:01.451 +by version control, most cases that would be git, + +00:08:01.791 --> 00:08:04.154 +it will not be locally backed up, and that was not + +00:08:04.234 --> 00:08:06.217 +something I was content with. + +00:08:07.899 --> 00:08:10.443 +Those few lines that I will never commit anyway, + +00:08:10.683 --> 00:08:12.025 +they're not backed up, + +00:08:12.410 --> 00:08:14.973 +and sometimes you need those lines. + +00:08:15.093 --> 00:08:17.075 +Most of the times you don't, but sometimes you do. + +00:08:18.096 --> 00:08:19.818 +So I also enabled that one. + +00:08:21.180 --> 00:08:24.744 +If you enable all that stuff, of course, too + +00:08:24.784 --> 00:08:26.426 +much backups files will be generated. + +00:08:26.446 --> 00:08:28.829 +So you will need to trim them a little bit. + +00:08:28.849 --> 00:08:30.851 +You can either do that yourself or use a + +00:08:30.911 --> 00:08:33.173 +callback function or a time function or whatever, + +00:08:33.294 --> 00:08:39.340 +or just configure these specific settings. + +00:08:39.360 --> 00:08:41.623 +Then let's see. + +00:08:42.177 --> 00:08:43.719 +Backup. + +00:08:46.122 --> 00:08:46.603 +What was it? + +00:08:47.884 --> 00:08:51.909 +Let's go to the last few pages here. + +00:08:52.810 --> 00:08:54.072 +The mini-buffer. + +00:08:56.735 --> 00:08:57.196 +Here it is. + +00:08:58.077 --> 00:08:59.779 +`consult-local-history`. + +00:08:59.799 --> 00:09:03.324 +This is the thing that I just called in my other file. + +00:09:04.365 --> 00:09:06.468 +What it actually does is really simple. + +00:09:07.609 --> 00:09:09.091 +It scans the backup directory. + +00:09:10.072 --> 00:09:11.374 +If I evaluate... + +00:09:11.810 --> 00:09:19.458 +If I were to evaluate that, let's see, we'll call + +00:09:20.239 --> 00:09:21.200 +the backup history. + +00:09:21.921 --> 00:09:24.403 +This thing is just a configuration of the one in + +00:09:24.443 --> 00:09:26.425 +the Emacs .el file that I just showed. + +00:09:27.106 --> 00:09:30.289 +And then it checks for this buffer file name. + +00:09:30.670 --> 00:09:31.731 +Are there any backups? + +00:09:32.091 --> 00:09:35.194 +If yes, we just format them using a time string + +00:09:35.775 --> 00:09:37.817 +and then show them inside the mini-buffer. + +00:09:38.455 --> 00:09:44.743 +So if I go back to my tdd.md file and then go to + +00:09:44.763 --> 00:09:48.026 +the file history, this diff history, + +00:09:48.027 --> 00:09:49.748 +this is just the formatted one + +00:09:49.749 --> 00:09:50.990 +and these are all the files + +00:09:51.231 --> 00:09:54.234 +found in my specific backup directory + +00:09:54.235 --> 00:09:55.877 +regarding tdd.md. + +00:10:01.123 --> 00:10:04.486 +So once we have all those sorted files, + +00:10:04.487 --> 00:10:08.412 +we format the candidates and then we just display them. + +00:10:08.763 --> 00:10:15.750 +Then you use `consult--read` to see exactly + +00:10:15.950 --> 00:10:18.833 +which candidate is the one that's being picked. + +00:10:19.513 --> 00:10:21.875 +The one that's being picked, we use `diff-buf` + +00:10:22.836 --> 00:10:26.158 +or `diff-no-select` with the selected backup, + +00:10:26.159 --> 00:10:30.083 +the file name, and a few other parameters I found useful. + +00:10:30.524 --> 00:10:32.425 +Then it gets opened in a new window. + +00:10:32.445 --> 00:10:36.069 +So it's just a built-in diff. + +00:10:36.089 --> 00:10:38.331 +Then you can decide for yourself what to do with it. + +NOTE Wrapping up + +00:10:40.758 --> 00:10:43.100 +If you somehow think this is all really stupid + +00:10:43.101 --> 00:10:46.185 +or the way this is written is silly + +00:10:46.186 --> 00:10:48.188 +or completely wrong, please do let me know + +00:10:48.189 --> 00:10:50.952 +because I've been using Emacs for only less than a year, + +00:10:50.953 --> 00:10:54.819 +so I'm actually a complete noob when it comes to this. + +00:10:54.839 --> 00:10:59.506 +So I'm sure there will be better or more robust alternatives. + +00:10:59.586 --> 00:11:04.433 +I'd be really interested in hearing from that as well. + +00:11:04.974 --> 00:11:10.242 +So yeah, thank you very much and see you soon. diff --git a/2026/captions/emacsconf-2026-plots--plots-with-roots-resilient-data-visualization-with-emacs-org-and-gnuplot--lukas-c-bossert--main--chapters.vtt b/2026/captions/emacsconf-2026-plots--plots-with-roots-resilient-data-visualization-with-emacs-org-and-gnuplot--lukas-c-bossert--main--chapters.vtt new file mode 100644 index 00000000..4036300e --- /dev/null +++ b/2026/captions/emacsconf-2026-plots--plots-with-roots-resilient-data-visualization-with-emacs-org-and-gnuplot--lukas-c-bossert--main--chapters.vtt @@ -0,0 +1,59 @@ +WEBVTT + + +00:00:00.110 --> 00:00:31.919 +Introduction + +00:00:31.920 --> 00:01:06.259 +ROOT: Robust, Open, Ongoing and Time-tested + +00:01:06.260 --> 00:01:33.799 +SHAPE: Structure, Harmonise, Automate, Propagate, Evaluate + +00:01:33.800 --> 00:02:08.199 +The dataset + +00:02:08.200 --> 00:03:48.500 +Org Notebook + +00:03:49.000 --> 00:05:01.419 +Making our first plot + +00:05:01.420 --> 00:06:03.110 +Using a Gnuplot block + +00:06:03.290 --> 00:06:42.679 +Group names + +00:06:42.680 --> 00:07:28.219 +Adding bars + +00:07:28.220 --> 00:08:13.159 +Tidying up + +00:08:13.160 --> 00:08:47.629 +Additional series + +00:08:47.630 --> 00:09:28.849 +Stacking outcomes + +00:09:28.850 --> 00:10:51.850 +Percentages + +00:10:52.600 --> 00:12:15.129 +Leaving out a group + +00:12:15.130 --> 00:13:44.279 +Digging into the details + +00:13:44.280 --> 00:14:25.060 +Overall group rates + +00:14:26.120 --> 00:15:22.660 +Checking + +00:15:24.110 --> 00:16:09.540 +Saving as PDF + +00:16:11.240 --> 00:19:58.020 +What else can Gnuplot do? diff --git a/2026/captions/emacsconf-2026-plots--plots-with-roots-resilient-data-visualization-with-emacs-org-and-gnuplot--lukas-c-bossert--main.vtt b/2026/captions/emacsconf-2026-plots--plots-with-roots-resilient-data-visualization-with-emacs-org-and-gnuplot--lukas-c-bossert--main.vtt new file mode 100644 index 00000000..57ba2fcc --- /dev/null +++ b/2026/captions/emacsconf-2026-plots--plots-with-roots-resilient-data-visualization-with-emacs-org-and-gnuplot--lukas-c-bossert--main.vtt @@ -0,0 +1,1581 @@ +WEBVTT + +NOTE Introduction + +00:00:00.110 --> 00:00:02.705 +Welcome! My name is Lukas, and today + +00:00:02.706 --> 00:00:05.090 +we will use gnuplot to draw graphs + +00:00:05.160 --> 00:00:07.147 +and organise the work in Emacs, + +00:00:07.148 --> 00:00:09.010 +a text editor, using Org mode. + +00:00:09.210 --> 00:00:11.066 +That lets us keep data, + +00:00:11.067 --> 00:00:13.850 +code and explanation in one document + +00:00:13.880 --> 00:00:16.278 +and build figures we can understand, + +00:00:16.279 --> 00:00:17.380 +revise and share. + +00:00:20.520 --> 00:00:22.275 +A figure may need to be corrected + +00:00:22.276 --> 00:00:24.340 +months later or rebuilt by someone else. + +00:00:24.920 --> 00:00:26.757 +That raises two questions: + +00:00:26.758 --> 00:00:28.799 +will our tools still serve us, + +00:00:28.800 --> 00:00:30.005 +and will someone + +00:00:30.006 --> 00:00:31.919 +understand how we use them? + +NOTE ROOT: Robust, Open, Ongoing and Time-tested + +00:00:31.920 --> 00:00:34.945 +I've developed two frameworks around those + +00:00:34.946 --> 00:00:37.620 +questions: ROOT for technology choices + +00:00:38.040 --> 00:00:40.220 +and SHAPE for workflows. + +00:00:40.410 --> 00:00:42.581 +ROOT concerns the tools, + +00:00:42.582 --> 00:00:44.839 +so that is where we start. + +00:00:44.840 --> 00:00:46.964 +The name stands for Robust, + +00:00:46.965 --> 00:00:49.239 +Open, Ongoing and Time-tested. + +00:00:49.240 --> 00:00:52.055 +These criteria help us assess whether we + +00:00:52.056 --> 00:00:54.940 +can inspect failures, understand and reuse + +00:00:55.130 --> 00:00:57.666 +the technology, keep using and adapting + +00:00:57.667 --> 00:01:00.140 +it, and draw on established experience. + +00:01:00.310 --> 00:01:02.269 +For gnuplot, readable scripts, + +00:01:02.270 --> 00:01:04.236 +continuing development and decades + +00:01:04.237 --> 00:01:06.259 +of use give us reasons to choose it. + +NOTE SHAPE: Structure, Harmonise, Automate, Propagate, Evaluate + +00:01:06.260 --> 00:01:08.324 +SHAPE concerns how we organise + +00:01:08.325 --> 00:01:10.189 +the work around those tools. + +00:01:10.190 --> 00:01:12.763 +It brings together five principles: + +00:01:12.764 --> 00:01:15.479 +structure stages, harmonise handovers, + +00:01:15.480 --> 00:01:18.905 +automate actions, propagate provenance, + +00:01:18.906 --> 00:01:20.959 +and evaluate explicitly. + +00:01:20.960 --> 00:01:23.561 +We look at this next because a dependable + +00:01:23.562 --> 00:01:25.419 +tool still needs clear inputs, + +00:01:25.420 --> 00:01:26.425 +agreed meanings, + +00:01:26.426 --> 00:01:28.199 +recorded decisions and checks. + +00:01:28.200 --> 00:01:31.000 +These principles give us things to look + +00:01:31.001 --> 00:01:33.799 +for when we watch the practical example. + +NOTE The dataset + +00:01:33.800 --> 00:01:35.687 +For that example, we will use + +00:01:35.688 --> 00:01:37.699 +a teaching dataset of passengers + +00:01:37.700 --> 00:01:39.947 +and crew aboard the Titanic, + +00:01:39.948 --> 00:01:41.419 +which sank in 1912. + +00:01:41.420 --> 00:01:44.003 +It records class or crew membership, + +00:01:44.004 --> 00:01:45.539 +sex, age and survival. + +00:01:45.540 --> 00:01:48.083 +This lets us ask a simple question: + +00:01:48.084 --> 00:01:50.979 +crew had more survivors than first class, + +00:01:50.980 --> 00:01:54.069 +but did they have a higher survival rate? + +00:01:54.070 --> 00:01:55.988 +We'll explore that question + +00:01:55.989 --> 00:01:57.289 +in an Org notebook, + +00:01:57.290 --> 00:01:59.050 +using gnuplot to draw + +00:01:59.051 --> 00:02:00.889 +and revise the figures. + +00:02:00.890 --> 00:02:01.966 +So our route is: + +00:02:01.967 --> 00:02:03.740 +introduce the tool criteria, + +00:02:03.990 --> 00:02:06.008 +establish the workflow principles, + +00:02:06.009 --> 00:02:08.199 +then put both into practice with data. + +NOTE Org Notebook + +00:02:08.200 --> 00:02:10.078 +Let's switch to our Org notebook + +00:02:10.079 --> 00:02:12.069 +in Emacs and start the live coding. + +00:02:12.070 --> 00:02:14.058 +I'll change a little code, run it + +00:02:14.059 --> 00:02:16.279 +and we'll look at the result together. + +00:02:16.280 --> 00:02:17.829 +The notebook keeps data, + +00:02:17.830 --> 00:02:19.750 +code and pictures in one place. + +00:02:19.800 --> 00:02:22.907 +First, let's open the raw CSV, + +00:02:22.908 --> 00:02:24.209 +the raw data. + +00:02:24.210 --> 00:02:26.719 +We'll turn it into a small table + +00:02:26.720 --> 00:02:28.999 +and build our plot from there. + +00:02:29.000 --> 00:02:30.259 +Our question is: + +00:02:30.260 --> 00:02:32.571 +did crew have a better chance + +00:02:32.572 --> 00:02:35.730 +of surviving than first-class passengers? + +00:02:36.670 --> 00:02:39.715 +Each row is one person here; survival + +00:02:39.716 --> 00:02:42.759 +is one for survived and zero for died. + +00:02:42.760 --> 00:02:45.069 +There are 2,207 people + +00:02:45.070 --> 00:02:47.580 +in this teaching dataset, + +00:02:47.770 --> 00:02:50.272 +and that's our SHAPE structure: + +00:02:50.273 --> 00:02:53.399 +a question and a route through the work. + +00:02:53.400 --> 00:02:56.549 +Next, we let AWK count the groups. + +00:02:56.550 --> 00:02:58.786 +Let's turn all those rows + +00:02:58.787 --> 00:03:00.849 +into four useful totals. + +00:03:00.850 --> 00:03:03.157 +We'll run this AWK block and look + +00:03:03.158 --> 00:03:05.940 +at the table it puts straight underneath. + +00:03:06.680 --> 00:03:10.139 +The commas tell AWK where each field ends. + +00:03:10.140 --> 00:03:11.299 +We skip the header, + +00:03:11.300 --> 00:03:14.151 +use the first field to identify the group + +00:03:14.152 --> 00:03:16.459 +and count one person for each row. + +00:03:16.460 --> 00:03:18.779 +Then we add the fourth field. + +00:03:18.780 --> 00:03:20.752 +Because it's zero or one, + +00:03:20.753 --> 00:03:23.179 +that sum gives us the survivors. + +00:03:23.180 --> 00:03:25.243 +Subtract survivors from everyone + +00:03:25.244 --> 00:03:27.370 +aboard and we have the deaths too. + +00:03:28.200 --> 00:03:29.424 +The last loop puts + +00:03:29.425 --> 00:03:31.229 +the groups in a fixed order. + +00:03:31.230 --> 00:03:33.300 +There we go: four rows + +00:03:33.301 --> 00:03:35.549 +with the numbers we need. + +00:03:35.550 --> 00:03:37.729 +This is our SHAPE handover: + +00:03:37.730 --> 00:03:40.919 +a small table with clear column meanings. + +00:03:40.920 --> 00:03:44.040 +For now, it's just an AWK result. + +00:03:44.140 --> 00:03:45.946 +But next, we'll add the name + +00:03:45.947 --> 00:03:48.500 +and plotting lines around the same table. + +NOTE Making our first plot + +00:03:49.000 --> 00:03:50.478 +Now let's make our first + +00:03:50.479 --> 00:03:51.719 +plot from this table. + +00:03:51.720 --> 00:03:54.099 +We'll add its name and plotting lines, + +00:03:54.100 --> 00:03:55.706 +run the plot and then put a link + +00:03:55.707 --> 00:03:57.410 +to the saved picture underneath it. + +00:03:58.280 --> 00:04:00.240 +The name is demo-class-counts, + +00:04:00.241 --> 00:04:02.580 +so we can use this table again later. + +00:04:03.320 --> 00:04:06.422 +`ind:1` takes the group names from the first + +00:04:06.423 --> 00:04:09.380 +column, `and deps:(3)` picks the survivors. + +00:04:10.040 --> 00:04:13.109 +I run `org-plot/gnuplot` inside the table. + +00:04:13.110 --> 00:04:15.739 +That writes our SVG file. + +00:04:15.740 --> 00:04:19.009 +To show it here, I add a file link below + +00:04:19.010 --> 00:04:21.879 +the table and refresh inline images. + +00:04:21.880 --> 00:04:24.119 +There are our four bars. + +00:04:24.120 --> 00:04:26.675 +Keeping that table and picture together + +00:04:26.676 --> 00:04:29.229 +makes the SHAPE handover easy to follow. + +00:04:29.230 --> 00:04:32.559 +Crew is slightly ahead of first class. + +00:04:32.560 --> 00:04:34.217 +Next, let's check how many + +00:04:34.218 --> 00:04:36.119 +people each group started with. + +00:04:36.120 --> 00:04:39.859 +Before we read too much into those bars, + +00:04:39.860 --> 00:04:43.610 +let's try column 2: everyone aboard. + +00:04:43.620 --> 00:04:45.024 +I change `deps:(3)` + +00:04:45.025 --> 00:04:47.130 +to `deps:(2)` and plot again. + +00:04:48.680 --> 00:04:50.169 +Crew had 890 people. + +00:04:50.170 --> 00:04:53.499 +First class had 324. + +00:04:53.500 --> 00:04:56.095 +Similar survivor counts came + +00:04:56.096 --> 00:04:58.959 +from very different group sizes. + +00:04:58.960 --> 00:05:01.419 +I put `deps:(3)` back and redraw. + +NOTE Using a Gnuplot block + +00:05:01.420 --> 00:05:04.281 +Next, we use a Gnuplot block so we + +00:05:04.282 --> 00:05:06.979 +can develop the figure ourselves. + +00:05:06.980 --> 00:05:09.404 +Now let's move from the table's plot + +00:05:09.405 --> 00:05:11.959 +instructions to a Gnuplot source block. + +00:05:11.960 --> 00:05:13.588 +Those plot lines were + +00:05:13.589 --> 00:05:15.289 +handy for a quick look. + +00:05:15.290 --> 00:05:17.717 +Next, we calculate percentages, + +00:05:17.718 --> 00:05:20.599 +reuse a style and draw several series. + +00:05:20.600 --> 00:05:22.902 +A source block gives us one place + +00:05:22.903 --> 00:05:25.069 +to read and edit those commands. + +00:05:25.070 --> 00:05:27.500 +We'll keep the same table + +00:05:27.501 --> 00:05:29.467 +and the same SVG file. + +00:05:29.468 --> 00:05:32.100 +The `:var` header supplies our named table. + +00:05:32.600 --> 00:05:34.804 +`:file` says where the picture goes, + +00:05:34.805 --> 00:05:36.619 +and `term` chooses the format. + +00:05:36.620 --> 00:05:38.519 +With the file-result + +00:05:38.520 --> 00:05:40.689 +settings we've prepared, + +00:05:40.690 --> 00:05:43.021 +Babel adds or updates the result + +00:05:43.022 --> 00:05:44.999 +link below the block for us. + +00:05:45.000 --> 00:05:47.109 +That's the automation part of SHAPE: + +00:05:47.110 --> 00:05:49.474 +we can rerun one recipe and keep + +00:05:49.475 --> 00:05:51.479 +its result together with it. + +00:05:51.480 --> 00:05:55.419 +Let's start with just plot data using 3. + +00:05:55.420 --> 00:05:58.430 +Run the block and we get four points: + +00:05:58.431 --> 00:06:00.490 +the survivor counts again. + +00:06:00.920 --> 00:06:03.110 +We'll keep building in this block. + +NOTE Group names + +00:06:03.290 --> 00:06:06.100 +Next, let's put the group names back. + +00:06:07.080 --> 00:06:08.370 +Let's make those four + +00:06:08.371 --> 00:06:09.659 +points easier to read. + +00:06:09.660 --> 00:06:11.399 +We'll add the group names, + +00:06:11.400 --> 00:06:13.032 +leave some room at the sides + +00:06:13.033 --> 00:06:14.890 +and start the vertical axis at 0. + +00:06:15.640 --> 00:06:17.285 +In the using expression, + +00:06:17.286 --> 00:06:19.259 +column 0 means the row number, + +00:06:19.260 --> 00:06:21.276 +column 3 gives us the height + +00:06:21.277 --> 00:06:23.849 +and xtic(1) supplies the group names. + +00:06:23.850 --> 00:06:26.919 +notitle removes the automatic legend. + +00:06:26.920 --> 00:06:28.396 +We don't need a legend + +00:06:28.397 --> 00:06:30.129 +for a single set of points. + +00:06:30.130 --> 00:06:32.342 +Run the block again and the picture + +00:06:32.343 --> 00:06:33.940 +updates in the same place. + +00:06:34.440 --> 00:06:35.889 +Now we can tell which point + +00:06:35.890 --> 00:06:37.079 +belongs to which group. + +00:06:37.080 --> 00:06:40.420 +That's the same SHAPE handover idea. + +00:06:40.760 --> 00:06:42.679 +Make the columns and labels clear. + +NOTE Adding bars + +00:06:42.680 --> 00:06:44.958 +Next, we'll turn them into bars + +00:06:44.959 --> 00:06:47.380 +and give the chart a bit of style. + +00:06:49.000 --> 00:06:51.209 +Let's turn these points into filled bars, + +00:06:51.210 --> 00:06:52.410 +then give the chart + +00:06:52.411 --> 00:06:53.850 +a title and clear units. + +00:06:54.280 --> 00:06:56.299 +We'll put the appearance settings + +00:06:56.300 --> 00:06:58.199 +in a small style block above it. + +00:06:58.200 --> 00:06:59.709 +`boxwidth` controls the width. + +00:06:59.710 --> 00:07:02.480 +The `fill` setting colours the bars, and + +00:07:02.481 --> 00:07:05.249 +the `linetype` setting gives us our blue. + +00:07:05.250 --> 00:07:07.711 +The plot block keeps the title and the + +00:07:07.712 --> 00:07:09.920 +label saying we're counting people. + +00:07:09.960 --> 00:07:12.116 +The little Noweb reference pulls + +00:07:12.117 --> 00:07:14.599 +in the style whenever we run the plot. + +00:07:14.600 --> 00:07:17.286 +So after changing the style, I run + +00:07:17.287 --> 00:07:20.279 +the plot again and see the result here. + +00:07:20.280 --> 00:07:23.479 +That's another bit of SHAPE automation. + +00:07:23.480 --> 00:07:25.479 +Reuse one definition. + +00:07:25.480 --> 00:07:28.219 +Same four values, much easier to read. + +NOTE Tidying up + +00:07:28.220 --> 00:07:30.570 +Let's tidy up the frame next. + +00:07:31.560 --> 00:07:33.131 +Before we add more data, + +00:07:33.132 --> 00:07:35.710 +let's tidy up the borders and tick marks. + +00:07:36.120 --> 00:07:38.054 +We'll keep the bottom and left + +00:07:38.055 --> 00:07:39.739 +edges and add a light grid. + +00:07:39.740 --> 00:07:42.779 +Each border has a value: + +00:07:42.780 --> 00:07:45.095 +Bottom is 1, left is 2, + +00:07:45.096 --> 00:07:47.409 +top is 4 and right is 8. + +00:07:47.410 --> 00:07:49.479 +Add the sides you want. + +00:07:49.480 --> 00:07:52.981 +1 + 2 gives 3, so set border + +00:07:52.982 --> 00:07:55.879 +3 keeps bottom and left. + +00:07:55.880 --> 00:07:58.402 +The ticks have separate settings: + +00:07:58.403 --> 00:08:01.369 +nomirror removes their copies at the top + +00:08:01.370 --> 00:08:03.090 +and right, and out points + +00:08:03.091 --> 00:08:05.669 +the remaining ticks away from the bars. + +00:08:05.670 --> 00:08:09.140 +The grid goes behind the data. + +00:08:09.150 --> 00:08:11.029 +Our small SHAPE check here is + +00:08:11.030 --> 00:08:13.159 +whether the scale is easy to read. + +NOTE Additional series + +00:08:13.160 --> 00:08:14.751 +Now we are ready to bring + +00:08:14.752 --> 00:08:16.649 +in the people who died as well. + +00:08:16.650 --> 00:08:19.369 +Let's show survivors and deaths together. + +00:08:19.370 --> 00:08:20.957 +We use two bars per group, + +00:08:20.958 --> 00:08:23.309 +with a legend so we can tell them apart. + +00:08:23.310 --> 00:08:25.388 +We switch to clustered histograms + +00:08:25.389 --> 00:08:27.650 +and give the plot command two series. + +00:08:27.820 --> 00:08:29.690 +One takes the survivor column; + +00:08:29.691 --> 00:08:31.319 +the other takes the deaths. + +00:08:31.320 --> 00:08:32.820 +Blue means survived + +00:08:32.821 --> 00:08:34.920 +and the pale bars mean died. + +00:08:35.130 --> 00:08:36.659 +Putting the bars side by side + +00:08:36.660 --> 00:08:38.629 +makes it easy to compare the two + +00:08:38.630 --> 00:08:40.239 +outcomes within each group. + +00:08:40.240 --> 00:08:42.391 +I'll keep the legend above the chart + +00:08:42.392 --> 00:08:44.020 +so it leaves the data clear. + +00:08:44.600 --> 00:08:46.441 +We can already see a different + +00:08:46.442 --> 00:08:47.629 +story in each group. + +NOTE Stacking outcomes + +00:08:47.630 --> 00:08:49.776 +So next we'll stack these + +00:08:49.777 --> 00:08:52.169 +same bars to show the totals. + +00:08:52.170 --> 00:08:54.771 +Let's stack those two outcomes and see + +00:08:54.772 --> 00:08:57.039 +what happens to the overall shape. + +00:08:57.040 --> 00:08:59.102 +We only need to change the histogram + +00:08:59.103 --> 00:09:01.220 +layout and update the title and units. + +00:09:01.880 --> 00:09:04.679 +Now each full bar is everyone aboard: + +00:09:04.680 --> 00:09:06.123 +the blue part is survivors + +00:09:06.124 --> 00:09:07.620 +and the pale part is deaths. + +00:09:08.110 --> 00:09:10.335 +A useful SHAPE check is that those + +00:09:10.336 --> 00:09:12.370 +parts add up to the group total. + +00:09:13.000 --> 00:09:15.399 +Look at crew compared with first class. + +00:09:15.400 --> 00:09:17.468 +The blue parts are quite similar, + +00:09:17.469 --> 00:09:19.719 +but the full crew bar is much taller. + +00:09:19.720 --> 00:09:23.719 +Crew had 890 people; first class had 324. + +00:09:23.720 --> 00:09:26.354 +So a similar number of survivors came + +00:09:26.355 --> 00:09:28.849 +from very different starting groups. + +NOTE Percentages + +00:09:28.850 --> 00:09:31.863 +Next we'll put each group on a percentage + +00:09:31.864 --> 00:09:34.589 +scale to make that comparison clearer. + +00:09:34.590 --> 00:09:36.223 +Now let's turn those + +00:09:36.224 --> 00:09:38.090 +counts into percentages. + +00:09:38.110 --> 00:09:40.241 +We write one small rate function + +00:09:40.242 --> 00:09:42.759 +and use it for both parts of the stack. + +00:09:42.760 --> 00:09:45.817 +The function takes a count, divides it by + +00:09:45.818 --> 00:09:48.729 +the number aboard and multiplies by 100. + +00:09:48.730 --> 00:09:50.244 +Writing it once saves us + +00:09:50.245 --> 00:09:51.879 +repeating that calculation. + +00:09:51.880 --> 00:09:55.110 +That's the automate-actions idea in SHAPE. + +00:09:55.290 --> 00:09:57.110 +Then we use it for the survivor + +00:09:57.111 --> 00:09:58.759 +column and the deaths column, + +00:09:58.760 --> 00:10:01.430 +and set the axis from 0 to 100. + +00:10:01.610 --> 00:10:03.537 +Run the block and every stack + +00:10:03.538 --> 00:10:05.079 +reaches the same height. + +00:10:05.080 --> 00:10:06.912 +The blue part now takes up much + +00:10:06.913 --> 00:10:08.629 +more of first class than crew. + +00:10:08.630 --> 00:10:10.680 +That's the difference we couldn't + +00:10:10.681 --> 00:10:12.549 +see from survivor counts alone. + +00:10:12.550 --> 00:10:15.309 +Let's keep just those survival rates next. + +00:10:15.310 --> 00:10:17.637 +Let's make the answer easier to pick + +00:10:17.638 --> 00:10:20.089 +out by showing only the survival rates. + +00:10:20.090 --> 00:10:22.143 +We'll go back to simple bars + +00:10:22.144 --> 00:10:24.480 +and keep the full 0 to 100 scale. + +00:10:25.390 --> 00:10:27.590 +We remove the histogram settings + +00:10:27.591 --> 00:10:29.389 +and the two-outcome legend. + +00:10:29.390 --> 00:10:31.459 +The rate function stays and we use + +00:10:31.460 --> 00:10:33.469 +it to calculate each bar's height. + +00:10:33.470 --> 00:10:35.872 +I also put percent signs on the tick + +00:10:35.873 --> 00:10:38.599 +labels so the units are clear at a glance. + +00:10:38.600 --> 00:10:41.709 +First class is highest; crew is lowest. + +00:10:41.710 --> 00:10:44.349 +We've changed from asking how many + +00:10:44.350 --> 00:10:47.289 +survived to asking what share survived. + +00:10:47.290 --> 00:10:49.114 +That's our SHAPE check: + +00:10:49.115 --> 00:10:51.850 +does the measure match our question? + +NOTE Leaving out a group + +00:10:52.600 --> 00:10:54.562 +Next I'll show you how to leave out + +00:10:54.563 --> 00:10:56.469 +a group without changing the table. + +00:10:56.470 --> 00:10:58.254 +Let's look at passengers + +00:10:58.255 --> 00:10:59.539 +only for a moment. + +00:10:59.540 --> 00:11:01.223 +We'll hide crew in this view + +00:11:01.224 --> 00:11:03.140 +and leave the source table alone. + +00:11:04.360 --> 00:11:05.352 +Inside using, + +00:11:05.353 --> 00:11:07.479 +we check the name in column 1. + +00:11:07.480 --> 00:11:11.879 +If it's Crew, we return 1 divided by 0. + +00:11:11.880 --> 00:11:13.619 +Gnuplot treats that as + +00:11:13.620 --> 00:11:16.039 +an undefined value and skips it. + +00:11:16.040 --> 00:11:17.293 +For the other rows, + +00:11:17.294 --> 00:11:19.109 +we keep the rate calculation. + +00:11:19.110 --> 00:11:21.275 +We also adjust the horizontal range + +00:11:21.276 --> 00:11:23.200 +and say passengers in the title. + +00:11:23.250 --> 00:11:25.428 +That's a small SHAPE check: + +00:11:25.429 --> 00:11:28.539 +the title should tell us who's included. + +00:11:28.540 --> 00:11:31.118 +There are our three passenger classes + +00:11:31.119 --> 00:11:33.289 +with their original percentages. + +00:11:33.290 --> 00:11:35.483 +Next we'll bring crew back and write + +00:11:35.484 --> 00:11:37.439 +the actual values above the bars. + +00:11:37.440 --> 00:11:39.837 +That way nobody has to estimate + +00:11:39.838 --> 00:11:41.709 +the values from the axis. + +00:11:41.710 --> 00:11:44.009 +We restore the original range + +00:11:44.010 --> 00:11:45.916 +and add another use of the same table + +00:11:45.917 --> 00:11:46.919 +to the plot command. + +00:11:46.920 --> 00:11:49.706 +This time it supplies text + +00:11:49.707 --> 00:11:52.079 +at each bar's position. + +00:11:52.080 --> 00:11:54.507 +sprintf formats the number to one + +00:11:54.508 --> 00:11:57.220 +decimal place and adds a percent sign. + +00:11:57.720 --> 00:12:00.366 +Both the bar and its label use our rate + +00:12:00.367 --> 00:12:02.880 +function, so they agree automatically. + +00:12:04.040 --> 00:12:06.259 +That's SHAPE automation saving + +00:12:06.260 --> 00:12:08.549 +us from copying numbers by hand. + +00:12:08.550 --> 00:12:11.354 +Now we can read about 62% + +00:12:11.355 --> 00:12:15.129 +for first class and 23.7% for crew. + +NOTE Digging into the details + +00:12:15.130 --> 00:12:17.295 +Let's see what those group + +00:12:17.296 --> 00:12:19.300 +averages might be hiding. + +00:12:19.960 --> 00:12:21.437 +Let's split that comparison + +00:12:21.438 --> 00:12:22.439 +into women and men. + +00:12:22.440 --> 00:12:24.680 +We'll connect a second named table + +00:12:24.681 --> 00:12:26.280 +to the same Gnuplot block + +00:12:26.470 --> 00:12:29.079 +and draw the two rates beside each other. + +00:12:29.080 --> 00:12:32.113 +I add `sex=demo-class-sex` + +00:12:32.114 --> 00:12:33.820 +to the `:var` header. + +00:12:33.980 --> 00:12:35.799 +That table comes from the same CSV + +00:12:35.800 --> 00:12:38.877 +but keeps separate counts for the recorded + +00:12:38.878 --> 00:12:41.309 +sex categories including children. + +00:12:41.310 --> 00:12:42.948 +Same SHAPE handover: + +00:12:42.949 --> 00:12:45.989 +we need to know what each column means. + +00:12:45.990 --> 00:12:47.978 +For each series we divide + +00:12:47.979 --> 00:12:50.959 +its survivors by its own number aboard. + +00:12:50.960 --> 00:12:53.719 +Run it and we get two bars per group. + +00:12:53.720 --> 00:12:56.459 +Women have higher survival rates + +00:12:56.460 --> 00:12:58.119 +in every group here. + +00:12:58.120 --> 00:13:00.318 +So the overall group rate leaves + +00:13:00.319 --> 00:13:02.049 +out quite a bit of detail. + +00:13:02.050 --> 00:13:04.258 +Next, we'll try a different way + +00:13:04.259 --> 00:13:06.189 +to show the same comparison. + +00:13:06.190 --> 00:13:08.617 +Let's keep those two calculations + +00:13:08.618 --> 00:13:10.829 +and try points instead of bars. + +00:13:10.830 --> 00:13:12.963 +It's a quick way to see how much + +00:13:12.964 --> 00:13:15.549 +the choice of chart changes the picture. + +00:13:15.550 --> 00:13:18.389 +We remove the histogram settings and use + +00:13:18.390 --> 00:13:21.160 +a circle for women and a square for men. + +00:13:21.350 --> 00:13:24.789 +Each pair sits at the same group position. + +00:13:24.790 --> 00:13:27.298 +Our SHAPE check is whether this view + +00:13:27.299 --> 00:13:29.739 +makes the comparison easier to read. + +00:13:29.740 --> 00:13:31.650 +The shapes help us tell them + +00:13:31.651 --> 00:13:33.559 +apart as well as the colours. + +00:13:33.560 --> 00:13:35.281 +We can still see the gap + +00:13:35.282 --> 00:13:36.589 +within every group, + +00:13:36.590 --> 00:13:38.754 +and the common percentage scale + +00:13:38.755 --> 00:13:40.580 +lets us compare groups too. + +00:13:40.920 --> 00:13:42.058 +That's another view + +00:13:42.059 --> 00:13:44.279 +from the same table and the same block. + +NOTE Overall group rates + +00:13:44.280 --> 00:13:47.486 +Let's finish with the overall + +00:13:47.487 --> 00:13:49.409 +group rates again. + +00:13:49.410 --> 00:13:51.346 +We'll bring back the four labelled + +00:13:51.347 --> 00:13:52.839 +bars and add a source line, + +00:13:52.840 --> 00:13:54.578 +so the saved figure makes + +00:13:54.579 --> 00:13:56.449 +sense outside this notebook. + +00:13:56.450 --> 00:13:58.414 +We remove the women and men + +00:13:58.415 --> 00:14:00.519 +table from the variable header + +00:14:00.520 --> 00:14:02.099 +and use our original + +00:14:02.100 --> 00:14:03.979 +class-counts table again. + +00:14:03.980 --> 00:14:05.790 +Then we add the dataset + +00:14:05.791 --> 00:14:07.300 +version and its DOI. + +00:14:07.640 --> 00:14:09.820 +That's the provenance part of SHAPE: + +00:14:10.010 --> 00:14:11.643 +someone can trace this + +00:14:11.644 --> 00:14:13.559 +picture back to its source. + +00:14:13.560 --> 00:14:16.080 +The subgroup comparison showed that there + +00:14:16.081 --> 00:14:18.359 +are differences inside each group too, + +00:14:18.360 --> 00:14:21.319 +so we'll be careful about what we claim. + +00:14:21.320 --> 00:14:23.148 +These are the overall + +00:14:23.149 --> 00:14:25.060 +rates in this snapshot. + +NOTE Checking + +00:14:26.120 --> 00:14:28.010 +Next let's check the total + +00:14:28.011 --> 00:14:29.199 +before we export. + +00:14:29.200 --> 00:14:32.160 +We'll also check that the shared style + +00:14:32.161 --> 00:14:34.969 +still updates when we rerun the plot. + +00:14:34.970 --> 00:14:38.015 +The stars in the stats ranges tell Gnuplot + +00:14:38.016 --> 00:14:40.919 +to use all the data for this calculation. + +00:14:40.920 --> 00:14:43.053 +Otherwise our percentage axis + +00:14:43.054 --> 00:14:45.399 +would leave out counts above 100. + +00:14:45.400 --> 00:14:48.409 +This keeps the chart at 0 to 100, + +00:14:48.410 --> 00:14:50.805 +while stats adds up all + +00:14:50.806 --> 00:14:53.399 +four survivor counts: 711. + +00:14:53.400 --> 00:14:54.797 +We use that result + +00:14:54.798 --> 00:14:56.929 +in a small label so the total + +00:14:56.930 --> 00:14:59.575 +comes from the table rather than from + +00:14:59.576 --> 00:15:02.219 +a number we've typed into the picture. + +00:15:02.220 --> 00:15:04.793 +Now I'll briefly change the shared + +00:15:04.794 --> 00:15:06.999 +colour and run the plot again. + +00:15:07.000 --> 00:15:09.709 +There's the colour change. + +00:15:09.710 --> 00:15:12.589 +Restore it and rerun: we're back to blue. + +00:15:12.590 --> 00:15:14.590 +Our style connection works, + +00:15:14.591 --> 00:15:17.589 +and the total agrees with the input check. + +00:15:17.590 --> 00:15:20.437 +That's SHAPE's evaluate-explicitly idea, + +00:15:20.438 --> 00:15:22.660 +with a concrete number to check. + +NOTE Saving as PDF + +00:15:24.110 --> 00:15:25.862 +Next, we save the finished + +00:15:25.863 --> 00:15:27.159 +figure as a PDF too. + +00:15:27.160 --> 00:15:29.659 +We already have the SVG, + +00:15:29.660 --> 00:15:32.120 +so we'll change the output options + +00:15:32.121 --> 00:15:34.369 +and keep the plot code as it is. + +00:15:34.370 --> 00:15:36.280 +In the header, I change + +00:15:36.281 --> 00:15:38.350 +the filename to end in PDF + +00:15:38.390 --> 00:15:41.189 +and choose pdfcairo as the terminal. + +00:15:41.190 --> 00:15:43.550 +Run the block, open the file, + +00:15:43.551 --> 00:15:45.360 +and there's our figure. + +00:15:45.960 --> 00:15:47.475 +Then I restore the SVG + +00:15:47.476 --> 00:15:49.319 +options for the inline view. + +00:15:49.320 --> 00:15:51.489 +Keeping the recipe, + +00:15:51.490 --> 00:15:53.759 +source and export together carries + +00:15:53.760 --> 00:15:55.639 +our SHAPE provenance forward. + +00:15:55.640 --> 00:15:58.388 +We can now answer our original question: + +00:15:58.389 --> 00:16:00.600 +crew had slightly more survivors, + +00:16:00.810 --> 00:16:02.836 +but a much lower survival rate + +00:16:02.837 --> 00:16:05.060 +than first class in this snapshot. + +00:16:05.400 --> 00:16:07.658 +We've got the data, the calculation + +00:16:07.659 --> 00:16:09.540 +and the saved result together. + +NOTE What else can Gnuplot do? + +00:16:11.240 --> 00:16:13.290 +Now let's spend a few minutes + +00:16:13.291 --> 00:16:15.749 +looking at what else Gnuplot can do. + +00:16:15.750 --> 00:16:17.929 +Let's start with three views together. + +00:16:17.930 --> 00:16:19.213 +I'll show the prepared + +00:16:19.214 --> 00:16:20.329 +code and the result, + +00:16:20.330 --> 00:16:22.050 +and we'll just look at what + +00:16:22.051 --> 00:16:23.340 +the picture tells us. + +00:16:23.510 --> 00:16:25.753 +On the left, the stacks show + +00:16:25.754 --> 00:16:27.919 +how many people were aboard. + +00:16:27.920 --> 00:16:29.060 +In the middle, + +00:16:29.061 --> 00:16:31.719 +the percentages change the ranking. + +00:16:31.720 --> 00:16:34.088 +On the right, the connected dots + +00:16:34.089 --> 00:16:36.960 +compare women and men within each group. + +00:16:36.990 --> 00:16:39.020 +Putting them together helps us + +00:16:39.021 --> 00:16:40.919 +see how the questions relate. + +00:16:40.920 --> 00:16:43.485 +Each panel has a clear job + +00:16:43.486 --> 00:16:46.050 +just like our SHAPE stages. + +00:16:46.250 --> 00:16:48.322 +Next, let's look at who made + +00:16:48.323 --> 00:16:50.110 +up the population aboard. + +00:16:51.400 --> 00:16:54.039 +This one is about the size of each group. + +00:16:54.040 --> 00:16:56.406 +Crew makes up about 40% + +00:16:56.407 --> 00:16:58.970 +and third class about 32%. + +00:17:00.200 --> 00:17:03.229 +First and second class make up the rest. + +00:17:03.230 --> 00:17:05.575 +The names and percentages sit right + +00:17:05.576 --> 00:17:07.919 +in the picture so it's easy to read. + +00:17:07.920 --> 00:17:11.316 +These slices describe who was aboard; the + +00:17:11.317 --> 00:17:14.469 +survival rates are a separate question. + +00:17:14.470 --> 00:17:16.743 +Next, we'll try showing + +00:17:16.744 --> 00:17:19.489 +several measures in one view. + +00:17:19.490 --> 00:17:21.860 +So let's try a spider plot. + +00:17:22.360 --> 00:17:25.051 +It gives each group a shape by placing + +00:17:25.052 --> 00:17:27.189 +several measures on the spokes. + +00:17:27.190 --> 00:17:30.309 +Each outline is one group and every + +00:17:30.310 --> 00:17:32.909 +spoke uses a percentage scale. + +00:17:32.910 --> 00:17:34.509 +You can follow an outline + +00:17:34.510 --> 00:17:37.020 +around to see that group's profile + +00:17:37.021 --> 00:17:39.459 +or compare groups along one spoke. + +00:17:39.460 --> 00:17:41.220 +The overall shape can + +00:17:41.221 --> 00:17:43.220 +help us spot differences. + +00:17:43.640 --> 00:17:45.328 +But the area inside it + +00:17:45.329 --> 00:17:46.869 +isn't a single score. + +00:17:46.870 --> 00:17:49.965 +Next, we'll return to class and sex + +00:17:49.966 --> 00:17:52.889 +and read the rates through colour. + +00:17:52.890 --> 00:17:55.659 +So let's look at the heatmap. + +00:17:55.660 --> 00:17:58.055 +The groups run down the side, + +00:17:58.056 --> 00:18:01.250 +and women and men have separate columns. + +00:18:01.360 --> 00:18:03.589 +The colour gives us a quick impression, + +00:18:03.590 --> 00:18:05.988 +and the text keeps the percentages + +00:18:05.989 --> 00:18:07.289 +and counts visible. + +00:18:07.290 --> 00:18:10.865 +Look at crew: the women's rate comes from + +00:18:10.866 --> 00:18:14.440 +23 people, while the men's comes from 867. + +00:18:14.550 --> 00:18:16.488 +Now let's bring age into + +00:18:16.489 --> 00:18:18.039 +the picture as well. + +00:18:18.040 --> 00:18:21.080 +Here we have a bubble + +00:18:21.790 --> 00:18:26.059 +for each age band and class or crew group. + +00:18:26.060 --> 00:18:28.379 +Colour shows survival rate, + +00:18:28.380 --> 00:18:30.533 +while bubble area shows how + +00:18:30.534 --> 00:18:32.839 +many people are in that group. + +00:18:32.840 --> 00:18:34.615 +So a tiny bright bubble means + +00:18:34.616 --> 00:18:36.450 +a high rate among a few people. + +00:18:36.520 --> 00:18:39.128 +This view uses the 2,205 + +00:18:39.129 --> 00:18:42.049 +people whose ages are known. + +00:18:42.050 --> 00:18:45.445 +For the last plot we will turn those same + +00:18:45.446 --> 00:18:48.759 +age groups into a three-dimensional view. + +00:18:48.760 --> 00:18:51.161 +For this last plot, let's look + +00:18:51.162 --> 00:18:53.950 +at the same age groups as a skyline. + +00:18:54.680 --> 00:18:55.643 +The columns make + +00:18:55.644 --> 00:18:57.399 +the population sizes stand out. + +00:18:57.400 --> 00:18:59.813 +Height shows people aboard + +00:18:59.814 --> 00:19:03.119 +and colour still shows survival rate. + +00:19:03.120 --> 00:19:05.115 +The large groups of young adults + +00:19:05.116 --> 00:19:06.869 +now look like tall buildings. + +00:19:06.870 --> 00:19:09.557 +It's the same data we just saw as bubbles, + +00:19:09.558 --> 00:19:12.119 +but with a different way of drawing them. + +00:19:12.120 --> 00:19:13.922 +We can still trace it back + +00:19:13.923 --> 00:19:16.259 +which is our SHAPE provenance idea. + +00:19:16.260 --> 00:19:17.511 +That's a good place + +00:19:17.512 --> 00:19:18.949 +to finish the examples, + +00:19:18.950 --> 00:19:21.787 +and I'll leave you with the sources + +00:19:21.788 --> 00:19:24.309 +and somewhere to keep exploring. + +00:19:24.310 --> 00:19:27.422 +But before we finish, let me point you to + +00:19:27.423 --> 00:19:30.459 +the sources and the rest of the material. + +00:19:30.460 --> 00:19:32.690 +The DOI links here take you + +00:19:32.691 --> 00:19:35.159 +to the dataset, ROOT and SHAPE, + +00:19:35.160 --> 00:19:37.115 +so you can follow up on the data + +00:19:37.116 --> 00:19:39.069 +and the ideas behind the session. + +00:19:39.070 --> 00:19:41.254 +If you'd like a deeper dive into + +00:19:41.255 --> 00:19:43.239 +the open educational resource, + +00:19:43.240 --> 00:19:45.779 +visit https://gnuplot.emaix.org. + +00:19:45.780 --> 00:19:48.579 +The QR code takes you there too. + +00:19:48.580 --> 00:19:50.519 +You will find the lessons, + +00:19:50.520 --> 00:19:52.648 +code and datasets, ready for you + +00:19:52.649 --> 00:19:54.389 +to try things out yourself. + +00:19:54.390 --> 00:19:58.020 +Happy plotting! diff --git a/2026/captions/emacsconf-2026-portable--emacs-as-my-portable-user-space-across-operating-platforms--mohammed-ismail-ansari--main--chapters.vtt b/2026/captions/emacsconf-2026-portable--emacs-as-my-portable-user-space-across-operating-platforms--mohammed-ismail-ansari--main--chapters.vtt new file mode 100644 index 00000000..75f8df4a --- /dev/null +++ b/2026/captions/emacsconf-2026-portable--emacs-as-my-portable-user-space-across-operating-platforms--mohammed-ismail-ansari--main--chapters.vtt @@ -0,0 +1,53 @@ +WEBVTT + + +00:00:01.111 --> 00:00:39.606 +Introduction + +00:00:40.514 --> 00:01:56.893 +History + +00:01:57.397 --> 00:02:55.328 +Getting into publishing packages + +00:02:56.769 --> 00:03:33.944 +More packages + +00:03:33.964 --> 00:03:52.757 +macOS + +00:03:53.716 --> 00:04:52.257 +Contributing to other packages + +00:04:53.238 --> 00:05:22.097 +Plain text + +00:05:22.098 --> 00:05:47.979 +Sharing my config + +00:05:48.820 --> 00:06:33.590 +Super Emacs + +00:06:33.610 --> 00:06:56.256 +Interface + +00:06:56.236 --> 00:07:08.300 +Navigation + +00:07:08.320 --> 00:07:15.274 +telephone-line + +00:07:15.727 --> 00:07:30.951 +Programming + +00:07:31.758 --> 00:08:25.204 +Using Super Emacs + +00:08:26.399 --> 00:09:04.675 +Recent improvements + +00:09:05.802 --> 00:09:46.862 +Customizing + +00:09:47.821 --> 00:11:31.183 +Acknowledgements diff --git a/2026/captions/emacsconf-2026-portable--emacs-as-my-portable-user-space-across-operating-platforms--mohammed-ismail-ansari--main.vtt b/2026/captions/emacsconf-2026-portable--emacs-as-my-portable-user-space-across-operating-platforms--mohammed-ismail-ansari--main.vtt new file mode 100644 index 00000000..4d9436b1 --- /dev/null +++ b/2026/captions/emacsconf-2026-portable--emacs-as-my-portable-user-space-across-operating-platforms--mohammed-ismail-ansari--main.vtt @@ -0,0 +1,781 @@ +WEBVTT captioned by sachac, verified by MyTerminal + +NOTE Introduction + +00:00:01.111 --> 00:00:03.135 +Hello, I am Mohammed Ismail Ansari, + +00:00:03.355 --> 00:00:04.558 +also known as MyTerminal. + +00:00:05.259 --> 00:00:07.403 +I am an electronics engineer by education, + +00:00:07.944 --> 00:00:10.108 +an automobile engineer by aspiration, + +00:00:10.429 --> 00:00:12.152 +and a software engineer by profession + +00:00:12.232 --> 00:00:14.576 +for the past 17 years. + +00:00:14.597 --> 00:00:17.221 +I love learning and talking about productivity, + +00:00:17.242 --> 00:00:19.626 +lists, and all kinds of tools. + +00:00:19.707 --> 00:00:23.354 +Today, I'll talk about how Emacs has been my portable user space + +00:00:23.555 --> 00:00:26.500 +across operating systems over the last decade and more. + +NOTE Summary + +00:00:27.182 --> 00:00:30.087 +I will talk in brief about my journey and experience + +00:00:30.127 --> 00:00:33.995 +with each of the three major operating systems I've used Emacs on, + +00:00:34.656 --> 00:00:37.662 +eventually leading to my reusable Emacs configuration + +00:00:37.762 --> 00:00:39.606 +that I call super-emacs. + +NOTE Operating Platforms + +00:00:40.514 --> 00:00:42.437 +I used to believe that all software + +00:00:42.497 --> 00:00:45.401 +was available for only one operating system. + +00:00:45.421 --> 00:00:47.765 +And that is because, long time ago, + +00:00:47.785 --> 00:00:51.310 +at a desk far, far away from where I'm sitting now, + +00:00:51.330 --> 00:00:53.894 +.exe files was all that I knew about. + +NOTE Windows + +00:00:55.236 --> 00:00:58.400 +So back when Windows was the only means to use a computer + +00:00:58.561 --> 00:01:01.485 +at my school, college, work and home, + +00:01:02.206 --> 00:01:05.150 +I did not imagine one could use Emacs on Windows as well, + +00:01:05.571 --> 00:01:07.534 +when I heard about it for the first time. + +00:01:07.801 --> 00:01:10.024 +But thanks to a friend for lighting the fire + +00:01:10.145 --> 00:01:12.228 +by splitting windows on his work machine + +00:01:12.308 --> 00:01:14.211 +during that enlightening afternoon + +00:01:14.351 --> 00:01:16.234 +just before I was leaving for the day, + +00:01:16.835 --> 00:01:20.801 +it did, for the most part, reduce my dependency on Visual Studio, + +00:01:21.422 --> 00:01:25.067 +eventually replacing it all together a few years later. + +00:01:25.317 --> 00:01:28.603 +I synced my configuration across machines at home + +00:01:28.743 --> 00:01:33.091 +and work through a GitHub repo I called EmacsConfiguration, + +00:01:33.111 --> 00:01:36.677 +totally unaware that it would one day become my dotfiles in some form. + +00:01:37.318 --> 00:01:39.182 +I hoarded packages left and right, + +00:01:39.422 --> 00:01:41.706 +including the ones that I did not need, + +00:01:42.040 --> 00:01:45.628 +lost my work emails due to a wrong configuration with mew.el + +00:01:46.189 --> 00:01:48.815 +in an attempt to replace Microsoft Outlook, + +00:01:48.835 --> 00:01:50.579 +teamed up with the same friend of mine + +00:01:50.659 --> 00:01:53.385 +to demo the power of Emacs macros across teams + +00:01:53.906 --> 00:01:56.893 +in hopes to get more people to discover and use it. + +00:01:57.397 --> 00:02:01.103 +I started publishing my own arguably lesser useful packages + +00:02:01.404 --> 00:02:03.828 +and then switched over to Marmalade repo + +00:02:03.928 --> 00:02:06.112 +to get around the review process with MELPA. + +00:02:06.813 --> 00:02:08.997 +I did even create my own color theme + +00:02:09.037 --> 00:02:11.281 +to make Emacs appear more like I wanted to + +00:02:11.802 --> 00:02:13.485 +and used it with theme-looper, + +00:02:13.585 --> 00:02:16.931 +which is almost my most useful Emacs package to date, + +00:02:17.131 --> 00:02:20.637 +but also one that I do not use myself anymore. + +NOTE Linux + +00:02:21.089 --> 00:02:23.132 +My switch to Linux made me realize + +00:02:23.172 --> 00:02:25.456 +that the git repo EmacsConfiguration + +00:02:25.616 --> 00:02:29.182 +was actually dotfiles and would later hold much more, + +00:02:29.322 --> 00:02:31.205 +including my workstation setup scripts + +00:02:31.325 --> 00:02:33.469 +for multiple operating systems at once + +00:02:33.970 --> 00:02:35.853 +and also several utility scripts. + +00:02:36.834 --> 00:02:38.336 +My tiling window manager setup + +00:02:38.417 --> 00:02:40.159 +had perfect parity with Emacs, + +00:02:40.560 --> 00:02:43.705 +and everything felt like a single system inside out. + +00:02:44.157 --> 00:02:47.740 +Needless to say, there was no more confusion about the home directory + +00:02:47.941 --> 00:02:49.802 +as it was in the case of Windows, + +00:02:50.183 --> 00:02:53.226 +and there was no more a need for add-ons like Cygwin + +00:02:53.606 --> 00:02:55.328 +to emulate a usable shell. + +00:02:56.769 --> 00:02:58.511 +Hoarding of packages did not stop + +00:02:59.111 --> 00:03:01.654 +and after adopting heavier packages like Helm, + +00:03:02.194 --> 00:03:05.437 +I even had to implement my own lazy loading system of packages + +00:03:05.938 --> 00:03:07.599 +that would improve startup times + +00:03:08.120 --> 00:03:09.961 +as I never used Emacs server + +00:03:10.422 --> 00:03:13.725 +and every single Emacs launch was a standalone instance. + +00:03:14.853 --> 00:03:18.178 +theme-looper now received more love from not only myself + +00:03:18.579 --> 00:03:20.983 +but also several other strangers on the web + +00:03:21.363 --> 00:03:25.550 +in form of code fixes, suggestions, and new features. + +00:03:25.570 --> 00:03:28.695 +Needless to say, being able to give back to the community, + +00:03:28.715 --> 00:03:30.719 +no matter in how small of a capacity, + +00:03:30.819 --> 00:03:33.944 +was pretty fulfilling. + +NOTE macOS + +00:03:33.964 --> 00:03:35.566 +I've also had a chance to experience + +00:03:35.586 --> 00:03:38.050 +Emacs with macOS at work + +00:03:38.491 --> 00:03:42.177 +and even on my personal setup for four years a while ago. + +00:03:42.781 --> 00:03:45.752 +GNU Emacs was still my tool of choice there, + +00:03:45.772 --> 00:03:49.686 +however, I learned that there were many more ways to get Emacs on macOS + +00:03:50.208 --> 00:03:52.757 +than I had seen on the other two platforms. + +00:03:53.716 --> 00:03:57.081 +It was during that time when I made Emacs my daily driver + +00:03:57.561 --> 00:04:00.065 +and made significant improvements to my configuration. + +00:04:01.046 --> 00:04:03.630 +I wrote my custom add-on to projectile-mode + +00:04:03.790 --> 00:04:07.876 +in order to work with projects more in the way it suited my workflow. + +00:04:07.896 --> 00:04:10.820 +These additions were not approved by the package maintainer + +00:04:10.880 --> 00:04:14.365 +so I supplemented it in an independent repo of my own + +00:04:14.585 --> 00:04:16.567 +which by the way I still use until this date. + +00:04:17.678 --> 00:04:19.120 +I discovered telephone-line + +00:04:19.260 --> 00:04:22.884 +as a great alternative to the other mode-line extensions, + +00:04:22.904 --> 00:04:25.887 +adopted perspective.el for being able to work + +00:04:25.927 --> 00:04:28.070 +with persistent workspaces, + +00:04:28.090 --> 00:04:31.233 +and helped bridge a few gaps by submitting merge requests + +00:04:31.514 --> 00:04:34.577 +to package maintainers for the ones I was using. + +NOTE How Emacs Influenced My Toolset + +00:04:34.597 --> 00:04:37.941 +During all these years, Emacs did not only help me as a user, + +00:04:38.041 --> 00:04:41.425 +but also influenced the other tools in my toolset. + +00:04:41.405 --> 00:04:44.829 +Firstly, I liked the idea of being able to use the same tool + +00:04:44.889 --> 00:04:46.070 +across operating systems + +00:04:46.611 --> 00:04:50.215 +and then, more importantly, being able to work on the data + +00:04:50.655 --> 00:04:52.257 +without locking myself with a tool. + +00:04:53.238 --> 00:04:56.462 +Slowly, I turned most of my data into plain text + +00:04:56.902 --> 00:04:59.345 +and that means if I'm looking for a new tool + +00:04:59.465 --> 00:05:02.688 +for a new use case, I'd expect to be able to read + +00:05:03.309 --> 00:05:06.012 +or edit the data from within Emacs. + +00:05:06.363 --> 00:05:09.246 +Add to it my carefully architected syncthing network + +00:05:09.326 --> 00:05:11.768 +consisting of about 15 nodes. + +00:05:11.788 --> 00:05:14.911 +Whether it is a Logseq graph or an Obsidian vault, + +00:05:15.472 --> 00:05:17.694 +as far as the data is available to me, + +00:05:17.714 --> 00:05:18.715 +I can still work with it + +00:05:18.855 --> 00:05:22.097 +in arguably the most efficient way. + +NOTE Sharing my Configs + +00:05:22.098 --> 00:05:23.500 +Just like my dotfiles, + +00:05:23.520 --> 00:05:26.002 +I've always been proud of my Emacs configuration, + +00:05:26.383 --> 00:05:29.085 +which is why sharing it has been a focus for me. + +00:05:30.206 --> 00:05:31.728 +I've been through numerous approaches + +00:05:31.808 --> 00:05:34.430 +for both maintaining and sharing them + +00:05:34.591 --> 00:05:36.032 +over the past 14 years. + +00:05:36.603 --> 00:05:39.988 +After turning EmacsConfiguration git repo into dotfiles + +00:05:40.048 --> 00:05:42.672 +to hold much more than just Emacs config files, + +00:05:43.293 --> 00:05:45.816 +I extracted it back into a Git repo of its own + +00:05:46.177 --> 00:05:47.979 +to have a better separation of concerns. + +00:05:48.820 --> 00:05:50.282 +Fast forwarding a few approaches + +00:05:50.783 --> 00:05:53.848 +brings us to the next major topic I wanted to cover today, + +00:05:54.228 --> 00:05:55.590 +which is super-emacs. + +NOTE super-emacs + +00:05:56.448 --> 00:05:59.931 +I have been maintaining super-emacs since almost 12 years + +00:06:00.371 --> 00:06:02.913 +and I wanted it to be a better starting configuration + +00:06:03.013 --> 00:06:05.896 +for someone who did not have the time or motivation + +00:06:06.256 --> 00:06:07.517 +to build one for themselves. + +00:06:08.518 --> 00:06:11.300 +It has evolved quite a lot from what it used to be earlier + +00:06:11.741 --> 00:06:13.502 +but the idea behind it is still the same. + +NOTE super-emacs: Basics + +00:06:15.404 --> 00:06:18.847 +I've made an attempt to keep super-emacs as minimal as possible + +00:06:18.887 --> 00:06:21.009 +with only about 50 external packages + +00:06:21.289 --> 00:06:24.051 +while also providing a reasonable amount of customization + +00:06:24.251 --> 00:06:26.353 +over out-of-the-box configuration. + +00:06:26.722 --> 00:06:29.285 +I've also tried to keep it as generic as possible + +00:06:29.725 --> 00:06:33.590 +with the least amount of subjective elements from myself. + +00:06:33.610 --> 00:06:35.012 +It has a minimal interface + +00:06:35.052 --> 00:06:37.294 +with almost all visual elements hidden + +00:06:37.595 --> 00:06:40.478 +except for the window, mode line and mini buffer. + +00:06:41.759 --> 00:06:44.922 +My own overcast theme makes certain elements + +00:06:44.923 --> 00:06:46.925 +like the active window stand out better. + +00:06:48.267 --> 00:06:49.849 +It comes with dual configuration + +00:06:49.969 --> 00:06:52.572 +for text and graphical-based sessions + +00:06:52.652 --> 00:06:56.256 +with special effort made to maintain them separately. + +00:06:56.236 --> 00:06:57.979 +It features easier buffer + +00:06:58.100 --> 00:07:00.364 +and window navigation and management, + +00:07:00.384 --> 00:07:01.687 +quick toggles and more, + +00:07:02.248 --> 00:07:04.492 +all nested within a set of four key bindings + +00:07:04.613 --> 00:07:08.300 +to avoid collisions with otherwise popular key bindings. + +00:07:08.320 --> 00:07:10.545 +The telephone-line helps make the mode line + +00:07:10.605 --> 00:07:13.010 +more informative and visually pleasing + +00:07:13.150 --> 00:07:15.274 +without much performance overhead. + +00:07:15.727 --> 00:07:16.951 +There are numerous tweaks + +00:07:17.031 --> 00:07:18.716 +for a better programming experience + +00:07:18.816 --> 00:07:22.226 +with several included language modes, an LSP server, + +00:07:23.189 --> 00:07:25.836 +and an overall enjoyable text editing experience + +00:07:25.937 --> 00:07:28.183 +with support for multiple named workspaces + +00:07:28.564 --> 00:07:30.951 +that can be persisted between sessions. + +NOTE super-emacs: Setting Up + +00:07:31.758 --> 00:07:34.082 +Now using super-emacs isn't very different + +00:07:34.142 --> 00:07:36.886 +than using your own Emacs configuration, + +00:07:36.906 --> 00:07:38.569 +though I've tried my hand at a script + +00:07:38.950 --> 00:07:41.294 +that would attempt to take care of the setup for you + +00:07:41.674 --> 00:07:43.257 +while also attempting to install + +00:07:43.337 --> 00:07:45.801 +a few external dependencies using Crater + +00:07:46.182 --> 00:07:47.984 +which is my own meta package manager + +00:07:48.125 --> 00:07:50.188 +I created for use cases like these. + +NOTE super-emacs: How I Use It Differently + +00:07:50.843 --> 00:07:52.786 +A few years ago, in order to make sure + +00:07:52.806 --> 00:07:54.708 +I did not abandon super-emacs, + +00:07:55.048 --> 00:07:56.530 +instead of maintaining it separately + +00:07:56.630 --> 00:07:58.453 +from my personal Emacs configuration, + +00:07:59.054 --> 00:08:01.617 +I decided to switch to using super-emacs myself. + +00:08:02.278 --> 00:08:04.019 +However, as I've experimented with + +00:08:04.020 --> 00:08:06.503 +a few other minimal starter packages earlier, + +00:08:06.804 --> 00:08:10.168 +the way I consume super-emacs is a little different. + +00:08:10.148 --> 00:08:12.454 +I just have to place another configuration + +00:08:12.494 --> 00:08:14.779 +in this directory that is hosted in my dotfiles + +00:08:15.060 --> 00:08:16.984 +and on startup, it would prompt me + +00:08:17.065 --> 00:08:18.668 +for the config to load instead. + +00:08:19.350 --> 00:08:22.317 +As super-emacs is the only one over there at the moment, + +00:08:22.337 --> 00:08:25.204 +it bypasses the prompt as if there isn't any. + +NOTE super-emacs: A Few Recent Major Changes + +00:08:26.399 --> 00:08:28.683 +There have been several recent major improvements + +00:08:28.723 --> 00:08:30.647 +that I would specifically like to mention. + +00:08:31.488 --> 00:08:33.491 +To start with a not so recent one, + +00:08:33.511 --> 00:08:35.336 +I had to come up with a custom package + +00:08:35.395 --> 00:08:37.239 +installation strategy with Quelpa, + +00:08:37.520 --> 00:08:40.365 +conditionally selecting the appropriate source. + +00:08:40.385 --> 00:08:42.207 +This helps me choose between stable + +00:08:42.429 --> 00:08:44.172 +and bleeding edge package versions. + +00:08:45.265 --> 00:08:48.871 +Integration with your favorite LLMs is achieved with ellama + +00:08:49.211 --> 00:08:50.313 +plus a custom wrapper + +00:08:50.373 --> 00:08:53.518 +that brings your model closer to the buffer or the mini buffer. + +00:08:54.319 --> 00:08:56.102 +There's also a splash screen + +00:08:56.182 --> 00:08:59.427 +that shows some info about the session and the host system + +00:09:00.068 --> 00:09:01.931 +and also contains a few shortcuts + +00:09:01.971 --> 00:09:04.675 +to resume back from where you left in an earlier session. + +NOTE super-emacs: Extending super-emacs + +00:09:05.802 --> 00:09:07.886 +I've been approached by a few individuals + +00:09:08.107 --> 00:09:11.935 +asking for recommended ways one can customize super-emacs for themselves + +00:09:12.376 --> 00:09:13.779 +and the following are the two means + +00:09:14.019 --> 00:09:16.064 +I've implemented that one can use + +00:09:16.404 --> 00:09:18.208 +until I come up with something better. + +00:09:19.285 --> 00:09:22.409 +Apart from the config files for basic and standard modes, + +00:09:22.429 --> 00:09:24.212 +I have dedicated a variables file + +00:09:24.332 --> 00:09:26.555 +that lets you tweak a few surface level + +00:09:26.675 --> 00:09:27.997 +elements of super-emacs. + +00:09:29.078 --> 00:09:31.561 +Apart from that, the config files for the two modes + +00:09:31.782 --> 00:09:33.504 +are loaded in a numerical order, + +00:09:33.804 --> 00:09:36.288 +so you're free to get creative with adding more files + +00:09:36.468 --> 00:09:38.170 +in a way that doesn't change the order + +00:09:38.210 --> 00:09:40.093 +of the files that are already included. + +00:09:41.014 --> 00:09:42.777 +How you would maintain your customization + +00:09:42.937 --> 00:09:46.862 +while also being in sync with the upstream is still a minor challenge. + +NOTE super-emacs: Contributions from Others + +00:09:47.821 --> 00:09:49.843 +super-emacs couldn't have been what it is + +00:09:49.903 --> 00:09:51.666 +without feedback and suggestions + +00:09:51.766 --> 00:09:53.568 +from a few friends over the internet. + +00:09:54.549 --> 00:09:56.571 +I realize I could have done a better job + +00:09:56.632 --> 00:09:58.294 +at making more of those happen, + +00:09:58.314 --> 00:10:00.736 +but at least with the fixes and improvements + +00:10:00.817 --> 00:10:01.898 +that could make it through, + +00:10:02.418 --> 00:10:03.980 +I couldn't have been more appreciative + +00:10:04.080 --> 00:10:05.142 +to these individuals. + +NOTE super-emacs: Future of super-emacs + +00:10:06.263 --> 00:10:09.827 +From the future standpoint, super-emacs will still continue to be + +00:10:09.887 --> 00:10:14.193 +my personal Emacs configuration running on all my machines, + +00:10:14.213 --> 00:10:17.136 +but beyond that, I'm open to your ideas. + +00:10:17.690 --> 00:10:20.134 +With the impressive starter packs that I came across + +00:10:20.314 --> 00:10:22.337 +back when I was starting my journey with Emacs + +00:10:22.918 --> 00:10:25.141 +and with my limited knowledge of Emacs Lisp, + +00:10:25.682 --> 00:10:28.486 +I did not intend to compete with any of those. + +00:10:28.506 --> 00:10:30.730 +Having said that, even if I succeed + +00:10:30.750 --> 00:10:32.893 +in helping a few people with it, + +00:10:32.913 --> 00:10:34.956 +it would mean the world to me. + +00:10:34.936 --> 00:10:38.400 +Honestly, I haven't been following Emacs much these days + +00:10:38.700 --> 00:10:41.983 +as much as I used to earlier but I do hope to get back + +00:10:42.043 --> 00:10:44.326 +to making super-emacs even better someday + +00:10:44.946 --> 00:10:47.769 +as soon as my hyperactive mind lets me be free + +00:10:47.849 --> 00:10:51.373 +from a hundred other things it keeps throwing at me. + +NOTE super-emacs: Acknowledgements + +00:10:51.393 --> 00:10:54.276 +Before I close, I'd like to mention a couple of people + +00:10:54.376 --> 00:10:55.817 +who have been truly instrumental + +00:10:55.957 --> 00:10:57.519 +in my experience with Emacs + +00:10:57.999 --> 00:10:59.961 +without whom I wouldn't have been sharing + +00:11:00.042 --> 00:11:01.483 +super-emacs with you today. + +00:11:02.290 --> 00:11:05.394 +Sacha Chua has been one of the few friendly faces + +00:11:05.974 --> 00:11:08.057 +whom I got to learn a lot from, + +00:11:08.077 --> 00:11:10.980 +especially during my early days with Emacs. + +00:11:11.000 --> 00:11:13.263 +Ryan D'Souza, my friend and mentor, + +00:11:13.583 --> 00:11:15.605 +was the one to spark my interest in Emacs + +00:11:15.725 --> 00:11:18.048 +by merely splitting buffers. + +00:11:18.068 --> 00:11:20.110 +And then, there are many others + +00:11:20.190 --> 00:11:21.432 +whom I couldn't mention here, + +00:11:21.672 --> 00:11:25.256 +but if you are one of those, thank you. + +NOTE Outro + +00:11:25.276 --> 00:11:27.319 +Thanks for hearing me talk about Emacs today. + +00:11:27.859 --> 00:11:29.241 +May the learning never stop, + +00:11:29.781 --> 00:11:31.183 +and may the maker watch over you. diff --git a/2026/captions/emacsconf-2026-rau--emacs-as-a-window-manager-and-concurrency--thomas-koch--main--chapters.vtt b/2026/captions/emacsconf-2026-rau--emacs-as-a-window-manager-and-concurrency--thomas-koch--main--chapters.vtt new file mode 100644 index 00000000..f55dc663 --- /dev/null +++ b/2026/captions/emacsconf-2026-rau--emacs-as-a-window-manager-and-concurrency--thomas-koch--main--chapters.vtt @@ -0,0 +1,44 @@ +WEBVTT + + +00:00:02.317 --> 00:01:08.269 +Introduction + +00:01:08.349 --> 00:01:32.656 +I already got a window manager + +00:01:33.764 --> 00:02:17.809 +Reka, an Emacs window manager + +00:02:22.312 --> 00:02:53.237 +Reka is written partly in Rust + +00:02:56.093 --> 00:04:20.404 +Râu + +00:04:24.027 --> 00:05:44.110 +River: Separating compositor and WM + +00:05:47.512 --> 00:08:20.361 +How? + +00:08:21.881 --> 00:09:34.077 +Demo + +00:09:37.313 --> 00:11:04.803 +Concurrency + +00:11:07.063 --> 00:12:16.502 +On concurrency + +00:12:22.898 --> 00:13:32.217 +Logging: lgr + +00:13:36.158 --> 00:15:06.285 +Commodore 64 + +00:15:10.206 --> 00:18:52.015 +Artificial intelligence + +00:18:55.774 --> 00:19:08.034 +Wrapping up diff --git a/2026/captions/emacsconf-2026-rau--emacs-as-a-window-manager-and-concurrency--thomas-koch--main.vtt b/2026/captions/emacsconf-2026-rau--emacs-as-a-window-manager-and-concurrency--thomas-koch--main.vtt new file mode 100644 index 00000000..6fb61dbc --- /dev/null +++ b/2026/captions/emacsconf-2026-rau--emacs-as-a-window-manager-and-concurrency--thomas-koch--main.vtt @@ -0,0 +1,941 @@ +WEBVTT captioned by Thomas Koch + +NOTE Introduction + +00:00:02.317 --> 00:00:05.698 +I am Thomas Koch and I'll be talking about Emacs + +00:00:05.938 --> 00:00:07.099 +as a window manager. + +00:00:08.299 --> 00:00:11.061 +My window manager is called Râu. + +00:00:11.881 --> 00:00:13.501 +I'll explain that name later. + +00:00:15.742 --> 00:00:19.064 +When I told my wife that after two months of work + +00:00:19.464 --> 00:00:24.226 +I could now move and resize windows on my screen, + +00:00:25.286 --> 00:00:27.047 +she was not impressed. + +00:00:28.022 --> 00:00:31.205 +Maybe today I have more luck and can find people + +00:00:31.285 --> 00:00:34.327 +who understand what I actually worked on and why + +00:00:34.387 --> 00:00:35.608 +it was so much fun. + +00:00:37.730 --> 00:00:41.052 +When I initially switched to Wayland some months + +00:00:41.132 --> 00:00:44.455 +ago, I first went for Niri as my window manager. + +00:00:45.376 --> 00:00:46.617 +Niri is fantastic. + +00:00:47.137 --> 00:00:49.859 +It is fast, beautiful, stable, featureful. + +00:00:50.380 --> 00:00:52.902 +It has a large fanbase for good reasons. + +00:00:54.395 --> 00:00:57.438 +But Niri has its own key bindings. + +00:00:58.619 --> 00:01:01.843 +And there are many more key bindings not shown on + +00:01:01.883 --> 00:01:02.483 +this slide. + +00:01:03.644 --> 00:01:08.269 +I did not want to learn all these key bindings. + +NOTE I already got a window manager + +00:01:08.349 --> 00:01:11.733 +First, I tried to make Niri behave like Emacs. + +00:01:12.834 --> 00:01:15.917 +Then I realized that I already got a window + +00:01:15.957 --> 00:01:16.337 +manager. + +00:01:17.256 --> 00:01:19.619 +And it has a superb key binding system. + +00:01:20.500 --> 00:01:21.522 +And it is tiled. + +00:01:22.103 --> 00:01:23.364 +And it has workspaces. + +00:01:23.765 --> 00:01:24.766 +And a help system. + +00:01:25.387 --> 00:01:27.309 +And a functional scripting language. + +00:01:27.690 --> 00:01:28.651 +And an overview. + +00:01:28.992 --> 00:01:31.054 +And inter-process communication. + +00:01:31.755 --> 00:01:32.656 +And much more. + +NOTE Reka, an Emacs window manager + +00:01:33.764 --> 00:01:37.427 +My friend Tazjin wrote an Emacs window manager + +00:01:37.647 --> 00:01:40.729 +based on the Wayland compositor River. + +00:01:42.010 --> 00:01:45.231 +Since his window manager is based on River, + +00:01:45.232 --> 00:01:47.393 +he called it Reka, + +00:01:47.394 --> 00:01:50.076 +which is the Russian word for River. + +00:01:51.397 --> 00:01:53.198 +On the slide you see Reka. + +00:01:54.259 --> 00:01:58.082 +The screen is fully occupied by an Emacs frame. + +00:01:59.437 --> 00:02:02.619 +On the left is one buffer displaying Firefox. + +00:02:03.760 --> 00:02:07.662 +On the top right is a Magit buffer and on the + +00:02:07.742 --> 00:02:10.404 +bottom right a Markdown text buffer. + +00:02:11.545 --> 00:02:15.007 +At the top of the screen there are three Emacs + +00:02:15.087 --> 00:02:17.809 +tabs and on the bottom is the mini buffer. + +NOTE Reka is written partly in Rust + +00:02:22.312 --> 00:02:25.433 +Reka is written partly in Elisp + +00:02:25.434 --> 00:02:26.795 +and partly in Rust. + +00:02:28.065 --> 00:02:30.686 +The Rust part is an Emacs module. + +00:02:31.667 --> 00:02:35.529 +It runs a separate thread and uses libwayland to + +00:02:35.589 --> 00:02:38.750 +communicate over a Unix socket with River. + +00:02:40.071 --> 00:02:43.552 +I like Rust. But I do not like the friction + +00:02:43.792 --> 00:02:45.693 +between Elisp and Rust. + +00:02:47.254 --> 00:02:50.696 +And I don't like the overhead to set up the Rust + +00:02:50.756 --> 00:02:53.237 +toolchain and the compilation time. + +NOTE Râu + +00:02:56.093 --> 00:03:01.076 +So I found ewc, an Elisp library that could speak + +00:03:01.176 --> 00:03:02.377 +the Wayland protocol. + +00:03:03.978 --> 00:03:09.062 +EWC allowed me to replace the Rust part of Reka + +00:03:09.242 --> 00:03:10.643 +with pure Elisp. + +00:03:12.704 --> 00:03:17.768 +I named my fork of Reka Râu, which is the + +00:03:17.848 --> 00:03:19.629 +Romanian word for river. + +00:03:22.080 --> 00:03:26.123 +After a lot of refactorings, I eventually arrived + +00:03:26.423 --> 00:03:28.564 +at the architecture shown here: + +00:03:30.325 --> 00:03:33.947 +a frontend Emacs process that starts a backend + +00:03:34.147 --> 00:03:35.048 +Emacs process. + +00:03:36.329 --> 00:03:38.129 +The backend Emacs process + +00:03:38.130 --> 00:03:42.451 +talks to River. Note that although the backend + +00:03:42.452 --> 00:03:44.173 +is a child process + +00:03:44.273 --> 00:03:48.436 +of the frontend, they do not use standard input + +00:03:48.696 --> 00:03:51.638 +and output as their communication channel. + +00:03:53.485 --> 00:03:56.707 +I did not find a non-blocking way for Emacs to + +00:03:56.787 --> 00:04:00.230 +listen to its standard input, and the backend + +00:04:00.410 --> 00:04:03.292 +must not block because it also needs to + +00:04:03.352 --> 00:04:04.813 +communicate with River. + +00:04:06.854 --> 00:04:09.957 +I will also talk about another problem I ran into + +00:04:10.017 --> 00:04:13.999 +before I arrived at the current state, but first + +00:04:14.220 --> 00:04:17.402 +some words about the magic involved that lets + +00:04:17.601 --> 00:04:20.404 +Emacs manage Wayland windows. + +NOTE River: Separating compositor and WM + +00:04:24.027 --> 00:04:26.909 +Please do not try to understand the state machine + +00:04:27.109 --> 00:04:27.909 +on this slide. + +00:04:28.430 --> 00:04:31.011 +This is only an illustration for River. + +00:04:33.092 --> 00:04:36.615 +Isaac Freund presented River on this year's + +00:04:36.695 --> 00:04:37.235 +FOSDEM. + +00:04:38.436 --> 00:04:41.498 +After working on the window manager River for + +00:04:41.678 --> 00:04:45.740 +over six years, he made an important observation + +00:04:46.020 --> 00:04:48.802 +about Wayland window managers in general. + +00:04:50.327 --> 00:04:53.751 +At this point, it is important to understand that + +00:04:53.971 --> 00:04:57.835 +so far every Wayland window manager was actually + +00:04:58.056 --> 00:05:02.500 +a window manager and a compositor in one program. + +00:05:04.002 --> 00:05:06.544 +So, Isaac noticed that there is + +00:05:06.545 --> 00:05:08.546 +a similar state machine + +00:05:08.547 --> 00:05:11.650 +at the core of different Wayland window managers, + +00:05:12.770 --> 00:05:15.732 +and that this state machine could actually be the + +00:05:15.852 --> 00:05:22.116 +base for a common API between window managers and + +00:05:22.196 --> 00:05:23.337 +Wayland compositors. + +00:05:24.598 --> 00:05:29.741 +So he created this API and since version 4, River + +00:05:29.841 --> 00:05:32.623 +is now only a Wayland compositor. + +00:05:34.125 --> 00:05:37.547 +There are now over 20 different Wayland window + +00:05:37.587 --> 00:05:41.189 +managers in 8 different programming languages + +00:05:41.649 --> 00:05:44.110 +using River as their compositor. + +NOTE How? + +00:05:47.512 --> 00:05:52.034 +Let's look at the core idea of Reka and Râu. + +00:05:53.195 --> 00:05:58.357 +I have not looked at EXWM yet, but I assume it + +00:05:58.437 --> 00:05:59.898 +does something similar. + +00:06:02.347 --> 00:06:07.408 +For every screen or output in Wayland terms, we + +00:06:07.488 --> 00:06:09.229 +create an Emacs frame. + +00:06:10.849 --> 00:06:14.470 +Such frames have two important Wayland objects + +00:06:14.650 --> 00:06:15.510 +related to them: + +00:06:16.950 --> 00:06:20.791 +the Wayland output that this Emacs frame should + +00:06:20.871 --> 00:06:25.952 +be shown on and the Wayland window that is + +00:06:26.072 --> 00:06:28.533 +actually showing the Emacs frame. + +00:06:30.345 --> 00:06:35.108 +Emacs frames can have parameters that can store + +00:06:35.509 --> 00:06:36.630 +arbitrary data. + +00:06:38.631 --> 00:06:44.635 +We store the IDs of the associated Wayland + +00:06:44.755 --> 00:06:47.077 +objects as frame parameters. + +00:06:48.278 --> 00:06:52.661 +That is, the window ID and the output ID. + +00:06:54.757 --> 00:06:58.199 +Then there are the other Wayland windows that are + +00:06:58.259 --> 00:07:02.000 +not showing Emacs frames associated with outputs. + +00:07:03.441 --> 00:07:06.101 +For every such Wayland window, + +00:07:06.102 --> 00:07:08.162 +we create an Emacs buffer + +00:07:08.163 --> 00:07:11.564 +and store the Wayland window id + +00:07:11.565 --> 00:07:14.345 +as a buffer-local value + +00:07:14.346 --> 00:07:18.328 +and the Wayland window title as the buffer name. + +00:07:19.389 --> 00:07:23.527 +Now every time the buffer is shown, + +00:07:23.528 --> 00:07:27.908 +we ask Emacs for the edges of the buffer + +00:07:27.909 --> 00:07:30.490 +and use those to position + +00:07:30.590 --> 00:07:35.511 +the Wayland window exactly above its associated + +00:07:35.751 --> 00:07:36.651 +Emacs buffer. + +00:07:40.312 --> 00:07:42.493 +The same idea visualized: + +00:07:44.106 --> 00:07:47.609 +For every Wayland output, that means for every + +00:07:47.649 --> 00:07:52.153 +screen or monitor, there is one maximized Emacs + +00:07:52.233 --> 00:07:54.455 +frame occupying the whole screen. + +00:07:56.937 --> 00:08:01.301 +The Emacs frame displays one or more Emacs + +00:08:01.401 --> 00:08:05.325 +windows with associated Emacs buffers. + +00:08:07.277 --> 00:08:11.898 +If such an Emacs buffer is a rau-mode buffer, + +00:08:12.699 --> 00:08:16.480 +then we display the associated Wayland window + +00:08:16.760 --> 00:08:20.361 +exactly at the position of the Emacs window. + +NOTE Demo + +00:08:21.881 --> 00:08:24.102 +Now, let's see this in action. + +00:08:25.522 --> 00:08:29.183 +For simplicity, we don't use a launcher but start + +00:08:29.243 --> 00:08:31.644 +LibreOffice as an async process. + +00:08:32.904 --> 00:08:35.664 +Async is important here to not block Emacs. + +00:08:37.155 --> 00:08:40.376 +Râu has initial support for floating windows. + +00:08:41.275 --> 00:08:44.256 +They can be moved around by pressing a modifier + +00:08:44.317 --> 00:08:48.259 +key together with the left mouse button and + +00:08:48.619 --> 00:08:50.980 +resized with the right mouse button. + +00:08:52.640 --> 00:08:55.401 +A middle button click with the modifier key + +00:08:55.581 --> 00:08:56.662 +closes the window. + +00:08:58.162 --> 00:09:02.044 +Notice that the Emacs UI is fully functional, + +00:09:02.524 --> 00:09:04.024 +including pop-up menus. + +00:09:04.745 --> 00:09:05.765 +I will come back to this. + +00:09:07.175 --> 00:09:10.818 +Wayland windows are represented as buffers and + +00:09:10.838 --> 00:09:13.000 +thus can be switched like buffers. + +00:09:14.481 --> 00:09:18.644 +Splitting the screen automatically resizes, and if + +00:09:18.744 --> 00:09:21.607 +necessary, repositions the Wayland window. + +00:09:23.068 --> 00:09:26.930 +Use `C-x b` with autocompletion + +00:09:26.931 --> 00:09:28.052 +to switch windows. + +00:09:29.213 --> 00:09:32.135 +You can also close windows by killing their + +00:09:32.255 --> 00:09:34.077 +associated Emacs buffers. + +NOTE Concurrency + +00:09:37.313 --> 00:09:41.556 +As I said, it took multiple iterations to arrive + +00:09:41.656 --> 00:09:43.117 +at the current architecture. + +00:09:44.538 --> 00:09:47.920 +The most pressing problem was that accidental + +00:09:48.000 --> 00:09:52.663 +mouse click could open an x-popup menu and this + +00:09:52.744 --> 00:09:54.765 +would freeze the whole window manager. + +00:09:56.266 --> 00:10:00.108 +I can only assume that somehow Emacs and River + +00:10:00.289 --> 00:10:02.230 +were waiting for each other. + +00:10:04.064 --> 00:10:08.407 +So I first tried to defer event processing with + +00:10:08.547 --> 00:10:12.129 +timers and get it out of the process-filter + +00:10:12.169 --> 00:10:12.610 +function. + +00:10:13.350 --> 00:10:14.491 +That did not help. + +00:10:16.132 --> 00:10:19.994 +Then I used artificial intelligence to write me + +00:10:20.114 --> 00:10:21.215 +an Emacs module. + +00:10:22.156 --> 00:10:25.738 +The module would do the Unix socket communication + +00:10:25.898 --> 00:10:27.259 +in a separate thread. + +00:10:28.729 --> 00:10:32.529 +However, this also did not solve the freezing, + +00:10:32.530 --> 00:10:34.231 +so I threw the code away. + +00:10:36.371 --> 00:10:39.311 +Thanks to artificial intelligence, + +00:10:39.312 --> 00:10:41.753 +this experiment took only about an hour. + +00:10:43.513 --> 00:10:46.393 +Eventually, I broke Râu + +00:10:46.394 --> 00:10:49.655 +into two separate Emacs processes. + +00:10:50.655 --> 00:10:52.656 +That finally fixed the issue. + +00:10:54.436 --> 00:10:57.237 +I did the coding of this refactoring myself. + +00:10:58.601 --> 00:11:01.861 +But I discussed the necessary steps + +00:11:01.862 --> 00:11:04.803 +and code organization with AI. + +NOTE On concurrency + +00:11:07.063 --> 00:11:10.424 +I looked at existing packages for concurrency. + +00:11:11.344 --> 00:11:14.245 +They also use separate Emacs processes. + +00:11:15.485 --> 00:11:19.626 +Both async and futur, however, only support + +00:11:19.806 --> 00:11:21.067 +short-lived functions. + +00:11:22.247 --> 00:11:25.308 +For Râu, I need a long-living process. + +00:11:26.943 --> 00:11:31.066 +In the end, it took only about 150 lines of code + +00:11:31.687 --> 00:11:35.710 +to start a child Emacs instance and allow remote + +00:11:35.770 --> 00:11:38.232 +procedure calls in both directions. + +00:11:39.793 --> 00:11:42.935 +Both processes just call functions + +00:11:42.936 --> 00:11:43.817 +on the other side. + +00:11:45.198 --> 00:11:47.639 +The code could be that simple + +00:11:47.640 --> 00:11:50.201 +because I do not need return values + +00:11:50.202 --> 00:11:51.363 +for the function calls. + +00:11:53.052 --> 00:11:55.272 +Serialization is provided by + +00:11:55.273 --> 00:11:57.534 +Elisp's symbolic expressions. + +00:11:59.055 --> 00:12:02.456 +The child Emacs process starts an Emacs server, + +00:12:02.996 --> 00:12:06.378 +so I can look into the backend with Emacs client. + +00:12:07.618 --> 00:12:11.079 +So, although my problem is solved, + +00:12:11.080 --> 00:12:12.499 +it would be very nice to have + +00:12:12.500 --> 00:12:15.400 +isolated worker threads in Emacs + +00:12:15.401 --> 00:12:16.502 +like in JavaScript. + +NOTE Logging: lgr + +00:12:22.898 --> 00:12:25.739 +A window manager should of course write log + +00:12:25.779 --> 00:12:28.520 +messages and write them to the same place as + +00:12:29.120 --> 00:12:30.260 +other services do. + +00:12:31.561 --> 00:12:35.222 +I found around 15 different logging + +00:12:35.342 --> 00:12:38.162 +implementations in my Emacs, + +00:12:39.343 --> 00:12:41.943 +all of them specific to their package. + +00:12:43.524 --> 00:12:45.704 +Thankfully there is now a logging package + +00:12:45.705 --> 00:12:46.805 +for Emacs. + +00:12:48.102 --> 00:12:51.685 +Lgr supports a hierarchy of loggers. + +00:12:51.705 --> 00:12:54.427 +Each node in the hierarchy can have its own + +00:12:54.548 --> 00:12:55.468 +configuration, + +00:12:56.489 --> 00:12:58.890 +so you can raise the logging level + +00:12:58.891 --> 00:13:00.932 +in only a specific part of your code + +00:13:00.933 --> 00:13:04.875 +and won't be spammed by log messages + +00:13:04.876 --> 00:13:05.697 +from other parts. + +00:13:06.998 --> 00:13:08.659 +Log messages have levels. + +00:13:09.140 --> 00:13:11.901 +They can be written to different places + +00:13:11.902 --> 00:13:14.924 +and log messages are only constructed + +00:13:14.925 --> 00:13:16.126 +when actually needed. + +00:13:17.412 --> 00:13:21.153 +The latter allows you to craft informative debug + +00:13:21.373 --> 00:13:25.835 +log messages with helpful data without worrying + +00:13:26.015 --> 00:13:27.155 +about performance. + +00:13:28.576 --> 00:13:32.217 +Please adopt Lgr and make it part of Emacs core! + +NOTE Commodore 64 + +00:13:36.158 --> 00:13:40.279 +When you're around my age, you might have a warm + +00:13:40.399 --> 00:13:42.520 +feeling when seeing this screen. + +00:13:44.490 --> 00:13:48.732 +One great thing about the C64 was that + +00:13:48.733 --> 00:13:51.153 +it welcomed the user directly + +00:13:51.154 --> 00:13:52.875 +with the programming environment. + +00:13:54.256 --> 00:13:56.296 +It was very natural to start + +00:13:56.297 --> 00:13:57.538 +hacking your computer. + +00:14:01.100 --> 00:14:04.942 +It only occurred to me after some time that Râu + +00:14:05.242 --> 00:14:08.044 +actually recreates this experience. + +00:14:09.261 --> 00:14:12.164 +When you use Emacs as your window manager, + +00:14:12.165 --> 00:14:14.047 +you are booting directly into + +00:14:14.048 --> 00:14:16.612 +an Elisp programming environment. + +00:14:18.354 --> 00:14:20.597 +If I were a school teacher, + +00:14:20.598 --> 00:14:24.183 +I would install Râu in the Computer Science lab. + +00:14:28.037 --> 00:14:31.219 +Besides Râu, there is of course the old + +00:14:31.220 --> 00:14:33.502 +Emacs X Window Manager. + +00:14:34.182 --> 00:14:37.225 +There is Reka, which I already talked about. + +00:14:38.165 --> 00:14:42.149 +And there is EWM, also a Wayland window manager. + +00:14:43.750 --> 00:14:47.173 +EWM was initially created with the help of + +00:14:47.753 --> 00:14:49.014 +artificial intelligence. + +00:14:49.935 --> 00:14:53.398 +It includes its own compositor and is more + +00:14:53.458 --> 00:14:55.840 +featureful than Reka or Râu. + +00:14:57.503 --> 00:15:01.643 +I have created the Category Window Manager + +00:15:01.644 --> 00:15:02.844 +in the Emacs Wiki. + +00:15:03.484 --> 00:15:06.285 +Please look there and also update the wiki. + +NOTE Artificial intelligence + +00:15:10.206 --> 00:15:12.186 +I have not made up my mind yet. + +00:15:13.647 --> 00:15:17.307 +I am humble enough to understand that artificial + +00:15:17.387 --> 00:15:19.848 +intelligence is a complex issue. + +00:15:21.897 --> 00:15:25.500 +I am convinced though that any meaningful + +00:15:25.560 --> 00:15:30.284 +discussion on AI should involve at least the + +00:15:30.344 --> 00:15:32.146 +concepts written on this slide. + +00:15:34.247 --> 00:15:37.890 +Artificial intelligence is no doubt a tool for + +00:15:37.990 --> 00:15:40.693 +control over people through surveillance, + +00:15:41.353 --> 00:15:43.535 +autonomous weapons, and propaganda. + +00:15:45.340 --> 00:15:48.321 +Artificial intelligence challenges previous + +00:15:48.441 --> 00:15:51.723 +understanding of property, labor, and capital. + +00:15:53.243 --> 00:15:56.725 +And none of the above can be talked about without + +00:15:56.985 --> 00:16:00.586 +also talking about human life and love. + +00:16:02.467 --> 00:16:05.368 +Unfortunately, that cannot be done in a + +00:16:06.029 --> 00:16:08.890 +conference talk nor on a mailing list. + +00:16:13.268 --> 00:16:18.252 +I did use AI right at the start to convert the + +00:16:18.312 --> 00:16:20.734 +Rust part of Reka into Elisp. + +00:16:21.715 --> 00:16:24.918 +Since then, however, I have refactored and + +00:16:25.158 --> 00:16:30.822 +rewritten code so much that I am not aware of any + +00:16:30.922 --> 00:16:34.545 +remaining trace of the initial AI converted code. + +00:16:36.327 --> 00:16:39.009 +I do not use AI to generate code. + +00:16:40.823 --> 00:16:43.743 +The most important reason for me is that + +00:16:43.744 --> 00:16:46.584 +the brain needs training like a muscle + +00:16:46.585 --> 00:16:48.406 +and I don't want to become stupid. + +00:16:49.986 --> 00:16:53.567 +And second, I only want to commit code that I + +00:16:53.727 --> 00:16:54.768 +fully understand. + +00:16:56.908 --> 00:17:02.790 +I still do use AI, however, to review my code and + +00:17:02.850 --> 00:17:04.590 +this is tremendously helpful. + +00:17:05.611 --> 00:17:07.791 +It regularly catches errors. + +00:17:09.512 --> 00:17:12.856 +Then AI is a much better search engine. + +00:17:14.098 --> 00:17:18.122 +I can ask, for example, is there a built-in + +00:17:18.402 --> 00:17:21.604 +function in Emacs to check whether a value + +00:17:21.605 --> 00:17:22.767 +is a cons cell. + +00:17:25.128 --> 00:17:30.233 +And the life-changing benefit of AI shows + +00:17:30.234 --> 00:17:31.436 +during debugging. + +00:17:32.654 --> 00:17:36.517 +AI easily finds the root cause that would + +00:17:36.718 --> 00:17:39.860 +otherwise have taken me hours to dig up. + +00:17:42.322 --> 00:17:45.485 +Another observation is that AI probably + +00:17:45.645 --> 00:17:47.847 +diminished the role of testing. + +00:17:49.008 --> 00:17:53.291 +Writing tests for a graphical, rapidly evolving + +00:17:53.371 --> 00:17:57.635 +project with multiple network connected + +00:17:57.815 --> 00:18:01.218 +components is more than a challenge. + +00:18:02.619 --> 00:18:06.581 +Having AI available for code review and debugging + +00:18:07.382 --> 00:18:10.924 +was more than a replacement for a test read at + +00:18:11.144 --> 00:18:13.306 +this stage of the project. + +00:18:16.968 --> 00:18:21.010 +As I said, AI is a very complex issue. + +00:18:23.252 --> 00:18:27.033 +In the context of a large and old codebase + +00:18:27.034 --> 00:18:27.815 +like Emacs, + +00:18:28.805 --> 00:18:33.887 +it is however very inspiring to think about the + +00:18:34.007 --> 00:18:38.789 +things that AI could enable and that previously + +00:18:39.049 --> 00:18:41.711 +would be deemed as infeasible. + +00:18:44.312 --> 00:18:49.734 +What could you do with 100 junior programmers + +00:18:50.134 --> 00:18:52.015 +that won't get tired? + +NOTE Wrapping up + +00:18:55.774 --> 00:19:00.802 +So, please go ahead and give Râu a try. + +00:19:02.004 --> 00:19:04.889 +I'm looking forward to user feedback and + +00:19:05.109 --> 00:19:06.051 +contributions. + +00:19:07.613 --> 00:19:08.034 +Thank you. |
