From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 6MpkEIst8l/5TAAA0tVLHw (envelope-from ) for ; Sun, 03 Jan 2021 20:48:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2Nw0DIst8l+gdwAAbx9fmQ (envelope-from ) for ; Sun, 03 Jan 2021 20:48:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 919FE9404E5 for ; Sun, 3 Jan 2021 20:48:10 +0000 (UTC) Received: from localhost ([::1]:32864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwAIK-0000P5-M1 for larch@yhetil.org; Sun, 03 Jan 2021 15:48:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36952) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwAHB-0000Oy-NE for emacs-orgmode@gnu.org; Sun, 03 Jan 2021 15:46:57 -0500 Received: from out0.migadu.com ([94.23.1.103]:12326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwAH8-0004L6-Is for emacs-orgmode@gnu.org; Sun, 03 Jan 2021 15:46:57 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kyleam.com; s=key1; t=1609706811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G+XGftCs4KFyQASZ3pw0jdTXFzLM+vxdN2vWn1Ypw+A=; b=knbWW6fGN3bfEv4nGlxsn9L78ziNnEq4p6alnIxQgXccTnoORPPeqGMIvALpa/5X16FJPp ZA6TZnD7g4qfh9xGNh9gldqGqVZaJGjTGsR5L+huIPcr1Z20b/c2vPpAP77JHko9QdLdtz YKq/YZe09JO3hWycvuKKwsFVGTOjjZW9mIpGeyFj69zJeYbAyjieVrs8divDdSIr1mAX9C memhGhDirpnYNdCs3JCOtC+GrJdGhsW5DUaCd9WKvggR/9kq+klFqmhoE4CBqcJDQhM7qw ZlGBiK1w/DxJGMulkzn9CmtKywDjFuVn4sbwTBk8siCj9Rp+UOzeaoS8/tRWaA== From: Kyle Meyer To: Pablo Palazon Subject: Re: Problems with attachment links in exported files In-Reply-To: References: Message-ID: <87a6tpd9zb.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Migadu-Auth-User: kyle@kyleam.com Date: Sun, 03 Jan 2021 20:46:50 GMT Received-SPF: pass client-ip=94.23.1.103; envelope-from=kyle@kyleam.com; helo=out0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kyleam.com header.s=key1 header.b=knbWW6fG; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 919FE9404E5 X-Spam-Score: -2.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: WICbybCuUTZg 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 org-agenda-colorized-blocks.png and the image is rendered inline. Could you provide a minimal reproducer for the issue you see?