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: [BR] Clipboard support on macOS and Org 9.7 Date: Mon, 17 Jun 2024 14:05:04 +0200 Message-ID: <87cyofai6n.fsf@gmail.com> References: <1a472cbc-7e1e-4a9d-97fc-5cfbf3ff58fb@gmx.net> 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="24933"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, Ihor Radchenko , Visuwesh , "Christopher M. Miles" , Alan Third To: Juergen Fenn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 17 14:05:55 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 1sJB7Q-00067U-4u for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Jun 2024 14:05:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJB6p-0001XM-Kx; Mon, 17 Jun 2024 08:05:15 -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 1sJB6l-0001V0-Ux for emacs-devel@gnu.org; Mon, 17 Jun 2024 08:05:14 -0400 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJB6j-0002Ir-67 for emacs-devel@gnu.org; Mon, 17 Jun 2024 08:05:10 -0400 Original-Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3608545debbso2006955f8f.1 for ; Mon, 17 Jun 2024 05:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718625906; x=1719230706; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from:from :to:cc:subject:date:message-id:reply-to; bh=8iQyVR1ZetG+dGJJaoWN3ymYXj5Qq8IL9IFlr4ZSk0k=; b=N10xSX8WY3f7kOf4lpb80A0DSY4OrGaAiU+ftwig+8A5I4w/8MiDH47AWo/PdyBAF8 tvn356pnvCt1p7ZYqc26Ylb8xYLMiYdu/GEvVSAtUScTvZQv3TSdhvSrwT+v6jQfjCVI ejAYGhCTkM2bNRqAVy7u4sQ8xz71H5zvF6n89BRNRtxD6N3Mc8zkMQOob9IjhrsG1fl5 V2EUF4FlkXG8jarVTFisYYbLmd2c3Z9VhCKgO1Ku9iniTuO91dJMVZIXrhqJEsX9nCC8 dMb3DahK9xlffigyl7ExZFw6uydE5XEVK3JuClS2iN6rdceVMsj42D/Mt1eZ6UY9Sw1O lDeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718625906; x=1719230706; h=content-transfer-encoding:mime-version:message-id:date :gmane-reply-to-list:references:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8iQyVR1ZetG+dGJJaoWN3ymYXj5Qq8IL9IFlr4ZSk0k=; b=awr0es7HE014OIewv7fwUhWX8OHOPsNkG5c2KPyLYwek4xUOzUcHgHw05ct6CN+Fjw wP9EFOE1PrO9sIz/9GYWVL5lbPnP5tNcpRm07UTVPZbCYKobQG79PTNI5Mmn0quRNpsj 1qDY/pVPB3zC5ffQcmTAK2EGWmdvpw5mv0tKZ2HtN0rk7wAmW9rOjARYfSjwb0mW1iVz aZ033MDphYXxcIRyCqMjmkDOiCz64ddtPP1kUIjsN/1hWEEt9SUTk1GVANyws+FfI638 iwPxwM4W+RcN6AzUBIpvLtwy2fKzYtGJMi8zmuTramXS731Bk39ohNTlQYtjURIO6IWx znLw== X-Gm-Message-State: AOJu0YwewVCuSqDOBrSVqTA7tTCrFhdLRUjCGxZA7EQDmOYs1HzazEWF jr1WmwyUUE5040K8CM2jW2ZXRs7BFzrhCj1eXm/J931IHUYS/v6y X-Google-Smtp-Source: AGHT+IFoervnyIJVBTNY3BDC5p0AdIrPAE1Bd3cQUq7tNfWJiRFUZN6gTXNWqHA4ZmNCv1hNXxIXpQ== X-Received: by 2002:a5d:50c8:0:b0:35e:4f42:6016 with SMTP id ffacd0b85a97d-3607a75b684mr7352614f8f.30.1718625906155; Mon, 17 Jun 2024 05:05:06 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f2263sm11868945f8f.83.2024.06.17.05.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 05:05:05 -0700 (PDT) In-Reply-To: <1a472cbc-7e1e-4a9d-97fc-5cfbf3ff58fb@gmx.net> (Juergen Fenn's message of "Sun, 16 Jun 2024 23:22:14 +0200") Gmane-Reply-To-List: yes Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=rpluim@gmail.com; helo=mail-wr1-x42c.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, T_SCC_BODY_TEXT_LINE=-0.01 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:320208 Archived-At: >>>>> On Sun, 16 Jun 2024 23:22:14 +0200, Juergen Fenn said: Juergen> You might like to know that upgrading to Sonoma meant that I h= ad to Juergen> re-compile my Emacs 29.3 because the one I had built under Ven= tura would Juergen> not run any more on the new platform. I managed to re-compile = Emacs from Juergen> the 29.3 tarball I had used on Ventura, but I realised that I = cannot Juergen> compile Emacs under Sonoma with gnutls. Although the latest gn= utls is Juergen> installed on my machine (I even re-installed gnutls over Homeb= rew) and Juergen> though this posed no problem under Ventura, I had to use =3D./= configure Juergen> --with-gnutls=3Difavailable=3D. Perhaps there were some change= s to the Apple Juergen> Command Line Tools, too, that I re-installed for Sonoma. I can= install Juergen> new packages with package.el, but Emacs now keeps telling me t= hat Juergen> =3DPackage tls is deprecated=3D. That means you=CA=BCre using the cli tools, not the GnuTLS library. Perhaps you need to have pkg-config installed as well in order for configure to find the includes and the library. Juergen> Anyway, I have tested the clipboard bug with Org 9.7.4 on GNU = Emacs 29.3 Juergen> (build 1, aarch64-apple-darwin23.5.0, NS appkit-2487.60 Versio= n 14.5 Juergen> (Build 23F79)) of 2024-06-09. Here is what I can reproduce: Juergen> - Open the file manager Finder and select a local jpg file. Juergen> - Press Command-c to copy the file to the clipboard. Juergen> - Switch to an Org buffer in Emacs. Juergen> - M-x yank-media. Juergen> It turns out that any file, regardless of its real format, get= s attached Juergen> with a TIFF file ending. Juergen> M-x yank-media-type yields: Juergen> (1/3) Yank type: Juergen> clipboard:image/tiff Juergen> clipboard:STRING Juergen> clipboard:text/plain Yep Juergen> Ihor found out that MIME type support in macOS indeed is incom= plete: Juergen> https://lists.gnu.org/archive/html/emacs-orgmode/2024-06/msg00= 063.html 'ns_get_foreign_selection' queries the clipboard to see what types are available, and those are the ones it reports. Based on a quick google, if we were to say "give me the data as JPEG anyway", there=CA=BCs a chance it might work, but of course the source might actually be TIFF, or PNG. I can=CA=BCt find an official API to query the macOS clipboard for which types it supports, but then again Apple=CA=BCs docs site and I rarely get along. Robert --=20