From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2HTSOshF52ATGQEAgWs5BA (envelope-from ) for ; Thu, 08 Jul 2021 20:36:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 2GeENshF52CvaAAA1q6Kng (envelope-from ) for ; Thu, 08 Jul 2021 18:36:56 +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 198581211F for ; Thu, 8 Jul 2021 20:36:56 +0200 (CEST) Received: from localhost ([::1]:48664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1YtK-0001eq-7m for larch@yhetil.org; Thu, 08 Jul 2021 14:36:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Xx3-0002Yb-Nq for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 13:36:42 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:37476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1Xx1-0000We-9y for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 13:36:41 -0400 Received: by mail-wm1-x333.google.com with SMTP id y21-20020a7bc1950000b02902161fccabf1so4126084wmi.2 for ; Thu, 08 Jul 2021 10:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ZRmq+ofjOVyl+YbjppH8pYfL8EtMBy1JG9/+tPIH9cc=; b=Mktr8AExV2TfPosQ9laejg0qGHkiyxSpQJwCH/XCFXL5VkUyVLMUCSBVQFllVvn0lf KIpYV3ZkUZncrplub8K3GpoNhYLQazntjQMsqD2K8YyUvDLYTJe09aK547vz/lUPQ6bs tCuXK29i5vIBuA46a0NJhFu43K73dGQb6eUKqiUj5j9ipKKJEsSzo6wqD7SPQiPdY1LX 1BVbiy3xMswtQGx+FL0H8KhakMt4goNSym5XSmDrQmSMgCGJny1z/WdlZkFuuu/lX4nU bK0BEnOiOPhurFjKOIBARfXoYYA67kh8iYWV7cGjxE07CitnionZrPYST96doUp7+Ehd FiMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ZRmq+ofjOVyl+YbjppH8pYfL8EtMBy1JG9/+tPIH9cc=; b=M5ECSVOpvisyfPDUtziSS2vdzET6KARrDZouUYTaKVUIKmK15tCQF7u8Bk5t6VaxBZ Ojpcy1WZe3h/uy0lwYosCjy8F/nK16RpTblsvpRDmOSqXv5UpdlZWj4W77kwiUzLrU6k 6NbdMw0Wi6nkCoAr9ak3lNFx8u0AzHr20z2yNne1KGqY3Hmkws6vZbnrSWs9JLn61s2H nkwW05mAe2DO471KkFj3gcWsZnnPf5DldeNFVaIxNnNZbAvAMJY9Dx7Dz9t1ULynn193 lVZaRgTLMnFfrgxccPKU4GXX186SFMzyxI0RZ+MMJ3Cf1fx6+dEOIL/C0+9hhX9snAUH HoXQ== X-Gm-Message-State: AOAM530oUDLjhyYvESCIyn01a4nHhksEW2tWvX/Dv9H5nGMehbCXBYXp vWTxy72ts3g80I9TR5436XI= X-Google-Smtp-Source: ABdhPJx/A5Qyqhonuw46nUFXljsftHpPxPnhEO1boU1s2N+m4D2ONVcYToDEfsbVhOjXoXA+FmFfwA== X-Received: by 2002:a1c:9a12:: with SMTP id c18mr11129110wme.48.1625765797869; Thu, 08 Jul 2021 10:36:37 -0700 (PDT) Received: from aspire-5942 (p200300d86700b600b5fca10f44ab1c53.dip0.t-ipconnect.de. [2003:d8:6700:b600:b5fc:a10f:44ab:1c53]) by smtp.gmail.com with ESMTPSA id t6sm2856486wru.75.2021.07.08.10.36.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Jul 2021 10:36:37 -0700 (PDT) From: Marco Wahl To: Colin Baxter Subject: Re: [WDYT] org-attach-sync better remove an empty attachment directory? References: <87lf6h7ueq.fsf@gmail.com> <87o8bdljwn.fsf@gmail.com> <87y2ahi6zo.fsf@gmail.com> <87sg0ptere.fsf@gmail.com> <87zguxmcop.fsf@yandex.com> Date: Thu, 08 Jul 2021 19:36:27 +0200 In-Reply-To: <87zguxmcop.fsf@yandex.com> (Colin Baxter's message of "Thu, 08 Jul 2021 09:28:54 +0100") Message-ID: <87r1g8wvvo.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=marcowahlsoft@gmail.com; helo=mail-wm1-x333.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: Marco Wahl , Tim Cross , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625769416; 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=ZRmq+ofjOVyl+YbjppH8pYfL8EtMBy1JG9/+tPIH9cc=; b=a201oAyTShyC4whmOKP2VjR1QJyvdJAJcxJ0SRROYdCfSZXqGBl5R9UZgmzyOtYusKItn6 p8oWT9/q6HpfJUVmmmnOtZfIrLOlmTcw9i4EEUtbQ6yWSpBZznfacVsZlDKNpvIoznwQgQ A32VgWF8u3YjvhuN2qHsIHtjuo7VDgGiNV3A4EoZ79sZ07DLWamNj/r93axhEl5ELirpnO rFtuknXXEmr6JcY+GMZUw8AcZRMvgKuIP1sghDIUShQYGH9z9PTATZze+0s9u8NsEOBoWI BPYiJx4Il7h3uxTYPMkGreEyInt96gOx5eGxYXFEsDuhJEoCy1y7ZWviA+j8Kw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625769416; a=rsa-sha256; cv=none; b=enTygoEVBOy+WueCevkA3jEeilI7cleUUqV0n5zlp2i52XhVnp4H/zv/hPEKXd6SPxYUpk BXilwL6jcc3SCr9TsnpATfN51NlxZklGljjmB+Jx7jVXu9fiNwzA7h6sI9IQbHHlZq1Q+S 0HWr5QOXA84YHSZ27Iu++NpPNh1j1F8qZ5K3jyGRlrH8t7uCTbrZOJlrkSIe+gU9/E0aRC Wz9GVK2ap2ThBXHVxRsqC+LqbIO9ZcvLcq2V3Mi+36CRNrj0UgWw/lR97KvzW5LMBxkp8G 4FgXOIrPJxm5NXcu1DrNQLAzxSBPgTQeaQufXvCOJ42cbIpYERBdGsCEntxRnw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=Mktr8AEx; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Spam-Score: -0.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=Mktr8AEx; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 198581211F X-Spam-Score: -0.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7iH+q6arREeR Marco> Please recall that only empty attachment directories would be Marco> removed, so removal of a directory--and in particular one Marco> that existed before its interpretation as Org Marco> attachment--wouldn't be a big deal AFAICS. Tim> Not as confident here. I can imagine workflows and other Tim> external scripts which might expect a specific directory Tim> structure that could be broken if a directory was removed (even Tim> when empty). Hence my suggestion it needs to be something you Tim> can turn off. Tim> Likely this is something which should be controllable via a Tim> custom setting? Marco> To be honest I'd rather not make another customizable thing Marco> out of it to keep the overall complexity low. Marco> Marco> OTOH we could easily introduce e.g. customizable Marco> org-attach-delete-empty-dirs-on-sync. Tim> Appreciate the problem with far too many customization options, Tim> but when it comes to software 'automatically' doing something, Tim> like removal of an empty directory, especially when it might Tim> not have been responsible for creation of the directory, it is Tim> better to provide some way to allow the user to turn off the Tim> behaviour. I would default to having it enabled though. Colin> I'm afraid I for one often have empty attach directories Colin> which I leave alone knowing that one day soon - sometimes Colin> very soon - they will be used again. Cannot the user be asked Colin> if he wants the directory removed? Thanks Tim and Colin. We could introduce multiple possibilities to choose from. 1. Ask in case of an empty directory if it should be deleted. 2. Don't ask. Don't touch an empty directory. (The state now.) 3. Don't ask. Delete empty directory. We could also make 3. the default setting.