开发者

Copying (yanking) only visible text in emacs outline-mode

开发者 https://www.devze.com 2023-01-10 17:09 出处:网络
Sometimes I\'d like to copy only the visible text from an outline-mode buffer in emacs, ignoring hidden开发者_开发问答 leaves, etc.

Sometimes I'd like to copy only the visible text from an outline-mode buffer in emacs, ignoring hidden开发者_开发问答 leaves, etc.

I don't see any way to do this. When I use M-w and then paste somewhere else, I get all the text, including the hidden parts.

Does anyone know how to do this? The manual and google aren't helping.

Thanks,

Tom


Edit: Tom Faulhaber's solution, as per the comment below:
https://gist.github.com/tomfaulhaber/519635

Original answer:

FWIW, org-mode has org-export-visible, and is derived from outline-mode, so maybe that code could be adapted if no other solution exists?

There's also M-x outline-headers-as-kill which works on the region in outline-minor-mode. That's also not what you wanted, but perhaps provides another approach for implementation.

0

精彩评论

暂无评论...
验证码 换一张
取 消