emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with attachment links in exported files


From: Pablo Palazon
Subject: Re: Problems with attachment links in exported files
Date: Sun, 3 Jan 2021 22:53:23 +0100

Thanks Kyle!, While I was reading your message I checked that my org-mode version was outdated. I configured org-mode repository, but I didn't install the latest org-mode version. So I'm sorry for that. I've tried your snippet, and it works perfectly. Thank you for you time, I appreciate it.

On Sun, Jan 3, 2021 at 9:46 PM Kyle Meyer <kyle@kyleam.com> wrote:
Pablo Palazon writes:

> Hi everyone!
>
> I've had a trouble with attachment type link on exporting. I configured
> org-attach directory and using org-id and it works great on emacs, all
> those links work great. I can see any attach linked on org notes, but in
> exported files all those links point to local directory instead of the
> right attached folder.
>
[...]
> I tried to use
>
> (add-hook 'org-export-before-parsing-hook 'org-attach-expand-links)
>
> And it works except for inline images, but I don't understand why is not on
> org-mode repository code.

Hmm, I'm not sure what you mean by the last part.  The snippet you show
is in the Org repo, specifically in org-attach.el:

  https://code.orgmode.org/bzg/org-mode/src/release_9.4.4/lisp/org-attach.el#L750

I'm not an org-attach user, so I might be missing something obvious, but
I wasn't able to trigger the issue with inline links.  Here's what I
tried using the default configuration on the master branch (c3888a8b7):

  (require 'org-attach)
  (let ((default-directory (make-temp-file "org-attach-export-test-" t)))
    (with-current-buffer (find-file-noselect "scratch.org")
      (insert "* h1\n\n")
      (org-attach-url
       "https://orgmode.org/worg/images/agenda/org-agenda-colorized-blocks.png")
      (insert "attachment:org-agenda-colorized-blocks.png")
      (org-open-file (org-html-export-to-html))))

That output includes

    <img
    src="">     alt="org-agenda-colorized-blocks.png" />

and the image is rendered inline.

Could you provide a minimal reproducer for the issue you see?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]