emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [ANN] Org mode 9.7 is out
@ 2024-06-02  9:42 Ihor Radchenko
  2024-06-02 11:40 ` Dr. Arne Babenhauserheide
  2024-06-02 16:30 ` Russell Adams
  0 siblings, 2 replies; 24+ messages in thread
From: Ihor Radchenko @ 2024-06-02  9:42 UTC (permalink / raw)
  To: emacs-orgmode

Dear all,

Org 9.7, a major release, is out.
Org 9.7 will be a part of Emacs 30.

You can upgrade from GNU ELPA or install with M-x package-install RET org RET

Please, also re-install all the Org-related packages - some of the
changes require re-compiling packages that use Org mode APIs.

Org 9.7 added a number of new features and customizations, all listed on
<https://orgmode.org/Changes.html>.

If you enjoy using Org, please consider supporting contributors via
<https://liberapay.com/org-mode/>. Donations do help a lot.

* Some highlights of user-facing additions

- Org mode supports drag-and-drop and pasting images/files from
  clipboard (pasting from clipboard requires Emacs >=29)

  Thanks to Visuwesh for contributing these features.

- id: links support search options like [[id:my-id::*child heading]]:
  Any valid fuzzy location will work as a search option.

  Contributed by Rick Lupton.

- Org mode honors ~display-buffer-alist~ settings for window placement

- Shell code blocks support asynchronous evaluation

  Contributed by Matthew Trzcinski, the new ob-shell maintainer.

- iCalendar export now handles recurring tasks

  Contributed by Jack Kamm, the new ox-icalendar maintainer.

- Face background in folded headings and blocks can extend to the right
  margin.  This is a small, tricky, but widely requested feature.

- Moving, promoting, and demoting headings/items honors region.

  You can now conveniently select multiple headings/items and use, for
  example, =M-<down>=/=M-<up>= repeatedly without losing the selection.

* Important changes in Org parser

Library authors and Elisp hackers, please pay attention to major changes
of Org parser API:

1. Parser uses lazy evaluation by default, for speed

