[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: |
Eli Zaretskii |
Subject: |
Re: yank-media: allow users to limit image types that can be inserted |
Date: |
Tue, 24 Sep 2024 16:08:21 +0300 |
> From: Robert Pluim <rpluim@gmail.com>
> Cc: pinmacs <pinmacs@cas.cat>, visuweshm@gmail.com, emacs-devel@gnu.org
> Date: Tue, 24 Sep 2024 14:18:08 +0200
>
> >>>>> On Tue, 24 Sep 2024 14:30:01 +0300, Eli Zaretskii <eliz@gnu.org> said:
>
> Eli> First, I think a simple defcustom will not be enough, since changing
> Eli> the list of handlers must go through yank-media-handler.
>
> Thereʼs no need to change the list of handlers. What the user option
> would change is only which type(s) are presented to the user. The
> mapping from the selected type to the handler doesnʼt need to be
> changed. eg org uses the same handler for all image types.
So this option can only be used to effectively disable some handlers,
and cannot be used to _add_ handlers? Does that make sense?
> Eli> More importantly, I still don't understand the rationale and the use
> Eli> cases where this could be useful, and adding yet another user option
> Eli> without understanding its need and intended usage is not something
> I'd
> Eli> like us to do. Emacs already has way too many user options.
>
> When writing technical documentation, often you want to include
> screenshots, eg of a browser window. On my GNU/Linux box, `yank-media'
> of such a screenshot offers jpeg, png, or webp as formats and I have
> to choose which one I want every time.
And this is a frequent enough situation to justify a new user option?
How much does this happen to you when you write documentation?
Moreover, why would you want to prefer a specific image type in this
case? I think this case is exactly the reason for having a command
that automatically chooses the most appropriate image format without
asking you.
> Or if I was yanking text from a word processor, I could say "prefer
> plain text" since I donʼt want to deal with any potential html
> markup.
Here' too, it should be possible for Emacs to choose the most
appropriate format automatically. For example, if yanking into a
plain text buffer, prefer plain text; when yanking into rich text,
prefer text with faces, etc.
> Itʼs analogous to the situation where people send
> multipart/alternative emails with both a text/plain and a text/html
> part, and the recipient specifies which of those theyʼd prefer to see.
Yes, and how many times you want the part that was not the one shown
by default? In my case, this happens extremely rarely, almost only
when the default format has some problem, like is unreadable for some
reason.
Bottom line, I think we will be much better off if we offer a command
that automatically yanks the most appropriate format.
But we are already going in circles, so I hope someone has some new
arguments and use cases that were not yet brought up.
- Re: yank-media: allow users to limit image types that can be inserted, (continued)
- Re: yank-media: allow users to limit image types that can be inserted, Visuwesh, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Eli Zaretskii, 2024/09/23
- Re: yank-media: allow users to limit image types that can be inserted, Robert Pluim, 2024/09/23
- Re: yank-media: allow users to limit image types that can be inserted, Eli Zaretskii, 2024/09/23
- Re: yank-media: allow users to limit image types that can be inserted, pinmacs, 2024/09/23
- Re: yank-media: allow users to limit image types that can be inserted, Eli Zaretskii, 2024/09/23
- Re: yank-media: allow users to limit image types that can be inserted, pinmacs, 2024/09/23
- Re: yank-media: allow users to limit image types that can be inserted, Robert Pluim, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Eli Zaretskii, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Robert Pluim, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted,
Eli Zaretskii <=
- Re: yank-media: allow users to limit image types that can be inserted, Visuwesh, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Eli Zaretskii, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Pedro, 2024/09/23
- Re: yank-media: allow users to limit image types that can be inserted, Visuwesh, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Eli Zaretskii, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Visuwesh, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Eli Zaretskii, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Visuwesh, 2024/09/24
- Re: yank-media: allow users to limit image types that can be inserted, Eli Zaretskii, 2024/09/23
- Re: yank-media: allow users to limit image types that can be inserted, Robert Pluim, 2024/09/24