org-pandoc-import icon indicating copy to clipboard operation
org-pandoc-import copied to clipboard

[feature request] convert from buffer instead of file

Open digizeph opened this issue 4 years ago • 4 comments

Hi @tecosaur Thank you for your efforts on this project!

I'd like to see if it is possible to convert a markdown buffer (not a file) to org. The use case is that sometimes I encountered some markdown content online, I'd like to copy the markdown to a emacs buffer, then convert it to orgmode without saving the markdown file first somewhere.

EDIT: realized that this may be more than just markdown mode. I changed the issue title to reflect that. EDIT2: I think the potential solution is to save the current file to a temporary location with filename suffix determined by the current major mode, then run the import function, then delete the temporary file.

digizeph avatar Apr 06 '21 16:04 digizeph

Hmmm, this seems like a good idea but would require reworking a fair bit. A PR would be great, otherwise expect to wait a few weeks-months.

( NB: It's not that much work, I'm just rather busy )

tecosaur avatar Apr 06 '21 18:04 tecosaur

A regular use case I have is to paste/yank some markdown from my clipboard into an org file, so this sounds useful. :+1:

stefan2904 avatar Oct 28 '21 19:10 stefan2904

My thought have no changed, but unfortunately neither has the amount of time I have available :stuck_out_tongue:, there's a good chance of this happening by the end of the year without a PR though.

tecosaur avatar Oct 28 '21 19:10 tecosaur

Gentle 👍🏻 on this one! (There are dozens of us!)

I wondered about this while using the great https://github.com/twlz0ne/separedit.el to edit markdown docstrings containing tables.

aisamu avatar Dec 27 '23 18:12 aisamu