2. Many Org mode functions can accept parser objects (or return value of
   `org-element-at-point' as arguments)

As a result of these changes, internal representation of Org parse tree
has been changed. Please use Org element API to access element/object
internals. All the details in <https://orgmode.org/Changes.html>.

* Development updates

I would also like to welcome new maintainers of Org mode libraries:

- Daniel Kraus is maintaining ob-sql and ob-clojure
- Matthew Trzcinski is maintaining ob-shell
- Jack Kamm is maintaining ox-icalendar (in addition to ob-python that
  he has been maintaining for the last 4 years)

We are still looking for additional maintainers of individual Org
libraries, especially ox-latex and ox-html. More than half of all the
Org libraries currently do not have any dedicated maintainer. Please
consider volunteering. See
https://orgmode.org/worg/org-maintenance.html#maintainer-role for more
details. Maintaining takes less effort than one may expect (see the
link).

This release was made possible thanks to many volunteer contributors:

Ihor Radchenko, Kyle Meyer, TEC, Matthew Trzcinski, Stefan Kangas, Max
Nikulin, Jack Kamm, Stefan Monnier, Matt Trzcinski, Gerard Vermeulen,
Rudolf Adamkovič, Leo Butler, Bastien Guerry, Morgan Smith, Mattias
Engdegård, Sławomir Grochowski, Aaron L. Zeng, Ilya Chernyshov, Po Lu,
Evgenii Klimov, Bruno BARBIER, Jeremie Juste, Juan Manuel Macias,
Sébastien Miquel, Alexander Adolf, Anand Deopurkar, Daniel Kraus, Eli
Zaretskii, Jens Schmidt, Liu Hui, Nicholas Vollmer, Pedro A. Aranda,
Pedro A. Aranda Gutierrez, Rick Lupton, Ruijie Yu, Andreas Gerler, Arash
Esbati, Basil L. Contovounesios, Damien Cassou, Gautier Ponsinet, Hraban
Luyat, Jonathan Gregory, Justin Vallon, Kevin Brubeck Unhammer, Lee
Thompson, Marco Wahl, Martin Marshall, Nathaniel Nicandro, Pedro Andres
Aranda Gutierrez, Stephen J. Eglen, Tim Ruffing, Visuwesh, Xi Lu, Yuval
Langer, Aaron Madlon-Kay, Akira Kyle, Alan Schmitt, Alexander Gogl,
Alexandre Avanian, Allen Li, Andras Simonyi, Andrew Hyatt, Antero Mejr,
Cook, Malcolm, David Masterson, Detlef Steuer, Dmitry Gutov, Dmitry
Logvinenko, Elias Kueny, Emacs User, Eric S Fraga, Feraidoon Mehri, Hugo
Heagren, Hunter Jozwiak, Jakub Ječmínek, Jan Zavitski, Jim Porter, Jim
Wisniewski, Joris Caravati, Joseph Turner, José Miguel García Urrutia,
Karl Fogel, Karthik Chikmagalur, Kenny Ballou, Kris Nelson, Laurence
Warne, Lei Zhe, Marc Nieper-Wißkirchen, Martin Edström, Martin Kampas,
Nafiz Islam, Nan JunJie, Nick Dokos, Olivier Lischer, Pedro A. Aranda
Gutiérrez, PolishEmacsUser, Psionik K, Robert Pluim, Roshan Shariff,
Ross Timson, Shynur, Steven Allen, Thierry Banel, Tim Landscheidt, Tim
Visher, Tom Gillespie, Tommy Kelly, Tomohisa Kuranari, Valentin
Herrmann, Zelphir Kaltstahl, hrdl, hugcis, libreville, stardiviner

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  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 16:30 ` Russell Adams
  1 sibling, 1 reply; 24+ messages in thread
From: Dr. Arne Babenhauserheide @ 2024-06-02 11:40 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

Ihor Radchenko <yantar92@posteo.net> writes:
> Org 9.7, a major release, is out.
> - Org mode supports drag-and-drop and pasting images/files from
>   clipboard (pasting from clipboard requires Emacs >=29)
> - Moving, promoting, and demoting headings/items honors region.

That’s great!

What happens when I paste an image?

> We are still looking for additional maintainers of individual Org
> libraries, especially ox-latex and ox-html. More than half of all the
> Org libraries currently do not have any dedicated maintainer. Please
> consider volunteering. See
> https://orgmode.org/worg/org-maintenance.html#maintainer-role for more
> details. Maintaining takes less effort than one may expect (see the
> link).

I wish I could join (I use both ox-latex and ox-html in
hobby-but-for-me-personally-critical tasks), but I’m already
overstretched.

Deepest thanks to all current maintainers for your great work!

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 11:40 ` Dr. Arne Babenhauserheide
@ 2024-06-02 12:07   ` Ihor Radchenko
  2024-06-02 14:01     ` Juergen Fenn
  0 siblings, 1 reply; 24+ messages in thread
From: Ihor Radchenko @ 2024-06-02 12:07 UTC (permalink / raw)
  To: Dr. Arne Babenhauserheide; +Cc: emacs-orgmode

"Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>> Org 9.7, a major release, is out.
>> - Org mode supports drag-and-drop and pasting images/files from
>>   clipboard (pasting from clipboard requires Emacs >=29)
>> - Moving, promoting, and demoting headings/items honors region.
>
> That’s great!
>
> What happens when I paste an image?

The image will be saved with automatically generated name near Org file
(or as attachment) and the link to the image will be inserted. Try it
and see.

All the aspects are configurable:
- org-yank-image-save-method
- org-yank-image-file-name-function
- org-yank-dnd-method
- org-yank-dnd-default-attach-method

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 12:07   ` Ihor Radchenko
@ 2024-06-02 14:01     ` Juergen Fenn
  2024-06-02 15:05       ` Ihor Radchenko
  0 siblings, 1 reply; 24+ messages in thread
From: Juergen Fenn @ 2024-06-02 14:01 UTC (permalink / raw)
  To: emacs-orgmode



Am 02.06.24 um 14:07 Uhr schrieb Ihor Radchenko:
> "Dr. Arne Babenhauserheide" <arne_bab@web.de> writes:
>
>> Ihor Radchenko <yantar92@posteo.net> writes:
>>> Org 9.7, a major release, is out.
>>> - Org mode supports drag-and-drop and pasting images/files from
>>>   clipboard (pasting from clipboard requires Emacs >=29)
>>> - Moving, promoting, and demoting headings/items honors region.
>> That’s great!
>>
>> What happens when I paste an image?
> The image will be saved with automatically generated name near Org file
> (or as attachment) and the link to the image will be inserted. Try it
> and see.

I'm on a Mac (M1 MB Air, Ventura).

GNU Emacs 29.3 (build 1, aarch64-apple-darwin22.6.0, NS appkit-2299.77
Version 13.6.5 (Build 22G621)) of 2024-03-24

When I drag and drop a jpg image to an Org buffer, Emacs opens the image
i new buffer, not in the Org buffer.

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?

Last, but not least: Thanks to everyone in the team for Org 9.7!

Regards,
Jürgen.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 14:01     ` Juergen Fenn
@ 2024-06-02 15:05       ` Ihor Radchenko
  2024-06-02 15:21         ` Juergen Fenn
  0 siblings, 1 reply; 24+ messages in thread
From: Ihor Radchenko @ 2024-06-02 15:05 UTC (permalink / raw)
  To: Juergen Fenn; +Cc: emacs-orgmode

Juergen Fenn <jfenn@gmx.net> writes:

>>> What happens when I paste an image?
>> The image will be saved with automatically generated name near Org file
>> (or as attachment) and the link to the image will be inserted. Try it
>> and see.
>
> I'm on a Mac (M1 MB Air, Ventura).
>
> GNU Emacs 29.3 (build 1, aarch64-apple-darwin22.6.0, NS appkit-2299.77
> Version 13.6.5 (Build 22G621)) of 2024-03-24
>
> 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?
(after getting the backtrace, you can cancel interruption via M-x cancel-debug-on-entry)

> 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.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 15:05       ` Ihor Radchenko
@ 2024-06-02 15:21         ` Juergen Fenn
  2024-06-02 18:05           ` Ihor Radchenko
  0 siblings, 1 reply; 24+ messages in thread
From: Juergen Fenn @ 2024-06-02 15:21 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode



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.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  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 16:30 ` Russell Adams
  1 sibling, 0 replies; 24+ messages in thread
From: Russell Adams @ 2024-06-02 16:30 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, Jun 02, 2024 at 09:42:30AM +0000, Ihor Radchenko wrote:
> Dear all,
>
> Org 9.7, a major release, is out.

> This release was made possible thanks to many volunteer contributors:
>
> Ihor Radchenko, Kyle Meyer, TEC, Matthew Trzcinski, Stefan Kangas, Max
> Nikulin, Jack Kamm, Stefan Monnier, Matt Trzcinski, Gerard Vermeulen,
> Rudolf Adamkovič, Leo Butler, Bastien Guerry, Morgan Smith, Mattias
> Engdegård, Sławomir Grochowski, Aaron L. Zeng, Ilya Chernyshov, Po Lu,
> Evgenii Klimov, Bruno BARBIER, Jeremie Juste, Juan Manuel Macias,
> Sébastien Miquel, Alexander Adolf, Anand Deopurkar, Daniel Kraus, Eli
> Zaretskii, Jens Schmidt, Liu Hui, Nicholas Vollmer, Pedro A. Aranda,
> Pedro A. Aranda Gutierrez, Rick Lupton, Ruijie Yu, Andreas Gerler, Arash
> Esbati, Basil L. Contovounesios, Damien Cassou, Gautier Ponsinet, Hraban
> Luyat, Jonathan Gregory, Justin Vallon, Kevin Brubeck Unhammer, Lee
> Thompson, Marco Wahl, Martin Marshall, Nathaniel Nicandro, Pedro Andres
> Aranda Gutierrez, Stephen J. Eglen, Tim Ruffing, Visuwesh, Xi Lu, Yuval
> Langer, Aaron Madlon-Kay, Akira Kyle, Alan Schmitt, Alexander Gogl,
> Alexandre Avanian, Allen Li, Andras Simonyi, Andrew Hyatt, Antero Mejr,
> Cook, Malcolm, David Masterson, Detlef Steuer, Dmitry Gutov, Dmitry
> Logvinenko, Elias Kueny, Emacs User, Eric S Fraga, Feraidoon Mehri, Hugo
> Heagren, Hunter Jozwiak, Jakub Ječmínek, Jan Zavitski, Jim Porter, Jim
> Wisniewski, Joris Caravati, Joseph Turner, José Miguel García Urrutia,
> Karl Fogel, Karthik Chikmagalur, Kenny Ballou, Kris Nelson, Laurence
> Warne, Lei Zhe, Marc Nieper-Wißkirchen, Martin Edström, Martin Kampas,
> Nafiz Islam, Nan JunJie, Nick Dokos, Olivier Lischer, Pedro A. Aranda
> Gutiérrez, PolishEmacsUser, Psionik K, Robert Pluim, Roshan Shariff,
> Ross Timson, Shynur, Steven Allen, Thierry Banel, Tim Landscheidt, Tim
> Visher, Tom Gillespie, Tommy Kelly, Tomohisa Kuranari, Valentin
> Herrmann, Zelphir Kaltstahl, hrdl, hugcis, libreville, stardiviner

Congrats on another successful release! Thank you to everyone who
continues to make Org mode possible!

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com
                                    https://www.adamsinfoserv.com/


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 15:21         ` Juergen Fenn
@ 2024-06-02 18:05           ` Ihor Radchenko
  2024-06-02 19:13             ` Juergen Fenn
  2024-06-03  9:11             ` Ihor Radchenko
  0 siblings, 2 replies; 24+ messages in thread
From: Ihor Radchenko @ 2024-06-02 18:05 UTC (permalink / raw)
  To: Juergen Fenn; +Cc: emacs-orgmode

Juergen Fenn <jfenn@gmx.net> writes:

>>> 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)

Looks like Mac does not follow XDND.
I think I know how to fix this.

>> 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.

Org normally asks you what format to insert, if multiple formats are
available from clipboard.

> [[attachment:clipboard-20240602T170643.tiff]]
> ----
>
> An export to Markdown and preview from Markdown-Mode in Firefox does not
> display the image:

That's questions to firefox/preview. But I think that you should simply
select a different format when pasting. tiff is not the most widely
supported format.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 18:05           ` Ihor Radchenko
@ 2024-06-02 19:13             ` Juergen Fenn
  2024-06-02 20:11               ` Ihor Radchenko
  2024-06-03  9:11             ` Ihor Radchenko
  1 sibling, 1 reply; 24+ messages in thread
From: Juergen Fenn @ 2024-06-02 19:13 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode, numbchild



Am 02.06.24 um 20:05 Uhr schrieb Ihor Radchenko:

>> Debugger entered--entering a function:
>> * dnd-open-local-file("file:/Users/juergenfenn/Desktop/test-file.jpeg"
>> private)
>
> Looks like Mac does not follow XDND.
> I think I know how to fix this.

Thanks, this would be fine.

>>> 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.
>
> Org normally asks you what format to insert, if multiple formats are
> available from clipboard.
>
>> [[attachment:clipboard-20240602T170643.tiff]]
>> ----
>>
>> An export to Markdown and preview from Markdown-Mode in Firefox does not
>> display the image:
>
> That's questions to firefox/preview. But I think that you should simply
> select a different format when pasting. tiff is not the most widely
> supported format.

Well, the image I used is this one. It was available because I had
downloaded it the other day:

https://www.europeana.eu/fr/item/2021012/_42FFE0B5C39B7F9819D6D3692B2F4154

The format is jpg. I have no idea why I get a tiff attachment when I try
to include a local jpg file. Maybe the macOS clipboard offers several
formats and Emacs/Org choses one option because it is offered first or
for some other reason? Or some kind of conversion plays into this on the
system level when copying to Emacs? Or there is something wrong or
unsusual with the jpg file, perhaps it was a tiff file in the first
place, later converted to jpg. I do not know.

There is one more thing: My Emacs init time has got slightly longer
since updating to Org 9.7.1 from ~1.9 to 2.273441 seconds. I
re-installed Org and the depending packages, as you recommended
(org-contrib, org-static-blog). No more changes, same setup as before.

@Christopher, thanks for your suggestion, I'll have a look if it fits
into my init file when I rework it mid summer.

Regards,
Jürgen.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 19:13             ` Juergen Fenn
@ 2024-06-02 20:11               ` Ihor Radchenko
  2024-06-02 21:17                 ` Juergen Fenn
  0 siblings, 1 reply; 24+ messages in thread
From: Ihor Radchenko @ 2024-06-02 20:11 UTC (permalink / raw)
  To: Juergen Fenn; +Cc: emacs-orgmode, numbchild

Juergen Fenn <jfenn@gmx.net> writes:

>> Org normally asks you what format to insert, if multiple formats are
>> available from clipboard.
> ...
> Well, the image I used is this one. It was available because I had
> downloaded it the other day:
>
> https://www.europeana.eu/fr/item/2021012/_42FFE0B5C39B7F9819D6D3692B2F4154
>
> The format is jpg. I have no idea why I get a tiff attachment when I try
> to include a local jpg file. Maybe the macOS clipboard offers several
> formats and Emacs/Org choses one option because it is offered first or
> for some other reason? Or some kind of conversion plays into this on the
> system level when copying to Emacs? Or there is something wrong or
> unsusual with the jpg file, perhaps it was a tiff file in the first
> place, later converted to jpg. I do not know.

Even Linux clipboard offers several formats if I copy from browser.
After M-x yank-media, I get "Several types, available, choose one:"
prompt, with options to choose from png/pbm/xbm/xpm/jpeg format. I
guess it is also tiff in your case. Just choose another format in that
prompt.

> There is one more thing: My Emacs init time has got slightly longer
> since updating to Org 9.7.1 from ~1.9 to 2.273441 seconds. I
> re-installed Org and the depending packages, as you recommended
> (org-contrib, org-static-blog). No more changes, same setup as before.

As it usually goes with the config, it can be anything.
Use profiler to reveal the cause.

One blind guess could be that Org mode loads more built-in libraries
(like yank-media library) now. So, loading might be slower. Not sure
about 0.4 seconds slower.

In future versions, I have a plan to rework the way Org mode loads,
aiming for faster load times among other things. (this is annoyingly
difficult task; like 300+-commits-and-no-end-in-sight level annoying)

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 20:11               ` Ihor Radchenko
@ 2024-06-02 21:17                 ` Juergen Fenn
  2024-06-03  5:06                   ` Visuwesh
  2024-06-29 21:01                   ` Juergen Fenn
  0 siblings, 2 replies; 24+ messages in thread
From: Juergen Fenn @ 2024-06-02 21:17 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode



Am 02.06.24 um 22:11 Uhr schrieb Ihor Radchenko:
> Juergen Fenn <jfenn@gmx.net> writes:
>
>>> Org normally asks you what format to insert, if multiple formats are
>>> available from clipboard.
>> ...
>> Well, the image I used is this one. It was available because I had
>> downloaded it the other day:
>>
>> https://www.europeana.eu/fr/item/2021012/_42FFE0B5C39B7F9819D6D3692B2F4154
>>
>> The format is jpg. I have no idea why I get a tiff attachment when I try
>> to include a local jpg file. Maybe the macOS clipboard offers several
>> formats and Emacs/Org choses one option because it is offered first or
>> for some other reason? Or some kind of conversion plays into this on the
>> system level when copying to Emacs? Or there is something wrong or
>> unsusual with the jpg file, perhaps it was a tiff file in the first
>> place, later converted to jpg. I do not know.
>
> Even Linux clipboard offers several formats if I copy from browser.
> After M-x yank-media, I get "Several types, available, choose one:"
> prompt, with options to choose from png/pbm/xbm/xpm/jpeg format. I
> guess it is also tiff in your case. Just choose another format in that
> prompt.

I'm afraid I forgot to mention that I don't get prompted, and I did not
copy the image from my webbrowser. Rather, I downloaded the jpg file
over Europeana's proxy from Finnish National Library and then copied
this one with Command-c in Finder (the macOS file manager) from local
system SSD. I do not understand how the tiff comes in here. But is is
there in the data folder Org created. I tried to open it in Preview, I
even changed the file ending to .jpg, but I cannot open it. The tiff
file seems to be corrupt.

>> There is one more thing: My Emacs init time has got slightly longer
>> since updating to Org 9.7.1 from ~1.9 to 2.273441 seconds. I
>> re-installed Org and the depending packages, as you recommended
>> (org-contrib, org-static-blog). No more changes, same setup as before.
>
> As it usually goes with the config, it can be anything.
> Use profiler to reveal the cause.
>
> One blind guess could be that Org mode loads more built-in libraries
> (like yank-media library) now. So, loading might be slower. Not sure
> about 0.4 seconds slower.
>
> In future versions, I have a plan to rework the way Org mode loads,
> aiming for faster load times among other things. (this is annoyingly
> difficult task; like 300+-commits-and-no-end-in-sight level annoying)

No need to worry about that.

Thanks, again. Have a good start to the new week.

Regards,
Jürgen.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 21:17                 ` Juergen Fenn
@ 2024-06-03  5:06                   ` Visuwesh
  2024-06-05  5:34                     ` Juergen Fenn
  2024-06-29 21:01                   ` Juergen Fenn
  1 sibling, 1 reply; 24+ messages in thread
From: Visuwesh @ 2024-06-03  5:06 UTC (permalink / raw)
  To: Juergen Fenn; +Cc: Ihor Radchenko, emacs-orgmode

[ஞாயிறு ஜூன் 02, 2024] Juergen Fenn wrote:

> Am 02.06.24 um 22:11 Uhr schrieb Ihor Radchenko:
>> Juergen Fenn <jfenn@gmx.net> writes:
>>
>>>> Org normally asks you what format to insert, if multiple formats are
>>>> available from clipboard.
>>> ...
>>> Well, the image I used is this one. It was available because I had
>>> downloaded it the other day:
>>>
>>> https://www.europeana.eu/fr/item/2021012/_42FFE0B5C39B7F9819D6D3692B2F4154
>>>
>>> The format is jpg. I have no idea why I get a tiff attachment when I try
>>> to include a local jpg file. Maybe the macOS clipboard offers several
>>> formats and Emacs/Org choses one option because it is offered first or
>>> for some other reason? Or some kind of conversion plays into this on the
>>> system level when copying to Emacs? Or there is something wrong or
>>> unsusual with the jpg file, perhaps it was a tiff file in the first
>>> place, later converted to jpg. I do not know.
>>
>> Even Linux clipboard offers several formats if I copy from browser.
>> After M-x yank-media, I get "Several types, available, choose one:"
>> prompt, with options to choose from png/pbm/xbm/xpm/jpeg format. I
>> guess it is also tiff in your case. Just choose another format in that
>> prompt.
>
> I'm afraid I forgot to mention that I don't get prompted, and I did not
> copy the image from my webbrowser. Rather, I downloaded the jpg file
> over Europeana's proxy from Finnish National Library and then copied
> this one with Command-c in Finder (the macOS file manager) from local
> system SSD. I do not understand how the tiff comes in here. But is is
> there in the data folder Org created. I tried to open it in Preview, I
> even changed the file ending to .jpg, but I cannot open it. The tiff
> file seems to be corrupt.
>

Please tell what is shown in the *Completions* buffer when you do M-x
yank-media-types RET after you copy the image to the clipboard.  I
suspect the problem is with the regexp used to detect the mime-type.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 18:05           ` Ihor Radchenko
  2024-06-02 19:13             ` Juergen Fenn
@ 2024-06-03  9:11             ` Ihor Radchenko
  1 sibling, 0 replies; 24+ messages in thread
From: Ihor Radchenko @ 2024-06-03  9:11 UTC (permalink / raw)
  To: Juergen Fenn; +Cc: emacs-orgmode

Ihor Radchenko <yantar92@posteo.net> writes:

>>>> 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)
>
> Looks like Mac does not follow XDND.
> I think I know how to fix this.

Should be fixed now, on the latest bugfix branch.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0477df8aa

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-03  5:06                   ` Visuwesh
@ 2024-06-05  5:34                     ` Juergen Fenn
  2024-06-05  6:01                       ` Visuwesh
  0 siblings, 1 reply; 24+ messages in thread
From: Juergen Fenn @ 2024-06-05  5:34 UTC (permalink / raw)
  To: Visuwesh; +Cc: Ihor Radchenko, emacs-orgmode



Am 03.06.24 um 07:06 Uhr schrieb Visuwesh:
> [ஞாயிறு ஜூன் 02, 2024] Juergen Fenn wrote:
>
>> Am 02.06.24 um 22:11 Uhr schrieb Ihor Radchenko:
>>> Juergen Fenn <jfenn@gmx.net> writes:
>>>
>>>>> Org normally asks you what format to insert, if multiple formats are
>>>>> available from clipboard.
>>>> ...
>>>> Well, the image I used is this one. It was available because I had
>>>> downloaded it the other day:
>>>>
>>>> https://www.europeana.eu/fr/item/2021012/_42FFE0B5C39B7F9819D6D3692B2F4154
>>>>
>>>> The format is jpg. I have no idea why I get a tiff attachment when I try
>>>> to include a local jpg file. Maybe the macOS clipboard offers several
>>>> formats and Emacs/Org choses one option because it is offered first or
>>>> for some other reason? Or some kind of conversion plays into this on the
>>>> system level when copying to Emacs? Or there is something wrong or
>>>> unsusual with the jpg file, perhaps it was a tiff file in the first
>>>> place, later converted to jpg. I do not know.
>>>
>>> Even Linux clipboard offers several formats if I copy from browser.
>>> After M-x yank-media, I get "Several types, available, choose one:"
>>> prompt, with options to choose from png/pbm/xbm/xpm/jpeg format. I
>>> guess it is also tiff in your case. Just choose another format in that
>>> prompt.
>>
>> I'm afraid I forgot to mention that I don't get prompted, and I did not
>> copy the image from my webbrowser. Rather, I downloaded the jpg file
>> over Europeana's proxy from Finnish National Library and then copied
>> this one with Command-c in Finder (the macOS file manager) from local
>> system SSD. I do not understand how the tiff comes in here. But is is
>> there in the data folder Org created. I tried to open it in Preview, I
>> even changed the file ending to .jpg, but I cannot open it. The tiff
>> file seems to be corrupt.
>>
>
> Please tell what is shown in the *Completions* buffer when you do M-x
> yank-media-types RET after you copy the image to the clipboard.  I
> suspect the problem is with the regexp used to detect the mime-type.
>

Sorry for my late reply. I have updated to Org 9.7.2 in the meanwhile.

M-x yank-media-types RET yields:

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

M-x yank-media RET still inserts an attachment with a tiff file that I
cannot open in Preview.

BTW, Org identifies with a rather longish string that used to be shorter
in Org 9.6:

Org mode version 9.7.2 (release_N/A-N/A-88dd2c @
/Users/juergenfenn/.emacs.d/elpa/org-9.7.2/)

Regards,
Jürgen.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-05  5:34                     ` Juergen Fenn
@ 2024-06-05  6:01                       ` Visuwesh
  2024-06-05 14:20                         ` Ihor Radchenko
  2024-06-05 16:03                         ` Juergen Fenn
  0 siblings, 2 replies; 24+ messages in thread
From: Visuwesh @ 2024-06-05  6:01 UTC (permalink / raw)
  To: Juergen Fenn; +Cc: Ihor Radchenko, emacs-orgmode

[புதன் ஜூன் 05, 2024] Juergen Fenn wrote:

> Am 03.06.24 um 07:06 Uhr schrieb Visuwesh:
>> [ஞாயிறு ஜூன் 02, 2024] Juergen Fenn wrote:
>>> [...]
>>> I'm afraid I forgot to mention that I don't get prompted, and I did not
>>> copy the image from my webbrowser. Rather, I downloaded the jpg file
>>> over Europeana's proxy from Finnish National Library and then copied
>>> this one with Command-c in Finder (the macOS file manager) from local
>>> system SSD. I do not understand how the tiff comes in here. But is is
>>> there in the data folder Org created. I tried to open it in Preview, I
>>> even changed the file ending to .jpg, but I cannot open it. The tiff
>>> file seems to be corrupt.
>>>
>>
>> Please tell what is shown in the *Completions* buffer when you do M-x
>> yank-media-types RET after you copy the image to the clipboard.  I
>> suspect the problem is with the regexp used to detect the mime-type.
>>
>
> Sorry for my late reply. I have updated to Org 9.7.2 in the meanwhile.
>
> 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.

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.  ]

