* org-id-get-create maybe... @ 2009-08-04 23:06 Sebastian Rose 2009-08-04 23:49 ` Carsten Dominik 0 siblings, 1 reply; 3+ messages in thread From: Sebastian Rose @ 2009-08-04 23:06 UTC (permalink / raw) To: Emacs-orgmode mailing list In my org-setup, I want to have something like this: (defun sr-org-id-insert-maybe () (if (y-or-n-p "Create a unique ID for this section?") (org-id-get-create))) (org-insert-heading-hook (quote (sr-org-id-insert-maybe))) But I don't want to enable it globally. Instead, I want to create IDs semi-automatic for special files (or projects) only. How would I do that? Sebastian ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-id-get-create maybe... 2009-08-04 23:06 org-id-get-create maybe Sebastian Rose @ 2009-08-04 23:49 ` Carsten Dominik 2009-08-05 11:33 ` Sebastian Rose 0 siblings, 1 reply; 3+ messages in thread From: Carsten Dominik @ 2009-08-04 23:49 UTC (permalink / raw) To: Sebastian Rose; +Cc: Emacs-orgmode mailing list On Aug 5, 2009, at 1:06 AM, Sebastian Rose wrote: > > > In my org-setup, I want to have something like this: > > (defun sr-org-id-insert-maybe () > (if (y-or-n-p "Create a unique ID for this section?") > (org-id-get-create))) > > (org-insert-heading-hook (quote (sr-org-id-insert-maybe))) > > > > But I don't want to enable it globally. Instead, I want to create IDs > semi-automatic for special files (or projects) only. > > How would I do that? Take a look at file variables http://www.gnu.org/software/emacs/manual/html_node/emacs/File-Variables.html#File-Variables and directory variables. http://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#Directory-Variables And then make your hook dependent on the value of such a variable. - Carsten > > > > Sebastian > > > _______________________________________________ > 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] 3+ messages in thread
* Re: org-id-get-create maybe... 2009-08-04 23:49 ` Carsten Dominik @ 2009-08-05 11:33 ` Sebastian Rose 0 siblings, 0 replies; 3+ messages in thread From: Sebastian Rose @ 2009-08-05 11:33 UTC (permalink / raw) To: Carsten Dominik; +Cc: Emacs-orgmode mailing list Carsten Dominik <carsten.dominik@gmail.com> writes: > On Aug 5, 2009, at 1:06 AM, Sebastian Rose wrote: > >> >> >> In my org-setup, I want to have something like this: >> >> (defun sr-org-id-insert-maybe () >> (if (y-or-n-p "Create a unique ID for this section?") >> (org-id-get-create))) >> >> (org-insert-heading-hook (quote (sr-org-id-insert-maybe))) >> >> >> >> But I don't want to enable it globally. Instead, I want to create IDs >> semi-automatic for special files (or projects) only. >> >> How would I do that? > > Take a look at > > file variables > > http://www.gnu.org/software/emacs/manual/html_node/emacs/File-Variables.html#File-Variables > > and directory variables. > > http://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#Directory-Variables > > And then make your hook dependent on the value of such a variable. I knew there were a solution somewhere :) Thanks a bunch! Sebastian ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-08-05 11:29 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-08-04 23:06 org-id-get-create maybe Sebastian Rose 2009-08-04 23:49 ` Carsten Dominik 2009-08-05 11:33 ` Sebastian Rose
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).