From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-id-get-create maybe... Date: Wed, 5 Aug 2009 01:49:06 +0200 Message-ID: References: <87my6f5gcc.fsf@kassiopeya.MSHEIMNETZ> Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYTkp-0008KX-9P for emacs-orgmode@gnu.org; Tue, 04 Aug 2009 19:49:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYTkk-0008Iz-Mc for emacs-orgmode@gnu.org; Tue, 04 Aug 2009 19:49:14 -0400 Received: from [199.232.76.173] (port=42191 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYTkk-0008Iq-ES for emacs-orgmode@gnu.org; Tue, 04 Aug 2009 19:49:10 -0400 Received: from mail-ew0-f211.google.com ([209.85.219.211]:45842) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYTkj-0002YS-TM for emacs-orgmode@gnu.org; Tue, 04 Aug 2009 19:49:10 -0400 Received: by ewy7 with SMTP id 7so1126324ewy.42 for ; Tue, 04 Aug 2009 16:49:08 -0700 (PDT) In-Reply-To: <87my6f5gcc.fsf@kassiopeya.MSHEIMNETZ> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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