Fork me on GitHub

How do you delete the surrounding sexp, but keep the inner ones?


with smartparens ?


Like say I have:

(do (foo)
and I want:


What I do now is sp-unwrap-sexp which gets rid of the outer parenthesis, and then I manually delete do. But is there a command that would also delete do ?


@didibus SPC k r on a child (nested) expressions will replace the parent expression with the child. Unfortunately this will kill any other child expressions, so not quite what you want 😞

Sam H11:03:59

(do |(foo)
with my cursor before (foo) if I do SPC k E it should give what you want

👍 12

Does anyone else find it awkward to insert an org-mode link at the end of a line? Since links get inserted before the point, and since you must be in normal mode to insert a link, the only way I've come up with to insert a link at the end of a line is: 1. a to enter insert mode after the current character

A link:
2. <SPC> to add a placeholder space
A link: 
3. <ESC> to enter normal mode, with the cursor on the placeholder space
A link: 
4. ,il to run org-insert-link
A link: 
5. x to delete the placeholder space
A link: 
Curious whether anyone else has a better way.


I usually type the text of the link first, then use v or SPC v to highlight that text. Then , i l after I enter the URL the link text is already populated, so I just press RET .


Got it. Do you have a similar workflow for when you want the text to be the title of the webpage?


i.e. org-cliplink-like behavior


I've never used that function, seems handy though. If its in the body of a text, I would just create an extra space before using it. Or if I forgot, insert the link without the space and use F [ to jump back to the start and i to insert a space.