From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#75116: [PATCH] Make 'yank-media' autoselect the best media type Date: Mon, 06 Jan 2025 19:05:20 +0000 Message-ID: <8734hvhifj.fsf@localhost> References: <87o70yeiih.fsf@gmail.com> <86r05uxx4i.fsf@gnu.org> <871pxtcxiq.fsf@gmail.com> <86r05sro63.fsf@gnu.org> <87bjwkbls7.fsf@gmail.com> <87cygzhjw9.fsf@localhost> <868qrn6alg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39358"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pinmacs@cas.cat, rpluim@gmail.com, 75116@debbugs.gnu.org, visuweshm@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 06 20:04:35 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tUsOw-000A5p-Ts for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jan 2025 20:04:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUsOT-0002LZ-P7; Mon, 06 Jan 2025 14:04:06 -0500 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 1tUsOR-0002LB-R4 for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 14:04:03 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUsOR-0005Ui-4v for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 14:04:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=tM1DMLiH3zyLnl4wFZWDb9YU1YtNno5ueTMwl3CoarI=; b=sSinRwBXmNMVe5Usds5qsbThhxtSaYPWhNTFBw8mRDZcR6kl04Hw17LuEihrX5w/99vlMaiAtzXEGLqQ9ePCZ9ODXDrLodJkqCSab9dc/XjPebmTEJgtqq2q8nBSQq9czLqDCynCv6o1TqyZ4KouxvWcMKLKX7nb3OEdEKqzvlOzJg8s5Dp5hT5bBWqhisYlHA+2pXMv71XCB0m2y98zd+bYeJguPRW0qgz4htddhjsfayWMtlsvxq+ziZ6DRXLbjXs7dkJLkUDrFoPAYMYurlYOLv811MWuN00/1iF1Y0dgnJ0R6xtotr57VOcGlyBDlh9CxHkwy+5LQjmZNJWyJQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUsOQ-00051x-G6 for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 14:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jan 2025 19:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75116 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 75116-submit@debbugs.gnu.org id=B75116.173619019919258 (code B ref 75116); Mon, 06 Jan 2025 19:04:02 +0000 Original-Received: (at 75116) by debbugs.gnu.org; 6 Jan 2025 19:03:19 +0000 Original-Received: from localhost ([127.0.0.1]:40096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUsNf-00050L-29 for submit@debbugs.gnu.org; Mon, 06 Jan 2025 14:03:18 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:36439) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUsNb-000500-Oa for 75116@debbugs.gnu.org; Mon, 06 Jan 2025 14:03:13 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1FF47240101 for <75116@debbugs.gnu.org>; Mon, 6 Jan 2025 20:03:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1736190184; bh=3xmSIh/11RuliO/93XUS1I1DoMPJvPV3Pqk9ZGI9u80=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=lu+8X8c+e8tm2/9bOA8b06PxnsyyYXB4OoJiIV/25VYe2oEDdR8JZzmfhCEEjmRbp x50cJ07pGg9SmuVqK0plkCf2OJpHLU2KuioxazohSwz1cMcFFiV4xvN2DhU2xAEqMP FehT8AK3aghck6gA06o7y6GKS8tnDsxPgzx+drbOhkEVtciM2esEHRd10nz1fz3LT2 CWfr+4/Ey/OelLIUR+HGTlS0hVtXRHkc1drWpK4m/V8j81vFCOhnVEf9JB5eeETxL1 GJ3kYBHBhRXvSMpAsqXnik0A6p64PsNnSDzSDDTZPTOUophj3/rmERCOjNrBlFA9OF PWXLPcGHht3ZA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4YRk8j5kf4z9rxF; Mon, 6 Jan 2025 20:03:01 +0100 (CET) In-Reply-To: <868qrn6alg.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298688 Archived-At: Eli Zaretskii writes: >> >>> User asks to autoselect: >> >>> 1. autoselect-function (a-s-f) returns one media type: we yank it. >> >> >> >> Yes. >> >> >> >>> 2. a-s-f returns multiple media types: we ask the user which one >> >>> to yank. >> >> >> >> No, we use the first one. > ... > That's what I mean by "ask": use the default behavior of the command. > > Conceptually, it's the same as the paste operation in other > applications: by default, the application decides which of the formats > to use, and if the user wants to choose, he/she needs to pop up a menu > of available formats in some way and select from there. I see the logic. I still find returning a list of mimetypes useful though - if user wants to implement an additional filter on top of a-s-f provided by major mode, having a list of mimetypes as input is more flexible. But we need to document that the final choice will be taken as the first element from what a-s-f (possibly adviced) returns. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at . Support Org development at , or support my work at