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 ms0.migadu.com with LMTPS id sLS5MYJP52AGKQEAgWs5BA (envelope-from ) for ; Thu, 08 Jul 2021 21:18:26 +0200 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 qBl1LYJP52AlTwAAbx9fmQ (envelope-from ) for ; Thu, 08 Jul 2021 19:18:26 +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 18B2013088 for ; Thu, 8 Jul 2021 21:18:26 +0200 (CEST) Received: from localhost ([::1]:46244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1ZXU-0001uV-6M for larch@yhetil.org; Thu, 08 Jul 2021 15:18:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45984) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Z9u-0003I0-5C for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 14:54:03 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:37815) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1Z9p-0008RG-P9 for emacs-orgmode@gnu.org; Thu, 08 Jul 2021 14:54:01 -0400 Received: by mail-wm1-x32e.google.com with SMTP id y21-20020a7bc1950000b02902161fccabf1so4267698wmi.2 for ; Thu, 08 Jul 2021 11:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version; bh=zU50GEN7AXRkwuQPy9nz64UpZEPIhxT3sDY600IDf40=; b=dmHCdWwmnFYVTUx/CVwR4NxeX5yS3hdkVOjTkCN+qsJKOlhc7W/KsK9KDBFh77dj++ JiNbNr4Dl5eFJWn0Jj5eRt1N5s/S98Cj+pu6Oly5E8BkXbwSjDWEnywU75GGHhXKe0tN uEPaKxtom9xkGBTX2Az5R6ZM4BCL6CXUlMInjQH+qzioeiuVRrfKyl57ucySZambdrlR d9n5CTULDjo/FpOtncpSxfqxrePmOCU0vgdvLQwJFAgB7Xi2Bh/7zFxBAOqRICmNYQst afVGMFH3tKThtDrnFTqOjXDNhg2jivlVT6ebepJdUktuNXXADyN3/HEHm75iYLdEa0g8 8yVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=zU50GEN7AXRkwuQPy9nz64UpZEPIhxT3sDY600IDf40=; b=WCBlauycac2MifPvODxYcY0wNqZ5/N49/3Khml4mDk7gapmnW6sz2r9XVLY4Rt55SC FhJ6fqwfY66Hbf+Ghlgt7t+gRtiJ13tB0uF/AsvYRGVeBKm2hjqm7QVFco8Xv6d/gL/H jBXkPjLCkh5W27y63zeQeaktVbUIIs5Hi0yB3iVptCyn1ViE5jvSI3RiffdpflWYHrLU jWOSPiD2QiY3ajG4w1SjCqqhX1i5wVJfbMHNYxuOn69KrKnYBE19Qg9jWhi4qkT2N0Tq duOe20dftZrlvxSpJFx9OSsmwFhTTRQRmXVVFZz66AqHb4rUthG/mGVFJ7xKA7NXvMaD a3kQ== X-Gm-Message-State: AOAM530ACrbcrQcQMGIlzl48WhTKgSPkb70SHumBaUfqLLsUqQWpdQ/g zO0tWLCo1qOGKU0mYu78Jio= X-Google-Smtp-Source: ABdhPJw/I6jWuRnH8qoR2qfq3q7c2n8ANMnJ/iQGM8lDOlv7iAVHQ+lKsac8htdKLfuLPWTfA2MKLA== X-Received: by 2002:a05:600c:19d1:: with SMTP id u17mr7032532wmq.40.1625770434774; Thu, 08 Jul 2021 11:53:54 -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 f1sm2929632wri.74.2021.07.08.11.53.53 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Jul 2021 11:53:54 -0700 (PDT) From: Marco Wahl To: Colin Baxter , Tim Cross , emacs-orgmode@gnu.org Subject: Re: [WDYT] org-attach-sync better remove an empty attachment directory? In-Reply-To: <87r1g8wvvo.fsf@gmail.com> (Marco Wahl's message of "Thu, 08 Jul 2021 19:36:27 +0200") 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> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 08 Jul 2021 20:53:25 +0200 Message-ID: <87lf6gwsbe.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=marcowahlsoft@gmail.com; helo=mail-wm1-x32e.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: , 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=1625771906; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=zU50GEN7AXRkwuQPy9nz64UpZEPIhxT3sDY600IDf40=; b=roN77WKDyCmBuxjWwcjDwx3DBqK/gBJ/LOxKs/P8GGVhEOk5WSqk5TOcxNXuPJyngHWDMr k8f7BAAX+XxoztZiEMpmo9NuUV+TEpwTzAUFuCaWzI6xjTQHxm9q0E77PH3HNgfsh+6Wod 6vWEghzUXftV7u1lLwJ5OeGmuHrlbydy0vEEItYeAeIYOv5asl9pxVG69OwmA1krW4RCxJ 0Sd+YrsktF0/bdWxQCwJv91hqR9XlhQafrZPwgtf0AaM6CC7adcLSibJ0n7kmuJ8PUi9eA Xb0Wdl2DOoDzCyB3W6C3L0ga40GhSMIu4MjBGxRUWIgHUGbeSSXQEbP0/JM11w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625771906; a=rsa-sha256; cv=none; b=aytuSH4wPbuK4oZmq4QV27IWyqYfSIpW+gE2PakK4QSXIkR7rgcIRTAPx+AVgSMUwl098M AB6B3C432vRK+a5luFB0ZyCdKq2jOgXW2zT2ReZNN3EwcgFjf0a1jEvqDDGC+f4zm6Hnjl ESU4s8saPWANQBGVrnm7F+hKz2kJsttXgTcinF5CcKWgF2p/tOfPVLAJL+JnXX4uu3cZwb fJ7GhLXnwHqSGq613az8pKA0Al3UOHqGTdoUGfG5x+WCGX9Hq4hSY93MLDg2ga7BP8o+2M 4aH8mmqeUVVfAsr2pZc/oJ9S3Muh8ji0yY0Jtj8nb1+6/kV14Btx8iYKYEeDUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=dmHCdWwm; 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=dmHCdWwm; 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: 18B2013088 X-Spam-Score: -2.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: VSXzm6kY1yxv 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. Sorry for the confusion.