Hello,
Anyone aware of any package/code snipped that could replicate the paste behavior of vs code? To elaborate what I mean by that. When I copy image in file manager and paste it in a markdown file in vscode it automatically converts it into relative path from the current file. Alternatively is there a way to auto complete in the `C-c C-i` mini buffer?
You can use yank-media to do whatever you want with non-text selections in your clipboard. You can find an example of a function that attaches files copied using a file manager to an org file in this patch: https://yhetil.org/orgmode/87jzsintv0.fsf@gmail.com/
HTH.
🙏
I think yank-medai is actually a slightly different use-case – image contents in clipboard, whereas OP was talking about a file path. But support for both would be cool, I added an issue for the contents at https://github.com/jrblevin/markdown-mode/issues/804
/u/arkoinad might want to open an issue for the filepath use-case
The name is slightly misleading, the command is for any non-text selection. If you check the patch, you will find support for files copied from a file manager.
Oh nice, so they could get support for both in one go with yank-media handlers :-)
That would be so awesome and finally make Emacs my goto note taking as notes often go with images / screenshots and my Markdown workflow in Emacs is wanting in this regard.