tecosaur / org-pandoc-import

Mirror of https://git.tecosaur.net/tec/org-pandoc-import
GNU General Public License v3.0
241 stars 14 forks source link

[feature request] convert from buffer instead of file #10

Open digizeph opened 3 years ago

digizeph commented 3 years ago

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.

tecosaur commented 3 years ago

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 )

stefan2904 commented 2 years ago

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

tecosaur commented 2 years ago

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.

aisamu commented 8 months ago

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.