emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Juergen Fenn <jfenn@gmx.net>
To: Visuwesh <visuweshm@gmail.com>
Cc: Ihor Radchenko <yantar92@posteo.net>, emacs-orgmode@gnu.org
Subject: Re: [ANN] Org mode 9.7 is out
Date: Wed, 5 Jun 2024 18:03:17 +0200	[thread overview]
Message-ID: <cd3e8d89-7651-4a23-947c-0f9def6f87d7@gmx.net> (raw)
In-Reply-To: <877cf47wso.fsf@gmail.com>



Am 05.06.24 um 08:01 Uhr schrieb Visuwesh:
>> M-x yank-media-types RET yields:
>>
>> Yank type:
>> clipboard:image/tiff
>> clipboard:STRING
>> clipboard:text/plain
> I'm afraid there's nothing much we can do.  IIUC, you copy the file from
> a file manager, so Org expects clipboard to be something like
>
>     Possible completions are:
>     clipboard:x-special/gnome-copied-files
>     primary:...
>
> where clipboard:x-special/gnome-copied-files gives
>
>     copy
>     file:///home/viz/tmp/2-gnus_stipple.png
>
> but given there's neither image/jpeg nor a special type like the above,
> Org's yank-media copies the image/tiff data (the regexp used by Org
> looks for mime-types that match the regexp "image/.*").
> I am guessing clipboard:text/plain contains the link to the file, am I
> right?  But this feels fragile to rely on.
>
> What happens when you copy multiple images to the clipboard from the
> file manager?  Is there a difference in yank-media-types' output?  What
> if you copy a non-image file to the clipboard? Say a PDF file.

If I copy Command-c two different jpg files in Finder, Org seems not to
be able to process any file. There is only

clipboard:STRING
clipboard:text/plain

in the completions buffer, no image MIME type.

When I try M-x yank-media RET I get the message:

user-error: No handler in the current buffer for anything on the clipboard

But it is getting even more weird when I try a different MIME type, say
PDF, as you suggested. I've just tried the latest LaTeX News 39 which
happens to be on my desktop. It has not been published yet, but you can
easily compile it yourself from
<https://github.com/latex3/latex2e/blob/develop/base/doc/ltnews39.tex>.
Copy with Command-c from Finder, then M-x yank-media RET also yields:

clipboard:image/tiff
clipboard:STRING
clipboard:text/plain

While M-x yank-media RET yields:

----
* Test
:ATTACH:
:PROPERTIES:
:ID:       105A314B-BCA8-41CC-8ED8-FA97F70AAE85
:END:

[[attachment:clipboard-20240605T174306.tiff]]
-----

and now I am indeed prompted for the =Yank type= from the three options
above. I can select with Cursor-up or Cursor-down.

- If I select image/tiff the PDF is added in plain text, it seems.
- Selecting STRING simply pastes the filename =ltnews39.pdf= to buffer.
- Selecting text/plain pastes the path to the file to buffer.

> I don't have access to a Mac but if you can find documentation on how
> Finder puts the relevant data in the clipboard, that would be useful.
> [ In Linux, you expect the x-special/gnome-copied-files or somesuch
>   TARGET.  ]

I'm afraid I cannot provide this information because I am not a
developer, so I don't know which documents to consult for this.

I just would like to add that such internals in macOS may change over
time. I'm on Ventura, which is not the latest version of macOS, that's
Sonoma. Its successor macOS 15 will probably be released in a few
months. Even the way self-compiled Emacs is run are said to vary from
one version to another. I cannot tell because I did not compile Emacs
before I switched to Ventura, but I trust such reports are true.

Regards,
Jürgen.


  parent reply	other threads:[~2024-06-05 16:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02  9:42 [ANN] Org mode 9.7 is out Ihor Radchenko
2024-06-02 11:40 ` Dr. Arne Babenhauserheide
2024-06-02 12:07   ` Ihor Radchenko
2024-06-02 14:01     ` Juergen Fenn
2024-06-02 15:05       ` Ihor Radchenko
2024-06-02 15:21         ` Juergen Fenn
2024-06-02 18:05           ` Ihor Radchenko
2024-06-02 19:13             ` Juergen Fenn
2024-06-02 20:11               ` Ihor Radchenko
2024-06-02 21:17                 ` Juergen Fenn
2024-06-03  5:06                   ` Visuwesh
2024-06-05  5:34                     ` Juergen Fenn
2024-06-05  6:01                       ` Visuwesh
2024-06-05 14:20                         ` Ihor Radchenko
2024-06-06  6:20                           ` Visuwesh
2024-06-06 11:55                             ` Juergen Fenn
2024-06-06 15:17                               ` Ihor Radchenko
2024-06-06 20:41                                 ` Juergen Fenn
2024-06-17 21:16                                   ` JD Smith
2024-06-18  1:03                                   ` JD Smith
2024-06-05 16:03                         ` Juergen Fenn [this message]
2024-06-03  9:11             ` Ihor Radchenko
2024-06-02 16:30 ` Russell Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd3e8d89-7651-4a23-947c-0f9def6f87d7@gmx.net \
    --to=jfenn@gmx.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=visuweshm@gmail.com \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).