From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.devel Subject: Re: yank-media: allow users to limit image types that can be inserted Date: Tue, 24 Sep 2024 19:07:25 +0530 Message-ID: <871q19w4tm.fsf@gmail.com> 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> <86o74ddzxp.fsf@gnu.org> <875xqlw702.fsf@gmail.com> <867cb1dw2h.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30908"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: pinmacs@cas.cat, rpluim@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 24 15:38:30 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 1st5kM-0007ov-7F for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Sep 2024 15:38:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1st5jU-00053d-PE; Tue, 24 Sep 2024 09:37:36 -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 1st5jT-0004xA-0L for emacs-devel@gnu.org; Tue, 24 Sep 2024 09:37:35 -0400 Original-Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1st5jQ-0004jd-Th; Tue, 24 Sep 2024 09:37:34 -0400 Original-Received: by mail-pl1-x642.google.com with SMTP id d9443c01a7336-207397d1000so49632105ad.0; Tue, 24 Sep 2024 06:37:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727185051; x=1727789851; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4A8kGvU3orKZPxRbbw08AO7P/RpWa47b+PGB9ZdXiRA=; b=k2zaFvKMMTWuIO8Y1KKc2GiNjAquRpVSqUKtAONeR1gB3DtGQBgOv7TIytcVbUfuyT iHDhlUjk7dLDjpcHWeu0BwdiC5HKoKOMTZqChx+YE9bg/gRA+NSvRhg6OsUp5TLpkwCV XNYYto4L+IO4ddaxmO/BIlQYsHBUwH+wSUFnLhTOz1J5WMnoh8KlztAxoAhcf9oQkrfi lhYzeZ928WAXFhudQL5VXjY+7/To/y7IfPnGILrVqdtiuLdiTBMmjPYLKB2pLzKdPcF2 d3VCNKl6UGuaFDh+kTSv+egifLIFxgdPnORWNnT4vgLiVmpZ20knO25xAKr3SmTgsLPf p4Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727185051; x=1727789851; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=4A8kGvU3orKZPxRbbw08AO7P/RpWa47b+PGB9ZdXiRA=; b=lGbNCjxACz2UkIUNX3z+Cok8LDH+66Zje4h5SI89vYccDZdelrfOWev36QSvjBzb3G azRpNPRD7Khvf63aSVmDN2AbJTyD7oMi0VzI5n7cKta5Xs07BVv72nRwia3uYrlWOyHA MOiPRVqCYxyrZxsXtWM0Pl6UJSkj3G6d8hdTetNsEj+0ILt9tCLGjpRXs0EdVWWOvnwm oKvlCKJox0PJCCmVRKP5EEtDT9WtigschntNFa/vKlJLPZjKECBEPLYk7fZER5xyPuzU EjfCjFPxIq5HVkjoI/wbdOYsg9q5RQ1hlpDpNPSLp0dEm+8PEUUIFJc9z2Em1HaeE1Oj nhhQ== X-Forwarded-Encrypted: i=1; AJvYcCUkx6FcjECVC4e8+WMoMzqRm26ie/GufRhWr6dbPAPLfLmnEye7HcaXcMtHOzl4aIzmETlO2+BwAZqKhA==@gnu.org X-Gm-Message-State: AOJu0Yyj5yfEvjiLfJRivk1NO7S2LX7xqGGEr6qSPFwWZ51blYM15jvr wsR0eTVEAW27T3k7T1CFmSKPnle+58UtGZl0r3e6C/Roknl5UmCNZJKbDdAC X-Google-Smtp-Source: AGHT+IHKbpQRcfRmwMhddTA3rJuNbk9ldG1E7Ua8lGeWq0qAdmXaNzwL2+nK6n5P2oZhuooUlMlFjQ== X-Received: by 2002:a17:902:f68c:b0:201:dcb0:9fbf with SMTP id d9443c01a7336-20aed0c0dfemr47463915ad.15.1727185050593; Tue, 24 Sep 2024 06:37:30 -0700 (PDT) Original-Received: from localhost ([115.240.90.130]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20af17229c9sm10430515ad.85.2024.09.24.06.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2024 06:37:30 -0700 (PDT) In-Reply-To: <867cb1dw2h.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 24 Sep 2024 16:23:50 +0300") Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=visuweshm@gmail.com; helo=mail-pl1-x642.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:324033 Archived-At: [=E0=AE=9A=E0=AF=86=E0=AE=B5=E0=AF=8D=E0=AE=B5=E0=AE=BE=E0=AE=AF=E0=AF=8D = =E0=AE=9A=E0=AF=86=E0=AE=AA=E0=AF=8D=E0=AE=9F=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0= =AE=B0=E0=AF=8D 24, 2024] Eli Zaretskii wrote: >> From: Visuwesh >> Cc: pinmacs@cas.cat, rpluim@gmail.com, emacs-devel@gnu.org >> Date: Tue, 24 Sep 2024 18:20:21 +0530 >>=20 >> I haven't encountered many "multiple types available" scenario outside >> of Firefox and LibreOffice. In most cases, yank-media just does the >> thing without interrupting me but when the uncommon case of "multiple >> types available" crops up, I would like yank-media to choose the type I >> want automatically for me. In Org, I personally would make yank-media >> choose image/png. If you ask me for technical reasons to prefer >> image/png specifically, I cannot give you a concrete answer. It might as >> well be image/jpeg for all I care. I simply do not want to be asked a >> question when I'm focusing on writing. The point of the user option is >> to keep user interaction to a minimum. > > I think if PNG is supported by the running Emacs, it is always > preferable. (And we can come up with the list image formats ordered > by their preference, and use that to find the first available one.) > > I do agree that in many/most cases having Emacs deduce the best format > automatically is a very useful feature to have. I also agree that it > is useful to be able to see the list of available formats and choose > from them. So then we do agree. > I just think that these two extremities is all we need, provided that > we can come up with a good algorithm for deciding the "most > appropriate format" in each case. This is where we disagree: I think it would be best if we leave this choice to the user. I do not think it is possible to come up with a "one size fits all" solution that works across all the handlers. We could leave the job of deciding the "most appropriate format" to the major-mode but I am afraid it will only produce even more user options which would be too chaotic to manage.