From: George Sokolsky <sokolgeo@posteo.net>
To: Kyle Meyer <kyle@kyleam.com>, michael.dauer@smartpm.com, bzg@gnu.org
Cc: sokolgeo@posteo.net, emacs-orgmode@gnu.org
Subject: Re: [PATCH] agenda: Consider FILETAGS for archive skipping
Date: Mon, 18 May 2020 11:34:19 +0200 [thread overview]
Message-ID: <87blmlmvs4.fsf@posteo.net> (raw)
In-Reply-To: <87blmnt9az.fsf@kyleam.com> (message from Kyle Meyer on Sun, 17 May 2020 05:33:24 +0000)
Thank you very much Kyle for the patch you provided!
I had to apply it manually on the latest org-20200518 (line numbers
changed in this new version or me too lame) - the patch seem to fix the
below problem and works just fine!
IMHO using "#+FILETAGS: ARCHIVE" is one of legitimate ways of applying
ARCHIVE tag to items in org. As such I'd love the below patch included
into the official org distribution. I'm trying to add Bastien into
recepients of this e-mail - or could anyone please help with commiting
the below code into the org repository?
Thank you,
George
Kyle Meyer <kyle@kyleam.com> writes:
> George Sokolsky writes:
>
>> I have .org files with "#+FILETAGS: ARCHIVE" headers.
>>
>> I want items from these .org files to be hidden by default from results
>> of "org-agenda" -> "s Search for keywords" by default.
>>
>> This is not the case, unfortunately.
> [...]
>
> I'd guess that it's uncommon to try to set the ARCHIVE tag at the file
> level, as file-level archiving is already dealt through
> org-archive-location and friends. These standard files can optionally
> be included with vA (or C-u M-x org-agenda-archives-mode).
>
>> *How the above could be done, please?*
>
> I don't see a built-in way to do it, though I think the patch below may
> be sufficient to provide the behavior you want. It doesn't consider any
> of the tag inheritance variables, but that's probably okay given that
> those aren't considered for handling :ARCHIVE: subtrees either.
>
> -- >8 --
> Subject: [PATCH] agenda: Consider FILETAGS for archive skipping
>
> * lisp/org-agenda.el (org-agenda-skip): Consider skipping all entries
> in a file if org-archive-tag is set via FILETAGS.
> ---
> lisp/org-agenda.el | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 9c73d0d6c..8ed5e402d 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -4082,8 +4082,10 @@ (defun org-agenda-skip ()
> (when (or
> (save-excursion (goto-char p) (looking-at comment-start-skip))
> (and org-agenda-skip-archived-trees (not org-agenda-archives-mode)
> - (get-text-property p :org-archived)
> - (org-end-of-subtree t))
> + (or (and (get-text-property p :org-archived)
> + (org-end-of-subtree t))
> + (and (member org-archive-tag org-file-tags)
> + (goto-char (point-max)))))
> (and org-agenda-skip-comment-trees
> (get-text-property p :org-comment)
> (org-end-of-subtree t))
next prev parent reply other threads:[~2020-05-18 9:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-16 10:53 Org-agenda ignores archive tag set by "#+FILETAGS: ARCHIVE" George Sokolsky
2020-05-17 5:33 ` [PATCH] agenda: Consider FILETAGS for archive skipping Kyle Meyer
2020-05-17 8:54 ` Dauer, Michael
2020-05-18 9:34 ` George Sokolsky [this message]
2020-05-18 9:52 ` Bastien
2020-05-18 10:09 ` George Sokolsky
2020-05-18 11:48 ` Bastien
2020-05-18 12:17 ` George Sokolsky
2020-05-19 0:43 ` Kyle Meyer
2020-05-21 3:05 ` Kyle Meyer
2020-05-21 7:16 ` George Sokolsky
2020-05-24 10:57 ` Org-agenda ignores archive tag set by "#+FILETAGS: ARCHIVE" Bastien
2020-05-24 17:06 ` Kyle Meyer
2020-05-25 8:28 ` George Sokolsky
Reply instructions:
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blmlmvs4.fsf@posteo.net \
--to=sokolgeo@posteo.net \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=kyle@kyleam.com \
--cc=michael.dauer@smartpm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).