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.bugs Subject: bug#71377: 30.0.50; command `yank-meida` raise error (wrong-type-argument sequencep TARGETS) Date: Wed, 05 Jun 2024 17:03:48 +0200 Message-ID: <87plsvig8b.fsf@gmail.com> References: <6660303d.170a0220.36c52b.a875@mx.google.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="14903"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71377@debbugs.gnu.org To: "Christopher M. Miles" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 05 17:56:32 2024 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 1sEt04-0003c0-Fv for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 05 Jun 2024 17:56:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEszS-0002jl-4O; Wed, 05 Jun 2024 11:55:54 -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 1sEszQ-0002jD-M4 for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 11:55:52 -0400 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 1sEszP-0006Jj-TV for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 11:55:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sEszd-0004vK-TO for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2024 11:56:05 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2024 15:56:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71377 X-GNU-PR-Package: emacs Original-Received: via spool by 71377-submit@debbugs.gnu.org id=B71377.171760292018752 (code B ref 71377); Wed, 05 Jun 2024 15:56:05 +0000 Original-Received: (at 71377) by debbugs.gnu.org; 5 Jun 2024 15:55:20 +0000 Original-Received: from localhost ([127.0.0.1]:44438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEsyq-0004s5-Gb for submit@debbugs.gnu.org; Wed, 05 Jun 2024 11:55:20 -0400 Original-Received: from mail-lj1-f169.google.com ([209.85.208.169]:56499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sEsCM-0002hT-Fu for 71377@debbugs.gnu.org; Wed, 05 Jun 2024 11:05:15 -0400 Original-Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2eaafda3b90so44185271fa.0 for <71377@debbugs.gnu.org>; Wed, 05 Jun 2024 08:04:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717599830; x=1718204630; darn=debbugs.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=ATxaMW+nQXIn6rK+s4fCOiTsV9S0OG0jObFpRjkFokE=; b=WIJzqU/DuJl5P6UVxIo01LV0mzm9XSp9aQFVLSQHtYQCPmlnwoyIMMqGsrN/hrhyrb uZZgKPLJIyUrvwmMj4l32xgQVg9aXBhKd+/87Oopxde3pe2uErvWVAG8QqFTmwtcgBYh wEzndvxJYHyMuori61L0HO+AWD6Z9/+tIavrFITylNEZC8JxsNSDz+it+hSa2jcg440P 0UNHAzKMDH0y7pu6dX2EEL1i/L+An8845/er1kAZtWi39Qc1pWcMQy90vKNnWWjE84is zAAzFV6LK5YUPzXaw917DyOgkgxvpJml7MpBO+2snmaD5c/16fvgigv98eQbZUWNeujl 7wkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717599830; x=1718204630; 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=ATxaMW+nQXIn6rK+s4fCOiTsV9S0OG0jObFpRjkFokE=; b=jPtvN7lwNM8ga1Oob/PmwueUYbSn9bd3J+3V5bvcPR0PS16N/AsOiZr9m7Jvk1BG0G 88eNwPOHuRmS4C9XqIofq8InqLbJJnhFp0d5t4HslHNnA7vSDJ0ZA58/XpILIgAIwkrL GBxuf5BhEVK+PuIypsR0hx6epd8tn7kE5YxXjA3yrgK89YcSkrTMVJ5+uYweKm+wP27f 38CN/6kQashy79Bf6YWSk3Zu4abfUKxhm1THUUPFPrYODUFq0JJ0wZyoAk3NN9KTwT6B fRAECtuPNShbPLA2fRTChDxfDLQ+iuj2SOV2aBfWyzvY9eaQGLp7se/TKizyepwZZhWO gD3w== X-Gm-Message-State: AOJu0YyMCWINsr5o90WRdgun93ET51Ue1QYuHdjIktMTMs5lJZYkybuE yGH2SBhIr0iRHYwMiLypvK7eLDOgj4HuVO7zCdbQla6XdB+8oALQ0NYxpQ== X-Google-Smtp-Source: AGHT+IFDPk8OCvHCU5bhN/Bn2CZkR75cSJFttfM2v6HfGjruwy0UeMfjqHeFCzM1jWd27HZo5F7IFQ== X-Received: by 2002:a2e:b74c:0:b0:2ea:7d38:d4a9 with SMTP id 38308e7fff4ca-2eac7a932fdmr14961111fa.52.1717599829731; Wed, 05 Jun 2024 08:03:49 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215813c9c3sm24494235e9.43.2024.06.05.08.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 08:03:49 -0700 (PDT) In-Reply-To: <6660303d.170a0220.36c52b.a875@mx.google.com> (Christopher M. Miles's message of "Wed, 05 Jun 2024 17:30:30 +0800") 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:286614 Archived-At: >>>>> On Wed, 05 Jun 2024 17:30:30 +0800, "Christopher M. Miles" said: Christopher> ----------------------------------------------------------= -------------- Christopher> When I execute command `yank-media` in Org-mode buffer to = paste the Christopher> copied image from web browser. Christopher> I meet the bellowing error (I got it through `toggle-debug= -on-error`): Christopher> #+begin_example Christopher> Debugger entered--Lisp error: (wrong-type-argument sequenc= ep TARGETS) Christopher> mapc(#f(compiled-function (elt) #) TARGETS) Christopher> seq-do(#f(compiled-function (elt) #) TARGETS) Christopher> #f(compiled-function #'sequence #)(#f(compiled-function (elt) #) TARGETS) Christopher> apply(#f(compiled-function #'sequence #) #f(compiled-function (elt) #) TA= RGETS nil) Christopher> seq-map(#f(compiled-function (elt) #) TARGETS) Christopher> seq-filter(#f(compiled-function (type) #) TARGETS) Christopher> yank-media--find-matching-media("x/special-\\(?:gnome|KD= E|mate\\)-files") Christopher> #f(compiled-function () (interactive nil) #)() Christopher> apply(#f(compiled-function () (interactive nil) #) nil) Christopher> yank-media() Christopher> funcall-interactively(yank-media) Christopher> call-interactively(yank-media nil nil) Christopher> command-execute(yank-media) Christopher> #+end_example Christopher> For a test, I copy an image in Arc web browser: Christopher> source image URL: https://img1.doubanio.com/view/photo/raw= /public/p2895245009.jpg Christopher> My environment: Christopher> - GNU Emacs 30.0.50 (build 2, aarch64-apple-darwin23.4.0, = NS appkit-2487.50 Version 14.4.1 (Build 23E224)) Christopher> of 2024-05-14 Christopher> - Org mode: 9.7-pre Christopher> - macOS: appkit-2487.50 Version 14.4.1 (Build 23E224) On macOS, if there is a selection active, then it is returned, even when `yank-media' is actually querying to see which media types are supported. The following fixes it for me, but I don=CA=BCt know a great deal about the selection code on macOS. diff --git a/src/nsselect.m b/src/nsselect.m index bb6679cd2ab..f5cef42eacc 100644 --- a/src/nsselect.m +++ b/src/nsselect.m @@ -205,6 +205,9 @@ Updated by Christian Limpach (chris@nice.ch) Lisp_Object target_type) { Lisp_Object local_value; + if (EQ (selection_name, QCLIPBOARD) + && EQ (target_type, QTARGETS)) + return Qnil; local_value =3D assq_no_quit (selection_name, Vselection_alist); return local_value; } Robert --=20