emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: yank-media: allow users to limit image types that can be inserted


From: Visuwesh
Subject: Re: yank-media: allow users to limit image types that can be inserted
Date: Thu, 31 Oct 2024 14:18:43 +0530
User-agent: Gnus/5.13 (Gnus v5.13)

[வியாழன் அக்டோபர் 31, 2024] Pedro wrote:

> Hi Visuwesh,
>
> Thanks for the patch!! It is very useful to me.
>
> I tested it and it works as I originally expected: reduce the
> interaction to minimum: I don't need to press enter anymore! :)
>
> I also tested it with two types [1]: jpeg and png; and then you see a
> selector with just the two types you care instead of the 7 types that
> flameshot screen capture tool offers.

Thanks for the feedback.

>
> [1]
>   (setq-local
>     yank-media-preferred-type-function
>     (lambda (types)
>       (if (or
>            (memq 'image/png types)
>            (memq 'image/jpeg types))
>           (list 'image/png 'image/jpeg)
>         types)))
>

With this definition, you will be asked to choose between image/png and
image/jpeg even when the clipboard contains only image/png (or
image/jpeg).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]