From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: yank-media: allow users to limit image types that can be inserted Date: Tue, 24 Sep 2024 15:00:18 +0300 Message-ID: <86o74ddzxp.fsf@gnu.org> References: <79fc91f3-c2c3-44db-9817-595808917f26@cas.cat> <86ed5ahb08.fsf@gnu.org> <87zfnywki8.fsf@gmail.com> <86setqfnmq.fsf@gnu.org> <87frpqflv4.fsf@gmail.com> <86ikumfjri.fsf@gnu.org> <877cb2fj0c.fsf@gmail.com> <86cykufhw7.fsf@gnu.org> <3a015d0f-549a-401f-be1c-651c9dbd5d9a@cas.cat> <8634lqfcaf.fsf@gnu.org> <87ikulwsd6.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18736"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pinmacs@cas.cat, rpluim@gmail.com, emacs-devel@gnu.org To: Visuwesh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 24 14:01:08 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1st4E8-0004cI-1N for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Sep 2024 14:01:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1st4DS-0003cj-Pd; Tue, 24 Sep 2024 08:00:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1st4DP-0003cQ-A2 for emacs-devel@gnu.org; Tue, 24 Sep 2024 08:00:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1st4DN-0000W2-D9; Tue, 24 Sep 2024 08:00:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ocIguIG61hKIY3OqTjbGhAeLn1os1ivyobJt/ylR3yA=; b=l5ik9epvSJ1p iT6B0/k7BMFXbCuJWqHVUCrev/hHYt9i6LKge1mzmftuj9L5nwm0E96ywIwGM6Xtth4+D197ETQNM WIBQsdcHNoqlBL4KoY0HcxOXTtNpWdRjsQJXlq4dsP3KueD6yxrdTz/U5YpEhemS0Pl631XdIp3Yc +5TizHkraz3zgCA8X7r2sD2tjQVOwcdOSy6RCWhOB368pr8Fd5AQEBPvHIUtldFQJZj4F0NdSDIqy esK62EtiCm0GM/JIFhwYdFighguL3a2RZ9KL/htLXX4/stfMbybM7+pV0IFHDIzV8SXOeog56e6SG CeHEGPFub6W6M0drxIkmYw==; In-Reply-To: <87ikulwsd6.fsf@gmail.com> (message from Visuwesh on Tue, 24 Sep 2024 10:38:53 +0530) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324021 Archived-At: > From: Visuwesh > Cc: pinmacs , rpluim@gmail.com, emacs-devel@gnu.org > Date: Tue, 24 Sep 2024 10:38:53 +0530 > > > What I still do not understand is what would be the reason for the > > user to prefer JPEG over PNG. More generally, if Emacs can support N > > formats out of those available in the clipboard, why would the user > > want to be shown only 1 < M < N out of them? > > [ The more I think about this, the more I believe the choice of > "preferred formats" will change depending on the scenario where > yank-media is used. In Org, I could see "don't bother asking me, just > use PNG if available" could be useful. But somewhere in HTML mode, > "always ask me" could be the right choice. ] Which is why I suggested two separate commands: one where the user says he/she wants the most appropriate type, the other to allow selection. > > Bottom line: I'm okay with offering two yank-media alternatives: > > > > (1) via a command that selects a single most appropriate format based > > on some (yet to be defined) algorithm; and > > What about a user option yank-media-preferred-mimetypes which is a list > of mimetypes that the user would like to always opt for, given the > choice? That was proposed earlier in this thread, and I responded: I'm not sure I understand when and why would this option be needed _as_ a user option. > > (2) via showing the list of all the formats that the running Emacs > > supports and asking the user to choose one. > > This is what we already have so nothing to be changed. Right.