Am 02.06.24 um 17:05 Uhr schrieb Ihor Radchenko:
>> When I drag and drop a jpg image to an Org buffer, Emacs opens the image
>> i new buffer, not in the Org buffer.
>
> Interesting.
> May you try M-x debug-on-entry RET dnd-open-local-file RET
> Then, drop an image, and share the backtrace displayed?
----
Debugger entered--entering a function:
* dnd-open-local-file("file:/Users/juergenfenn/Desktop/test-file.jpeg"
private)
dnd-handle-one-url(#<window 25 on notizbuch.org> private
"file:/Users/juergenfenn/Desktop/test-file.jpeg")
ns-drag-n-drop((drag-n-drop (#<window 25 on notizbuch.org> 46478 (115
. 566) 0 nil 46478 (12 . 31) nil (61 . 8) (9 . 18)) (file
(ns-drag-operation-generic ns-drag-operation-copy
ns-drag-operation-link) "/Users/juergenfenn/Desktop/test-file.jpeg")))
funcall-interactively(ns-drag-n-drop (drag-n-drop (#<window 25 on
notizbuch.org> 46478 (115 . 566) 0 nil 46478 (12 . 31) nil (61 . 8) (9 .
18)) (file (ns-drag-operation-generic ns-drag-operation-copy
ns-drag-operation-link) "/Users/juergenfenn/Desktop/test-file.jpeg")))
call-interactively(ns-drag-n-drop nil nil)
command-execute(ns-drag-n-drop)
----
>> When I copy the jpg file in Finder and paste it C-y to the Org buffer,
>> the file name appears. No org syntax for including an image is added.
>>
>> Is there anything else I have to do?
>
> Yes, you need to use M-x yank-media, not C-y.
Thank you, this indeed did the trick. Now, Org created an attachment,
but not the original jpeg was added. Instead org added a tiff file in a
subfolder of the org file working directory. However, I cannot open it
in Preview as a tiff file.
----
* Test
:ATTACH:
:PROPERTIES:
:ID: 063E1B8B-2EDA-47FD-88C6-A220F3DCA23F
:END:
[[attachment:clipboard-20240602T170643.tiff]]
----
An export to Markdown and preview from Markdown-Mode in Firefox does not
display the image:
----
# Inhaltsverzeichnis
1. [Test](#org82bf039):ATTACH:
<a id="org82bf039"></a>
# Test :ATTACH:
<file:///Users/juergenfenn/Documents/Projekte/org/data/06/3E1B8B-2EDA-47FD-88C6-A220F3DCA23F/clipboard-20240602T170643.tiff>
----
Thanks, again.
Regards,
Jürgen.