From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id KAC0HhTpNWYBbgEA62LTzQ:P1 (envelope-from ) for ; Sat, 04 May 2024 09:51:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id KAC0HhTpNWYBbgEA62LTzQ (envelope-from ) for ; Sat, 04 May 2024 09:51:48 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="EueUlTx/"; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714809108; h=from:from:sender:sender: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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gkj71gDi9s8AmRPWHkS9ZC2dnX7qzkEe2W33FNCDO14=; b=ijgr7h7hICZvDdZqKRmSAjhrQgg4Fvv3EzUpu2JZVH7QZW93sndlbU14fXzxctkigaPdPs 6NOj/aYJGrxpwFMeXDlENUDmScaR6aE5ecGNv6ET6Q3ONYVp2/xtaFI5SBdHWWSt6g8BQ/ RFYI3YD1Ks0B+NCkci8O8EHgjDafbe0qjiYk7UOr1Jalwm1lLxEjXp9XkPIiaj+fAm6f7K JW6J5J0tI0xbPSZO5fwml/RJD+jOuxz/FGJy6Vpq9d9tMzft2XONDlvNVF6NaoclOnhZ7y vksBF8q+m9qQwwu/DNYUDy1mrDcVP/e076ClIEVwp7BSrFK+2Py6QsjllHZEHg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714809108; a=rsa-sha256; cv=none; b=b7zTFUwbef3PtDApPRaD5SreCEI4wyHCYYlAq7nuCY66PkD/BWbtzGI9wJLeinBAKFBJSJ rp1G0l8pzhzormH+xR7jdUN+QYvfrumeswjetosZfRc9d49DNDGhd17DHbBi8OpA2G1QHg DZlW4igbgXqQx4Mxyw1raeQniKrXwiFGeMYY5iW+snNMmfoH3LurBqTpNCS+BVEoSi/vQB 5ITmdu7s3mAijN25vqcgz8hBx/VabWjC9PZCHsPTVjuZJqLRyZmGAPf+WNxU1hFaRI2TR2 94kxHeMWaYHhkzeKjSZG85rptm8m6Jii1nOcIZAoF3+OL6drq1KsGVHvbcESpg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="EueUlTx/"; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" 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 3C1C41C6A for ; Sat, 04 May 2024 09:51:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3AAl-0007ET-FW; Sat, 04 May 2024 03:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3AAj-0007Db-LQ for emacs-orgmode@gnu.org; Sat, 04 May 2024 03:51:05 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3AAh-0000U1-4l for emacs-orgmode@gnu.org; Sat, 04 May 2024 03:51:05 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7B728240105 for ; Sat, 4 May 2024 09:51:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1714809060; bh=PrVv0bZ9j35XSFNXLCSX5VTEQ/hUj02/4A379vKrlco=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=EueUlTx/jCzaFdRy/Y/LlFa6OUukf1saV66h8e5ZuYRs8YYwJYggRAYogvmaNqLuS 0Wne/UzRW8epw09ep/J2lr6ze9bR9weuQgSn7wfcnqKNOj/HRTGNOohzKQw3dCUhSg 6MYdj+2jFEdvA01MOH1KtigTyW9UDHtEtp/fHoETEy6CUv2nJdYUcMrdiLgsvY6iVx 6X7IiuV50mUSnzEjclk020z9lkqs7QPLrsUBjR1r00pgHnfYHlBcWbnXujUb/SxT4k wokG3oQL8FVjfv9UvUbB7ySn4Xf0ARWScWuCTWE2OZr1LC7JuuOBNKAzLINpjqYZ0L k6AbrRkJomhZg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VWfxH3zClz6twr; Sat, 4 May 2024 09:50:59 +0200 (CEST) From: Ihor Radchenko To: Karthik Chikmagalur Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] Attachments not resolved correctly from symlinked Org files In-Reply-To: <875xvxk1bj.fsf@gmail.com> References: <87ttjl8cf9.fsf@gmail.com> <87h6fjz07g.fsf@localhost> <875xvxk1bj.fsf@gmail.com> Date: Sat, 04 May 2024 07:52:12 +0000 Message-ID: <87seyydnf7.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.60 X-Spam-Score: -6.60 X-Migadu-Queue-Id: 3C1C41C6A X-Migadu-Scanner: mx11.migadu.com X-TUID: STr4ONQ4UFA6 Karthik Chikmagalur writes: >> I can see the problem. >> But what would you expect to happen if there was no attachment in the >> original directory? Should the attachment be created relative to the >> original file? To the symlink? > > I don't know. I would expect the attachment to always be created > relative to the original file, but other users might have the opposite > expectation. What about the approach we already use in `org-attach-id-to-path-function-list' - check if an attachment directory already exists, generated using any rule, and only if not, create a new? Similarly, in `org-attach-dir', we can first check local attachment directory and return it if it exists. Then, we check attachment directory for the symlink source, and return it when it exists. If none exists, create attachment locally or relative to the symlink source, according to some customization. The default will be creating locally, to follow the existing behavior. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at