From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp1 ([2001:41d0:2:bcc0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms1 with LMTPS
	id gM2EKNvVi159FQAAk0OIDg
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 07 Apr 2020 01:22:35 +0000
Received: from aspmx2.migadu.com ([2001:41d0:2:bcc0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp1 with LMTPS
	id 8AgnDdrVi16gMQAAbx9fmQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 07 Apr 2020 01:22:34 +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 aspmx2.migadu.com (Postfix) with ESMTPS id 5F391683972
	for <larch@yhetil.org>; Tue,  7 Apr 2020 00:38:19 +0000 (UTC)
Received: from localhost ([::1]:39386 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	id 1jLcFt-0006jI-2d
	for larch@yhetil.org; Mon, 06 Apr 2020 20:38:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:58735)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <kyle@kyleam.com>) id 1jLcF9-0006iw-BN
 for emacs-orgmode@gnu.org; Mon, 06 Apr 2020 20:37:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <kyle@kyleam.com>) id 1jLcF6-00075N-Lr
 for emacs-orgmode@gnu.org; Mon, 06 Apr 2020 20:37:29 -0400
Received: from pb-smtp1.pobox.com ([64.147.108.70]:55722)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <kyle@kyleam.com>) id 1jLcF6-000743-BW
 for emacs-orgmode@gnu.org; Mon, 06 Apr 2020 20:37:28 -0400
Received: from pb-smtp1.pobox.com (unknown [127.0.0.1])
 by pb-smtp1.pobox.com (Postfix) with ESMTP id A3C9C4F0CA;
 Mon,  6 Apr 2020 20:37:25 -0400 (EDT) (envelope-from kyle@kyleam.com)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc
 :subject:in-reply-to:references:date:message-id:mime-version
 :content-type; s=sasl; bh=PMzWNoyA2QDg5Tsjm04EYbSiFjs=; b=Etyapk
 80k1A+n7VMTvaypwzhEn0+sJguMVxqrPJfniLIUpce57lh7jOtLGLcCIzOnDqlL+
 OUXmcD+v3mixAB9h0AJLGPO7i71M9oPX5Js74IBt7PuJD7SrWCRHJHd+hc+ZaO3T
 DiPZicmgboOiBPT/1x/BGbD3zCsUu7u1gmBdE=
Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1])
 by pb-smtp1.pobox.com (Postfix) with ESMTP id 9B4614F0C9;
 Mon,  6 Apr 2020 20:37:25 -0400 (EDT) (envelope-from kyle@kyleam.com)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com;
 h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type;
 s=mesmtp; bh=fZTBPiSuu+7Qux419NPwnJ2Rk0/ohXuixq3cf6jEx4g=;
 b=kceHCeSfnv7IyTm9KdNlJoYHKIXJbTXyVIdEUE+iLInISACHBxhuRdKcel5W7GXsTbxyCFu4ChTWPsCPQ26nc3mnSzTAhvg/1EqaNj75+5QrqoNFrMb/WChMwFBkIp6dnXoCUfgG5tOdVmnT1KhewQ8lsE4Gnb3dVZEFNoUueZE=
Received: from localhost (unknown [45.33.91.115])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by pb-smtp1.pobox.com (Postfix) with ESMTPSA id F15FA4F0C8;
 Mon,  6 Apr 2020 20:37:24 -0400 (EDT) (envelope-from kyle@kyleam.com)
From: Kyle Meyer <kyle@kyleam.com>
To: No Wayman <iarchivedmywholelife@gmail.com>
Subject: Re: Bug: org-archive-subtree-save-file-p logic [9.3.6
 (release_9.3.6-399-ge6df03 @ /home/n/.emacs.d/straight/build/org/)]
In-Reply-To: <87zhbov9sw.fsf@gmail.com>
References: <87zhcybjz5.fsf@gmail.com> <87lfn917rx.fsf@kyleam.com>
 <87zhbov9sw.fsf@gmail.com>
Date: Tue, 07 Apr 2020 00:37:23 +0000
Message-ID: <878sj8167w.fsf@kyleam.com>
MIME-Version: 1.0
Content-Type: text/plain
X-Pobox-Relay-ID: F37A58EA-7867-11EA-B0BC-C28CBED8090B-24757444!pb-smtp1.pobox.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 64.147.108.70
X-BeenThere: emacs-orgmode@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Cc: emacs-orgmode@gnu.org
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: "Emacs-orgmode" <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=default; t=1586219900;
	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=HrTYwrpiZCv4JSoZB1ccA6qg8PLxovLZAqGWbDvEnX8=;
	b=BQXj69++ccuqwReGlW17nluI5XrvUBLic6Yj2xTPudjpSf+p2nOykkKfVAIo2HY+gEGWiA
	elwUjPCRKTrR10zcRBcFMom0ZIlLa3j9THEwzeYg8FvVp1hXPH6B8S3ynu73AssGblkTNe
	g99dyN6tH0s5Z64jocZwuavVrraBquE=
