all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Robert Pluim <rpluim@gmail.com>
Cc: visuweshm@gmail.com, pinmacs@cas.cat, emacs-devel@gnu.org
Subject: Re: yank-media: allow users to limit image types that can be inserted
Date: Mon, 23 Sep 2024 18:54:25 +0300	[thread overview]
Message-ID: <86ikumfjri.fsf@gnu.org> (raw)
In-Reply-To: <87frpqflv4.fsf@gmail.com> (message from Robert Pluim on Mon, 23 Sep 2024 17:09:03 +0200)

> From: Robert Pluim <rpluim@gmail.com>
> Cc: Visuwesh <visuweshm@gmail.com>,  pinmacs@cas.cat,  emacs-devel@gnu.org
> Date: Mon, 23 Sep 2024 17:09:03 +0200
> 
>     Eli> IMO, for users we already have what is needed: when we detect several
>     Eli> formats, we show them to the user and ask him/her to tell us which
>     Eli> format he/she wants to use.
> 
> But that requires user interaction. I think the original request could
> be summed up as "if the list contains image/png, donʼt ask me, just
> insert the image".

That's not how I understand the request.  It was not always PNG, it
was "sometimes PNG, but if so-and-so-happens, the JPEG" etc.

I'm okay with having C-y select one format, if we can come up with
some reasonable default, but we need to discuss the algorithm to
arrive at that default.  And if the suggestion is to let users write a
function to make that decision, then I'm squarely against that,
because providing such functions is the job of Lisp programs.

>     Eli> The issue at hand here, AFAIU, is not the UI, but how Lisp programs
>     Eli> (and Org in particular) can control this.  If the issue is the user
>     Eli> interface, then I honestly don't understand what issue is being
>     Eli> brought up, because in that case we already have the correct and
>     Eli> comprehensive solution, similar to what other advanced apps do in
>     Eli> these cases.
> 
> You have to register the yank-media-handler before the yank-media
> call, so org canʼt control this: it has to register for "image/.*"
> because it canʼt know what formats will be presented to it. I guess it
> could have a user option to filter the results from inside its
> yank-media-handler, but then *every* package that wants to support
> image yanking will have to implement something similar: we should just
> implement such handling in the yank-media code.

How else would you pull such a trick?

And no one has explained yet why I would prefer PNG to JPEG or vice
versa, btw.  The usual choices I'm familiar with is whether or not to
preserve typefaces, colors, and other fancy attributes; regarding
images, there's just a decision whether you want to paste the material
as a picture or as some kind of text, whether rich or not.  So the
background and the context for this request is still not clear to me.



  parent reply	other threads:[~2024-09-23 15:54 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22 16:53 yank-media: allow users to limit image types that can be inserted pinmacs
2024-09-23 11:20 ` Eli Zaretskii
2024-09-23 13:46   ` Visuwesh
2024-09-23 14:30     ` Eli Zaretskii
2024-09-23 15:06       ` Visuwesh
2024-09-23 15:48         ` Eli Zaretskii
2024-09-23 15:09       ` Robert Pluim
2024-09-23 15:14         ` Visuwesh
2024-09-23 15:20           ` Robert Pluim
2024-09-23 15:58           ` Eli Zaretskii
2024-09-24  5:00             ` Visuwesh
2024-09-24  5:10               ` Visuwesh
2024-09-24 11:57               ` Eli Zaretskii
2024-09-24 12:42                 ` Visuwesh
2024-09-23 15:54         ` Eli Zaretskii [this message]
2024-09-23 16:10           ` Robert Pluim
2024-09-23 16:34             ` Eli Zaretskii
2024-09-23 18:00               ` pinmacs
2024-09-23 18:35                 ` Eli Zaretskii
2024-09-23 20:45                   ` Pedro
2024-09-23 21:08                   ` pinmacs
2024-09-24  8:15                     ` Robert Pluim
2024-09-24 11:30                     ` Eli Zaretskii
2024-09-24 12:18                       ` Robert Pluim
2024-09-24 13:08                         ` Eli Zaretskii
2024-09-24 13:38                           ` Visuwesh
2024-09-24 13:50                             ` Eli Zaretskii
2024-09-24  5:08                   ` Visuwesh
2024-09-24 12:00                     ` Eli Zaretskii
2024-09-24 12:50                       ` Visuwesh
2024-09-24 13:23                         ` Eli Zaretskii
2024-09-24 13:37                           ` Visuwesh
2024-10-26 17:27                       ` Ihor Radchenko
2024-10-26 19:09                         ` Eli Zaretskii
2024-10-27  8:17                           ` Ihor Radchenko
2024-10-27  9:14                             ` Eli Zaretskii
2024-10-27  9:36                               ` Visuwesh
2024-10-27 10:09                                 ` Eli Zaretskii
2024-10-27 15:02                                   ` Visuwesh
2024-10-27 17:11                                     ` Eli Zaretskii
2024-10-28 13:37                                       ` Visuwesh
2024-10-29 11:29                                       ` Visuwesh
2024-10-30 23:22                                         ` Pedro
2024-10-31  8:29                                           ` Eli Zaretskii
2024-10-31 10:47                                             ` pinmacs
2024-10-31 11:16                                               ` Eli Zaretskii
2024-10-31 11:51                                                 ` pinmacs
2024-10-31 14:31                                                   ` Eli Zaretskii
     [not found]                                                 ` <c67bb616-710b-4272-919d-bf4ece8e7c99@imayhem.com>
2024-10-31 14:20                                                   ` Eli Zaretskii
2024-10-31 18:21                                                     ` Ihor Radchenko
2024-10-31 19:03                                                       ` Eli Zaretskii
2024-10-31 19:08                                                         ` Ihor Radchenko
2024-10-31 19:29                                                           ` Eli Zaretskii
2024-10-31 19:42                                                             ` Ihor Radchenko
2024-11-01  7:01                                                               ` Eli Zaretskii
2024-10-31  8:48                                           ` Visuwesh
2024-10-31  8:24                                         ` Eli Zaretskii
2024-10-31  8:46                                           ` Visuwesh
2024-10-31  9:56                                             ` Eli Zaretskii
2024-11-01  5:20                                               ` Visuwesh
2024-11-01  7:38                                                 ` Eli Zaretskii
2024-11-03 17:19                                                 ` Ihor Radchenko
2024-11-03 18:47                                                   ` Eli Zaretskii
2024-11-04  4:04                                                   ` Visuwesh
2024-11-04 20:03                                                     ` Ihor Radchenko
2024-11-04 20:19                                                       ` Eli Zaretskii
2024-10-28 18:39                               ` Ihor Radchenko
2024-10-28 18:50                                 ` Eli Zaretskii
2024-09-23 18:11               ` Eli Zaretskii
2024-09-24  8:38                 ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ikumfjri.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=pinmacs@cas.cat \
    --cc=rpluim@gmail.com \
    --cc=visuweshm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.