BTW, we might have similar problems in Windows too.  See this thread in
emacs-devel when yank-media was initially added:
https://yhetil.org/emacs-devel/837ddk9tc8.fsf@gnu.org

> M-x yank-media RET still inserts an attachment with a tiff file that I
> cannot open in Preview.

Given the above, I hope you understand why this happens.

HTH.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-05  6:01                       ` Visuwesh
@ 2024-06-05 14:20                         ` Ihor Radchenko
  2024-06-06  6:20                           ` Visuwesh
  2024-06-05 16:03                         ` Juergen Fenn
  1 sibling, 1 reply; 24+ messages in thread
From: Ihor Radchenko @ 2024-06-05 14:20 UTC (permalink / raw)
  To: Visuwesh; +Cc: Juergen Fenn, emacs-orgmode

Visuwesh <visuweshm@gmail.com> writes:

> BTW, we might have similar problems in Windows too.  See this thread in
> emacs-devel when yank-media was initially added:
> https://yhetil.org/emacs-devel/837ddk9tc8.fsf@gnu.org

Looking at that thread, I see
https://yhetil.org/emacs-devel/YZ18W18vybG7Cb%2FH@idiocy.org/

+  /* Dictionary for looking up NS types from MIME types, and vice versa.  */
+  typeLookup
+    = [NSDictionary
+           dictionaryWithObjectsAndKeys:
+             @"text/plain",        NSPasteboardTypeURL,
+#if NS_USE_NSPasteboardTypeFileURL
+             @"text/plain",        NSPasteboardTypeFileURL,
+#else
+             @"text/plain",        NSFilenamesPboardType,
+#endif
+             @"text/html",         NSPasteboardTypeHTML,
+             @"text/plain",        NSPasteboardTypeMultipleTextSelection,
+             @"application/pdf",   NSPasteboardTypePDF,
+             @"image/png",         NSPasteboardTypePNG,
+             @"application/rtf",   NSPasteboardTypeRTF,
+             @"application/rtfd",  NSPasteboardTypeRTFD,
+             @"STRING",            NSPasteboardTypeString,
+             @"text/plain",        NSPasteboardTypeTabularText,
+             @"image/tiff",        NSPasteboardTypeTIFF,
+             nil];

