Fork me on GitHub

I cannot find it with the google, but there is an Emacs mouse command I had access to in one editor that was wonderful: move point somewhere, now right click an expression (a word, a fifty-line form) to have it copied to the point. Counter-intuitive until I got addicted. Control-right-click moved instead of copying. Does Cursive have that? If not…please?????! I can go for ten minutes using nothing else when refactoring.


@hiskennyness I’m pretty sure Cursive doesn’t have that, but I’m also not sure I understand how it works. So you put the caret somewhere, then right click on some other form and it gets copied to where the caret is?


Absolutely. Weird, right? It is an incredible tool. I learned about it when JP Massar a long time Lisper joined our team and asked why our IDE of choice AllegroCL did not have it in their Emacs mode.


That is extremely weird.


If you want to copy a 50-line form, how do you reliably select it? Do you click on either the opening or closing paren?


The Franz team responded, “OMG Yes. We remember that!!” and implemented it in half a day.


Ha, no pressure 🙂


Click on opening or closing parens. Pray “undo” has been implemented well. 🙂


One issue is that in IntelliJ right click is for context menus, but I’m sure there’s some modifer combo that is free.


Cmd-right click or something.


I am not kidding, it is a gold mine. You know, I would have to remind my self. It might have been option click.


Sounds like it might have been the alternative one they talk about?


That talks about copying though, not pasting automatically.


Bingo, though Emacs has its own langauge, so I am not sure. Use it for a day and you will bug out at how often you end up reaching for it.


Yeah, you want it to paste automatically, perhaps as a move so the original gets tossed.


I was LMAO when I saw the Franz team jumping up and down over JP’s suggestion.


Maybe “There is an alternative mouse-copy minor mode that lets you copy or yank an s-exp under the mouse cursor to point by holding down a modifier key (C or C-M, respectively) and left-clicking. ” “s-exp under the mouse cursor” sounds better than some commands that talk about first selecting a region.


It is the ultimate in structural editing. Well, one ultimate. 🙂


Note that it pulls this off without using the normal copy/cut buffer, so anything in there is undisturbed. That proves to be DWIM.