From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Make tag inheritance explicit Date: Tue, 23 Jan 2018 18:33:52 +0100 Message-ID: <2018-01-23T18-27-03@devnull.Karl-Voit.at> References: <2018-01-23T11-18-52@devnull.Karl-Voit.at> <2018-01-23T15-38-21@devnull.Karl-Voit.at> Reply-To: Karl Voit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ee2T5-0004jL-Ro for emacs-orgmode@gnu.org; Tue, 23 Jan 2018 12:34:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ee2T1-0000fo-R9 for emacs-orgmode@gnu.org; Tue, 23 Jan 2018 12:34:43 -0500 Received: from [195.159.176.226] (port=47287 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ee2T1-0000fR-KI for emacs-orgmode@gnu.org; Tue, 23 Jan 2018 12:34:39 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ee2Qe-0001uC-BV for emacs-orgmode@gnu.org; Tue, 23 Jan 2018 18:32:12 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org * Kaushal Modi wrote: > > On Tue, Jan 23, 2018 at 9:45 AM Karl Voit 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/