emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Björn Bidar" <bjorn.bidar@thaodan.de>
Cc: Karthik Chikmagalur <karthikchikmagalur@gmail.com>,
	emacs-orgmode@gnu.org
Subject: Re: Link preview generation with new link preview property
Date: Sat, 14 Dec 2024 07:04:51 +0000	[thread overview]
Message-ID: <87pllug2y4.fsf@localhost> (raw)
In-Reply-To: <87jzc3nnaq.fsf@>

Björn Bidar <bjorn.bidar@thaodan.de> writes:

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

> The link element passed towards the handler didn't contain the
> description e.g. in this case file:https://stable.melpa.org/packages/rpm-spec-mode-badge.svg.

This is expected. See https://orgmode.org/worg/dev/org-element-api.html#org22c967a
You can access the contents by looking at buffer text between
:contents-begin and :contents-end. Either directly, or by invoking
sub-parser on the text.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>


  reply	other threads:[~2024-12-14  7:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6755f138.0c0a0220.40388.51fbSMTPIN_ADDED_BROKEN@mx.google.com>
2024-12-13  5:49 ` Link preview generation with new link preview property Karthik Chikmagalur
2024-12-14  0:03   ` Björn Bidar
2024-12-14  7:04     ` Ihor Radchenko [this message]
2024-12-08 19:18 Björn Bidar

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=87pllug2y4.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=bjorn.bidar@thaodan.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=karthikchikmagalur@gmail.com \
    /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).