emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-set-tag-hook
@ 2007-09-10 23:43 Austin Frank
  2007-09-13  6:32 ` org-set-tag-hook Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Austin Frank @ 2007-09-10 23:43 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1239 bytes --]

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 #1.2: Type: application/pgp-signature, Size: 185 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-13  6:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-10 23:43 org-set-tag-hook Austin Frank
2007-09-13  6:32 ` org-set-tag-hook Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).