diff options
Diffstat (limited to '')
4 files changed, 1625 insertions, 2 deletions
diff --git a/2024/captions/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main--chapters.vtt b/2024/captions/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main--chapters.vtt new file mode 100644 index 00000000..2f81b8be --- /dev/null +++ b/2024/captions/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main--chapters.vtt @@ -0,0 +1,44 @@ +WEBVTT + + +00:00:02.940 --> 00:00:37.880 +Introduction + +00:00:37.881 --> 00:01:38.559 +What do I mean by shell? + +00:01:38.560 --> 00:04:50.159 +What I do not mean + +00:04:50.160 --> 00:09:26.911 +What is a shell? + +00:09:26.912 --> 00:11:57.299 +Launching external processes + +00:11:57.300 --> 00:14:33.413 +Environment variables + +00:14:54.400 --> 00:16:02.546 +Processes + +00:17:00.180 --> 00:20:07.719 +Redirecting and pipelining input and output + +00:20:09.440 --> 00:21:01.999 +Scripts + +00:21:11.780 --> 00:23:30.079 +File system management + +00:23:43.560 --> 00:24:23.639 +Networking + +00:24:30.120 --> 00:34:21.127 +A brief tour of Eshell + +00:34:21.128 --> 00:36:36.979 +Login shell + +00:36:36.980 --> 00:37:13.000 +Resources diff --git a/2024/captions/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main.vtt b/2024/captions/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main.vtt new file mode 100644 index 00000000..7f16a859 --- /dev/null +++ b/2024/captions/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main.vtt @@ -0,0 +1,1142 @@ +WEBVTT captioned by mark + +NOTE Introduction + +00:00:02.940 --> 00:00:08.719 +Welcome to Emacs as a Shell, a talk by Christopher Howard for + +00:00:08.720 --> 00:00:13.799 +Emacs Conference 2024. + +00:00:13.800 --> 00:00:18.399 +In this talk, I would like to explore, or advocate for, a + +00:00:18.400 --> 00:00:21.919 +particular perspective. I want to encourage people to + +00:00:21.920 --> 00:00:26.479 +think of Emacs not as simply an editor or a development + +00:00:26.480 --> 00:00:31.119 +environment, but rather as a shell, or at least something + +00:00:31.120 --> 00:00:33.919 +that allows us to do most of the things that we might + +00:00:33.920 --> 00:00:37.880 +otherwise want to do from a shell. + +NOTE What do I mean by shell? + +00:00:37.881 --> 00:00:40.839 +What do I mean by shell? By + +00:00:40.840 --> 00:00:45.439 +shell, I mean basically an interface that allows us to + +00:00:45.440 --> 00:00:50.679 +interact with the rest of our system by entering commands. + +00:00:50.680 --> 00:00:55.039 +That definition is, perhaps, a little too broad, and so I + +00:00:55.040 --> 00:00:58.439 +will try to narrow it down with a list of features that, + +00:00:58.440 --> 00:01:03.279 +historically, we have come to expect from a shell. The Bash + +00:01:03.280 --> 00:01:07.719 +shell is one very portable and well-known shell, and for + +00:01:07.720 --> 00:01:13.599 +many of us it is maybe the prototypical example. But in the + +00:01:13.600 --> 00:01:16.879 +past there have been many other shells, and there are other + +00:01:16.880 --> 00:01:21.119 +shells available today. If we are willing to be flexible in + +00:01:21.120 --> 00:01:25.559 +our thinking, we can think of Emacs as being a shell, or at + +00:01:25.560 --> 00:01:28.879 +least providing most of the functionality that we expect + +00:01:28.880 --> 00:01:38.559 +from a shell. + +NOTE What I do not mean + +00:01:38.560 --> 00:01:42.759 +Before further expanding on this idea, I must emphasize + +00:01:42.760 --> 00:01:47.159 +what I do not mean. First of all, I am not talking about + +00:01:47.160 --> 00:01:51.439 +running Bash, or some other external shell, from within + +00:01:51.440 --> 00:01:56.439 +Emacs, although this is certainly possible. I am arguing, + +00:01:56.440 --> 00:02:02.439 +rather, for using Emacs as a shell, instead of other shells. + +00:02:02.440 --> 00:02:06.239 +Second, I do not mean running a terminal emulator from + +00:02:06.240 --> 00:02:11.399 +within Emacs. Emacs has a built-in terminal emulator, but + +00:02:11.400 --> 00:02:15.839 +this is not what I mean. A terminal emulator is essentially a + +00:02:15.840 --> 00:02:20.039 +program designed to control the cursor and text appearance + +00:02:20.040 --> 00:02:23.999 +in response to various control codes in order to mimic a + +00:02:24.000 --> 00:02:28.439 +terminal display device. There are certainly legitimate + +00:02:28.440 --> 00:02:32.559 +reasons to do this. Nevertheless, in general, it does not + +00:02:32.560 --> 00:02:36.519 +make much sense to run a terminal emulator within Emacs, + +00:02:36.520 --> 00:02:39.719 +because Emacs has its own commands for controlling the + +00:02:39.720 --> 00:02:45.039 +cursor and text appearance. Also, due to the way Emacs was + +00:02:45.040 --> 00:02:48.919 +designed historically, Emacs itself believes that it is + +00:02:48.920 --> 00:02:53.119 +running on a terminal. So you end up with layers upon layers + +00:02:53.120 --> 00:02:58.199 +of terminal emulation. Anyhow, at the end of the day, Emacs + +00:02:58.200 --> 00:03:01.839 +will not perform as well as a dedicated terminal emulator + +00:03:01.840 --> 00:03:08.079 +program. I also think that, as we try to force ANSI terminal + +00:03:08.080 --> 00:03:12.359 +emulation into our Emacs workflow, this ultimately will be + +00:03:12.360 --> 00:03:15.879 +a hindrance to us in taking advantage of the natural and + +00:03:15.880 --> 00:03:19.319 +pleasant interfaces that are already available to us + +00:03:19.320 --> 00:03:24.999 +within Emacs. In brief, if your goal is simply to figure out + +00:03:25.000 --> 00:03:28.499 +how to be able to do all your normal Bash command line + +00:03:28.500 --> 00:03:32.359 +wizardry from within an Emacs window instead of a GNOME + +00:03:32.360 --> 00:03:36.479 +console window, you are headed down a different set of train + +00:03:36.480 --> 00:03:43.199 +tracks than I am. Also, something which I fear may confuse + +00:03:43.200 --> 00:03:47.919 +the issue for some viewers is the fact that Emacs ships with + +00:03:47.920 --> 00:03:52.839 +its own unique built-in shell, called the Emacs shell, or + +00:03:52.840 --> 00:03:59.079 +Eshell. + +00:03:59.080 --> 00:04:02.959 +Eshell aims to be a legitimate shell, and provides a very + +00:04:02.960 --> 00:04:07.599 +similar experience to other shells like Bash, while being + +00:04:07.600 --> 00:04:11.119 +well integrated into the Emacs interface, and without + +00:04:11.120 --> 00:04:15.639 +giving up the power of the Emacs Lisp engine. Eshell will be + +00:04:15.640 --> 00:04:19.139 +mentioned multiple times in this talk. The entire talk + +00:04:19.140 --> 00:04:24.179 +could, in fact, be about Eshell, except that I want the talk + +00:04:24.180 --> 00:04:28.319 +to cover all aspects of Emacs shell-like functionality + +00:04:28.320 --> 00:04:32.079 +through its other tools, such as interactive commands and + +00:04:32.080 --> 00:04:37.079 +special modes. So, hopefully we can keep distinct in our + +00:04:37.080 --> 00:04:43.279 +mind the ideas of Emacs as a shell versus the Emacs shell, + +00:04:43.880 --> 00:04:50.159 +though the latter is an important part of the former. + +NOTE What is a shell? + +00:04:50.160 --> 00:04:55.399 +Let's get back to the fundamental idea of what is a shell. In + +00:04:55.400 --> 00:04:59.159 +the broadest definition, a shell is an interface which + +00:04:59.160 --> 00:05:02.279 +allows you to interact with your operating system through + +00:05:02.280 --> 00:05:06.840 +commands. However, from a historical perspective, there + +00:05:06.841 --> 00:05:10.699 +are a few basic capabilities which we expect to be part of + +00:05:10.700 --> 00:05:17.880 +every shell. + +00:05:17.881 --> 00:05:21.420 +First of all, the shell provides a means of launching + +00:05:21.421 --> 00:05:26.440 +external programs. Some internal or built-in commands + +00:05:26.441 --> 00:05:31.679 +might also be made available. Second, the shell provides a + +00:05:31.680 --> 00:05:36.820 +means of managing environment variables. In the past, + +00:05:36.821 --> 00:05:40.580 +environment variables often played a critical role as a + +00:05:40.581 --> 00:05:45.360 +means of passing in options, file names, device names, and + +00:05:45.361 --> 00:05:50.119 +suchlike to external programs. This is not quite as common + +00:05:50.120 --> 00:05:54.080 +today, but the environment still plays a critical role in + +00:05:54.081 --> 00:05:57.619 +managing things such as the path to executables and + +00:05:57.620 --> 00:06:03.080 +libraries, as well as various other user, desktop, and + +00:06:03.081 --> 00:06:08.280 +system settings. The shell modifies the environment and + +00:06:08.281 --> 00:06:11.620 +passes it on to external programs. + +00:06:13.540 --> 00:06:17.580 +Historically, job control was expected to be either a + +00:06:17.581 --> 00:06:21.560 +function of the shell, or easily accessible from it. + +00:06:21.561 --> 00:06:24.019 +Usually today, our personal computing is not + +00:06:24.020 --> 00:06:29.280 +batch-oriented. But typically, shells can run multiple + +00:06:29.281 --> 00:06:34.599 +processes simultaneously, as well as provide means to + +00:06:34.600 --> 00:06:38.780 +suspend and terminate processes, which are useful + +00:06:38.781 --> 00:06:44.880 +features. Shells should be able to redirect and pipeline + +00:06:44.881 --> 00:06:49.100 +process input and output. This allows the user to connect + +00:06:49.101 --> 00:06:53.880 +process input and output with files, devices, or other + +00:06:53.881 --> 00:06:58.813 +processes. Finally, shells are expected to have some + +00:06:58.814 --> 00:07:02.380 +limited scripting capability, such as the + +00:07:02.381 --> 00:07:06.613 +POSIX-compliant set of program statements and + +00:07:06.614 --> 00:07:08.880 +conditionals that Bash provides. + +00:07:11.100 --> 00:07:15.113 +As command-line wizards, there are a number of tasks we + +00:07:15.114 --> 00:07:18.280 +expect to be able to do quickly and easily from our shell, + +00:07:18.660 --> 00:07:21.646 +even though these tasks are not the domain of the shell + +00:07:21.647 --> 00:07:27.880 +itself. A common task is file management and navigation. We + +00:07:27.881 --> 00:07:31.113 +quickly navigate and manipulate the file system with + +00:07:31.114 --> 00:07:34.813 +standard utilities that do things like change the current + +00:07:34.814 --> 00:07:39.380 +working directory, rename files, move files, and delete + +00:07:39.381 --> 00:07:44.146 +files. We usually expect to have access to some additional + +00:07:44.147 --> 00:07:48.380 +process management utilities. These allow us to do things + +00:07:48.381 --> 00:07:51.780 +such as find out the status of all processes running on the + +00:07:51.781 --> 00:07:57.980 +system, and send signals to processes. Finally, we expect + +00:07:57.981 --> 00:08:02.113 +to have access to some basic networking utilities. For + +00:08:02.114 --> 00:08:05.413 +example, we should be able to run commands that set up + +00:08:05.414 --> 00:08:09.513 +network interfaces, ping computers, and download files. + +00:08:09.514 --> 00:08:16.080 +With a little reflection, we can see that Emacs can provide + +00:08:16.081 --> 00:08:20.146 +all or nearly all of the functionality we have described so + +00:08:20.147 --> 00:08:24.046 +far. And the functionality can be called conveniently + +00:08:24.047 --> 00:08:26.746 +through one of several methods. + +00:08:33.520 --> 00:08:43.846 +Either a normal interactive call, like M-x something, or a + +00:08:43.847 --> 00:08:46.013 +call to an elisp function, + +00:08:53.620 --> 00:09:01.180 +or through Eshell commands, or through some special buffer + +00:09:01.181 --> 00:09:06.946 +mode, such as the directory editor, which provides its own + +00:09:06.947 --> 00:09:09.413 +interface to some functionality. + +00:09:09.414 --> 00:09:17.413 +It may be going too far to say that Emacs is a full replacement + +00:09:17.414 --> 00:09:21.713 +for shells like Bash. Nevertheless, we can see that Emacs + +00:09:21.714 --> 00:09:25.680 +can do most of the things that we might otherwise do with our + +00:09:25.681 --> 00:09:26.911 +shell. + +NOTE Launching external processes + +00:09:26.912 --> 00:09:32.513 +Let us give some examples. First, can Emacs launch + +00:09:32.514 --> 00:09:36.680 +external commands? Of course. Now, there are something + +00:09:36.681 --> 00:09:40.446 +like a half-dozen different ways to do that within Emacs, and + +00:09:40.447 --> 00:09:46.713 +some are more convenient than others. From any Elisp + +00:09:46.714 --> 00:09:50.780 +program, we can call functions like make-process and + +00:09:50.781 --> 00:09:53.913 +call-process to launch external processes. + +00:10:12.460 --> 00:10:16.846 +These, however, generally are not convenient for quick, + +00:10:16.847 --> 00:10:22.380 +one-off commands. Another option would be to run Eshell, + +00:10:22.381 --> 00:10:26.580 +which would allow us to call the external program from a + +00:10:26.581 --> 00:10:28.946 +familiar command line prompt. + +00:10:34.160 --> 00:10:38.880 +If we do not actually want to drop into Eshell just to run one + +00:10:38.881 --> 00:10:42.213 +command, we also have the interactive command, + +00:10:42.214 --> 00:10:44.613 +eshell-command, + +00:10:52.420 --> 00:10:56.746 +which would allow us to call the external program from a + +00:10:56.747 --> 00:10:59.180 +familiar command line prompt. + +00:11:09.940 --> 00:11:12.080 +If we do not actually want to drop an + +00:11:12.081 --> 00:11:15.699 +Eshell just to run one command, as I just mentioned, we also + +00:11:15.700 --> 00:11:19.799 +have the interactive command eshell-command, which allows + +00:11:19.800 --> 00:11:23.399 +us to enter in a one-off command and run that immediately. + +00:11:25.420 --> 00:11:28.799 +And finally, there is also an interactive command called + +00:11:28.800 --> 00:11:30.499 +simply shell-command. + +00:11:34.600 --> 00:11:39.099 +Shell command is like Eshell command, but instead passes + +00:11:39.100 --> 00:11:42.899 +the command off to our system shell, for example, bash. + +00:11:43.940 --> 00:11:48.599 +This is cheating, of course, but it might be useful or convenient + +00:11:48.600 --> 00:11:57.299 +in some scenarios. + +NOTE Environment variables + +00:11:57.300 --> 00:12:01.899 +Regarding environment variables, Emacs can read and + +00:12:01.900 --> 00:12:05.399 +manipulate the environment variables, which in turn get + +00:12:05.400 --> 00:12:09.659 +passed on to processes which it launches. The + +00:12:09.660 --> 00:12:12.899 +general-purpose interactive commands for this are + +00:12:12.900 --> 00:12:18.499 +getenv and setenv. These commands + +00:12:18.500 --> 00:12:21.799 +deal with the one environment that is available throughout + +00:12:21.800 --> 00:12:25.699 +all parts of your running Emacs session. In other words, + +00:12:25.700 --> 00:12:28.999 +these functions deal with a global environment, which is + +00:12:29.000 --> 00:12:32.099 +the same wherever you are running getenv or + +00:12:32.100 --> 00:12:34.399 +setenv. + +00:13:00.340 --> 00:13:04.259 +An important exception is that every instance of Eshell + +00:13:04.260 --> 00:13:07.599 +maintains a distinct environment that will not be affected + +00:13:07.600 --> 00:13:13.980 +by setenv calls run in other buffers. Also, Eshell + +00:13:13.981 --> 00:13:16.446 +has some additional syntax for dealing with its + +00:13:16.447 --> 00:13:20.780 +environment, including the set and export syntax. + +00:13:38.647 --> 00:13:47.113 +Regarding job control and process management, Emacs does + +00:13:47.114 --> 00:13:50.880 +not provide job control in the way that Bash users are used + +00:13:50.881 --> 00:13:57.080 +to. We can, however, launch asynchronous processes, and do + +00:13:57.081 --> 00:14:01.580 +various things to them. From Eshell, or an eshell-command + +00:14:01.581 --> 00:14:07.180 +call, we can append the ampersand symbol to the command, and + +00:14:07.181 --> 00:14:11.013 +this will cause the process to run asynchronously in a + +00:14:11.014 --> 00:14:13.313 +dedicated buffer. + +00:14:20.881 --> 00:14:25.280 +Now, if the command is launched from Eshell, it will not + +00:14:25.281 --> 00:14:31.180 +actually run in a separate buffer, but the output will go to + +00:14:31.181 --> 00:14:33.413 +the Eshell buffer. + +NOTE Processes + +00:14:54.400 --> 00:14:59.580 +We can run the interactive command list-processes to see + +00:14:59.581 --> 00:15:02.846 +all the processes running for our current Emacs session. + +00:15:11.747 --> 00:15:17.646 +In Eshell, we can run the command "jobs" to get the same list. + +00:15:17.647 --> 00:15:22.813 +This will show the process name, process buffer name, + +00:15:22.814 --> 00:15:28.613 +process ID, and some other information. We can select the + +00:15:28.614 --> 00:15:32.880 +process buffer in the process list to bring up that process + +00:15:32.881 --> 00:15:36.213 +buffer. + +00:15:42.414 --> 00:15:47.046 +We can also use the interactive command signal-process to + +00:15:47.047 --> 00:15:52.980 +send any signal to a process, including "stop" to suspend the + +00:15:52.981 --> 00:15:58.380 +process, "continue" to resume the process, and "interrupt" or + +00:15:58.381 --> 00:16:02.546 +kill to terminate the process. + +NOTE Redirecting and pipelining input and output + +00:17:00.180 --> 00:17:04.813 +Regarding redirecting and pipelining input and output, + +00:17:04.814 --> 00:17:11.613 +Eshell does support redirection similar to Bash, so you can + +00:17:11.614 --> 00:17:17.046 +overwrite and append to files and some other objects. Input + +00:17:17.047 --> 00:17:22.380 +redirection is not yet implemented, but it is on the Eshell + +00:17:22.381 --> 00:17:29.213 +to-do list. Eshell also has pipes. The default pipe, which + +00:17:29.214 --> 00:17:33.220 +uses the familiar vertical bar symbol, pipes the data + +00:17:33.221 --> 00:17:36.980 +between the commands using an intermediate Emacs buffer. + +00:17:36.981 --> 00:17:41.200 +This, while usually quite practical, is less efficient + +00:17:41.201 --> 00:17:46.319 +than the system pipe. Therefore, Eshell also makes + +00:17:46.320 --> 00:17:50.146 +available a star-modified version, which uses the system + +00:17:50.147 --> 00:17:52.546 +pipe through a call to your system shell. + +00:17:56.881 --> 00:17:59.413 +So we can do things like + +00:18:02.340 --> 00:18:05.860 +direct output to a file. + +00:18:15.100 --> 00:18:20.240 +We're unfortunately not able to do input redirection, but + +00:18:20.241 --> 00:18:22.540 +we can use pipes. + +00:18:41.760 --> 00:18:45.639 +Elisp can manipulate and tie together processes in various + +00:18:45.640 --> 00:18:50.999 +ways, such as process filters and pipe processes, but I + +00:18:51.000 --> 00:18:56.559 +won't attempt to cover that. I feel like you should mention + +00:18:56.560 --> 00:19:02.119 +again that we have two kinds of pipes here available. So this + +00:19:02.120 --> 00:19:09.239 +pipe, the standard one, will pipe the data through Emacs + +00:19:09.240 --> 00:19:16.759 +buffers. That's very practical in most cases, but it is less + +00:19:16.760 --> 00:19:22.919 +efficient than piping through the system pipe. So Eshell + +00:19:22.920 --> 00:19:28.119 +makes available another symbol for that, star, vertical + +00:19:28.120 --> 00:19:38.339 +bar, that allows you to explicitly use the system pipe. + +00:19:38.340 --> 00:19:43.599 +Regarding scripting: Of course, using Emacs makes + +00:19:43.600 --> 00:19:47.959 +available all the power of the Elisp API and third-party + +00:19:47.960 --> 00:19:54.719 +packages, so we have that out of the gate. Eshell also has + +00:19:54.720 --> 00:19:59.639 +control flow statements, like an "if" construct and a "for" + +00:19:59.640 --> 00:20:06.519 +construct. See the Eshell info manual, section 3.7, for + +00:20:06.520 --> 00:20:07.719 +more details. + +NOTE Scripts + +00:20:09.440 --> 00:20:13.839 +And if you wish to write a script entirely in Eshell syntax, + +00:20:13.840 --> 00:20:18.559 +and store it in a separate file, this is possible with recent + +00:20:18.560 --> 00:20:20.159 +versions of Emacs. + +00:20:31.840 --> 00:20:34.679 +Here's an example of a brief script that I wrote. + +00:20:37.560 --> 00:20:42.679 +Unfortunately, an eshell mode for proper syntax + +00:20:42.680 --> 00:20:46.279 +highlighting is not yet available, but hopefully that will + +00:20:46.280 --> 00:20:51.279 +be forthcoming. Note that Eshell syntax allows elisp + +00:20:51.280 --> 00:20:55.079 +forms to be interspersed with regular command form for + +00:20:55.080 --> 00:20:58.759 +additional scripting power. We will discuss this a little + +00:20:58.760 --> 00:21:01.999 +more later. + +NOTE File system management + +00:21:11.780 --> 00:21:16.759 +Regarding file system management. In Emacs, many of the + +00:21:16.760 --> 00:21:20.239 +common file system operations are available as + +00:21:20.240 --> 00:21:26.759 +interactive commands. For example, M-x cd, to change your + +00:21:26.760 --> 00:21:32.839 +buffer's current working directory, and other M-x commands + +00:21:32.840 --> 00:21:37.439 +such as make-directory + +00:21:40.780 --> 00:21:42.679 +chmod, + +00:21:43.260 --> 00:21:51.159 +and delete-file. Of course, you can also drop into Eshell, + +00:21:53.840 --> 00:22:00.639 +or use M-x eshell-command to run the usual external commands + +00:22:00.640 --> 00:22:07.039 +for file system manipulation. Also, a file manager is built + +00:22:07.040 --> 00:22:14.279 +into Emacs, which can be run by calling M-x dired. + +00:22:19.640 --> 00:22:24.559 +The directory editor is powerful, but it is a bit strange to + +00:22:24.560 --> 00:22:28.679 +folks expecting something like Midnight Commander or the + +00:22:28.680 --> 00:22:35.639 +GNOME file manager. It gives us a number of helpful features + +00:22:35.640 --> 00:22:43.639 +like the ability to mark files, and to run elisp functions on + +00:22:44.700 --> 00:22:48.439 +them, and some other interesting ways to manipulate and + +00:22:48.440 --> 00:22:54.079 +rename the files. However, third-party Emacs extensions + +00:22:54.080 --> 00:22:58.479 +such as Midnight Commander Mode and Sunrise Commander are + +00:22:58.480 --> 00:23:03.879 +available to provide a Midnight Commander experience, for those who + +00:23:03.880 --> 00:23:10.319 +prefer that sort of file management. + +00:23:10.320 --> 00:23:14.879 +Emacs also has the nifty TRAMP functionality built in, + +00:23:14.880 --> 00:23:19.159 +which allows you, most of the time, to easily edit files on + +00:23:19.160 --> 00:23:22.719 +other computers, as well as manipulate the file system. + +00:23:23.180 --> 00:23:27.839 +This transparently works through SSH and some other + +00:23:27.840 --> 00:23:30.079 +protocols that you can specify. + +NOTE Networking + +00:23:43.560 --> 00:23:48.159 +Regarding networking features, I don't have a lot of + +00:23:48.160 --> 00:23:51.639 +interesting things to say about this at the present, so I'll + +00:23:51.640 --> 00:23:54.919 +skip through this quickly. But if you do a little research, + +00:23:54.920 --> 00:23:58.799 +you will see that Emacs has a lot of functionality relating + +00:23:58.800 --> 00:24:02.359 +to making network connections, interacting with the web, + +00:24:02.780 --> 00:24:07.859 +and such like, both built-in and in available packages, as + +00:24:07.860 --> 00:24:14.399 +well as modes for doing things like Web browsing and Gemini + +00:24:14.400 --> 00:24:20.599 +browsing. And of course, you can run the usual standard + +00:24:20.600 --> 00:24:23.639 +networking commands for your system through Eshell. + +NOTE A brief tour of Eshell + +00:24:30.120 --> 00:24:33.759 +So having put forward the main arguments for this talk, I + +00:24:33.760 --> 00:24:38.199 +would like to take some time now to give a brief tour of a few of + +00:24:38.200 --> 00:24:43.799 +the features of Eshell, the Emacs shell. It bears + +00:24:43.800 --> 00:24:46.999 +emphasizing that Eshell is not a drop-in replacement for + +00:24:47.000 --> 00:24:51.879 +Bash, or even a Bash clone, though I believe the developers + +00:24:51.880 --> 00:24:56.839 +are trying to make much of the syntax very similar. Also, + +00:24:56.840 --> 00:25:00.479 +Eshell is not a terminal emulator, and it will not display + +00:25:00.480 --> 00:25:04.679 +correctly applications which use advanced ANSI control + +00:25:04.680 --> 00:25:10.119 +codes. However, Eshell can be configured to be aware of such + +00:25:10.120 --> 00:25:13.300 +applications, and to run them automatically within the + +00:25:13.301 --> 00:25:19.940 +Emacs terminal emulator when launched. See section 5.1 of + +00:25:19.941 --> 00:25:24.100 +the Eshell manual titled Visual Commands. + +00:25:32.540 --> 00:25:36.759 +Though Eshell is not Bash, it has multiple features, + +00:25:36.760 --> 00:25:40.679 +pertaining mainly to its by-design Emacs integration, + +00:25:40.680 --> 00:25:44.639 +which may make it more appealing to use than Bash or another + +00:25:44.640 --> 00:25:45.359 +shell. + +00:25:48.160 --> 00:25:52.039 +For one, Eshell allows entering commands on the command + +00:25:52.040 --> 00:25:55.960 +line that are space and new line separated, without + +00:25:55.961 --> 00:26:01.280 +parentheses. Of course, all the other shells do this. But + +00:26:01.281 --> 00:26:06.280 +within Eshell, it is possible to enter internal Emacs + +00:26:06.281 --> 00:26:11.060 +functions, as well as external commands. + +00:26:13.240 --> 00:26:45.739 +This allows us to do things like this. + +00:26:45.740 --> 00:26:49.759 +As far as I understand, it is possible to enter any Emacs + +00:26:49.760 --> 00:26:53.959 +function on the Eshell command line. However, some special + +00:26:53.960 --> 00:26:58.399 +syntax may be required if you are trying to pass in something + +00:26:58.400 --> 00:27:00.799 +that is not a string or a number. + +00:27:04.380 --> 00:27:07.919 +As you might have noticed in the last example, Eshell makes + +00:27:07.920 --> 00:27:12.919 +it possible to use an Emacs buffer as a sink for output. It + +00:27:12.920 --> 00:27:18.039 +also allows using a buffer as a source of input, though this + +00:27:18.040 --> 00:27:21.839 +is slightly more complicated, since the buffer must be + +00:27:21.840 --> 00:27:27.199 +converted to a string first. I have distilled this down into + +00:27:27.200 --> 00:27:30.279 +my own function, named with the "at" symbol. + +00:27:36.640 --> 00:27:40.319 +And I will provide the brief snippet of code for this later. + +00:27:54.640 --> 00:28:02.499 +So to give an example, here's our messages buffer. + +00:28:02.500 --> 00:28:05.399 +And from Eshell, we can do something like this. + +00:28:29.780 --> 00:28:34.439 +Let's say here we wanted to grab our messages buffer to see + +00:28:34.440 --> 00:28:38.079 +everything that we had been loading during the startup + +00:28:38.080 --> 00:28:38.959 +process. + +00:28:48.060 --> 00:28:51.879 +So you can see how that could be very handy in a number of + +00:28:51.880 --> 00:28:52.959 +scenarios. + +00:28:55.060 --> 00:29:00.239 +I wanted to briefly mention that we have a helpful function + +00:29:00.240 --> 00:29:03.439 +here called eshell-insert-buffer-name, + +00:29:11.120 --> 00:29:15.359 +which allows us to insert a buffer name into the current + +00:29:15.360 --> 00:29:18.439 +buffer at point using completion, + +00:29:24.680 --> 00:29:32.879 +which can save you a lot of typing. + +00:29:32.880 --> 00:29:34.799 +Another nice feature of Eshell + +00:29:37.220 --> 00:29:41.199 +is that it allows integrating ELisp into the command line + +00:29:41.200 --> 00:29:48.879 +call. Let's give another example. Say we wanted to echo the + +00:29:48.880 --> 00:29:53.919 +date to an event file or an event log. + +00:29:56.720 --> 00:30:01.639 +I should probably take a moment to explain this asterisk + +00:30:01.640 --> 00:30:06.999 +that I'm occasionally using. So since Emacs, or excuse me, + +00:30:07.000 --> 00:30:11.719 +since Eshell can use internal or external Emacs, excuse me, + +00:30:11.720 --> 00:30:16.999 +internal Emacs commands or external commands, it may + +00:30:17.000 --> 00:30:21.679 +sometimes be necessary to clarify which one you want to use, + +00:30:22.380 --> 00:30:27.079 +since the names may overlap. Since my Eshell is configured + +00:30:27.080 --> 00:30:32.319 +by default to prefer the internal Emacs functions, then + +00:30:32.320 --> 00:30:37.799 +sometimes I have to use the asterisk to specify that I want + +00:30:37.800 --> 00:30:39.079 +the external version. + +00:30:42.680 --> 00:31:02.639 +Here I can insert a bit of Elisp, + +00:31:03.180 --> 00:31:06.119 +and then redirect the output to the event log. + +00:31:18.720 --> 00:31:22.639 +Last, I want to mention that there are some optional Eshell + +00:31:22.640 --> 00:31:27.159 +modules in Emacs, not turned on by default, which provide + +00:31:27.160 --> 00:31:29.039 +additional nifty features. + +00:31:40.540 --> 00:31:45.639 +On my system, I have most of the optional modules turned on. + +00:31:58.320 --> 00:32:03.199 +An interesting module is eshell-smart, which does various + +00:32:03.200 --> 00:32:07.319 +things with cursor positioning and scrolling, so as to make + +00:32:07.320 --> 00:32:10.399 +editing commands and reviewing output easier. + +00:32:18.340 --> 00:32:23.619 +Let's say I was to change directory to my boot directory + +00:32:30.880 --> 00:32:35.039 +and use a command which involves lots of output. + +00:32:39.900 --> 00:32:44.359 +You'll notice right away that the cursor positioning is set + +00:32:44.360 --> 00:32:48.719 +such that I'm immediately able to view the top of the output. + +00:32:48.720 --> 00:32:52.879 +Also, I'm able to use the space bar to page through the + +00:32:52.880 --> 00:32:56.079 +output. + +00:32:56.080 --> 00:33:01.919 +So this is an opinionated feature, which assumes that + +00:33:01.920 --> 00:33:05.399 +you're likely going to want to review the output + +00:33:05.400 --> 00:33:10.559 +immediately, or that you often will. Of course, you can + +00:33:10.560 --> 00:33:17.599 +always jump to the end. + +00:33:19.980 --> 00:33:23.919 +Also, after a command is entered, the cursor is immediately + +00:33:23.920 --> 00:33:28.279 +repositioned to make it easy to edit the command. + +00:33:53.020 --> 00:33:56.519 +And also, if I don't want to edit the command, and I do not want + +00:33:56.520 --> 00:33:59.679 +to review the output, I can simply start typing another + +00:33:59.680 --> 00:34:00.359 +command. + +00:34:11.260 --> 00:34:15.519 +So that covers the brief tour of Eshell features. + +00:34:17.760 --> 00:34:21.127 +And that basically ends my talk. + +NOTE Login shell + +00:34:21.128 --> 00:34:22.380 +However, a handful of + +00:34:22.381 --> 00:34:28.719 +viewers might be wondering, is it possible to set Emacs to be + +00:34:28.720 --> 00:34:37.639 +my login shell to completely replace bash in your login + +00:34:37.640 --> 00:34:43.719 +experience? The answer is yes, but in practice there are + +00:34:43.720 --> 00:34:47.399 +various difficulties involved which might make it not + +00:34:47.400 --> 00:34:48.359 +worth the trouble. + +00:35:00.440 --> 00:35:03.479 +Before doing this, you'll have to answer a few initial + +00:35:03.480 --> 00:35:09.519 +questions. Do you want to make a new Emacs instance every + +00:35:09.520 --> 00:35:13.759 +time you log in, or do you want it to connect to an Emacs + +00:35:13.760 --> 00:35:20.599 +server? Which is popular among Emacs users, to reuse the + +00:35:20.600 --> 00:35:26.599 +session, or to connect to the existing session. Also, do you + +00:35:26.600 --> 00:35:30.639 +want a different result, whether in graphical or a terminal + +00:35:30.640 --> 00:35:34.679 +environment? And are you okay with your initialization + +00:35:34.680 --> 00:35:39.559 +file being run every time you log in, including every new tab + +00:35:39.560 --> 00:35:44.520 +you open in a terminal emulator? If we assume that you are + +00:35:44.521 --> 00:35:50.339 +using a system with /etc/passwd user management, you get + +00:35:50.340 --> 00:35:53.999 +one field to specify the name of the shell program that you + +00:35:54.000 --> 00:35:58.479 +want to use, and no arguments are allowed. So maybe you can + +00:35:58.480 --> 00:36:02.679 +see how this might be challenging, depending on your + +00:36:02.680 --> 00:36:06.879 +answers to the previous questions. You can work around + +00:36:06.880 --> 00:36:10.479 +these issues in various ways, like modifying the + +00:36:10.480 --> 00:36:15.439 +authentication system, or by specifying a script for your + +00:36:15.440 --> 00:36:21.799 +login shell. But if your normal workflow is to simply log in + +00:36:21.800 --> 00:36:25.679 +and start Emacs and run that Emacs session until your next + +00:36:25.680 --> 00:36:36.979 +reboot, then it probably isn't worth the bother. + +NOTE Resources + +00:36:36.980 --> 00:36:41.999 +So thank you for listening to my talk, Emacs as a Shell, by + +00:36:42.000 --> 00:36:46.319 +Christopher Howard for Emacs Conference 2024. + +00:36:46.860 --> 00:36:51.519 +At the bottom of this page, you can see a link to the + +00:36:51.520 --> 00:36:56.919 +repository containing the brief amount of code that was + +00:36:56.920 --> 00:37:03.679 +featured here in this video, as well as a link to my personal + +00:37:03.680 --> 00:37:10.279 +Gemini gemlog, as well as to a Web portal version of that. + +00:37:10.280 --> 00:37:13.000 +Thank you. diff --git a/2024/info/shell-after.md b/2024/info/shell-after.md index 4f9b3cff..c1007582 100644 --- a/2024/info/shell-after.md +++ b/2024/info/shell-after.md @@ -1,6 +1,427 @@ <!-- Automatically generated by emacsconf-publish-after-page --> +<a name="shell-mainVideo-transcript"></a> +# Transcript + + +[[!template new="1" text="""Introduction""" start="00:00:02.940" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""Welcome to Emacs as a Shell, a talk by Christopher Howard for""" start="00:00:02.940" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Emacs Conference 2024.""" start="00:00:08.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""In this talk, I would like to explore, or advocate for, a""" start="00:00:13.800" video="mainVideo-shell" id="subtitle"]] +[[!template text="""particular perspective. I want to encourage people to""" start="00:00:18.400" video="mainVideo-shell" id="subtitle"]] +[[!template text="""think of Emacs not as simply an editor or a development""" start="00:00:21.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""environment, but rather as a shell, or at least something""" start="00:00:26.480" video="mainVideo-shell" id="subtitle"]] +[[!template text="""that allows us to do most of the things that we might""" start="00:00:31.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""otherwise want to do from a shell.""" start="00:00:33.920" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""What do I mean by shell?""" start="00:00:37.881" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""What do I mean by shell? By""" start="00:00:37.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""shell, I mean basically an interface that allows us to""" start="00:00:40.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""interact with the rest of our system by entering commands.""" start="00:00:45.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""That definition is, perhaps, a little too broad, and so I""" start="00:00:50.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""will try to narrow it down with a list of features that,""" start="00:00:55.040" video="mainVideo-shell" id="subtitle"]] +[[!template text="""historically, we have come to expect from a shell. The Bash""" start="00:00:58.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""shell is one very portable and well-known shell, and for""" start="00:01:03.280" video="mainVideo-shell" id="subtitle"]] +[[!template text="""many of us it is maybe the prototypical example. But in the""" start="00:01:07.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""past there have been many other shells, and there are other""" start="00:01:13.600" video="mainVideo-shell" id="subtitle"]] +[[!template text="""shells available today. If we are willing to be flexible in""" start="00:01:16.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""our thinking, we can think of Emacs as being a shell, or at""" start="00:01:21.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""least providing most of the functionality that we expect""" start="00:01:25.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""from a shell.""" start="00:01:28.880" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""What I do not mean""" start="00:01:38.560" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""Before further expanding on this idea, I must emphasize""" start="00:01:38.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""what I do not mean. First of all, I am not talking about""" start="00:01:42.760" video="mainVideo-shell" id="subtitle"]] +[[!template text="""running Bash, or some other external shell, from within""" start="00:01:47.160" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Emacs, although this is certainly possible. I am arguing,""" start="00:01:51.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""rather, for using Emacs as a shell, instead of other shells.""" start="00:01:56.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Second, I do not mean running a terminal emulator from""" start="00:02:02.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""within Emacs. Emacs has a built-in terminal emulator, but""" start="00:02:06.240" video="mainVideo-shell" id="subtitle"]] +[[!template text="""this is not what I mean. A terminal emulator is essentially a""" start="00:02:11.400" video="mainVideo-shell" id="subtitle"]] +[[!template text="""program designed to control the cursor and text appearance""" start="00:02:15.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""in response to various control codes in order to mimic a""" start="00:02:20.040" video="mainVideo-shell" id="subtitle"]] +[[!template text="""terminal display device. There are certainly legitimate""" start="00:02:24.000" video="mainVideo-shell" id="subtitle"]] +[[!template text="""reasons to do this. Nevertheless, in general, it does not""" start="00:02:28.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""make much sense to run a terminal emulator within Emacs,""" start="00:02:32.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""because Emacs has its own commands for controlling the""" start="00:02:36.520" video="mainVideo-shell" id="subtitle"]] +[[!template text="""cursor and text appearance. Also, due to the way Emacs was""" start="00:02:39.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""designed historically, Emacs itself believes that it is""" start="00:02:45.040" video="mainVideo-shell" id="subtitle"]] +[[!template text="""running on a terminal. So you end up with layers upon layers""" start="00:02:48.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""of terminal emulation. Anyhow, at the end of the day, Emacs""" start="00:02:53.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""will not perform as well as a dedicated terminal emulator""" start="00:02:58.200" video="mainVideo-shell" id="subtitle"]] +[[!template text="""program. I also think that, as we try to force ANSI terminal""" start="00:03:01.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""emulation into our Emacs workflow, this ultimately will be""" start="00:03:08.080" video="mainVideo-shell" id="subtitle"]] +[[!template text="""a hindrance to us in taking advantage of the natural and""" start="00:03:12.360" video="mainVideo-shell" id="subtitle"]] +[[!template text="""pleasant interfaces that are already available to us""" start="00:03:15.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""within Emacs. In brief, if your goal is simply to figure out""" start="00:03:19.320" video="mainVideo-shell" id="subtitle"]] +[[!template text="""how to be able to do all your normal Bash command line""" start="00:03:25.000" video="mainVideo-shell" id="subtitle"]] +[[!template text="""wizardry from within an Emacs window instead of a GNOME""" start="00:03:28.500" video="mainVideo-shell" id="subtitle"]] +[[!template text="""console window, you are headed down a different set of train""" start="00:03:32.360" video="mainVideo-shell" id="subtitle"]] +[[!template text="""tracks than I am. Also, something which I fear may confuse""" start="00:03:36.480" video="mainVideo-shell" id="subtitle"]] +[[!template text="""the issue for some viewers is the fact that Emacs ships with""" start="00:03:43.200" video="mainVideo-shell" id="subtitle"]] +[[!template text="""its own unique built-in shell, called the Emacs shell, or""" start="00:03:47.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Eshell.""" start="00:03:52.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Eshell aims to be a legitimate shell, and provides a very""" start="00:03:59.080" video="mainVideo-shell" id="subtitle"]] +[[!template text="""similar experience to other shells like Bash, while being""" start="00:04:02.960" video="mainVideo-shell" id="subtitle"]] +[[!template text="""well integrated into the Emacs interface, and without""" start="00:04:07.600" video="mainVideo-shell" id="subtitle"]] +[[!template text="""giving up the power of the Emacs Lisp engine. Eshell will be""" start="00:04:11.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""mentioned multiple times in this talk. The entire talk""" start="00:04:15.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""could, in fact, be about Eshell, except that I want the talk""" start="00:04:19.140" video="mainVideo-shell" id="subtitle"]] +[[!template text="""to cover all aspects of Emacs shell-like functionality""" start="00:04:24.180" video="mainVideo-shell" id="subtitle"]] +[[!template text="""through its other tools, such as interactive commands and""" start="00:04:28.320" video="mainVideo-shell" id="subtitle"]] +[[!template text="""special modes. So, hopefully we can keep distinct in our""" start="00:04:32.080" video="mainVideo-shell" id="subtitle"]] +[[!template text="""mind the ideas of Emacs as a shell versus the Emacs shell,""" start="00:04:37.080" video="mainVideo-shell" id="subtitle"]] +[[!template text="""though the latter is an important part of the former.""" start="00:04:43.880" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""What is a shell?""" start="00:04:50.160" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""Let's get back to the fundamental idea of what is a shell. In""" start="00:04:50.160" video="mainVideo-shell" id="subtitle"]] +[[!template text="""the broadest definition, a shell is an interface which""" start="00:04:55.400" video="mainVideo-shell" id="subtitle"]] +[[!template text="""allows you to interact with your operating system through""" start="00:04:59.160" video="mainVideo-shell" id="subtitle"]] +[[!template text="""commands. However, from a historical perspective, there""" start="00:05:02.280" video="mainVideo-shell" id="subtitle"]] +[[!template text="""are a few basic capabilities which we expect to be part of""" start="00:05:06.841" video="mainVideo-shell" id="subtitle"]] +[[!template text="""every shell.""" start="00:05:10.700" video="mainVideo-shell" id="subtitle"]] +[[!template text="""First of all, the shell provides a means of launching""" start="00:05:17.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""external programs. Some internal or built-in commands""" start="00:05:21.421" video="mainVideo-shell" id="subtitle"]] +[[!template text="""might also be made available. Second, the shell provides a""" start="00:05:26.441" video="mainVideo-shell" id="subtitle"]] +[[!template text="""means of managing environment variables. In the past,""" start="00:05:31.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""environment variables often played a critical role as a""" start="00:05:36.821" video="mainVideo-shell" id="subtitle"]] +[[!template text="""means of passing in options, file names, device names, and""" start="00:05:40.581" video="mainVideo-shell" id="subtitle"]] +[[!template text="""suchlike to external programs. This is not quite as common""" start="00:05:45.361" video="mainVideo-shell" id="subtitle"]] +[[!template text="""today, but the environment still plays a critical role in""" start="00:05:50.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""managing things such as the path to executables and""" start="00:05:54.081" video="mainVideo-shell" id="subtitle"]] +[[!template text="""libraries, as well as various other user, desktop, and""" start="00:05:57.620" video="mainVideo-shell" id="subtitle"]] +[[!template text="""system settings. The shell modifies the environment and""" start="00:06:03.081" video="mainVideo-shell" id="subtitle"]] +[[!template text="""passes it on to external programs.""" start="00:06:08.281" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Historically, job control was expected to be either a""" start="00:06:13.540" video="mainVideo-shell" id="subtitle"]] +[[!template text="""function of the shell, or easily accessible from it.""" start="00:06:17.581" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Usually today, our personal computing is not""" start="00:06:21.561" video="mainVideo-shell" id="subtitle"]] +[[!template text="""batch-oriented. But typically, shells can run multiple""" start="00:06:24.020" video="mainVideo-shell" id="subtitle"]] +[[!template text="""processes simultaneously, as well as provide means to""" start="00:06:29.281" video="mainVideo-shell" id="subtitle"]] +[[!template text="""suspend and terminate processes, which are useful""" start="00:06:34.600" video="mainVideo-shell" id="subtitle"]] +[[!template text="""features. Shells should be able to redirect and pipeline""" start="00:06:38.781" video="mainVideo-shell" id="subtitle"]] +[[!template text="""process input and output. This allows the user to connect""" start="00:06:44.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""process input and output with files, devices, or other""" start="00:06:49.101" video="mainVideo-shell" id="subtitle"]] +[[!template text="""processes. Finally, shells are expected to have some""" start="00:06:53.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""limited scripting capability, such as the""" start="00:06:58.814" video="mainVideo-shell" id="subtitle"]] +[[!template text="""POSIX-compliant set of program statements and""" start="00:07:02.381" video="mainVideo-shell" id="subtitle"]] +[[!template text="""conditionals that Bash provides.""" start="00:07:06.614" video="mainVideo-shell" id="subtitle"]] +[[!template text="""As command-line wizards, there are a number of tasks we""" start="00:07:11.100" video="mainVideo-shell" id="subtitle"]] +[[!template text="""expect to be able to do quickly and easily from our shell,""" start="00:07:15.114" video="mainVideo-shell" id="subtitle"]] +[[!template text="""even though these tasks are not the domain of the shell""" start="00:07:18.660" video="mainVideo-shell" id="subtitle"]] +[[!template text="""itself. A common task is file management and navigation. We""" start="00:07:21.647" video="mainVideo-shell" id="subtitle"]] +[[!template text="""quickly navigate and manipulate the file system with""" start="00:07:27.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""standard utilities that do things like change the current""" start="00:07:31.114" video="mainVideo-shell" id="subtitle"]] +[[!template text="""working directory, rename files, move files, and delete""" start="00:07:34.814" video="mainVideo-shell" id="subtitle"]] +[[!template text="""files. We usually expect to have access to some additional""" start="00:07:39.381" video="mainVideo-shell" id="subtitle"]] +[[!template text="""process management utilities. These allow us to do things""" start="00:07:44.147" video="mainVideo-shell" id="subtitle"]] +[[!template text="""such as find out the status of all processes running on the""" start="00:07:48.381" video="mainVideo-shell" id="subtitle"]] +[[!template text="""system, and send signals to processes. Finally, we expect""" start="00:07:51.781" video="mainVideo-shell" id="subtitle"]] +[[!template text="""to have access to some basic networking utilities. For""" start="00:07:57.981" video="mainVideo-shell" id="subtitle"]] +[[!template text="""example, we should be able to run commands that set up""" start="00:08:02.114" video="mainVideo-shell" id="subtitle"]] +[[!template text="""network interfaces, ping computers, and download files.""" start="00:08:05.414" video="mainVideo-shell" id="subtitle"]] +[[!template text="""With a little reflection, we can see that Emacs can provide""" start="00:08:09.514" video="mainVideo-shell" id="subtitle"]] +[[!template text="""all or nearly all of the functionality we have described so""" start="00:08:16.081" video="mainVideo-shell" id="subtitle"]] +[[!template text="""far. And the functionality can be called conveniently""" start="00:08:20.147" video="mainVideo-shell" id="subtitle"]] +[[!template text="""through one of several methods.""" start="00:08:24.047" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Either a normal interactive call, like M-x something, or a""" start="00:08:33.520" video="mainVideo-shell" id="subtitle"]] +[[!template text="""call to an elisp function,""" start="00:08:43.847" video="mainVideo-shell" id="subtitle"]] +[[!template text="""or through Eshell commands, or through some special buffer""" start="00:08:53.620" video="mainVideo-shell" id="subtitle"]] +[[!template text="""mode, such as the directory editor, which provides its own""" start="00:09:01.181" video="mainVideo-shell" id="subtitle"]] +[[!template text="""interface to some functionality.""" start="00:09:06.947" video="mainVideo-shell" id="subtitle"]] +[[!template text="""It may be going too far to say that Emacs is a full replacement""" start="00:09:09.414" video="mainVideo-shell" id="subtitle"]] +[[!template text="""for shells like Bash. Nevertheless, we can see that Emacs""" start="00:09:17.414" video="mainVideo-shell" id="subtitle"]] +[[!template text="""can do most of the things that we might otherwise do with our""" start="00:09:21.714" video="mainVideo-shell" id="subtitle"]] +[[!template text="""shell.""" start="00:09:25.681" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""Launching external processes""" start="00:09:26.912" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""Let us give some examples. First, can Emacs launch""" start="00:09:26.912" video="mainVideo-shell" id="subtitle"]] +[[!template text="""external commands? Of course. Now, there are something""" start="00:09:32.514" video="mainVideo-shell" id="subtitle"]] +[[!template text="""like a half-dozen different ways to do that within Emacs, and""" start="00:09:36.681" video="mainVideo-shell" id="subtitle"]] +[[!template text="""some are more convenient than others. From any Elisp""" start="00:09:40.447" video="mainVideo-shell" id="subtitle"]] +[[!template text="""program, we can call functions like make-process and""" start="00:09:46.714" video="mainVideo-shell" id="subtitle"]] +[[!template text="""call-process to launch external processes.""" start="00:09:50.781" video="mainVideo-shell" id="subtitle"]] +[[!template text="""These, however, generally are not convenient for quick,""" start="00:10:12.460" video="mainVideo-shell" id="subtitle"]] +[[!template text="""one-off commands. Another option would be to run Eshell,""" start="00:10:16.847" video="mainVideo-shell" id="subtitle"]] +[[!template text="""which would allow us to call the external program from a""" start="00:10:22.381" video="mainVideo-shell" id="subtitle"]] +[[!template text="""familiar command line prompt.""" start="00:10:26.581" video="mainVideo-shell" id="subtitle"]] +[[!template text="""If we do not actually want to drop into Eshell just to run one""" start="00:10:34.160" video="mainVideo-shell" id="subtitle"]] +[[!template text="""command, we also have the interactive command,""" start="00:10:38.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""eshell-command,""" start="00:10:42.214" video="mainVideo-shell" id="subtitle"]] +[[!template text="""which would allow us to call the external program from a""" start="00:10:52.420" video="mainVideo-shell" id="subtitle"]] +[[!template text="""familiar command line prompt.""" start="00:10:56.747" video="mainVideo-shell" id="subtitle"]] +[[!template text="""If we do not actually want to drop an""" start="00:11:09.940" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Eshell just to run one command, as I just mentioned, we also""" start="00:11:12.081" video="mainVideo-shell" id="subtitle"]] +[[!template text="""have the interactive command eshell-command, which allows""" start="00:11:15.700" video="mainVideo-shell" id="subtitle"]] +[[!template text="""us to enter in a one-off command and run that immediately.""" start="00:11:19.800" video="mainVideo-shell" id="subtitle"]] +[[!template text="""And finally, there is also an interactive command called""" start="00:11:25.420" video="mainVideo-shell" id="subtitle"]] +[[!template text="""simply shell-command.""" start="00:11:28.800" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Shell command is like Eshell command, but instead passes""" start="00:11:34.600" video="mainVideo-shell" id="subtitle"]] +[[!template text="""the command off to our system shell, for example, bash.""" start="00:11:39.100" video="mainVideo-shell" id="subtitle"]] +[[!template text="""This is cheating, of course, but it might be useful or convenient""" start="00:11:43.940" video="mainVideo-shell" id="subtitle"]] +[[!template text="""in some scenarios.""" start="00:11:48.600" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""Environment variables""" start="00:11:57.300" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""Regarding environment variables, Emacs can read and""" start="00:11:57.300" video="mainVideo-shell" id="subtitle"]] +[[!template text="""manipulate the environment variables, which in turn get""" start="00:12:01.900" video="mainVideo-shell" id="subtitle"]] +[[!template text="""passed on to processes which it launches. The""" start="00:12:05.400" video="mainVideo-shell" id="subtitle"]] +[[!template text="""general-purpose interactive commands for this are""" start="00:12:09.660" video="mainVideo-shell" id="subtitle"]] +[[!template text="""getenv and setenv. These commands""" start="00:12:12.900" video="mainVideo-shell" id="subtitle"]] +[[!template text="""deal with the one environment that is available throughout""" start="00:12:18.500" video="mainVideo-shell" id="subtitle"]] +[[!template text="""all parts of your running Emacs session. In other words,""" start="00:12:21.800" video="mainVideo-shell" id="subtitle"]] +[[!template text="""these functions deal with a global environment, which is""" start="00:12:25.700" video="mainVideo-shell" id="subtitle"]] +[[!template text="""the same wherever you are running getenv or""" start="00:12:29.000" video="mainVideo-shell" id="subtitle"]] +[[!template text="""setenv.""" start="00:12:32.100" video="mainVideo-shell" id="subtitle"]] +[[!template text="""An important exception is that every instance of Eshell""" start="00:13:00.340" video="mainVideo-shell" id="subtitle"]] +[[!template text="""maintains a distinct environment that will not be affected""" start="00:13:04.260" video="mainVideo-shell" id="subtitle"]] +[[!template text="""by setenv calls run in other buffers. Also, Eshell""" start="00:13:07.600" video="mainVideo-shell" id="subtitle"]] +[[!template text="""has some additional syntax for dealing with its""" start="00:13:13.981" video="mainVideo-shell" id="subtitle"]] +[[!template text="""environment, including the set and export syntax.""" start="00:13:16.447" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Regarding job control and process management, Emacs does""" start="00:13:38.647" video="mainVideo-shell" id="subtitle"]] +[[!template text="""not provide job control in the way that Bash users are used""" start="00:13:47.114" video="mainVideo-shell" id="subtitle"]] +[[!template text="""to. We can, however, launch asynchronous processes, and do""" start="00:13:50.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""various things to them. From Eshell, or an eshell-command""" start="00:13:57.081" video="mainVideo-shell" id="subtitle"]] +[[!template text="""call, we can append the ampersand symbol to the command, and""" start="00:14:01.581" video="mainVideo-shell" id="subtitle"]] +[[!template text="""this will cause the process to run asynchronously in a""" start="00:14:07.181" video="mainVideo-shell" id="subtitle"]] +[[!template text="""dedicated buffer.""" start="00:14:11.014" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Now, if the command is launched from Eshell, it will not""" start="00:14:20.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""actually run in a separate buffer, but the output will go to""" start="00:14:25.281" video="mainVideo-shell" id="subtitle"]] +[[!template text="""the Eshell buffer.""" start="00:14:31.181" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""Processes""" start="00:14:54.400" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""We can run the interactive command list-processes to see""" start="00:14:54.400" video="mainVideo-shell" id="subtitle"]] +[[!template text="""all the processes running for our current Emacs session.""" start="00:14:59.581" video="mainVideo-shell" id="subtitle"]] +[[!template text="""In Eshell, we can run the command "jobs" to get the same list.""" start="00:15:11.747" video="mainVideo-shell" id="subtitle"]] +[[!template text="""This will show the process name, process buffer name,""" start="00:15:17.647" video="mainVideo-shell" id="subtitle"]] +[[!template text="""process ID, and some other information. We can select the""" start="00:15:22.814" video="mainVideo-shell" id="subtitle"]] +[[!template text="""process buffer in the process list to bring up that process""" start="00:15:28.614" video="mainVideo-shell" id="subtitle"]] +[[!template text="""buffer.""" start="00:15:32.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""We can also use the interactive command signal-process to""" start="00:15:42.414" video="mainVideo-shell" id="subtitle"]] +[[!template text="""send any signal to a process, including "stop" to suspend the""" start="00:15:47.047" video="mainVideo-shell" id="subtitle"]] +[[!template text="""process, "continue" to resume the process, and "interrupt" or""" start="00:15:52.981" video="mainVideo-shell" id="subtitle"]] +[[!template text="""kill to terminate the process.""" start="00:15:58.381" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""Redirecting and pipelining input and output""" start="00:17:00.180" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""Regarding redirecting and pipelining input and output,""" start="00:17:00.180" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Eshell does support redirection similar to Bash, so you can""" start="00:17:04.814" video="mainVideo-shell" id="subtitle"]] +[[!template text="""overwrite and append to files and some other objects. Input""" start="00:17:11.614" video="mainVideo-shell" id="subtitle"]] +[[!template text="""redirection is not yet implemented, but it is on the Eshell""" start="00:17:17.047" video="mainVideo-shell" id="subtitle"]] +[[!template text="""to-do list. Eshell also has pipes. The default pipe, which""" start="00:17:22.381" video="mainVideo-shell" id="subtitle"]] +[[!template text="""uses the familiar vertical bar symbol, pipes the data""" start="00:17:29.214" video="mainVideo-shell" id="subtitle"]] +[[!template text="""between the commands using an intermediate Emacs buffer.""" start="00:17:33.221" video="mainVideo-shell" id="subtitle"]] +[[!template text="""This, while usually quite practical, is less efficient""" start="00:17:36.981" video="mainVideo-shell" id="subtitle"]] +[[!template text="""than the system pipe. Therefore, Eshell also makes""" start="00:17:41.201" video="mainVideo-shell" id="subtitle"]] +[[!template text="""available a star-modified version, which uses the system""" start="00:17:46.320" video="mainVideo-shell" id="subtitle"]] +[[!template text="""pipe through a call to your system shell.""" start="00:17:50.147" video="mainVideo-shell" id="subtitle"]] +[[!template text="""So we can do things like""" start="00:17:56.881" video="mainVideo-shell" id="subtitle"]] +[[!template text="""direct output to a file.""" start="00:18:02.340" video="mainVideo-shell" id="subtitle"]] +[[!template text="""We're unfortunately not able to do input redirection, but""" start="00:18:15.100" video="mainVideo-shell" id="subtitle"]] +[[!template text="""we can use pipes.""" start="00:18:20.241" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Elisp can manipulate and tie together processes in various""" start="00:18:41.760" video="mainVideo-shell" id="subtitle"]] +[[!template text="""ways, such as process filters and pipe processes, but I""" start="00:18:45.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""won't attempt to cover that. I feel like you should mention""" start="00:18:51.000" video="mainVideo-shell" id="subtitle"]] +[[!template text="""again that we have two kinds of pipes here available. So this""" start="00:18:56.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""pipe, the standard one, will pipe the data through Emacs""" start="00:19:02.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""buffers. That's very practical in most cases, but it is less""" start="00:19:09.240" video="mainVideo-shell" id="subtitle"]] +[[!template text="""efficient than piping through the system pipe. So Eshell""" start="00:19:16.760" video="mainVideo-shell" id="subtitle"]] +[[!template text="""makes available another symbol for that, star, vertical""" start="00:19:22.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""bar, that allows you to explicitly use the system pipe.""" start="00:19:28.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Regarding scripting: Of course, using Emacs makes""" start="00:19:38.340" video="mainVideo-shell" id="subtitle"]] +[[!template text="""available all the power of the Elisp API and third-party""" start="00:19:43.600" video="mainVideo-shell" id="subtitle"]] +[[!template text="""packages, so we have that out of the gate. Eshell also has""" start="00:19:47.960" video="mainVideo-shell" id="subtitle"]] +[[!template text="""control flow statements, like an "if" construct and a "for"""" start="00:19:54.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""construct. See the Eshell info manual, section 3.7, for""" start="00:19:59.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""more details.""" start="00:20:06.520" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""Scripts""" start="00:20:09.440" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""And if you wish to write a script entirely in Eshell syntax,""" start="00:20:09.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""and store it in a separate file, this is possible with recent""" start="00:20:13.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""versions of Emacs.""" start="00:20:18.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Here's an example of a brief script that I wrote.""" start="00:20:31.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Unfortunately, an eshell mode for proper syntax""" start="00:20:37.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""highlighting is not yet available, but hopefully that will""" start="00:20:42.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""be forthcoming. Note that Eshell syntax allows elisp""" start="00:20:46.280" video="mainVideo-shell" id="subtitle"]] +[[!template text="""forms to be interspersed with regular command form for""" start="00:20:51.280" video="mainVideo-shell" id="subtitle"]] +[[!template text="""additional scripting power. We will discuss this a little""" start="00:20:55.080" video="mainVideo-shell" id="subtitle"]] +[[!template text="""more later.""" start="00:20:58.760" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""File system management""" start="00:21:11.780" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""Regarding file system management. In Emacs, many of the""" start="00:21:11.780" video="mainVideo-shell" id="subtitle"]] +[[!template text="""common file system operations are available as""" start="00:21:16.760" video="mainVideo-shell" id="subtitle"]] +[[!template text="""interactive commands. For example, M-x cd, to change your""" start="00:21:20.240" video="mainVideo-shell" id="subtitle"]] +[[!template text="""buffer's current working directory, and other M-x commands""" start="00:21:26.760" video="mainVideo-shell" id="subtitle"]] +[[!template text="""such as make-directory""" start="00:21:32.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""chmod,""" start="00:21:40.780" video="mainVideo-shell" id="subtitle"]] +[[!template text="""and delete-file. Of course, you can also drop into Eshell,""" start="00:21:43.260" video="mainVideo-shell" id="subtitle"]] +[[!template text="""or use M-x eshell-command to run the usual external commands""" start="00:21:53.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""for file system manipulation. Also, a file manager is built""" start="00:22:00.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""into Emacs, which can be run by calling M-x dired.""" start="00:22:07.040" video="mainVideo-shell" id="subtitle"]] +[[!template text="""The directory editor is powerful, but it is a bit strange to""" start="00:22:19.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""folks expecting something like Midnight Commander or the""" start="00:22:24.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""GNOME file manager. It gives us a number of helpful features""" start="00:22:28.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""like the ability to mark files, and to run elisp functions on""" start="00:22:35.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""them, and some other interesting ways to manipulate and""" start="00:22:44.700" video="mainVideo-shell" id="subtitle"]] +[[!template text="""rename the files. However, third-party Emacs extensions""" start="00:22:48.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""such as Midnight Commander Mode and Sunrise Commander are""" start="00:22:54.080" video="mainVideo-shell" id="subtitle"]] +[[!template text="""available to provide a Midnight Commander experience, for those who""" start="00:22:58.480" video="mainVideo-shell" id="subtitle"]] +[[!template text="""prefer that sort of file management.""" start="00:23:03.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Emacs also has the nifty TRAMP functionality built in,""" start="00:23:10.320" video="mainVideo-shell" id="subtitle"]] +[[!template text="""which allows you, most of the time, to easily edit files on""" start="00:23:14.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""other computers, as well as manipulate the file system.""" start="00:23:19.160" video="mainVideo-shell" id="subtitle"]] +[[!template text="""This transparently works through SSH and some other""" start="00:23:23.180" video="mainVideo-shell" id="subtitle"]] +[[!template text="""protocols that you can specify.""" start="00:23:27.840" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""Networking""" start="00:23:43.560" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""Regarding networking features, I don't have a lot of""" start="00:23:43.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""interesting things to say about this at the present, so I'll""" start="00:23:48.160" video="mainVideo-shell" id="subtitle"]] +[[!template text="""skip through this quickly. But if you do a little research,""" start="00:23:51.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""you will see that Emacs has a lot of functionality relating""" start="00:23:54.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""to making network connections, interacting with the web,""" start="00:23:58.800" video="mainVideo-shell" id="subtitle"]] +[[!template text="""and such like, both built-in and in available packages, as""" start="00:24:02.780" video="mainVideo-shell" id="subtitle"]] +[[!template text="""well as modes for doing things like Web browsing and Gemini""" start="00:24:07.860" video="mainVideo-shell" id="subtitle"]] +[[!template text="""browsing. And of course, you can run the usual standard""" start="00:24:14.400" video="mainVideo-shell" id="subtitle"]] +[[!template text="""networking commands for your system through Eshell.""" start="00:24:20.600" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""A brief tour of Eshell""" start="00:24:30.120" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""So having put forward the main arguments for this talk, I""" start="00:24:30.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""would like to take some time now to give a brief tour of a few of""" start="00:24:33.760" video="mainVideo-shell" id="subtitle"]] +[[!template text="""the features of Eshell, the Emacs shell. It bears""" start="00:24:38.200" video="mainVideo-shell" id="subtitle"]] +[[!template text="""emphasizing that Eshell is not a drop-in replacement for""" start="00:24:43.800" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Bash, or even a Bash clone, though I believe the developers""" start="00:24:47.000" video="mainVideo-shell" id="subtitle"]] +[[!template text="""are trying to make much of the syntax very similar. Also,""" start="00:24:51.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Eshell is not a terminal emulator, and it will not display""" start="00:24:56.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""correctly applications which use advanced ANSI control""" start="00:25:00.480" video="mainVideo-shell" id="subtitle"]] +[[!template text="""codes. However, Eshell can be configured to be aware of such""" start="00:25:04.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""applications, and to run them automatically within the""" start="00:25:10.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Emacs terminal emulator when launched. See section 5.1 of""" start="00:25:13.301" video="mainVideo-shell" id="subtitle"]] +[[!template text="""the Eshell manual titled Visual Commands.""" start="00:25:19.941" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Though Eshell is not Bash, it has multiple features,""" start="00:25:32.540" video="mainVideo-shell" id="subtitle"]] +[[!template text="""pertaining mainly to its by-design Emacs integration,""" start="00:25:36.760" video="mainVideo-shell" id="subtitle"]] +[[!template text="""which may make it more appealing to use than Bash or another""" start="00:25:40.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""shell.""" start="00:25:44.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""For one, Eshell allows entering commands on the command""" start="00:25:48.160" video="mainVideo-shell" id="subtitle"]] +[[!template text="""line that are space and new line separated, without""" start="00:25:52.040" video="mainVideo-shell" id="subtitle"]] +[[!template text="""parentheses. Of course, all the other shells do this. But""" start="00:25:55.961" video="mainVideo-shell" id="subtitle"]] +[[!template text="""within Eshell, it is possible to enter internal Emacs""" start="00:26:01.281" video="mainVideo-shell" id="subtitle"]] +[[!template text="""functions, as well as external commands.""" start="00:26:06.281" video="mainVideo-shell" id="subtitle"]] +[[!template text="""This allows us to do things like this.""" start="00:26:13.240" video="mainVideo-shell" id="subtitle"]] +[[!template text="""As far as I understand, it is possible to enter any Emacs""" start="00:26:45.740" video="mainVideo-shell" id="subtitle"]] +[[!template text="""function on the Eshell command line. However, some special""" start="00:26:49.760" video="mainVideo-shell" id="subtitle"]] +[[!template text="""syntax may be required if you are trying to pass in something""" start="00:26:53.960" video="mainVideo-shell" id="subtitle"]] +[[!template text="""that is not a string or a number.""" start="00:26:58.400" video="mainVideo-shell" id="subtitle"]] +[[!template text="""As you might have noticed in the last example, Eshell makes""" start="00:27:04.380" video="mainVideo-shell" id="subtitle"]] +[[!template text="""it possible to use an Emacs buffer as a sink for output. It""" start="00:27:07.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""also allows using a buffer as a source of input, though this""" start="00:27:12.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""is slightly more complicated, since the buffer must be""" start="00:27:18.040" video="mainVideo-shell" id="subtitle"]] +[[!template text="""converted to a string first. I have distilled this down into""" start="00:27:21.840" video="mainVideo-shell" id="subtitle"]] +[[!template text="""my own function, named with the "at" symbol.""" start="00:27:27.200" video="mainVideo-shell" id="subtitle"]] +[[!template text="""And I will provide the brief snippet of code for this later.""" start="00:27:36.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""So to give an example, here's our messages buffer.""" start="00:27:54.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""And from Eshell, we can do something like this.""" start="00:28:02.500" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Let's say here we wanted to grab our messages buffer to see""" start="00:28:29.780" video="mainVideo-shell" id="subtitle"]] +[[!template text="""everything that we had been loading during the startup""" start="00:28:34.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""process.""" start="00:28:38.080" video="mainVideo-shell" id="subtitle"]] +[[!template text="""So you can see how that could be very handy in a number of""" start="00:28:48.060" video="mainVideo-shell" id="subtitle"]] +[[!template text="""scenarios.""" start="00:28:51.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""I wanted to briefly mention that we have a helpful function""" start="00:28:55.060" video="mainVideo-shell" id="subtitle"]] +[[!template text="""here called eshell-insert-buffer-name,""" start="00:29:00.240" video="mainVideo-shell" id="subtitle"]] +[[!template text="""which allows us to insert a buffer name into the current""" start="00:29:11.120" video="mainVideo-shell" id="subtitle"]] +[[!template text="""buffer at point using completion,""" start="00:29:15.360" video="mainVideo-shell" id="subtitle"]] +[[!template text="""which can save you a lot of typing.""" start="00:29:24.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Another nice feature of Eshell""" start="00:29:32.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""is that it allows integrating ELisp into the command line""" start="00:29:37.220" video="mainVideo-shell" id="subtitle"]] +[[!template text="""call. Let's give another example. Say we wanted to echo the""" start="00:29:41.200" video="mainVideo-shell" id="subtitle"]] +[[!template text="""date to an event file or an event log.""" start="00:29:48.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""I should probably take a moment to explain this asterisk""" start="00:29:56.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""that I'm occasionally using. So since Emacs, or excuse me,""" start="00:30:01.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""since Eshell can use internal or external Emacs, excuse me,""" start="00:30:07.000" video="mainVideo-shell" id="subtitle"]] +[[!template text="""internal Emacs commands or external commands, it may""" start="00:30:11.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""sometimes be necessary to clarify which one you want to use,""" start="00:30:17.000" video="mainVideo-shell" id="subtitle"]] +[[!template text="""since the names may overlap. Since my Eshell is configured""" start="00:30:22.380" video="mainVideo-shell" id="subtitle"]] +[[!template text="""by default to prefer the internal Emacs functions, then""" start="00:30:27.080" video="mainVideo-shell" id="subtitle"]] +[[!template text="""sometimes I have to use the asterisk to specify that I want""" start="00:30:32.320" video="mainVideo-shell" id="subtitle"]] +[[!template text="""the external version.""" start="00:30:37.800" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Here I can insert a bit of Elisp,""" start="00:30:42.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""and then redirect the output to the event log.""" start="00:31:03.180" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Last, I want to mention that there are some optional Eshell""" start="00:31:18.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""modules in Emacs, not turned on by default, which provide""" start="00:31:22.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""additional nifty features.""" start="00:31:27.160" video="mainVideo-shell" id="subtitle"]] +[[!template text="""On my system, I have most of the optional modules turned on.""" start="00:31:40.540" video="mainVideo-shell" id="subtitle"]] +[[!template text="""An interesting module is eshell-smart, which does various""" start="00:31:58.320" video="mainVideo-shell" id="subtitle"]] +[[!template text="""things with cursor positioning and scrolling, so as to make""" start="00:32:03.200" video="mainVideo-shell" id="subtitle"]] +[[!template text="""editing commands and reviewing output easier.""" start="00:32:07.320" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Let's say I was to change directory to my boot directory""" start="00:32:18.340" video="mainVideo-shell" id="subtitle"]] +[[!template text="""and use a command which involves lots of output.""" start="00:32:30.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""You'll notice right away that the cursor positioning is set""" start="00:32:39.900" video="mainVideo-shell" id="subtitle"]] +[[!template text="""such that I'm immediately able to view the top of the output.""" start="00:32:44.360" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Also, I'm able to use the space bar to page through the""" start="00:32:48.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""output.""" start="00:32:52.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""So this is an opinionated feature, which assumes that""" start="00:32:56.080" video="mainVideo-shell" id="subtitle"]] +[[!template text="""you're likely going to want to review the output""" start="00:33:01.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""immediately, or that you often will. Of course, you can""" start="00:33:05.400" video="mainVideo-shell" id="subtitle"]] +[[!template text="""always jump to the end.""" start="00:33:10.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Also, after a command is entered, the cursor is immediately""" start="00:33:19.980" video="mainVideo-shell" id="subtitle"]] +[[!template text="""repositioned to make it easy to edit the command.""" start="00:33:23.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""And also, if I don't want to edit the command, and I do not want""" start="00:33:53.020" video="mainVideo-shell" id="subtitle"]] +[[!template text="""to review the output, I can simply start typing another""" start="00:33:56.520" video="mainVideo-shell" id="subtitle"]] +[[!template text="""command.""" start="00:33:59.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""So that covers the brief tour of Eshell features.""" start="00:34:11.260" video="mainVideo-shell" id="subtitle"]] +[[!template text="""And that basically ends my talk.""" start="00:34:17.760" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""Login shell""" start="00:34:21.128" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""However, a handful of""" start="00:34:21.128" video="mainVideo-shell" id="subtitle"]] +[[!template text="""viewers might be wondering, is it possible to set Emacs to be""" start="00:34:22.381" video="mainVideo-shell" id="subtitle"]] +[[!template text="""my login shell to completely replace bash in your login""" start="00:34:28.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""experience? The answer is yes, but in practice there are""" start="00:34:37.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""various difficulties involved which might make it not""" start="00:34:43.720" video="mainVideo-shell" id="subtitle"]] +[[!template text="""worth the trouble.""" start="00:34:47.400" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Before doing this, you'll have to answer a few initial""" start="00:35:00.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""questions. Do you want to make a new Emacs instance every""" start="00:35:03.480" video="mainVideo-shell" id="subtitle"]] +[[!template text="""time you log in, or do you want it to connect to an Emacs""" start="00:35:09.520" video="mainVideo-shell" id="subtitle"]] +[[!template text="""server? Which is popular among Emacs users, to reuse the""" start="00:35:13.760" video="mainVideo-shell" id="subtitle"]] +[[!template text="""session, or to connect to the existing session. Also, do you""" start="00:35:20.600" video="mainVideo-shell" id="subtitle"]] +[[!template text="""want a different result, whether in graphical or a terminal""" start="00:35:26.600" video="mainVideo-shell" id="subtitle"]] +[[!template text="""environment? And are you okay with your initialization""" start="00:35:30.640" video="mainVideo-shell" id="subtitle"]] +[[!template text="""file being run every time you log in, including every new tab""" start="00:35:34.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""you open in a terminal emulator? If we assume that you are""" start="00:35:39.560" video="mainVideo-shell" id="subtitle"]] +[[!template text="""using a system with /etc/passwd user management, you get""" start="00:35:44.521" video="mainVideo-shell" id="subtitle"]] +[[!template text="""one field to specify the name of the shell program that you""" start="00:35:50.340" video="mainVideo-shell" id="subtitle"]] +[[!template text="""want to use, and no arguments are allowed. So maybe you can""" start="00:35:54.000" video="mainVideo-shell" id="subtitle"]] +[[!template text="""see how this might be challenging, depending on your""" start="00:35:58.480" video="mainVideo-shell" id="subtitle"]] +[[!template text="""answers to the previous questions. You can work around""" start="00:36:02.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""these issues in various ways, like modifying the""" start="00:36:06.880" video="mainVideo-shell" id="subtitle"]] +[[!template text="""authentication system, or by specifying a script for your""" start="00:36:10.480" video="mainVideo-shell" id="subtitle"]] +[[!template text="""login shell. But if your normal workflow is to simply log in""" start="00:36:15.440" video="mainVideo-shell" id="subtitle"]] +[[!template text="""and start Emacs and run that Emacs session until your next""" start="00:36:21.800" video="mainVideo-shell" id="subtitle"]] +[[!template text="""reboot, then it probably isn't worth the bother.""" start="00:36:25.680" video="mainVideo-shell" id="subtitle"]] + +[[!template new="1" text="""Resources""" start="00:36:36.980" video="mainVideo-shell" id="subtitle"]] + +[[!template text="""So thank you for listening to my talk, Emacs as a Shell, by""" start="00:36:36.980" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Christopher Howard for Emacs Conference 2024.""" start="00:36:42.000" video="mainVideo-shell" id="subtitle"]] +[[!template text="""At the bottom of this page, you can see a link to the""" start="00:36:46.860" video="mainVideo-shell" id="subtitle"]] +[[!template text="""repository containing the brief amount of code that was""" start="00:36:51.520" video="mainVideo-shell" id="subtitle"]] +[[!template text="""featured here in this video, as well as a link to my personal""" start="00:36:56.920" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Gemini gemlog, as well as to a Web portal version of that.""" start="00:37:03.680" video="mainVideo-shell" id="subtitle"]] +[[!template text="""Thank you.""" start="00:37:10.280" video="mainVideo-shell" id="subtitle"]] + + + +Captioner: mark + Questions or comments? Please e-mail [christopher@librehacker.com](mailto:christopher@librehacker.com?subject=Comment%20for%20EmacsConf%202023%20shell%3A%20Emacs%20as%20a%20shell) diff --git a/2024/info/shell-before.md b/2024/info/shell-before.md index aada5dc3..ef4d4f02 100644 --- a/2024/info/shell-before.md +++ b/2024/info/shell-before.md @@ -1,19 +1,35 @@ <!-- Automatically generated by emacsconf-publish-before-page --> The following image shows where the talk is in the schedule for Sat 2024-12-07. Solid lines show talks with Q&A via BigBlueButton. Dashed lines show talks with Q&A via IRC or Etherpad.<div class="schedule-in-context schedule-svg-container" data-slug="shell"> -<svg width="700" height="150" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title> Schedule for Saturday</title> <rect width="700" height="150" x="0" y="0" fill="white"></rect> <text font-size="10" fill="black" y="12" x="3"> Saturday</text> <a href="/2024/talks/sat-open" title="Saturday opening remarks" data-slug="sat-open"> <title> 9:00- 9:10 Saturday opening remarks</title> <rect x="0" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(11,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> sat-open</text></g></a> <a href="/2024/talks/papers" title="Writing academic papers in Org-Roam" data-slug="papers"> <title> 9:10- 9:20 Writing academic papers in Org-Roam</title> <rect x="13" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(24,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> papers</text></g></a> <a href="/2024/talks/project" title="Managing writing project metadata with org-mode" data-slug="project"> <title> 9:40-10:00 Managing writing project metadata with org-mode</title> <rect x="54" y="15" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(79,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> project</text></g></a> <a href="/2024/talks/org-update" title="The Future of Org" data-slug="org-update"> <title> 10:20-11:00 The Future of Org</title> <rect x="109" y="15" opacity="0.5" width="54" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(161,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> org-update</text></g></a> <a href="/2024/talks/color" title="Colour your Emacs with ease" data-slug="color"> <title> 11:20-11:30 Colour your Emacs with ease</title> <rect x="192" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(203,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> color</text></g></a> <a href="/2024/talks/theme" title="My journey of finding and creating the “perfect” Emacs theme" data-slug="theme"> <title> 1:00- 1:10 My journey of finding and creating the “perfect” Emacs theme</title> <rect x="329" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(340,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> theme</text></g></a> <a href="/2024/talks/water" title="Watering my (digital) plant with Emacs timers" data-slug="water"> <title> 1:30- 1:45 Watering my (digital) plant with Emacs timers</title> <rect x="370" y="15" opacity="0.5" width="20" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(388,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> water</text></g></a> <a href="/2024/talks/shell" title="Emacs as a shell" data-slug="shell"> <title> 1:55- 2:35 Emacs as a shell</title> <rect stroke-width="3" x="404" y="15" opacity="0.8" width="54" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(456,73)"> <text font-weight="bold" fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> shell</text></g></a> <a href="/2024/talks/casual" title="Re-imagining the Emacs user experience with Casual Suite" data-slug="casual"> <title> 2:45- 3:05 Re-imagining the Emacs user experience with Casual Suite</title> <rect x="473" y="15" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(498,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> casual</text></g></a> <a href="/2024/talks/hyperdrive" title="New in hyperdrive.el: quick install, peer graph, transclusion!" data-slug="hyperdrive"> <title> 3:25- 3:45 New in hyperdrive.el: quick install, peer graph, transclusion!</title> <rect x="528" y="15" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(553,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> hyperdrive</text></g></a> <a href="/2024/talks/writing" title="Emacs Writing Studio" data-slug="writing"> <title> 4:05- 4:15 Emacs Writing Studio</title> <rect x="583" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(594,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> writing</text></g></a> <a href="/2024/talks/emacs30" title="Emacs 30 Highlights" data-slug="emacs30"> <title> 4:25- 4:50 Emacs 30 Highlights</title> <rect x="610" y="15" opacity="0.5" width="34" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(642,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> emacs30</text></g></a> <a href="/2024/talks/sat-close" title="Saturday closing remarks" data-slug="sat-close"> <title> 5:00- 5:10 Saturday closing remarks</title> <rect x="658" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(669,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> sat-close</text></g></a> <a href="/2024/talks/gypsum" title="Gypsum: my clone of Emacs and ELisp written in Scheme" data-slug="gypsum"> <title> 10:00-10:20 Gypsum: my clone of Emacs and ELisp written in Scheme</title> <rect x="82" y="75" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(107,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> gypsum</text></g></a> <a href="/2024/talks/rust" title="An experimental Emacs core in Rust" data-slug="rust"> <title> 10:40-11:00 An experimental Emacs core in Rust</title> <rect x="137" y="75" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(162,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> rust</text></g></a> <a href="/2024/talks/p-search" title="p-search: a local search engine in Emacs" data-slug="p-search"> <title> 11:20-11:45 p-search: a local search engine in Emacs</title> <rect x="192" y="75" opacity="0.5" width="34" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(224,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> p-search</text></g></a> <a href="/2024/talks/julia" title="Exploring shared philosophies in Julia and Emacs" data-slug="julia"> <title> 1:00- 1:10 Exploring shared philosophies in Julia and Emacs</title> <rect x="329" y="75" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(340,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> julia</text></g></a> <a href="/2024/talks/guile" title="Beguiling Emacs: Guile-Emacs relaunched!" data-slug="guile"> <title> 1:25- 1:45 Beguiling Emacs: Guile-Emacs relaunched!</title> <rect x="363" y="75" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(388,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> guile</text></g></a> <a href="/2024/talks/secrets" title="Committing secrets with git using sops-mode" data-slug="secrets"> <title> 1:55- 2:05 Committing secrets with git using sops-mode</title> <rect x="404" y="75" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(415,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> secrets</text></g></a> <a href="/2024/talks/mcclim" title="Elisp and McCLIM" data-slug="mcclim"> <title> 2:25- 3:25 Elisp and McCLIM</title> <rect x="446" y="75" opacity="0.5" width="82" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(526,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> mcclim</text></g></a> <a href="/2024/talks/maxima" title="Emacs, eev, and Maxima - now!" data-slug="maxima"> <title> 3:45- 4:05 Emacs, eev, and Maxima - now!</title> <rect x="555" y="75" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="5,5,5" fill="skyblue"></rect> <g transform="translate(580,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> maxima</text></g></a> <g transform="translate(0,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 9 AM</text></g> <g transform="translate(82,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 10 AM</text></g> <g transform="translate(164,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 11 AM</text></g> <g transform="translate(247,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 12 PM</text></g> <g transform="translate(329,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 1 PM</text></g> <g transform="translate(411,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 2 PM</text></g> <g transform="translate(494,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 3 PM</text></g> <g transform="translate(576,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 4 PM</text></g> <g transform="translate(658,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 5 PM</text></g></svg> +<svg width="700" height="150" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title> Schedule for Saturday</title> <rect width="700" height="150" x="0" y="0" fill="white"></rect> <text font-size="10" fill="black" y="12" x="3"> Saturday</text> <a href="/2024/talks/sat-open" title="Saturday opening remarks" data-slug="sat-open"> <title> 9:00- 9:10 Saturday opening remarks</title> <rect x="0" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(11,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> sat-open</text></g></a> <a href="/2024/talks/papers" title="Writing academic papers in Org-Roam" data-slug="papers"> <title> 9:10- 9:20 Writing academic papers in Org-Roam</title> <rect x="13" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(24,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> papers</text></g></a> <a href="/2024/talks/project" title="Managing writing project metadata with org-mode" data-slug="project"> <title> 9:40-10:00 Managing writing project metadata with org-mode</title> <rect x="54" y="15" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(79,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> project</text></g></a> <a href="/2024/talks/org-update" title="The Future of Org" data-slug="org-update"> <title> 10:20-11:00 The Future of Org</title> <rect x="109" y="15" opacity="0.5" width="54" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(161,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> org-update</text></g></a> <a href="/2024/talks/color" title="Colour your Emacs with ease" data-slug="color"> <title> 11:20-11:30 Colour your Emacs with ease</title> <rect x="192" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(203,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> color</text></g></a> <a href="/2024/talks/theme" title="My journey of finding and creating the “perfect” Emacs theme" data-slug="theme"> <title> 1:00- 1:10 My journey of finding and creating the “perfect” Emacs theme</title> <rect x="329" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(340,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> theme</text></g></a> <a href="/2024/talks/water" title="Watering my (digital) plant with Emacs timers" data-slug="water"> <title> 1:30- 1:45 Watering my (digital) plant with Emacs timers</title> <rect x="370" y="15" opacity="0.5" width="20" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(388,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> water</text></g></a> <a href="/2024/talks/shell" title="Emacs as a shell" data-slug="shell"> <title> 1:55- 2:35 Emacs as a shell</title> <rect stroke-width="3" x="404" y="15" opacity="0.8" width="54" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(456,73)"> <text font-weight="bold" fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> shell</text></g></a> <a href="/2024/talks/casual" title="Re-imagining the Emacs user experience with Casual Suite" data-slug="casual"> <title> 2:45- 3:05 Re-imagining the Emacs user experience with Casual Suite</title> <rect x="473" y="15" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(498,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> casual</text></g></a> <a href="/2024/talks/hyperdrive" title="New in hyperdrive.el: quick install, peer graph, transclusion!" data-slug="hyperdrive"> <title> 3:25- 3:45 New in hyperdrive.el: quick install, peer graph, transclusion!</title> <rect x="528" y="15" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(553,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> hyperdrive</text></g></a> <a href="/2024/talks/writing" title="Emacs Writing Studio" data-slug="writing"> <title> 4:05- 4:15 Emacs Writing Studio</title> <rect x="583" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(594,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> writing</text></g></a> <a href="/2024/talks/emacs30" title="Emacs 30 Highlights" data-slug="emacs30"> <title> 4:25- 4:50 Emacs 30 Highlights</title> <rect x="610" y="15" opacity="0.5" width="34" height="59" stroke="black" stroke-dasharray="" fill="peachpuff"></rect> <g transform="translate(642,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> emacs30</text></g></a> <a href="/2024/talks/sat-close" title="Saturday closing remarks" data-slug="sat-close"> <title> 5:00- 5:10 Saturday closing remarks</title> <rect x="658" y="15" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="5,5,5" fill="peachpuff"></rect> <g transform="translate(669,73)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> sat-close</text></g></a> <a href="/2024/talks/gypsum" title="Gypsum: my clone of Emacs and ELisp written in Scheme" data-slug="gypsum"> <title> 10:00-10:20 Gypsum: my clone of Emacs and ELisp written in Scheme</title> <rect x="82" y="75" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(107,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> gypsum</text></g></a> <a href="/2024/talks/rust" title="An experimental Emacs core in Rust" data-slug="rust"> <title> 10:40-11:00 An experimental Emacs core in Rust</title> <rect x="137" y="75" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="5,5,5" fill="skyblue"></rect> <g transform="translate(162,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> rust</text></g></a> <a href="/2024/talks/p-search" title="p-search: a local search engine in Emacs" data-slug="p-search"> <title> 11:20-11:45 p-search: a local search engine in Emacs</title> <rect x="192" y="75" opacity="0.5" width="34" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(224,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> p-search</text></g></a> <a href="/2024/talks/julia" title="Exploring shared philosophies in Julia and Emacs" data-slug="julia"> <title> 1:00- 1:10 Exploring shared philosophies in Julia and Emacs</title> <rect x="329" y="75" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(340,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> julia</text></g></a> <a href="/2024/talks/guile" title="Beguiling Emacs: Guile-Emacs relaunched!" data-slug="guile"> <title> 1:25- 1:45 Beguiling Emacs: Guile-Emacs relaunched!</title> <rect x="363" y="75" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(388,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> guile</text></g></a> <a href="/2024/talks/secrets" title="Committing secrets with git using sops-mode" data-slug="secrets"> <title> 1:55- 2:05 Committing secrets with git using sops-mode</title> <rect x="404" y="75" opacity="0.5" width="13" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(415,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> secrets</text></g></a> <a href="/2024/talks/mcclim" title="Elisp and McCLIM" data-slug="mcclim"> <title> 2:25- 3:25 Elisp and McCLIM</title> <rect x="446" y="75" opacity="0.5" width="82" height="59" stroke="black" stroke-dasharray="" fill="skyblue"></rect> <g transform="translate(526,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> mcclim</text></g></a> <a href="/2024/talks/maxima" title="Emacs, eev, and Maxima - now!" data-slug="maxima"> <title> 3:45- 4:05 Emacs, eev, and Maxima - now!</title> <rect x="555" y="75" opacity="0.5" width="27" height="59" stroke="black" stroke-dasharray="5,5,5" fill="skyblue"></rect> <g transform="translate(580,133)"> <text fill="black" x="0" y="0" font-size="10" transform="rotate(-90)"> maxima</text></g></a> <g transform="translate(0,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 9 AM</text></g> <g transform="translate(82,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 10 AM</text></g> <g transform="translate(164,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 11 AM</text></g> <g transform="translate(247,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 12 PM</text></g> <g transform="translate(329,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 1 PM</text></g> <g transform="translate(411,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 2 PM</text></g> <g transform="translate(494,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 3 PM</text></g> <g transform="translate(576,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 4 PM</text></g> <g transform="translate(658,15)"> <line stroke="darkgray" x1="0" y1="0" x2="0" y2="120"></line> <text fill="black" x="0" y="133" font-size="10" text-anchor="left"> 5 PM</text></g></svg> </div> [[!toc ]] Format: 38-min talk ; Q&A: IRC <https://chat.emacsconf.org/?join=emacsconf,emacsconf-gen> Etherpad: <https://pad.emacsconf.org/2024-shell> Etherpad: <https://pad.emacsconf.org/2024-shell> Discuss on IRC: [#emacsconf-gen](https://chat.emacsconf.org/?join=emacsconf,emacsconf-gen) -Status: Ready to stream +Status: Q&A open for participation <div>Times in different time zones:</div><div class="times" start="2024-12-07T18:55:00Z" end="2024-12-07T19:35:00Z"><div class="conf-time">Saturday, Dec 7 2024, ~1:55 PM - 2:35 PM EST (US/Eastern)</div><div class="others"><div>which is the same as:</div>Saturday, Dec 7 2024, ~12:55 PM - 1:35 PM CST (US/Central)<br />Saturday, Dec 7 2024, ~11:55 AM - 12:35 PM MST (US/Mountain)<br />Saturday, Dec 7 2024, ~10:55 AM - 11:35 AM PST (US/Pacific)<br />Saturday, Dec 7 2024, ~6:55 PM - 7:35 PM UTC <br />Saturday, Dec 7 2024, ~7:55 PM - 8:35 PM CET (Europe/Paris)<br />Saturday, Dec 7 2024, ~8:55 PM - 9:35 PM EET (Europe/Athens)<br />Sunday, Dec 8 2024, ~12:25 AM - 1:05 AM IST (Asia/Kolkata)<br />Sunday, Dec 8 2024, ~2:55 AM - 3:35 AM +08 (Asia/Singapore)<br />Sunday, Dec 8 2024, ~3:55 AM - 4:35 AM JST (Asia/Tokyo)</div></div><div><strong><a href="/2024/watch/gen/">Find out how to watch and participate</a></strong></div> +<div class="vid"><video controls preload="none" id="shell-mainVideo"><source src="https://media.emacsconf.org/2024/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main.webm" />captions="""<track label="English" kind="captions" srclang="en" src="/2024/captions/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main.vtt" default />"""<track kind="chapters" label="Chapters" src="/2024/captions/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main--chapters.vtt" /><p><em>Your browser does not support the video tag. Please download the video instead.</em></p></video>[[!template id="chapters" vidid="shell-mainVideo" data=""" +00:02.940 Introduction +00:37.881 What do I mean by shell? +01:38.560 What I do not mean +04:50.160 What is a shell? +09:26.912 Launching external processes +11:57.300 Environment variables +14:54.400 Processes +17:00.180 Redirecting and pipelining input and output +20:09.440 Scripts +21:11.780 File system management +23:43.560 Networking +24:30.120 A brief tour of Eshell +34:21.128 Login shell +36:36.980 Resources +"""]]<div></div>Duration: 37:13 minutes<div class="files resources"><ul><li><a href="https://pad.emacsconf.org/2024-shell">Open Etherpad</a></li><li><a href="https://chat.emacsconf.org/?join=emacsconf,emacsconf-gen">Open public Q&A</a></li><li><a href="https://media.emacsconf.org/2024/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--intro.webm">Download --intro.webm</a></li><li><a href="https://media.emacsconf.org/2024/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main--chapters.vtt">Download --main--chapters.vtt</a></li><li><a href="https://media.emacsconf.org/2024/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main.vtt">Download --main.vtt</a></li><li><a href="https://media.emacsconf.org/2024/emacsconf-2024-shell--emacs-as-a-shell--christopher-howard--main.webm">Download --main.webm (87MB)</a></li></ul></div></div> # Description <!-- End of emacsconf-publish-before-page -->
\ No newline at end of file |