emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Austin Frank <austin.frank@gmail.com>
To: emacs-orgmode@gnu.org
Subject: org-set-tag-hook
Date: Mon, 10 Sep 2007 19:43:43 -0400	[thread overview]
Message-ID: <m04pi2t7bk.fsf@gmail.com> (raw)


[-- 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

             reply	other threads:[~2007-09-11  4:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 23:43 Austin Frank [this message]
2007-09-13  6:32 ` org-set-tag-hook Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m04pi2t7bk.fsf@gmail.com \
    --to=austin.frank@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).