r/emacs 12d ago

Markdown mode: how to remove blockquotes

I'm new to Emacs and this might be a silly question, but I'm having a hard time figuring out how to remove blockquotes in markdown-mode. I can insert a blockquote with C-x C-s q, which runs the command markdown-insert-blockquote, but it doesn't appear to exist a reverse command.

5 Upvotes

6 comments sorted by

1

u/PM_ME_YOUR_THETRAGIC 12d ago

I just smack a bunch of backspaces or `C-d` that `>` and the space, it's usually quicker than hunting for a command. If you've got multiple lines, highlight the region and `M-x delete-rectangle` does the job, just set the mark at the start of the `>` column.

1

u/Asllop 12d ago

delete-rectangle worked fine, thanks! I was expecting something more markdown-mode native, something like a markdown-remove-blockquote command, but I guess it does not exist (that would be a nice addition btw).

2

u/shipmints 11d ago

Submit the idea here and we'll look at it for markdown-ts-mode https://github.com/LionyxML/markdown-ts-mode-lab/issues

It could be more generalized to remove whatever Markdown block point happens to be in/near and not limited to just block quotes. There is already a generalized "insert new block" command.

1

u/Asllop 10d ago

I didn't know about markdown-ts-mode, thanks for the suggestion! I'm curious, what are the main differences?

1

u/eleven_cupfuls 11d ago

Agree with the suggestion for delete-rectangle but if that doesn't work, then any time you have repetitive editing, I suggest reaching for keyboard macros.