emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] org-set-tag-hook


From: Austin Frank
Subject: [Orgmode] org-set-tag-hook
Date: Mon, 10 Sep 2007 19:43:43 -0400
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (darwin)

Hello!

I am wondering whether it would be possible to introduce a new hook into
org-mode.  This hook would be run after any tags are added to an entry.
The main use would be to check for the presence of some tag among the
entry's tags, and execute some function in response to it.

I suggest this because I would like to maintain a list of tags that will
cause an entry to be excluded from export.  I would like to do something
like

    (setq excluded-tags '(home private bills))
    (add-hook 'org-set-tag-hook
        'excluded-tags
        '(org-set-property "PRIVATE" t))

This would automatically set the PRIVATE property of the headline to t
whenever one of the members of excluded-tags was added to a headline.
From there I think I could wrap the export functions to exclude all
entries with a value of t for that property.  I hope that, in general,
the strategy of setting properties in response to the presence of
certain tags will be useful.

Do other folks think this would be an interesting addition?  Am I
overlooking an easy way to accomplish this without adding the hook to
org?

Thanks,
/au

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

Attachment: pgp0_pgOzQX3A.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]