From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WJkOD4Fb52CvPQEAgWs5BA (envelope-from ) for ; Thu, 08 Jul 2021 22:09:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KNy0CoFb52CoPAAA1q6Kng (envelope-from ) for ; Thu, 08 Jul 2021 20:09:37 +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 61C7B130FB for ; Thu, 8 Jul 2021 22:09:36 +0200 (CEST) Received: from localhost ([::1]:57036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1aL0-0004O4-FX for larch@yhetil.org; Thu, 08 Jul 2021 16:09:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1ZiX-0001M3-Eu for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 15:29:49 -0400 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]:39614) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1ZiT-0002Yz-D5 for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 15:29:49 -0400 Received: by mail-pj1-x102d.google.com with SMTP id p14-20020a17090ad30eb02901731c776526so4385615pju.4 for ; Thu, 08 Jul 2021 12:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=AVc16fBkLw0W2MK21rSsUMwPb2OexlOnNCZM0INvGGM=; b=ZHOsWQ38Q4pmFH5y3A7Ht+0CwCPmc72tLMGes3dBvlPIVl8ZtMom27tJPHMSGy0zXz 2/q+xtgq/KF+1xDrhUAHeEeBoif0f/M4o0YP2HAeybnPXAxUSX+UHPlthdw96J2Zlqzn ijn689Qq//p+HiL/Aj4hXqYY2CPG+PNr5h74v4v5ICkaMpWsjcfjLXOU29RoD+evtG/9 npPkExT8W2HQKYENJJhYe7Xt8hdm8+qaPVLCXkzZMKYkI9g6W4yyGmXpE3GE9sxLqxbn v+V3A62GSN9xgW8+ckEiqN52esoIDgPcfrL8DCd73uaqBnS4aMyaXIdiU7v25UAWEWwk hXYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=AVc16fBkLw0W2MK21rSsUMwPb2OexlOnNCZM0INvGGM=; b=durKL5hNCUbXXs0ZfqrC+XOoGud+0IbE0WW7iurHj94fikNSo9Q+z/RgdOv6/b7B89 uN2pcpI5lZpDYxW8+dlNbBy2+ggt9XOTZIU3W39r/w+HDlom8RFm+P8mg8ZkXMTsVBwU A+cJlXWeg9mlluFQ661CQ/Ey+TNWDLeyPW63LbkzrmmWR+qFSP/nDgsOuPFgp7BV50dz 4MMYyClLqXjr4QQGSWKuSxY+8dwZDNbUrwid4waC22VvwJq1NZ1E2L/rJIEpLxx8hGJ5 VCGzree1DD3vFd77aSW1zm/YhEU1E6FxEwXUTkbMP5zfjBO7uB74q0jbGP54X939vkMQ CKcg== X-Gm-Message-State: AOAM530ixuzZny6vvtMgYqrsy+nBCLRknONSQsF1XMxvBcwtCDl+F1iF qJXnsAvAUkxIDcTRFaOW29ptzPzkJlE= X-Google-Smtp-Source: ABdhPJxWuaPolx3iecEGSjQ5QCdYLx+dKvyrhEZgNt70rf6CzkqJnOM7iZnMtYURNoB6xTTwJTyGOg== X-Received: by 2002:a17:90a:6708:: with SMTP id n8mr5778930pjj.32.1625772583199; Thu, 08 Jul 2021 12:29:43 -0700 (PDT) Received: from tim-desktop (106-69-78-201.dyn.iinet.net.au. [106.69.78.201]) by smtp.gmail.com with ESMTPSA id k25sm3478594pfa.213.2021.07.08.12.29.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 12:29:42 -0700 (PDT) References: <87lf6h7ueq.fsf@gmail.com> <87o8bdljwn.fsf@gmail.com> <87y2ahi6zo.fsf@gmail.com> <87sg0ptere.fsf@gmail.com> <87zguxmcop.fsf@yandex.com> <87r1g8wvvo.fsf@gmail.com> <87lf6gwsbe.fsf@gmail.com> User-agent: mu4e 1.5.13; emacs 28.0.50 From: Tim Cross To: Marco Wahl Subject: Re: [WDYT] org-attach-sync better remove an empty attachment directory? Date: Fri, 09 Jul 2021 05:28:43 +1000 In-reply-to: <87lf6gwsbe.fsf@gmail.com> Message-ID: <87mtqwtxi5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::102d; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x102d.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: Colin Baxter , 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=1625774976; 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=AVc16fBkLw0W2MK21rSsUMwPb2OexlOnNCZM0INvGGM=; b=TuFz8MWpYNupMw1GW2Hb93Uuf1tMh4Dxn1oLeSiXXAnr6nslYb2cJ0IjPPa9Y5vcORBcws 0bWu7z2VtiLXa+Uz+FVW9mFIxpLH1G8ENlkfsCmTr3bHVsQ0+wsx1aqX+RGeZu/LNnMTu0 Z5A8LHsKTUEfai7X2fB+0HLYaPx5irfLAQo4H3gqzvmy49WvwFUDNl3rhxTQEwN2jXh/1b e/weGOm4oaACMqQ0WPYJc3oRPbwPtCrgAezWor+vr1sPBAHF/377L2wwElXL//qIYFjDBS yBuq4U1eRILzDw+ItHGXq33VZTAZHezXFhVu/+4YOS3Yxs4d9de0TDkBUr3HAw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625774976; a=rsa-sha256; cv=none; b=JBRvqLtSBHO6I9ALZKPmZMnx3o2TaQEF54t/G43U9+bbDW9Ja5q2AruGgfMu5xZzaLckkq sYdjZgfIZBnb0qwr6KmxSrfdxI+Lmu/crG4t6FVzp1gUsavS+0Yqf0RGqa1TjXHeeRiFoN JcEzIqMEqjmltfsjSjUk5fOPCLqX1r7C39hkMK7Mya4tn23hTZIOAb5maDLwyJPj5Cl9r1 LXpCY15PjiMnqY2N5RyGLmqGEnpWWt5SoACrxMGnyQq0qmt7w3r8Gm8nJqANKFG1rGeLav Do/A2jAryw/ZHYSMG+0j8VP2uIayJ8DXgI5jDGd9QkLvYTFRE5YE6Ss8Dyy1Ug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ZHOsWQ38; dmarc=pass (policy=none) header.from=gmail.com; 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: -2.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=ZHOsWQ38; dmarc=pass (policy=none) header.from=gmail.com; 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: 61C7B130FB X-Spam-Score: -2.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: /Yo4H/hagWUG Marco Wahl writes: > Marco Wahl writes: > >> 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. > > I made a mistake here. > > If we do this I vote for option 1. (not 3.) as default (following the > suggestion by Colin) since it is the most interactive variant. If the > question gets annoying the user can switch to one of the other options. > That seems quite resonable to me. -- Tim Cross