ARC-Seal: i=1; s=default; d=yhetil.org; t=1586219900; a=rsa-sha256;
	cv=none;
	b=NnqTZeUlaMUo6N47vHU/2oiF7ZyJHo2dJVXBnrDPGle0z+6OygQkKzJ+jOV0KVq2C80jMW
	vpIfdvHdKbUhp+1hz3R1OzegCflOf3hV5poZgx/Iu/Zj0AuLa6pY5LXj2gQx6FoY1LnhW6
	FSN2cKX3rIvWCA+ZBGbyznOqNxb+FR4=
ARC-Authentication-Results: i=1;
	aspmx2.migadu.com;
	dkim=pass header.d=pobox.com header.s=sasl header.b=Etyapk 8;
	dkim=pass header.d=kyleam.com header.s=mesmtp header.b=kceHCeSf;
	dmarc=none;
	spf=pass (aspmx2.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-Scanner: scn0
X-Spam-Score: -1.21
Authentication-Results: aspmx2.migadu.com;
	dkim=pass header.d=pobox.com header.s=sasl header.b=Etyapk 8;
	dkim=pass header.d=kyleam.com header.s=mesmtp header.b=kceHCeSf;
	dmarc=none;
	spf=pass (aspmx2.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-Scan-Result: default: False [-1.21 / 13.00];
	 RCVD_VIA_SMTP_AUTH(0.00)[];
	 GENERIC_REPUTATION(0.00)[-0.58308167845139];
	 TO_DN_SOME(0.00)[];
	 R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c];
	 IP_REPUTATION_HAM(0.00)[asn: 22989(0.32), country: US(-0.01), ip: 209.51.188.17(-0.58)];
	 ARC_SIGNED(0.00)[i=1];
	 MX_GOOD(-0.50)[cached: eggs.gnu.org];
	 RCPT_COUNT_TWO(0.00)[2];
	 DKIM_TRACE(0.00)[pobox.com:+,kyleam.com:+];
	 MAILLIST(-0.20)[mailman];
	 FREEMAIL_TO(0.00)[gmail.com];
	 FORGED_RECIPIENTS_MAILLIST(0.00)[];
	 MIME_TRACE(0.00)[0:+];
	 RCVD_TLS_LAST(0.00)[];
	 ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US];
	 MID_RHS_MATCH_FROM(0.00)[];
	 TAGGED_FROM(0.00)[larch=yhetil.org];
	 FROM_NEQ_ENVFROM(0.00)[kyle@kyleam.com,emacs-orgmode-bounces@gnu.org];
	 ARC_NA(0.00)[];
	 R_DKIM_ALLOW(-0.20)[pobox.com:s=sasl,kyleam.com:s=mesmtp];
	 FROM_HAS_DN(0.00)[];
	 MIME_GOOD(-0.10)[text/plain];
	 DMARC_NA(0.00)[kyleam.com];
	 HAS_LIST_UNSUB(-0.01)[];
	 RCVD_COUNT_SEVEN(0.00)[8];
	 FORGED_SENDER_MAILLIST(0.00)[]
X-TUID: WZYiN7l+LVVz

No Wayman <iarchivedmywholelife@gmail.com> writes:

> What do you think of something like this?

Thanks for the suggestion.  The code is somewhat oddly formatted, at
least on my end.  Could you send a proper git-format-patch output to
this thread (either via git-send-email or as an attachment)?

> #+begin_src emacs-lisp
> (defcustom org-archive-subtree-save-file-p 'unless-agenda
>   "Conditionally save the archive file after archiving a subtree.
> The value 'unless-agenda prevents saving from the agenda-view.

"an agenda view" sounds better to me and matches the original text from
3d0282ef8.

> The value 'only-agenda saves only when the archive is initiated 
> from the agenda-view.

nitpick: Please write symbols as `foo' rather than 'foo.

Also, if you're going to expand the docstring (not a bad thing), I think
it'd make sense to slim down the :tag text a bit.
org-archive-save-context-info provides a nice example of formatting the
docstring, including the list of values.

> The value t saves in all cases where the archive target buffer is 
> not the current buffer.
> The value nil prevents saving in all cases."
>   :group 'org-archive
>   :package-version '(Org . "9.4")
>   :type '(choice
>           (const :tag "Do not save archive buffer when archiving 
>           from an agenda view" unless-agenda)
>           (const :tag "Only save archive buffer when archiving 
>           from an agenda view"   only-agenda)

As I mentioned above, I have a slight preference for sticking with
3d0282ef8's names: from-org and from-agenda.  I suppose the main
argument against from-org is that it's not clear from the name alone
that it's referring to a non-agenda Org buffer because "org" is of
course a bit overloaded.  Considered alongside from-agenda, I don't
think it's too bad though.

>           (const :tag "Save the archive buffer unless it is the 
>           current buffer" t)

This current buffer bit also applies to unless-agenda/from-org.  Perhaps
it'd make sense to just mention the current buffer behavior in the main
docstring, given it applies to all options (even though for
only-agenda/from-agenda, it's never the case that the archive buffer is
the current buffer).

In summary

  * I'd prefer to make a more minimal change on top of 3d0282ef8,
    keeping the names chosen there.  Functionally that comes down to
    adjusting the condition that guards the save-buffer call to consider
    from-org.

  * I think it'd be good to expand the docstring (along the lines of
    what you suggested) as well as trim and clarify the tag text a bit.

Thoughts?