diff options
Diffstat (limited to '2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main.vtt')
| -rw-r--r-- | 2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main.vtt | 645 |
1 files changed, 645 insertions, 0 deletions
diff --git a/2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main.vtt b/2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main.vtt new file mode 100644 index 00000000..00df4ccd --- /dev/null +++ b/2026/captions/emacsconf-2026-remoto--el-remoto-browse-any-github-repos-without-cloning-them--ag--main.vtt @@ -0,0 +1,645 @@ +WEBVTT captioned by sachac + +NOTE Introduction + +00:00:01.067 --> 00:00:03.628 +Okay, hello people of Emacs, my favorite kind of people. + +00:00:04.268 --> 00:00:06.869 +I would like to show you this thing I've been + +00:00:06.909 --> 00:00:08.829 +messing around with lately. + +00:00:09.080 --> 00:00:11.830 +So I hope this is big enough. + +00:00:13.270 --> 00:00:16.911 +Most of you probably know that you can do this in Emacs. + +00:00:17.071 --> 00:00:19.512 +When you do `C-x C-f`, which is + +00:00:19.712 --> 00:00:21.953 +normal `find-file` dialog, + +00:00:22.233 --> 00:00:25.531 +you can browse folders and files + +00:00:25.532 --> 00:00:30.294 +and that's a built-in feature of Emacs. + +00:00:30.414 --> 00:00:31.214 +Everybody knows about it. + +NOTE Remote files + +00:00:31.914 --> 00:00:37.317 +Now, you can also type /ssh: and + +00:00:37.337 --> 00:00:39.898 +then if you type the name of the machine and you + +00:00:39.938 --> 00:00:43.079 +have access to it, you can actually browse things + +00:00:43.859 --> 00:00:45.199 +on that remote machine + +00:00:45.200 --> 00:00:47.561 +as if you're browsing things locally. + +00:00:48.001 --> 00:00:51.783 +Similarly, you can do sudo. + +00:00:52.583 --> 00:00:55.264 +You can do Docker. + +00:00:55.344 --> 00:00:57.685 +You can do FTP. + +00:00:58.345 --> 00:00:59.705 +You can do SFTP. + +00:00:59.805 --> 00:01:03.346 +You can do SMB to access some other sources. + +00:01:03.446 --> 00:01:07.208 +You can do Podman, Kubernetes, some other things. + +00:01:07.268 --> 00:01:08.128 +You can do SCP. + +00:01:09.108 --> 00:01:12.269 +This feature is built-in into Emacs. + +00:01:14.070 --> 00:01:15.030 +It's been there forever. + +00:01:15.630 --> 00:01:16.890 +And it's called TRAMP. + +00:01:17.111 --> 00:01:20.712 +TRAMP stands for Transparent Remote File Access + +00:01:20.752 --> 00:01:21.512 +Multiple Protocol. + +00:01:22.421 --> 00:01:23.141 +And it's fantastic. + +00:01:23.201 --> 00:01:25.042 +It's one of the killer features of Emacs. + +NOTE Accessing GitHub + +00:01:26.282 --> 00:01:32.084 +I've been sitting thinking, well, can I use + +00:01:32.324 --> 00:01:35.405 +Tramp to access GitHub stuff? + +00:01:35.865 --> 00:01:39.587 +So if somebody gives me a URL, I have a URL in my + +00:01:39.627 --> 00:01:40.267 +browser open. + +00:01:40.367 --> 00:01:42.327 +Let me just bring it here. + +00:01:42.447 --> 00:01:44.028 +I have a handy command for that. + +00:01:44.468 --> 00:01:48.270 +So it inserted it in Org mode format because I'm + +00:01:48.330 --> 00:01:49.491 +in an Org mode buffer. + +00:01:50.011 --> 00:01:53.253 +Let's convert this into a plain URL. + +00:01:53.373 --> 00:01:58.016 +So if somebody gives me the URL like this, and I + +00:01:58.076 --> 00:02:02.699 +want just to see what's on in this repo, and I + +00:02:02.759 --> 00:02:07.161 +can do `C-x C-f`, paste that URL, + +00:02:07.622 --> 00:02:09.523 +press RET, and browse it. + +00:02:10.933 --> 00:02:13.474 +Turns out that is possible and that is not that + +00:02:13.514 --> 00:02:14.695 +difficult to achieve. + +00:02:15.495 --> 00:02:19.016 +And I started writing a package and I called it + +00:02:19.257 --> 00:02:19.897 +el-remoto. + +00:02:20.417 --> 00:02:24.019 +el-remoto is a pun on the EL extension. + +00:02:24.299 --> 00:02:25.799 +So it's basically self-recursive. + +00:02:25.939 --> 00:02:31.262 +It's el-remoto, remoto.el. And that's what it does. + +00:02:31.582 --> 00:02:36.384 +But we typically don't operate with URLs, + +00:02:36.404 --> 00:02:37.824 +specifically like full.[??] + +00:02:40.890 --> 00:02:42.531 +Let's say you want to look up something in, let's + +00:02:43.052 --> 00:02:44.513 +say Linux kernel. + +00:02:57.423 --> 00:02:59.123 +And Linux kernel is, + +00:02:59.124 --> 00:03:01.004 +it's kind of big, I think, right? + +00:03:01.064 --> 00:03:02.505 +Let's check how big it is. + +00:03:02.705 --> 00:03:06.646 +So I'm going to send https, I'm going to send a + +00:03:06.686 --> 00:03:10.627 +request to api.github.com. + +00:03:11.607 --> 00:03:16.688 +I think it's repos and then, well, I think, + +00:03:16.689 --> 00:03:19.530 +is it Torvalds? Linux, right? + +00:03:19.570 --> 00:03:23.451 +So if I sent this, if I sent this request... + +00:03:27.432 --> 00:03:28.974 +Okay, it gave me some data. + +00:03:30.275 --> 00:03:32.437 +There should be some numbers, I think. + +00:03:33.138 --> 00:03:33.799 +Was it size? + +00:03:34.059 --> 00:03:36.221 +Okay, let's just focus on size. + +00:03:36.241 --> 00:03:41.226 +I'm going to pipe it into jq with size. + +00:03:41.827 --> 00:03:44.850 +So this, I believe this is something like six + +00:03:44.890 --> 00:03:46.291 +gigabytes, not 60. + +00:03:46.731 --> 00:03:49.794 +And just to make sure, let's pipe it to, how do I? + +00:03:50.395 --> 00:03:53.337 +I think there is numfmt, but if I just do it like + +00:03:53.357 --> 00:03:54.918 +this, this is not, nothing going to happen. + +00:03:54.938 --> 00:03:58.400 +I think I have to convert it to, well, I don't + +00:03:58.460 --> 00:03:59.800 +remember exact parameters. + +00:03:59.840 --> 00:04:02.602 +Let's look them up. + +00:04:03.182 --> 00:04:08.725 +Why things are..., Oh yeah, numfmt, + +00:04:08.786 --> 00:04:19.672 +to maybe this one, let's try that. + +00:04:20.753 --> 00:04:21.553 +Let's write that. + +00:04:22.874 --> 00:04:23.815 +So I do this. + +00:04:24.915 --> 00:04:25.515 +And see? + +00:04:26.176 --> 00:04:27.036 +No, this is wrong. + +00:04:27.897 --> 00:04:29.017 +It can be six megabytes. + +00:04:29.918 --> 00:04:31.478 +I think we need + +00:04:32.179 --> 00:04:36.861 +from 1024, something like this? + +00:04:49.010 --> 00:04:50.730 +Oh, I need from unit, not from. + +00:04:53.671 --> 00:04:56.411 +So yeah, it's roughly six gigs, like I said. + +00:04:56.791 --> 00:04:59.452 +So you don't want to clone the entire six + +00:04:59.472 --> 00:05:01.432 +gigabytes just to look up something, right? + +00:05:02.773 --> 00:05:04.913 +And I wanted the browsing experience. + +NOTE Opening Github + +00:05:05.353 --> 00:05:08.474 +So if I press C-x C-f, and then type + +00:05:08.674 --> 00:05:15.015 +/github:, and you can see it shows my orgs. + +00:05:15.853 --> 00:05:17.855 +That's available because I'm using my own token. + +00:05:18.655 --> 00:05:21.877 +And if I type "torvalds", + +00:05:21.878 --> 00:05:25.320 +you see it's matching on the names. + +00:05:25.921 --> 00:05:29.042 +And at any point, if I press RET right here, + +00:05:29.043 --> 00:05:29.744 +it will open. + +00:05:30.064 --> 00:05:32.105 +Well, it matched on Torvalds, + +00:05:32.106 --> 00:05:33.807 +but let's go back again. + +00:05:34.548 --> 00:05:39.211 +Let me just explain what's happening. + +00:05:39.231 --> 00:05:40.812 +So if I type "tor", + +00:05:42.714 --> 00:05:47.536 +It will open all the matching authors and + +00:05:47.556 --> 00:05:50.697 +maintainers and orgs, but we need specifically + +00:05:50.777 --> 00:05:51.357 +"torvalds". + +00:05:52.478 --> 00:05:54.498 +And if I press enter here, and you can see this + +00:05:54.619 --> 00:05:59.180 +is normal Dired experience. + +00:05:59.341 --> 00:06:02.562 +It doesn't feel like I'm browsing something remote. + +00:06:02.722 --> 00:06:04.382 +It doesn't feel like + +00:06:04.383 --> 00:06:06.803 +it's sending requests somewhere else, + +00:06:06.804 --> 00:06:09.465 +but it's indeed remote repositories. + +00:06:10.125 --> 00:06:11.485 +If you want to look something in a file, + +00:06:11.486 --> 00:06:12.807 +you don't have to clone it. + +00:06:13.247 --> 00:06:14.328 +You can copy this file locally. + +00:06:14.348 --> 00:06:16.169 +There are other things you can do. + +00:06:16.210 --> 00:06:17.410 +For example, you can copy the URL of it, + +00:06:35.243 --> 00:06:37.024 +remoto-url. + +00:06:37.044 --> 00:06:39.645 +You can copy all sorts of different URLs. + +00:06:39.685 --> 00:06:43.708 +You can copy its raw URL, blame URL, etc. + +NOTE Embark + +00:06:44.008 --> 00:06:48.650 +But here, the point of Embark integration comes. + +00:06:48.850 --> 00:06:52.532 +Embark is a fantastic package and I have + +00:06:52.612 --> 00:06:53.893 +integrated into Remoto. + +00:06:53.973 --> 00:06:59.876 +So if I press my embark-act key, which is bound + +00:06:59.916 --> 00:07:02.898 +to `C-;`, + +00:07:03.859 --> 00:07:07.973 +It knows that I am at the remoto file, + +00:07:08.823 --> 00:07:13.406 +and it gives me some actions to copy the raw URL, + +00:07:13.446 --> 00:07:15.547 +copy the URL, blame history URL. + +00:07:15.587 --> 00:07:21.771 +So if I press H, I can send this to anybody, + +00:07:21.891 --> 00:07:23.332 +like somebody on my team, right? + +00:07:23.992 --> 00:07:28.755 +And if I am at the higher level, can I go higher? + +00:07:28.955 --> 00:07:30.316 +Oh, not from here, I guess. + +00:07:30.856 --> 00:07:36.760 +But if I go, if I'm here + +00:07:37.420 --> 00:07:41.442 +at this level, and if I press embark-act key again, + +00:07:41.482 --> 00:07:44.583 +you can see at this point it is... It knows that + +00:07:44.663 --> 00:07:48.065 +it's acting on... The target is a repo, not a file, + +00:07:48.085 --> 00:07:52.066 +so you can clone the repo. You can get + +00:07:52.286 --> 00:07:56.028 +specific different kind of urls. + +00:07:56.068 --> 00:07:57.649 +This also works while you... + +00:07:58.449 --> 00:08:00.350 +If you type add here, + +00:08:21.477 --> 00:08:24.857 +it will show the tags and branches + +00:08:24.858 --> 00:08:25.959 +in specific repo. + +00:08:26.719 --> 00:08:33.900 +If you type `#`, it will show issues and + +00:08:34.642 --> 00:08:35.241 +pull requests. + +00:08:35.302 --> 00:08:39.342 +Well, Linux doesn't seem to have any pull requests. + +00:08:39.503 --> 00:08:41.202 +Well, what about uemacs, + +00:08:41.203 --> 00:08:44.665 +which is a fork of Emacs Torvalds uses? + +00:08:45.045 --> 00:08:47.986 +Yeah, this one has pull requests and some open issues. + +00:08:48.326 --> 00:08:51.806 +You can even glance at them, + +00:08:51.807 --> 00:08:55.407 +see what this pull request is about. + +00:08:55.408 --> 00:08:59.190 +This is great. It also works for vim or + +00:08:59.390 --> 00:09:02.549 +evil users, so you can do like stuff like this. + +00:09:02.550 --> 00:09:08.111 +You can totally type `e` or `v` new and etc etc + +00:09:08.112 --> 00:09:10.413 +and it just works as well. + +00:09:11.493 --> 00:09:14.874 +You also don't have to type the whole GitHub thing. + +00:09:15.394 --> 00:09:20.836 +I have shorthand, so `gh`, and voila, we can go to + +00:09:20.976 --> 00:09:23.457 +and explore other repositories. + +NOTE Codeberg + +00:09:23.837 --> 00:09:27.819 +I just recently added CodeBerg support, so you + +00:09:27.839 --> 00:09:28.819 +can do CodeBerg. + +00:09:29.499 --> 00:09:34.361 +And I know Phil Technomancy. + +00:09:34.401 --> 00:09:36.822 +Yeah, Phil has CodeBerg. + +00:09:40.043 --> 00:09:42.364 +I have plans to add more support for more things. + +NOTE Issues + +00:09:42.484 --> 00:09:44.644 +Let's see what things I have remotely. + +00:09:44.764 --> 00:09:47.025 +If I press `#`, you can see the open issues. + +NOTE Plans + +00:09:47.085 --> 00:10:10.775 +I have plans to add support for S3, for browsing NPM, + +00:10:11.556 --> 00:10:12.456 +for SourceHut. + +00:10:12.496 --> 00:10:14.538 +GitLab probably comes next. + +00:10:14.798 --> 00:10:19.702 +I personally want to use the Gists or Gists. + +00:10:19.942 --> 00:10:23.966 +I want to be able to browse them. + +00:10:24.066 --> 00:10:26.808 +These are the planned features. + +00:10:29.733 --> 00:10:33.275 +And if you have any ideas or if you have issues, + +00:10:33.735 --> 00:10:34.415 +give it a try. + +00:10:34.555 --> 00:10:37.397 +It turns out that this package is very practical + +00:10:37.677 --> 00:10:41.619 +and it's actually really nice to be able to do + +00:10:42.180 --> 00:10:43.861 +things like that in this way. + +00:10:45.442 --> 00:10:45.922 +Check it out. + +00:10:46.842 --> 00:10:48.263 +See if it works for you. + +00:10:48.543 --> 00:10:50.424 +Let me know if you have any issues. + +00:10:50.504 --> 00:10:51.385 +Let's try to... + +00:10:51.745 --> 00:10:53.306 +If you have any ideas, let me know. + +00:10:53.746 --> 00:10:54.347 +Don't be shy. + +00:10:55.167 --> 00:10:56.468 +File a GitHub issue. + +00:10:57.549 --> 00:11:02.192 +And let's try to make [browsing remotes] + +00:11:02.332 --> 00:11:03.332 +experience in Emacs... + +00:11:03.792 --> 00:11:05.673 +Let's try to make it real. + +00:11:05.713 --> 00:11:06.974 +Let's try to make it awesome. + +00:11:07.755 --> 00:11:09.535 +That's all I have, I think. + +00:11:09.596 --> 00:11:10.556 +I still have some time. + +00:11:10.916 --> 00:11:15.219 +Maybe I can do Q&A. + +00:11:16.959 --> 00:11:19.181 +Some questions I had to answer. + +00:11:19.621 --> 00:11:20.761 +Some questions came. + +NOTE Why not a TRAMP backend? + +00:11:21.382 --> 00:11:24.083 +People asked why this is not a TRAMP backend. + +00:11:24.543 --> 00:11:25.324 +Well, TRAMP, + +00:11:26.178 --> 00:11:30.020 +turns out its back-end assumes a remote shell on + +00:11:30.040 --> 00:11:31.101 +the other end. + +00:11:31.281 --> 00:11:33.401 +So for the purposes of Remoto, + +00:11:33.402 --> 00:11:34.563 +there is no remote shell. + +00:11:34.723 --> 00:11:37.884 +So I just hijacked a file name handler, a list, + +00:11:38.565 --> 00:11:40.685 +and this is basically the mechanism + +00:11:40.686 --> 00:11:44.288 +the TRAMP mode uses on its own. + +NOTE Why not plain HTTP? + +00:11:45.008 --> 00:11:49.411 +And another question I had, why are you not using + +00:11:49.451 --> 00:11:50.471 +just plain HTTP? + +00:11:50.831 --> 00:11:52.692 +And I answered that as well. + +00:11:53.633 --> 00:11:57.355 +There's no raw HTTP URL that gives you the + +00:11:57.435 --> 00:11:59.596 +directory listing. + +00:11:59.796 --> 00:12:01.977 +It's just going to be more difficult. + +00:12:02.538 --> 00:12:05.319 +So yeah, there you have it. + +00:12:05.599 --> 00:12:06.380 +Here's the package. + +00:12:06.660 --> 00:12:07.320 +Give it a try. + +00:12:07.660 --> 00:12:08.461 +Let me know how it goes. + +00:12:09.301 --> 00:12:09.682 +That's all. + +00:12:10.082 --> 00:12:10.382 +Thank you. |
