Fun things With GNU Hyperbole

@matsl@mastodon.acc.sunet.se, matsl@gnu.org

May take questions after the event depending on how his move goes

Format: 15-min talk ; Q&A: BigBlueButton conference room
Status: TO_CAPTION_QA

Talk

00:00.000 Introduction 00:41.299 The action key and the assist key 02:22.840 Composing an e-mail 03:44.600 Inserting implicit links 06:03.411 Window grid 11:19.720 Select a thing 12:33.818 Web search

Duration: 14:10 minutes

Q&A

04:51.194 Q: How is the log buffer generated? 05:21.051 Q: So, the "select a thing" C-c RET is similar to expand-region? How does it behave in codes (functions, class, ...) 07:09.972 Q: What is a recent tool that you find exciting to think about using in combination with Hyperbole, or would like to suggest using in combination with it? 10:00.255 On Ihor as the new maintainer for Org Mode

Listen to just the audio:
Duration: 21:56 minutes

Description

This talk will focus on a few small fun things you can do with Hyperbole with less focus on going into details.

GNU Hyperbole is described as the Everyday Hypertextual Information Manager which point in the direction of hypertext with some inter linkage. It has all that but it also contains other small and useful things. This talk will focus on the other supported features and demo a sample of them.

About the speaker:

I'm Mats Lidell. Co-maintainer of GNU Hyperbole together with the author Bob Weiner.

See also:

Discussion

Questions and answers

  • Q: Hey, how is the log buffer generated?
    • A: interaction-log package
  • Q: So, the "select a thing" C-c RET is similar to expand-region? How does it behave in codes (functions, class, ...)
    • A: Behaves exactly the same.
  • Q:I know you Hyperbole devs are active and interested in sharing and interoperating with other emacs tools. What is a recent tool that you find exciting to think about using in combination with Hyperbole, or would like to suggest using in combination with it?
    • A: Lately, focussing on making Hyperbole work with org-mode so that they may interoperate.
    • The idea with Hyperbole is not to be better than everything else, but to be a connector between the different modes.
    • ace-window is a small, great package that selects  windows or displays a buffer in them.  Hyperbole extends this a bit letting you theow a region or buffer to a window or replace its contents with another buffer.  This is documented in the Hyperbole manual.
      • There's also C-@ (mark-org-subtree) which interferes with Hyperbole
      • Can you explain how it interferes?  Any conflict would likely be a bug, not an incompatibility.
    • Sometimes, it does clash with other modes, especially M-RET.
  • Q: Hi Mats! Can I ask you a technical question about Hyperbole? Many years ago I tried to learn hyperbole but I gave up after some time... I remember that I found the code of the dispatcher very hard to understand. Anyway, here is the question: if I type M-RET on this button - {C-h h d d} - Hyperbole detects the extent of the button and the kind of the button, and at some point it probably calls a Lisp function with the argument "C-h h d d", and that function makes emacs behave as if the user had typed C-h h d d. Do you know what function is that?
    • A:See the defib of kbd-key in the hib-kbd.el file.  That is an implicit button type defined via defib which invokes an action type of the same name defined with defact.  Just read the code and you'll see how it works.
  • Q: is hyperbole easy to turn on and off nowadays? I remember that many years ago just having it installed would make it change some behaviours globally
    • audience: yes just a hyperbole-mode to toggle or (hyperbole-mode -1) to make sure to disable
    • audience: I can usually just type M-x hyperbole to toggle it

Notes

  • Hyperbole looks like an incredible tool but I can't quite seem to get it. These examples make me want to try again though :)
    • Same here, I actually leave it in the background and hit M-RET from time to time :D
  • "take away your freedom" 🤔 "ta bort din frihet" 🙁
  • nice talk! Hyperbole is in my TODO list for some time already, I should bring it to the top...
  • I think that Hyperbole is a little diamon inside Emacas
  • ditto! it seems a wonderful grab-bag of random nifty stuff :)
  • alzai: I always viewed it as this mysterious tool. Some users recommend it but there's no simple overview of it. But I'd say this was one.
    • gs-101: for me one of the problems with hyperbole is the lack of examples in the documentation
    • We have written multiple example use files included in Hyperbole, a full Texinfo manual and a number of videos but maybe we should add a step-by-step how to use it for new users.
  • * NullNix suspects hyperbole window configs and winner window configs might be... confusing if used together :) [11:47]
  • Maybe it could be jokingly summarized as do-everything-at-point
  • well, I got lost around several types of buttons - cheatsheet would be huge help for jumping in
  • [re transient discussion]: Very excited for the Org move to transient.
  • sachac: In the org-update talk, Ihor mentioned wanting to move some more of the Org functionality into libraries that other packages could take advantage of, so it might be interesting to see what might be good to share with each other.
    • Could this be akin to refactoring useful features from emacs packages into emacs itself, especially if that feature is widely used and useful across many packages.
  • one of those legendary packages i've just never quite gotten around to learning
  • Yeah, Hyperbole does way too much to be integrated into core Emacs imo
  • I promise study Hyperbole for the next Emacsconf. Hyperbole it's a great tool

