From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 6K7lHq41/GUa1wAAe85BDQ:P1 (envelope-from ) for ; Thu, 21 Mar 2024 14:27:10 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 6K7lHq41/GUa1wAAe85BDQ (envelope-from ) for ; Thu, 21 Mar 2024 14:27:10 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=i9D6DrO7; 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=1711027630; 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=Navo8H3ftDCWNVNSR3baQRj/HGzSxHGYLZKw9/pzilA=; b=TAemRfdyuuAm/6wvxBHC0ICuedBmjVS/83Way0p/h/ZosIVeFlR8ArhLW4ek6d37uwZLQg z3YHm8xtaGscDH+QzRC3KoF2V2GU/fYxgk0cbGpUA/vmURc/fm5Yd+zJLWFrk02hQdEvOd CU/mRXEjDq2N/KcRL8uxxMvlTKsyQiM2RjtF4ImC5U8ZUfjGW+bOAynj2emFIZVh0VcYl5 /DyH0IrQTQ8N6rNSlX6aPA6aprX6aLul2zJTrkgqDXz6VkkdL2kLjgkcA3e8haauyG8XKP s1g3qjm5mj3IlWSOt6MCa7isGtveA6t2700TIdgSQaBDvJkF/HFem7lv9YcLBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=i9D6DrO7; 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=1711027630; a=rsa-sha256; cv=none; b=de8BVyOQSKBa1cWNFWgKpCJ30xmAQJyQHFLaAg8HLOq5yVHf+mFrj2azNLsHOhOfjUqzxn xfLjhb7HlLQYudjKKzD0HiQI40jX4izcPkRGhZHP1hGjt3ddLq23DxdRRzI199PPa9goec NFCUo/J+I1ZXTetFwsd0MCCErg4b7/WWJJTQ6mIKfpW/7SCjbexf7/m9jbauX/n5hXzBYN kZKYiiEqSZhVdDllW6aIMdHepAsHYHbZz9eSs+gANwBV7H9MBzWFtQkQoz47jPgmkCiVLX seJFNRh8MIKCkNC5FxAvKz+94Udpu3TWzy60vjSapeNyv5xpcELPiTAzBcJKZQ== 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 1C35D5350F for ; Thu, 21 Mar 2024 14:27:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rnIR2-0001Qq-90; Thu, 21 Mar 2024 09:26:20 -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 1rnIQq-0001Oo-4t for emacs-orgmode@gnu.org; Thu, 21 Mar 2024 09:26:10 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rnIQi-0006KP-HM for emacs-orgmode@gnu.org; Thu, 21 Mar 2024 09:26:06 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id A3A3C240028 for ; Thu, 21 Mar 2024 14:25:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711027545; bh=76sgLZgHdRY3WPIk/UGmok5NX+c91ZxMwQ3NyuyGN38=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=i9D6DrO7YkLEFldPOhT33ovfburrtzl72ulABDb+KJ4IYkt4G8ykNQiuRteovc1nr 9EQr0UHF3YzdwTYDWNZAIbdhHOZWrGDAPHklf78ToyyCMEgLXd8c/uWJmFBKA9/3c0 /PrQCvyojc2w0TDgI9pyD1zkhE5zvE07AHJ0ZoI4NvPmTqpfnPNRSyrV8TqZdVo3ua 6CD7ybIxs7tNXLMAMElzyMGmvDESlwH2kY5pAyN83EE+6nVmN7Mk+IWaK95RcppYKN ayq3d1PB8e2zeCiOKVdB13JBHrbtID2ZqUWBooYZBMK82DReP9l6MV8P/9QhoFk53y DJdN4xcYLavIA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V0mRs09Dlz9rxK; Thu, 21 Mar 2024 14:25:44 +0100 (CET) From: Ihor Radchenko To: Kepa Cc: emacs-orgmode@gnu.org Subject: [FR] Add customization for default answers to `org-attach-set/unset-directory' prompt (was: Org-attach risks) In-Reply-To: <171096963729.7.13315176883660452357.290626130@slmails.com> References: <877chxt7ql.fsf@localhost> <171096963729.7.13315176883660452357.290626130@slmails.com> Date: Thu, 21 Mar 2024 13:25:41 +0000 Message-ID: <87a5mrlnsa.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 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-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -9.52 X-Spam-Score: -9.52 X-Migadu-Queue-Id: 1C35D5350F X-TUID: VU9pp8/bYU1c [ Adding Org mailing list back to CC. Please use "Reply all" to keep the discussion public ] Kepa writes: > I don't know enough to upload a patch, I barely know what is a patch... No problem. Then, I will turn this discussion into a feature request. It may be eventually implemented by other interested users. > I was thinking, and if the default answer is (No) it could work: just clicking ENTER ENTER, no file moving or deleting would take place. > The danger would be if someday the default is (Yes) and people mechanically send ENTER ENTER ... We use yes/no prompt rather than (y/n) for a reason - it is a destructive file operation. What we may do instead is the following: In addition to the sequence of prompts when changing the attachment directory: 1. Copy over attachments from old attachment directory to new one? 2. Delete old attachment directory? we can introduce a custom variable `org-attach-move-attachments' with the following values: 1. 'ask (default) - display the prompts 2. 'move - move the attachments form old to new directory (same as yes, yes answer) 3. 'copy - copy the attachments, keeping the old directory (yes, no answer) 4. 'keep or nil - keep the attachments in the old directory (no, no answer) I guess that no, yes answer that would delete the attachments is not something we want to allow as automatic behavior. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at