On Jun 6, 2024, at 4:41 PM, Juergen Fenn <jfenn@gmx.net> wrote:



Am 06.06.24 um 17:17 Uhr schrieb Ihor Radchenko:
Juergen Fenn <jfenn@gmx.net> writes:

Am 06.06.24 um 08:20 Uhr schrieb Visuwesh:
Thanks for the analysis.  Given that Alan says GNUStep cannot handle
non-text clipboard items, I cannot propose anything myself.  It would be
nice if a Mac user can write a report and send it to the Emacs
developers.  Perhaps Juergen can do it?

Of course, I /could/ do this, but given the fact that you have already
found out about /some/ internals wouldn't it be better a macOS/NextStep
developer would look into this in the first place and hence write the
report with some somre insight?

Unfortunately, there are no MacOS developers among Org mode maintainers.
I personally do not even have access to MacOS for testing.

Since you at least can test things on MacOS, it would be helpful if you
can create the recipe suitable for Emacs devs to reproduce the
problem. They may also ask extra information from your MacOS.


I see. Thanks for explaining. So, I will write a bug report that draws
on our discussion and send it to emacs-devel over the weekend.

My switch from Ventura to Sonoma shortly may make things more
complicated, as I cannot foresee in howmuch the two platforms differ
under the hood, but I'm afraid I cannot postpone the upgrade.

A few years ago, I wrote a small package for pasting PNG and PDF into org documents as attachments, which I still use: org-mac-image-paste:  https://github.com/jdtsmith/org-mac-image-paste

With the recent work on yank-media I'm hopeful I can retire this tool soon (see the bottom of that page).  I found I could pull PDF data from the clipboard via AppleScript (and display in the emacs-mac build using its image-io backend), but had to use the pngpaste tool for PNG data.  PNG data are indeed included on the clipboard («class PNGf»), and can be seen via AppleScript.

The code for pngpaste might be informative: https://github.com/jcsalterego/pngpaste/blob/main/pngpaste.m.