[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Link preview generation with new link preview property
From: |
Karthik Chikmagalur |
Subject: |
Re: Link preview generation with new link preview property |
Date: |
Mon, 16 Dec 2024 19:42:39 -0800 |
>> Would it be possible to also handle image data in the function or
>> refactor the org-link-preview-file function in a way that the geometry
>> handling is done in a helper function which can be reused by other
>> handlers.
>
> There is such function: `org-display-inline-image--width'.
> We may consider exposing it as public function.
This will not be enough, we will also have to expose `org-image--align'
and the alignment code:
(when align
(overlay-put
ov 'before-string
(propertize
" " 'face 'default
'display
(pcase align
("center" `(space :align-to (- center (0.5 . ,image))))
("right" `(space :align-to (- right ,image)))))))
I don't think we can expect third party packages to figure out and
reimplement Org's image alignment logic.
Considering this, it might be better to just split
`org-link-preview-file' into two public functions, where the "inside"
function accepts an image instead of a file.
Karthik
- Link preview generation with new link preview property, Björn Bidar, 2024/12/08
- Re: Link preview generation with new link preview property, Karthik Chikmagalur, 2024/12/13
- Re: Link preview generation with new link preview property, Björn Bidar, 2024/12/13
- Re: Link preview generation with new link preview property, Ihor Radchenko, 2024/12/14
- Re: Link preview generation with new link preview property, Björn Bidar, 2024/12/16
- Re: Link preview generation with new link preview property, Ihor Radchenko, 2024/12/17
- Re: Link preview generation with new link preview property, Björn Bidar, 2024/12/19
- Re: Link preview generation with new link preview property, Ihor Radchenko, 2024/12/21
- Re: Link preview generation with new link preview property,
Karthik Chikmagalur <=
- Re: Link preview generation with new link preview property, Ihor Radchenko, 2024/12/17
- Re: Link preview generation with new link preview property, Björn Bidar, 2024/12/19
- Re: Link preview generation with new link preview property, Karthik Chikmagalur, 2024/12/19
- Re: Link preview generation with new link preview property, Ihor Radchenko, 2024/12/21
- Re: Link preview generation with new link preview property, Björn Bidar, 2024/12/23
- Message not available
- Re: Link preview generation with new link preview property, Karthik Chikmagalur, 2024/12/26
- Re: Link preview generation with new link preview property, Björn Bidar, 2024/12/29
- Re: Link preview generation with new link preview property, Ihor Radchenko, 2024/12/30
- Re: Link preview generation with new link preview property, stardiviner, 2024/12/18
- Re: Link preview generation with new link preview property, Karthik Chikmagalur, 2024/12/18