Transcript

[00:00:00.000] Introduction
Hi, Emacs Conference. I'm Mats Lidell. I'm the maintainer of the GNU Hyperbole, together with the author, Bob Weiner. The title of the talk is Fun Things with GNU Hyperbole. With that, I intend to cover a different set of small things that is in the package. So this will not be a tutorial of Hyperbole. For that, you have to look for other sources.
[00:00:41.299] The action key and the assist key
This is a short talk, so let's get started with the first thing. We're going to talk about scrolling and with the subtitle using the end of line. If you're new to Hyperbole, you need to know about the action key and assist key. The action key is bound to M-RET and the assist key is bound by default to M-RET with the prefix argument. Both of these keys are used for performing actions on different contexts. In this case, we'll look what happens when you use it on the end of a line. I have here the tutorial, the Emacs tutorial, and we see here a line inserting and deleting. I move there and put the cursor on the end of the line. I then hit M-RET, the action key, and it's moved to the top of the window. If I want to move it to the last row on the window I can press C-u and then M-RET, so I use the assist key. If I repeatedly hit M-RET, it will scroll so the first time it moves to the top of the window, but if I at the top of the window hit M-RET again it scrolls.
[00:02:22.840] Composing an e-mail
Now over to the next thing. So next thing is to compose an email from an address of the style of username@domain. Let's look into that. Here I have entered the file in the Emacs distribution vc.el. At its top it has a lot of different email addresses from the contributors. This is, in principle, a normal text file. By placing the cursor over one of these addresses and hitting the action key, Hyperbole identifies that it's an email address and tries to open or opens the email composer with that, using that email address. If we'll go to the scratch buffer... Prepared another name there so just to demonstrate it works in a buffer the same way.
[00:03:44.600] Inserting implicit links
The next fun thing is insert implicit link. I'm going to give you an example with email how to share an implicit link with someone. An implicit link is a text pattern, just as we saw with the email address, something that Hyperbole recognizes just by how the text looks. Here we have the example. We have started writing an email to the user@domain, and in the other window below, the vc.el file is open. It's now opened within the search path, the load path. That's why it's compressed. I want to tell my friend about the credit section. First, the cursor is placed here at your credit section. I move over to the other window and I use the Hyperbole menu system. By hitting C-h h, I go into the menu system. I press i for getting an i-button, implicit button, and I press l for creating a link. And there you have the link. What does the link mean? Well, it means that in the load for Hyperbole, Emacs lib files are special. If they are in the load path, they will use this short format. At the end, you have the L for the line number 24 and the C for the column. If I hit the action key on this line, you can see that the cursor moves over to the credit section. we can remove that file just to make sure that it works and move the cursor a little bit and hit M-RET again. M-RET and we moved over there. I mean, given that the receiver has a similar setup with Emacs, et cetera, that link will work there as well.
[00:06:03.411] Window grid
Hi, Emacs Conference. It's a new recording day, the sun is shining, I'm wearing a new t-shirt but we're still cracking on with fun things in Hyperbole. Our next subject is window grid. With Hyperbole, it's easy to create a grid of windows. I'm going to show how you can do that and also moving on I'm going to show how you can use Dired or IBuffer to select what buffers to show in the grid. I will also show how you can save configuration for use later. You reach the window grid functionality through the hyperbole menu system. C-h h screen. There you have two submenus, frame control and window control. The grid functionality is part of both of these submenus. You can select either, but I'll go with window control here. Down to the left, we see the @ character and the grid of windows, so hit @. I'm prompted with the number of columns and rows for the window grid. I select the 3x3 grid. We get the 3x3 grid, and it's populated with buffers I have loaded in Emacs. Let's go back here to the scratch buffer. Now, using all those keystrokes for the menu system is a little bit cumbersome, so there is a shortcut: C-c @. If I use that, C-c @, I get immediately prompted the number of rows and columns. If i use a prefix arg 0, C-u 0 C-c @, I get also prompted with what type of buffers I want to have populated in my grid. Let's select the emacs-lisp-mode. Again we do a 3x3 grid. Here you see all the grids. The whole grid is populated with Emacs Lisp buffers. To get even finer control, you can go into IBuffer. I have pre-selected here all the Emacs Lisp files I have. Let's pick a few. I mark them like this. Let's pick three or maybe pick four. Then I hit the @ sign, and then it automatically shows a 2x2 grid with the selected buffers. We can go in again and maybe select a few more and do the same thing: hit add and it now becomes a 3x2 grid with these buffers The same thing is possible through Dired. Let's just mark quite a few here and then hit @, and then it populates it with all the buffers. You see that if it's not enough buffer to fill the whole grid, there are blank grids or rectangles in the grid. Now going back and forth like this, maybe if you want to work on some file and and then go over to Dired again to select this, can be a little bit cumbersome. You maybe have prepared a grid with the buffers you want to have there. Hyperbole comes with a simple window configuration support. You reach that the same way through the Hyperbole menu, so C-h h and window, w for window, and there you can hit save to save the configuration to a ring of configurations. Let's go back to the scratch buffer again here. Now we want to bring up our window configuration again, so we hit C-h h and window, and yank in the configuration. Boom, there is the grid again.
[00:11:19.720] Select a thing
We're reaching the end of the talk. The last fun thing I want to talk about is the Hyperbole support for select a thing. We'll show some use of selections together with web search. Here I have brought up the GNU General Public License for just getting some text that I can show the select a thing functionality. Let's move the cursor over the word versions. Then I hit C-c RET, which is bound for the select a thing functionality. Then it selects the word that the cursor was at. If I hit it again, C-c RET, it selects the line. Again, it selects the sentence, and again, the whole paragraph. So that's a convenient way to extend your searches--your selections, rather--in a buffer.
[00:12:33.818] Web search
Looking at selections, how you can use that from web search... Let's mark some text and then hit C-c /, which is bound for the web search. Here you see the Hyperbole menu system again. It's slightly customized with things that I use, but the basic menus are the ones supported by Hyperbole. Let's look at searching DuckDuckGo. It then populates the prompt with the selection. I have configured it so it uses my Firefox for these searches. Here we have the GNU General Public License shown. I can also show that for like me, being not a native English speaker, let's look what "take away your freedoms" means in Swedish. So C-c /, and then I hit translate. Take away your freedom, yeah, what's the translation for that? Using Google Translate, I get it translated to Swedish. That was the whole talk. We reached the end, and thanks for listening. Bye.