For images, only image/png and image/tiff are listed for some reason. No
jpeg. (and no jpeg in the spec at
https://developer.apple.com/documentation/appkit/nspasteboardtype)

I suspect that image/tiff entry in the clipboard is garbled by Emacs.
We may want to report this as a bug.

We may also need to request a feature to support clipboard on MacOS
better. Using the same example image.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-05  6:01                       ` Visuwesh
  2024-06-05 14:20                         ` Ihor Radchenko
@ 2024-06-05 16:03                         ` Juergen Fenn
  1 sibling, 0 replies; 24+ messages in thread
From: Juergen Fenn @ 2024-06-05 16:03 UTC (permalink / raw)
  To: Visuwesh; +Cc: Ihor Radchenko, emacs-orgmode



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.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-05 14:20                         ` Ihor Radchenko
@ 2024-06-06  6:20                           ` Visuwesh
  2024-06-06 11:55                             ` Juergen Fenn
  0 siblings, 1 reply; 24+ messages in thread
From: Visuwesh @ 2024-06-06  6:20 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Juergen Fenn, emacs-orgmode

[புதன் ஜூன் 05, 2024] Ihor Radchenko wrote:

> Visuwesh <visuweshm@gmail.com> writes:
>
>> BTW, we might have similar problems in Windows too.  See this thread in
>> emacs-devel when yank-media was initially added:
>> https://yhetil.org/emacs-devel/837ddk9tc8.fsf@gnu.org
>
> Looking at that thread, I see
> https://yhetil.org/emacs-devel/YZ18W18vybG7Cb%2FH@idiocy.org/
>
> +  /* Dictionary for looking up NS types from MIME types, and vice versa.  */
> +  typeLookup
> +    = [NSDictionary
> +           dictionaryWithObjectsAndKeys:
> +             @"text/plain",        NSPasteboardTypeURL,
> +#if NS_USE_NSPasteboardTypeFileURL
> +             @"text/plain",        NSPasteboardTypeFileURL,
> +#else
> +             @"text/plain",        NSFilenamesPboardType,
> +#endif
> +             @"text/html",         NSPasteboardTypeHTML,
> +             @"text/plain",        NSPasteboardTypeMultipleTextSelection,
> +             @"application/pdf",   NSPasteboardTypePDF,
> +             @"image/png",         NSPasteboardTypePNG,
> +             @"application/rtf",   NSPasteboardTypeRTF,
> +             @"application/rtfd",  NSPasteboardTypeRTFD,
> +             @"STRING",            NSPasteboardTypeString,
> +             @"text/plain",        NSPasteboardTypeTabularText,
> +             @"image/tiff",        NSPasteboardTypeTIFF,
> +             nil];
>
> For images, only image/png and image/tiff are listed for some reason. No
> jpeg. (and no jpeg in the spec at
> https://developer.apple.com/documentation/appkit/nspasteboardtype)
>
> I suspect that image/tiff entry in the clipboard is garbled by Emacs.
> We may want to report this as a bug.
>
> We may also need to request a feature to support clipboard on MacOS
> better. Using the same example image.

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?

There was a bug report about yank-media failing in Mac yesterday or
thereabouts so I think the clipboard situation in Mac has a lot to
improve.  Hopefully with Org's yank-media support the situation will
improve.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-06  6:20                           ` Visuwesh
@ 2024-06-06 11:55                             ` Juergen Fenn
  2024-06-06 15:17                               ` Ihor Radchenko
  0 siblings, 1 reply; 24+ messages in thread
From: Juergen Fenn @ 2024-06-06 11:55 UTC (permalink / raw)
  To: Visuwesh, Ihor Radchenko; +Cc: emacs-orgmode



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?

> There was a bug report about yank-media failing in Mac yesterday or
> thereabouts so I think the clipboard situation in Mac has a lot to
> improve.  Hopefully with Org's yank-media support the situation will
> improve.

This was the other report yesterday:

https://lists.gnu.org/archive/html/help-gnu-emacs/2024-06/msg00015.html
https://lists.gnu.org/archive/html/help-gnu-emacs/2024-06/msg00017.html

Regards,
Jürgen.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-06 11:55                             ` Juergen Fenn
@ 2024-06-06 15:17                               ` Ihor Radchenko
  2024-06-06 20:41                                 ` Juergen Fenn
  0 siblings, 1 reply; 24+ messages in thread
From: Ihor Radchenko @ 2024-06-06 15:17 UTC (permalink / raw)
  To: Juergen Fenn; +Cc: Visuwesh, emacs-orgmode

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.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  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
  0 siblings, 2 replies; 24+ messages in thread
From: Juergen Fenn @ 2024-06-06 20:41 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Visuwesh, emacs-orgmode



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.

Regards,
Jürgen.


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-06 20:41                                 ` Juergen Fenn
@ 2024-06-17 21:16                                   ` JD Smith
  2024-06-18  1:03                                   ` JD Smith
  1 sibling, 0 replies; 24+ messages in thread
From: JD Smith @ 2024-06-17 21:16 UTC (permalink / raw)
  To: Juergen Fenn; +Cc: Ihor Radchenko, Visuwesh, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]



> 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.



[-- Attachment #2: Type: text/html, Size: 2861 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-06 20:41                                 ` Juergen Fenn
  2024-06-17 21:16                                   ` JD Smith
@ 2024-06-18  1:03                                   ` JD Smith
  1 sibling, 0 replies; 24+ messages in thread
From: JD Smith @ 2024-06-18  1:03 UTC (permalink / raw)
  To: Juergen Fenn; +Cc: Ihor Radchenko, Visuwesh, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 4655 bytes --]



> 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 data from the Mac clipboard into org documents as attachments, which I still use:  https://github.com/jdtsmith/org-mac-image-paste. 

With the recent work on yank-media I'm hopeful I can retire this package soon.  I found I could pull PDF data to file from the clipboard via AppleScript (and display in the emacs-mac build using its image-io backend), but used pngpaste[1] tool for PNG data.  When an image is on the clipboard, PNG data are indeed available from the clipboard («class PNGf»), as can be seen via AppleScript.  You can use AppleScript to inquire about the state of the clipboard.  For example, after taking a screenshot, I see:

% osascript -e "clipboard info"
«class PNGf», 121849, «class 8BPS», 401974, GIF picture, 21636, «class jp2 », 21831, JPEG picture, 35062, TIFF picture, 369790, «class BMP », 366218, «class TPIC», 285265

On copying an image from a website, I get:

% osascript -e "clipboard info"
TIFF picture, 91686, URL, 81, «class urln», 6, «class utf8», 81, «class rtfd», 2652, «class weba», 5679, «class HTML», 800, «class 8BPS», 103154, GIF picture, 681, «class jp2 », 5455, JPEG picture, 1059, «class PNGf», 6282, «class BMP », 44298, «class TPIC», 8066, «class ut16», 164, string, 81, Unicode text, 162

For images grabbed from web-pages, you can actually get the URL information if you like and include that in or near the attachment link.  

Here's after copying a GIF file from the Finder:

% osascript -e "clipboard info"
«class furl», 41, «class ut16», 24, «class utf8», 11, «class icns», 1137764, Unicode text, 22, string, 11, «class 8BPS», 1295026, GIF picture, 74698, «class jp2 », 110628, JPEG picture, 62209, TIFF picture, 4198020, «class PNGf», 305211, «class BMP », 4194442, «class TPIC», 796024

Notice the file-URL there, which you can get (here using the JXA=javascript flavor of AppleScript, with a UTI for the file-url, which is apparently the more modern way to do it):

% osascript -l JavaScript -e 'ObjC.import("AppKit"); $.NSPasteboard.generalPasteboard.stringForType("public.file-url");'
file:///Users/xxyz/Desktop/output.gif

You can even coerce the clipboard to be in a certain format:

% osascript -e "clipboard info"
TIFF picture, 35766, URL, 37, «class urln», 7, «class utf8», 37, «class rtfd», 1082, «class weba», 3643, «class HTML», 820, «class 8BPS», 9884, GIF picture, 434, «class jp2 », 4617, JPEG picture, 1268, «class PNGf», 1527, «class BMP », 32538, «class TPIC», 2446, «class ut16», 76, string, 37, Unicode text, 74

% osascript -e "set the clipboard to (the clipboard as JPEG picture)"

% osascript -e "clipboard info"                                      
JPEG picture, 1268, «class 8BPS», 8622, GIF picture, 687, «class jp2 », 4671, TIFF picture, 27704, «class PNGf», 2508, «class BMP », 24534, «class TPIC», 4372

My knowledge doesn't go any deeper than that but thought I'd share what I know.  

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

[-- Attachment #2: Type: text/html, Size: 9242 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [ANN] Org mode 9.7 is out
  2024-06-02 21:17                 ` Juergen Fenn
  2024-06-03  5:06                   ` Visuwesh
@ 2024-06-29 21:01                   ` Juergen Fenn
  1 sibling, 0 replies; 24+ messages in thread
From: Juergen Fenn @ 2024-06-29 21:01 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode



Am 02.06.24 um 23:17 Uhr schrieb Juergen Fenn:
>>> There is one more thing: My Emacs init time has got slightly longer
>>> since updating to Org 9.7.1 from ~1.9 to 2.273441 seconds. I
>>> re-installed Org and the depending packages, as you recommended
>>> (org-contrib, org-static-blog). No more changes, same setup as before.
>> As it usually goes with the config, it can be anything.
>> Use profiler to reveal the cause.
>>
>> One blind guess could be that Org mode loads more built-in libraries
>> (like yank-media library) now. So, loading might be slower. Not sure
>> about 0.4 seconds slower.
>>
>> In future versions, I have a plan to rework the way Org mode loads,
>> aiming for faster load times among other things. (this is annoyingly
>> difficult task; like 300+-commits-and-no-end-in-sight level annoying)
> No need to worry about that.

I just would like to thank you for reducing init time with

Org mode version 9.7.6 (9.7.6-7a4527 @
/Users/juergenfenn/.emacs.d/elpa/org-9.7.6/)

It is now down to 1.865443 seconds on

GNU Emacs 30.0.60 (build 1, aarch64-apple-darwin23.5.0, NS
appkit-2487.60 Version 14.5 (Build 23F79)) of 2024-06-29

Same configuration here as before.

Regards,
Jürgen.


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-06-29 21:02 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-06-29 21:01                   ` Juergen Fenn
2024-06-03  9:11             ` Ihor Radchenko
2024-06-02 16:30 ` Russell Adams

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).