From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-orgmode@gnu.org
Subject: Re: Make tag inheritance explicit
Date: Tue, 23 Jan 2018 18:33:52 +0100 [thread overview]
Message-ID: <2018-01-23T18-27-03@devnull.Karl-Voit.at> (raw)
In-Reply-To: CAFyQvY3YzahYpuqz7_h87Fr0E2Vw32pkoU+859u8CtVD8Xh+uA@mail.gmail.com
* Kaushal Modi <kaushal.modi@gmail.com> wrote:
>
> On Tue, Jan 23, 2018 at 9:45 AM Karl Voit <devnull@karl-voit.at> wrote:
>
>> > 2. Use `org-get-tags-at' with point on "Task 1" heading in your example.
>> > `org-get-tags' returns a list of tags *only* at the current heading.
>> > `org-get-tags-at' returns inherited tags too.
>>
>> You mean for developing a custom-made function that provides the
>> feature I was asking for?
>
> By "feature", you mean copying all the inherited tags to the heading at
> point?
Yes.
With your help, I wrote:
(defun my-set-tags-including-inherited ()
(interactive)
(let (
(alltags (org-get-tags-at))
)
(org-set-tags-to alltags)
)
)
Which provides me "the feature" I was looking for. It can be
simplified, I know. However, I tried to add a list of tags I *don't*
want to be added to the heading but failed so far.
alltags content example:
(#("test1" 0 5 (inherited t)) #("foobar" 0 6 (inherited t))
#("test2" 0 5 (inherited t)) #("baz" 0 3 (inherited t)))
Do you have an idea, how I can delete all items contained in my
black-list?
My example black list would be: (ignored-tags '(test1 2del crypt))
My latest approach on a single-item level was:
(remove* "test1" alltags :test 'equal :key 'car)
>> First, I wanted to get a confirmation that this feature is not
>> already part of Org-mode because (as usual) this seemed obvious to
>> me when using export functionality ;-)
>
> It's not clear what you mean by "feature is not already part of Org-mode".
Sorry for being unclear.
I thought, there might be something like "org-add-inherited-tags" or
similar I was not aware of.
--
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
> get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/
next prev parent reply other threads:[~2018-01-23 17:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 10:22 Make tag inheritance explicit Karl Voit
2018-01-23 12:16 ` Kaushal Modi
2018-01-23 14:44 ` Karl Voit
2018-01-23 15:15 ` Kaushal Modi
2018-01-23 17:33 ` Karl Voit [this message]
2018-01-23 12:17 ` Carsten Dominik
2018-01-23 14:55 ` Karl Voit
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2018-01-23T18-27-03@devnull.Karl-Voit.at \
--to=devnull@karl-voit.at \
--cc=emacs-orgmode@gnu.org \
--cc=news1142@Karl-Voit.at \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.