emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pablo Palazon <pablo.palazon@gmail.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Problems with attachment links in exported files
Date: Sun, 3 Jan 2021 22:53:23 +0100	[thread overview]
Message-ID: <CAOKwhjtbUU++b03C+vjKNgKZryxwmHhTs7d0GvVoajdA5XvVLA@mail.gmail.com> (raw)
In-Reply-To: <87a6tpd9zb.fsf@kyleam.com>

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

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="file:///tmp/org-attach-export-test-Surcu0/data/ad/4bdf8f-a28e-4621-a1e4-dc772ed6d531/org-agenda-colorized-blocks.png"
>     alt="org-agenda-colorized-blocks.png" />
> and the image is rendered inline.
> Could you provide a minimal reproducer for the issue you see?

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

      reply	other threads:[~2021-01-03 21:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-03  9:12 Problems with attachment links in exported files Pablo Palazon
2021-01-03 20:46 ` Kyle Meyer
2021-01-03 21:53   ` Pablo Palazon [this message]

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:

  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=CAOKwhjtbUU++b03C+vjKNgKZryxwmHhTs7d0GvVoajdA5XvVLA@mail.gmail.com \
    --to=pablo.palazon@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \


* 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


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