From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastien Vauban Subject: Remove redundant tags of headlines Date: Thu, 13 Mar 2014 16:36:50 +0100 Message-ID: <864n32yust.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, FYI, the code to "Remove redundant tags of headlines" (see http://orgmode.org/worg/org-hacks.html#sec-1-8-1) is not functioning anymore. --8<---------------cut here---------------start------------->8--- (defun dmj/org-remove-redundant-tags () "Remove redundant tags of headlines in current buffer. A tag is considered redundant if it is local to a headline and inherited by a parent headline." (interactive) (when (eq major-mode 'org-mode) (save-excursion (org-map-entries '(lambda () (let ((alltags (split-string (or (org-entry-get (point) "ALLTAGS") "") ":")) local inherited tag) (dolist (tag alltags) (if (get-text-property 0 'inherited tag) (push tag inherited) (push tag local))) (dolist (tag local) (if (member tag inherited) (org-toggle-tag tag 'off))))) t nil)))) --8<---------------cut here---------------end--------------->8--- The problem seems to be that `org-map-entries' return a sequence of `nil'. I tried Edebugging it, but Edebug does not jump into the execution of the anonymous function... Best regards, Seb -- Sebastien Vauban