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 14:57:19 +0300 Message-ID: <86plote02o.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> <87r09awgfo.fsf@gmail.com> <86h6a6fjki.fsf@gnu.org> <87msjxwsqm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6458"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, pinmacs@cas.cat, emacs-devel@gnu.org To: Visuwesh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 24 13:58: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 1st4BD-0001VJ-Tx for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Sep 2024 13:58:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1st4Ab-0002gz-7G; Tue, 24 Sep 2024 07:57:29 -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 1st4AY-0002gg-Il for emacs-devel@gnu.org; Tue, 24 Sep 2024 07:57:26 -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 1st4AX-00005Y-P7; Tue, 24 Sep 2024 07:57:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=oDB1SwJTh5BipmO7bbr1HgvroO5A4zM/3liNG3CA39U=; b=chGAUf1Q0Ae2EpOmOncJ YoaFAFoGlUSriJBjRjHS5A+hkLhdubkM6fcMHClVosyOhCZPC6TxGWVEYbIclr/co44qQv1Ls+RvH J3wx5h6zW+Gqy5RX8HB0XNoVNfZm9iwLZtlwgRv6BvY1oNmG6QatdFSTnu9qhPuSpBciMU8pqZenx JMeU7XKRhujXOw7ADHeubaVtpzSgNm+dV3pPy+EyHEdI6j6W6Lp9QYXl3v5StsRF2SMhPm3602ME8 nPSpgN8lhd0E0U7BK8rYpZZ5PMpGk/VF4PgQildMqM8DuGPcKIW0CBG1/FigaBCBBwdozVJJZjLDR LEepgUjM3Jr+Eg==; In-Reply-To: <87msjxwsqm.fsf@gmail.com> (message from Visuwesh on Tue, 24 Sep 2024 10:30:49 +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:324020 Archived-At: > From: Visuwesh > Cc: rpluim@gmail.com, pinmacs@cas.cat, emacs-devel@gnu.org > Date: Tue, 24 Sep 2024 10:30:49 +0530 > > [திங்கள் செப்டம்பர் 23, 2024] Eli Zaretskii wrote: > > >> AFAIR the yank-media code, there's no way for the handlers to reject a > >> specific format. yank-media, the command, asks the user the type she > >> wants, _then_ calls the handler specific to that type. The handler > >> cannot influence anything during this interaction. > > > > This is true, but I don't see how it is relevant to what I suggested. > > I was replying to this part: > > The issue at hand here, AFAIU, is not the UI, but how Lisp programs > (and Org in particular) can control this. > > My point was that there is little control over this UI from the handlers > type since the handler cannot filter the types available. OK, but then my point was that a Lisp program _can_ control this by customizing the list of handlers. It could even replace all the handlers with its own single handler, which could then call the other handlers according to some logic, thus working around the fact that there's no mechanism currently for a handler to refuse to handle the type for which it is registered.