Captioner: sachac

Q&A transcript (unedited)

And I believe we are live. Hi, Mats, how are you doing? Oh, I'm fine. It's a pleasure to see you again after last year. And I was trying to think about it. We saw you last year, but didn't we see you as well in 2022? Yes. This is my third year. Yeah, well, thank you for being a regular at EmacsConf. It's always a pleasure to have you chat about hyperbole. Although I think you're the only one chatting about hyperbole this year compared to last year. Yes, unfortunately, that's, yeah, Bob has some family issues. So yeah, I'm here, but I'm here. Yeah, but we are happy to have you here. And as I was saying before, I'm not sure if you were, you had the time to watch the previous talk by Mohsen, you know, you had, there were plenty of ideas, I think that were very similar to what Hyperbole is trying to do by having buttons and having stuff that can be in any other mode that would allow you to supplement a coding file with extra information. So the ideas are living on. And even though hyperbole is one thing, I feel like other packages are also taking a lot of inspiration for it. So congratulations on being an inspiration, I suppose. Oh, thanks. Unfortunately, I have not had any time to watch anything of the Emacs conference since apparently my life is like every time it's Emacs conference, I do something else. So I've been just moving this weekend. So, I'm in a new apartment, but I'm connected and everything seems to work okay. So, I can't relate to what we said in any of the other talks, I'm afraid. So, sorry about that. No, that's okay. No, but that's completely fine, because you may be able to watch the talks at any point later on, because I'll remind the viewers that the talks are currently available on EmacsConf or the pre-recorded one. And I think we only had one live talk yesterday. All of them are already available with subtitles and all the funny stuff that we usually put. So that's an invitation for people to watch it. All right. So, Mats, before we start with the questions, I see people in the process of writing them. Was there anything else you wanted to add on top of your presentation? Maybe some supplements or whatnot? No, no. Nothing to add. Right. I mean, this year was more a bag of tricks, some new stuff that you've implemented in Hyperbole. And it's fun because I see the UI that you have for some of those modes. And earlier, you weren't able to watch those talks, but we were talking a lot about Transient and about what it allows you to do in terms of interactivity. I'm actually familiar with Transient. No, no, no. It's a mode written by Tarsius, so Jonas Bernoulli, the person behind Magit, and it's a very nice way to create menus for interactive setups. So, if you are interested in perhaps augmenting what you currently have with Hyperbole, it might be nice to look into Transient because I think this is heading towards eventually being merged into the core of Emacs. I mean, don't quote me on this. and I'm not sure how Tarsius feels about it, but because of the adoption, because Magit obviously uses transient, Org is trying to make a move towards adopting transient, it feels like Hyperbole would do well as well to adopt it because it's starting to become a grammar of general UI at this point. Yeah, now when you mention it, I remember because I'm a heavy user of Magic, of course. So I know Transient that way. I know also that people have been complaining about Hyperbole's menu system. You know that Hyperbole reach back to something like 1993, so it has some maybe things that are not modern in that sense. So we have it on the plate to maybe look into these things and how we can sort of make things modern, etc. Sure, but it's completely fine to take your time. You don't necessarily have to follow the latest fads when it comes to completion engines or interactive engines like Transient is. I'm not actually sure how you would call Transient. Is this a UI maker, an interaction engine? I don't know. I'll need to ask Tarsius at some point. All right. Okay. Okay so let's move on to the questions. We've got a couple of them and for the Q&A we'll have about five minutes and 30 seconds until we got to lunch. So starting with the first question.
[00:04:51.194] Q: How is the log buffer generated?
How is the log buffer generated in your presentation? But it's a very quick answer to this. We recommend at EmacsConf that speakers use the interaction-log package, which allows you to have a slightly prettier lossage. Lossage being in Emacs how you call the comments that you've used. And so if you're interested in using this for your own presentation, interaction log, and you'll be able to find it fairly easily. Moving to the next question.
[00:05:21.051] Q: So, the "select a thing" C-c RET is similar to expand-region? How does it behave in codes (functions, class, ...)
So the selector thing C-c RET is similar to expand-region. How does it behave in codes i.e functions or class? Well I think it behaves exactly the same. I mean in the In any sort of buffer, it might depend on what constitutes a word, et cetera, and a sentence in the mood. That's how I would say it. Right. I'm just, in that sense, I'm just a user of the function. I haven't implemented it. I haven't tested it more than that. We can do this as a demo that you start with maybe select a small thing and by hitting it over and over again, you select more and more. Yeah, but it's completely fine sometimes to merely be a user of something, you know. It's easy. It's a testament to how amazing Emacs is because everything is written in Lisp in the background, that as soon as you start becoming a maintainer of something, you kind of expect it to just be able to understand everything else. And whilst it's technically true, the limiter here is the amount of time that you can invest looking at the definitions, understanding what they do, and sadly we don't have the time to do all of this. And especially with Hyperbole, which is obviously interacting with major modes in something that is more involved than Org mode, for instance. We do have another question. So, I know you Hyperbole devs are active and interested in sharing and interoperating with other Emacs tools.
[00:07:09.972] Q: What is a recent tool that you find exciting to think about using in combination with Hyperbole, or would like to suggest using in combination with it?
What is a recent tool that you find exciting to think about using in combination with Hyperbole or would like to suggest using in combination with it? Well, lately we've been focusing a lot of sort of trying to make Hyperbole work together with Org Mode and in in a good way so they can sort of, I mean... The idea with Hyperbole is not to be better than everything else, but more to be like the glue or spider that could integrate different modes in a good way together. So that being top of everything. And Org is a very popular mode, and there are a lot of sub-modes, or whatever you can call it, with Org for information management. And we would want Hyperbole to work together with Org in a good way, so Org users could benefit from Hyperbole as well. So we put in some effort in that. But I think there's a lot of way to go. There's much more that can be done there as well because different modes can easily compete in a bad way in the details. So it's a little bit of a tricky thing, especially like we have this and how probably we have this M-RET for the action production key and that's also used in many modes. So we would really, in the best of words, we would like Emacs to sort of come to some agreement on using of the M-RET in a good way for modes to sort of be able to work and live together. Yeah, I mean it's a tough thing to share the key bindings and the grammar of interaction between packages because you tell me M-RET, I don't want you to touch M-RET. For me it's just inserting a new line and not adding indentation at the start and everyone is going to have their own you know, feelings and thoughts about this, so it's really hard to impose any kind of system on this. But I'm glad to hear that you're looking into interaction with Org Mode because I remember the questions we were having on your first conference when people were asking, oh I'm so glad that you're talking about Hyperbole because the only way I'm interacting with it is when people chat about Org Mode and then whenever we had announcements about Hyperbole, be it on Reddit, be it on Hacker News, people would say, but don't we already have Org Mode? And we won't get into the topic again, because I think you've done a wonderful job of explaining the differences in previous years. And today, the conference, your talk at the conference also made it obvious that it's doing something that Org Mode is not able to do. But ultimately, being able to interface between the two is something great.
[00:10:00.255] On Ihor as the new maintainer for Org Mode
And I kind of wanted to ask you as well the question, because you haven't seen the talk, but yesterday we had the announcement that Ihor Radchenko was becoming the new maintainer of Org Mode. So obviously, a new maintainer introduces idea of changes of, you know, philosophy and strategy and all this. Is this somehow on your end with Hyperbole inspiring you perhaps to also innovate in a sense to maybe try to change the way some things are done? Hmm, tricky question. I know, right? Yeah, no, well, I don't know. I don't know if it answers the question, but we have this idea that we meet and work from our point of view. And then we pick up maybe details from the outside world. So we're not heavily looking into what happens in the rest of the world when it comes to Emacs and personal information management, etc. But but we do pick up some ideas. Sometimes. But yeah, we mostly do hacking and then we want to we meet once a week and work on hyperbole and you know, so Yeah, that's already very cool. And the reason I'm mentioning this is not because I know that you are operating in a little bit of a silo when it comes to all of Hyperbole, but it's always nice for me personally to see a lot of energy being brought in by people. Whenever there's a new major version being published, be it Org Mode or be it Hyperbole, people are excited. There's a lot of energy in here because people are chatting about what you're doing. And that's why I find that people, a new maintenanceship for Org Mode actually benefits Hyperbole in a way because you get a lot of excitement, a lot of people thinking and bringing ideas to the table. And I think it's a prime time to actually try I'm using the word stealing, but in a very nice way, stealing in terms of floss, stealing some ideas and trying to see if you can run with them on your own end. And that's also why I was suggesting transient, because transient looks like it's on its path to reach core at some point. And it would be nice if you had the idea early on to integrate with it, because it might save you time later on and make your user happy, because they can find the same grammar between the Git, between org mode, and between hyperbole. All right. Is there... I don't think... Yeah, go on, please. Yeah, I just want to add on that, that, I mean, as an ultimate goal, in the far distance, we would want sort of Hyperbole or hyperbole type of functionality be part of the core Emacs. So in that sense, it's sort of totally sort of okay with us that different packages steal ideas and try to merge them into sort of the core system. Yeah. All right, I don't see any more questions, so I think we can move to close. Actually, we're actually three minutes over time, so I'm glad we managed to discuss a little more, but that's fine. Mats, do you have any last words? I'll try it out. Okay, well, then, you heard it, everyone. Just try it out. Try it out, and if you like it, you can join us on Sundays Right. And every Sunday, well, if you do not know what to do, you know, here's an idea for you. All right. Thank you so much, Mats, for coming again to Emacs Conf. And we look forward, perhaps, to seeing you next year. Yes. I'll be there. Hopefully, I can see some of the presentations live then. OK. That's OK. You've got the entire year to catch up on the ones you haven't seen this year and next year. But you'll have the time to catch another one live. All right. Yes. Great! For the folks watching, we will be taking a break, a one hour and one minute break. We'll be back at 1 p.m. EST and I think if my UTC conversion is working right, it should be 6 p.m. UTC, so at least in one hour. All right, see you in a bit folks! Oh yes, and sorry, I've got a little elf speaking in my ears. In case you're interested in discussing further hyperbole with Mats, Mats is in the room right now and I see people have joined the BBB chat. So if you want to join and chat directly with Mats, I'm sure Mats would be more than happy to answer your questions. And obviously everything has been recorded and will be published later on. But for me, I will use the break to rest a little bit and I'll be back in the afternoon. All right, see you folks. Bye, take a break. Okay.

Questions or comments? Please e-mail matsl@gnu.org