1

The question itself might be confusing given I'm using the word embed here, which have different meaning. What i mean by that is:

  • Embed like what chat.stackoverflow does. Say I'm posting a single SO/SE link (from a post) on any chat on SO/SE, it will embed like so:

embedded test

Where this is the embedded link (do bear in mind this is just an example to illustrate what i mean, and not intended to be the final form).

Basically, what i mean by embed is either:

  • Show a part of the link, either at the start, end or any wanted part?
  • Show the whole content of the link in current buffer, but in a separate block (so it doesn't clutter any other existing text in the current buffer)

I'm also aware of possibly related things, like org-screenshot, though it's not exactly what i want, but still useful.

How could i do this?

10
  • yes, but I'm indirectly asking this to be made in elisp. Though it is true I wasn't sure of which tags would be right for this post - Any recommendation is welcome :) @Drew Sep 29 '20 at 22:53
  • nevermind, just saw you edited the tag. Disregard what i said in my last comment :D @Drew Sep 29 '20 at 22:54
  • 1
    You might want to check my Emacs extension org-link-beautify (github.com/stardiviner/org-link-beautify) It provides video preview. The implementation is here github.com/stardiviner/org-link-beautify/blob/master/… I think you can use similar way to embed URL content. (P.S If you want to implement this feature, PR welcome) Sep 30 '20 at 3:50
  • 1
    I learnt the feature via Discourse's Onebox which "turning media URLs into simple HTML previews of the resource", it requires the target websites supports some protocols such as facebook opengraph and twitter card, these info is easy to get since they are part of the HTML meta headers, StackExchange supports both. Not sure what you want, Emacs is a plain text environment it's char-by-char not pixel by pixel unlike the web browser.
    – xuchunyang
    Sep 30 '20 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.