emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BR] Clipboard support on macOS and Org 9.7


From: Robert Pluim
Subject: Re: [BR] Clipboard support on macOS and Org 9.7
Date: Mon, 17 Jun 2024 14:05:04 +0200

>>>>> On Sun, 16 Jun 2024 23:22:14 +0200, Juergen Fenn <jfenn@gmx.net> said:
    Juergen> You might like to know that upgrading to Sonoma meant that I had to
    Juergen> re-compile my Emacs 29.3 because the one I had built under Ventura 
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 gnutls 
is
    Juergen> installed on my machine (I even re-installed gnutls over Homebrew) 
and
    Juergen> though this posed no problem under Ventura, I had to use 
=./configure
    Juergen> --with-gnutls=ifavailable=. Perhaps there were some changes 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 that
    Juergen> =Package tls is deprecated=.

That means youʼre 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 Version 
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, gets 
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 
incomplete:

    Juergen> 
https://lists.gnu.org/archive/html/emacs-orgmode/2024-06/msg00063.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ʼs a chance
it might work, but of course the source might actually be TIFF, or PNG.

I canʼt find an official API to query the macOS clipboard for which
types it supports, but then again Appleʼs docs site and I rarely get
along.

Robert
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]