From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: yank-media: allow users to limit image types that can be inserted Date: Mon, 23 Sep 2024 17:20:38 +0200 Message-ID: <87bk0eflbt.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> <87r09awgfo.fsf@gmail.com> 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="35757"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , pinmacs@cas.cat, emacs-devel@gnu.org To: Visuwesh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 23 17:21:20 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 1ssksK-0009CR-9X for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Sep 2024 17:21:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sskrm-000501-8X; Mon, 23 Sep 2024 11:20:46 -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 1sskrk-0004zY-70 for emacs-devel@gnu.org; Mon, 23 Sep 2024 11:20:44 -0400 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sskri-0001eX-I3; Mon, 23 Sep 2024 11:20:43 -0400 Original-Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42cbb08a1a5so42831655e9.3; Mon, 23 Sep 2024 08:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727104840; x=1727709640; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=2wv6DlvCrV5btU9VVMKrrhm9jx7N8vjTJYxKJDfd0bw=; b=JHoJB6xjOZ1he4md5okqMvbgWCsoGUZ3XSs5vXcHetpKoz0dXhIvfFpTS12LE7MdeQ doTr/WiKbUEvhyOVKCVTtVR6rtSLcs2RVDJpUjwf9EWq84liM+//fjzYsNgjH7OHKAIY 5YCbrN2R98uFiNZ/og75shHWMiJsG0lbIXjs9yDp1FgDJH5ujHX5flif0D60Mw/pijnV /xEKBVU8cH250lpELzgNF17Y5XlKRwOXB6WK0KcjirRGiPpmPb4UNqXPECD8kV+NuF9f XwtgPxpQ4MBdanQT0qBtogQrbqnpmInqYdq4GsDNHM506GTF4MgSVzHm4h191kqL+j3O jEYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727104840; x=1727709640; h=content-transfer-encoding:mime-version: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=2wv6DlvCrV5btU9VVMKrrhm9jx7N8vjTJYxKJDfd0bw=; b=oTME3FKpZYLNtLfutOvlit2nZ0oVwPi7BBVs2eWM1ffz2iNz758SWaxHbcjiprbBIM j4E1Gvgj+LfxQl40Jwygz8igIqnqgb/QnIa9Ql0p1BiK0DFPWIU/WqvY3UUzY8HHgo+J w2mW2TOTyUlMo0JM3wwoHU6AfjPd/sno0FGLKp7xTYlQFJB2/YbJVyl6s07OleRq5DYo QndJWreU0nHWZ7nwU/8ykykMbH/ZLFh0/Joylxm+/WqVUc15KQtNjdN5H6qZiYQOYwT6 4CthpxfpM0Z14WCkYowkjFm0/jX9Kr8pW2FKas1x1qvZrBSt5TAyqZ+f1yZMOjzicFQB NlAw== X-Forwarded-Encrypted: i=1; AJvYcCWyRrgllrUudIFWT+QWoifRgpyHP9ETJW7p7cALCtkd0/j3dKKC5IsU7cNtXgGNJY4sJfxG8c3bzpJyTw==@gnu.org X-Gm-Message-State: AOJu0YyMn7U8XwQr5pzhtcOTE91G4ZiC82j/pv5RvLHKgaJ+ttVngjVi uGdfh70GZCQDe5Fh5QzsfW/FTNGSa0ysx0BcNcPNOuZ/xxzaiEZgT+wYdg== X-Google-Smtp-Source: AGHT+IEiwj8/PKh3oJSvenlEdIxnxbmG2RObDR0yET0g4jq0ht2ipaM5yekhcmTxW0p3SiSZEhEHKg== X-Received: by 2002:a05:600c:1c04:b0:42c:bb41:a077 with SMTP id 5b1f17b1804b1-42e7ada4c7cmr80696335e9.23.1727104839755; Mon, 23 Sep 2024 08:20:39 -0700 (PDT) Original-Received: from rltb ([2a01:e0a:3f3:fb51:4318:aaaa:4cce:d340]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e7afdda8esm103237625e9.31.2024.09.23.08.20.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 08:20:39 -0700 (PDT) In-Reply-To: <87r09awgfo.fsf@gmail.com> (Visuwesh's message of "Mon, 23 Sep 2024 20:44:19 +0530") Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=rpluim@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:323966 Archived-At: >>>>> On Mon, 23 Sep 2024 20:44:19 +0530, Visuwesh sa= id: Visuwesh> [=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=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 23, 2024] Robert Pluim wrote: 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. >>=20 >> You have to register the yank-media-handler before the yank-media >> call, so org can=CA=BCt control this: it has to register for "image/= .*" >> because it can=CA=BCt know what formats will be presented to it. I g= uess 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 ju= st >> implement such handling in the yank-media code. Visuwesh> AFAIR the yank-media code, there's no way for the handlers to= reject a Visuwesh> specific format. yank-media, the command, asks the user the = type she Visuwesh> wants, _then_ calls the handler specific to that type. The h= andler Visuwesh> cannot influence anything during this interaction. You=CA=BCre right. So even more reason to put such filtering in the yank-media code. Robert --=20