From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QMsRKURF8GaDmgAAe85BDQ:P1 (envelope-from ) for ; Sun, 22 Sep 2024 16:26:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id QMsRKURF8GaDmgAAe85BDQ (envelope-from ) for ; Sun, 22 Sep 2024 18:26:44 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Me78yAjl; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727022404; 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=2O9gHOX6sd/ks/NJLZ0wCympzQyzTubwMeoNUILumMs=; b=LfwTSwMtA+d+rAWffxzjIWZG7BATtmzKEtFPp2EsZd4BmOAsu8l2c3Nwjg1WyWZCHRkIQ2 zkUO5AcAu5/A/IaQU0dqD308isGHFjlgyA4eDiIdjPz1nyeEUoLoF7Hsi9Usg5/X9NQuoO MV6nOeAqh6UnMzxn9DBn5Pud56t2EtUSOfMhGqwT8Bbkp7iEHSD5peoZDAQggozK+igqE3 +HlcFNqsKiUYP6XPmGJ4rb7Pr/2ZLntM8U3zfY1iALSLVh7cJ2NXgcLXUYMgwlm5LACVML wD+2VpxQNWdgRu9seUX2uvJycPoxd9o5M3ZPK2tQJ81QEx2be8bYUqcvwt01vw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Me78yAjl; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727022404; a=rsa-sha256; cv=none; b=HGb1jGKnvbBllL/xdJmX3CtFEBiXoDnrtchJCSL1czboLFCKVcgMjlIr5wr19GXfXcLjJL bVGPD4n3PSV4q1FPQQ+AnHbFUDYr2F0ewHkIqNxBf5L5UyHr2BJU3ovo+v7t5hf1GScSDs SrQ7L/cOL92tD8SscDu3WNYHV3p7OarjJEro1eLQb5+g+Q41qD6f1QkC6jxX6pb57EIcsU iZjDW+i8bRD7IMmmRYcjVTo6dPQZlc/4TrTckswKIacrfhFSKKZtwsQosFMmWf9rZJsadg nVKQo3/vPI5Mb6wFimSb5QZOtGeKWWUHcnRMOzaJCGYjfwepiUW9OJpN9Ve+Ng== 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 747866FFD3 for ; Sun, 22 Sep 2024 18:26:44 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ssPPD-0003Yk-7Y; Sun, 22 Sep 2024 12:25:51 -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 1ssPPC-0003YZ-2w for emacs-orgmode@gnu.org; Sun, 22 Sep 2024 12:25:50 -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 1ssPP9-0001ut-NG for emacs-orgmode@gnu.org; Sun, 22 Sep 2024 12:25:49 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 223BF240101 for ; Sun, 22 Sep 2024 18:25:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1727022346; bh=i0TGvxQ/lOmKYRncDtqMbLn1yOWHSeVGkAzhuJcU8XI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Me78yAjl7xrf6PpFFkYbGPzSSu4ArdAKVbX4koGaM4WK91rlTZOgbhSmpno7CLAW7 FPgJUTdZBBfMO+bmjYedpj2qXXBIUSpfFGRWMGfJoJJ1WebWgDvCMCbMix8rC/vkO5 WVsvppZ/zMiX43AddV3QiVTda2UgpICwgYbBhTXcXvI72kJpZxSsOYQJX7mAKwnZfT 1/q4w/ylbdYzl+TqKbW921lytESXLDlosyE7TzfWi9zaKhOgi3o90fXtxm04QlM68h sNl2S+EA+DbnYDZ7yXszszZXdIICMFc9npRa1lcEpGvmRXzo683ZjkSDo/1fp0sq+a eSxY6Z8Y9SBhw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XBWh92H2kz9rxK; Sun, 22 Sep 2024 18:25:45 +0200 (CEST) From: Ihor Radchenko To: "Christopher M. Miles" Cc: Org mode mailing list Subject: Re: [PATCH] put `org-attach-after-change-hook` at the end of org-attach In-Reply-To: <66d5608d.170a0220.998ef.c484@mx.google.com> References: <66d5608d.170a0220.998ef.c484@mx.google.com> Date: Sun, 22 Sep 2024 16:27:21 +0000 Message-ID: <87zfnzpsba.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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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-Queue-Id: 747866FFD3 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -9.75 X-Migadu-Spam-Score: -9.75 X-TUID: 0grKkc2dUjOM "Christopher M. Miles" writes: > Subject: [PATCH] org-attach.el: put org-attach-after-change-hook at the end > > lisp/org-attach.el (org-attach-attach): Put org-attach-after-change-hook > at the end to make sure user can access attach link in org-store-links. I have no problem with the change, but I'd like to point out that link may or may not be present in the list of stored links depending on `org-attach-store-link-p'. So, checking stored links from the hook is unreliable. And remember that `org-attach-after-change-hook' may be called in other scenarios; not necessarily when a new file is attached. Instead, it might make more sense to pass the information about file changes (if available) to the hook itself directly. For example, we may obsolete `org-attach-after-change-hook' and introduce `org-attach-after-change-functions'. Then, we pass attachment dir + list of changed files to that new abnormal hook. WDYT? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at