From: Kyle Meyer <email@example.com>
To: No Wayman <firstname.lastname@example.org>
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/)]
Date: Tue, 07 Apr 2020 00:37:23 +0000 [thread overview]
Message-ID: <email@example.com> (raw)
No Wayman <firstname.lastname@example.org> 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
> 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).
* 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
* 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.
next prev parent reply other threads:[~2020-04-07 1:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 20:05 Bug: org-archive-subtree-save-file-p logic [9.3.6 (release_9.3.6-399-ge6df03 @ /home/n/.emacs.d/straight/build/org/)] No Wayman
2020-04-06 5:51 ` Kyle Meyer
2020-04-06 16:49 ` No Wayman
2020-04-07 0:37 ` Kyle Meyer [this message]
2020-04-07 19:00 ` No Wayman
2020-04-07 19:06 ` No Wayman
2020-04-08 2:58 ` Kyle Meyer
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).