|
From: | Max Nikulin |
Subject: | Re: [BUG] [PATCH] Add yank-media and DND handler [9.6.7 (9.6.7-g6eb773 @ /home/viz/lib/emacs/straight/build/org/)] |
Date: | Sun, 24 Sep 2023 21:58:37 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
On 23/09/2023 17:28, Ihor Radchenko wrote:
Visuwesh writes:+ (let* ((ext (symbol-name (mailcap-mime-type-to-extension mimetype))) + (iname (read-string "Insert filename for image: "))It would be nice if we auto-generate the file name here by default. It is what I would expect from yanking an image at least.
Certainly it would be great to provide some default value allowing user to override it. However it may be not so trivial. Clipboard content may be just copy region from some graphics editor or a screenshot tool, so not associated with a file yet. In X11 xprop may be used to get clipboard owner application and its title. Wayland may be less permissive.
I have tried to copy an image in Firefox. There is a chance to find file name (it may be image.php?id=1324 though) in text/html clipboard content, but it requires parsing of HTML
xclip -selection clipboard -o -t text/html
[Prev in Thread] | Current Thread | [Next in Thread] |