Enumerate all tags in org-mode -



Enumerate all tags in org-mode -

how generate enumerated list of tags (e.g., :tag:) in org-mode file? have list of form:

* head1 :foo:bar: ** subhead1 :foo: * head2 ** subhead2 :foo:bar:

i want generate list of tags in file how many times each tag used. like,

:foo: 3 :bar: 2

here approach.

(setq my-hash (make-hash-table :test 'equal)) (org-map-entries (lambda () (let ((tag-string (car (last (org-heading-components)))) (current-count)) (when tag-string (dolist (tag (split-string tag-string ":" t)) (setq current-count (gethash tag my-hash)) (if current-count; (puthash tag (+ 1 current-count) my-hash) (puthash tag 1 my-hash)) ) ) ) ) ) ;; https://github.com/wilfred/ht.el (require 'ht) (ht-map (lambda (key value) (list key value)) my-hash)

org-mode

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -