-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
register yank-media-handler so we can paste images #804
Comments
How about #807 ? |
Nice! I can now If I drag from thunar into emacs, it still just opens the file – I believe this requires If I use |
I'll look into dnd later.
I'm not sure yet, but I suppose yank always yanks text. |
I've also implemented the dnd feature |
Is this meant to work cross-plattform or exclusively for Gnome? I am using Emacs 29.1. on Windows and when an image is on the clipboard and I call yank-media in a markdown-buffer I get the following message: yank-media: No handler in the current buffer for anything on the clipboard |
Emacs has not supported images in clipboard on Windows yet.So this feature works only on Desktop Linux and macOS. https://www.gnu.org/software/emacs/manual/html_node/elisp/Window-System-Selections.html
|
You might also want to support the XDS protocol so that you can e.g., directly drag an image shown in firefox and drop it onto Emacs frame without needing to save it first somewhere, etc. Po Lu's initial message in the linked thread should be of help (and the later patches of course). I neglected to do this in the org-mode patch but you definitely want to call decode-coding-string on the string returned by url-unhex-string in the copied files yank-media handler.
See the subthread https://yhetil.org/emacs-devel/[email protected]/ and the conclusion therein. |
Expected Behavior
When an image is in the clipboard, yanking/pasting should create a file with the image in the same dir (perhaps customizable) and add a markdown image link.
See https://yhetil.org/orgmode/[email protected]/ for examples of yank-media handlers (this issue prompted by https://old.reddit.com/r/emacs/comments/17alspd/intelligent_paste_in_emacs/k5fnuta/ )
Actual Behavior
It pastes the latest text instead (and messages
Selection owner couldn’t convert: text/plain;charset=utf-8
)Steps to Reproduce
Software Versions
The text was updated successfully, but these errors were encountered: