From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: Setting org-insert-heading-hook while in a minor mode Date: Wed, 30 Oct 2013 23:58:48 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbjPG-0007vh-T6 for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 23:58:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbjPF-0003tm-Ub for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 23:58:50 -0400 Received: from mail-qe0-x233.google.com ([2607:f8b0:400d:c02::233]:65266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbjPF-0003sW-PT for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 23:58:49 -0400 Received: by mail-qe0-f51.google.com with SMTP id q19so1438583qeb.38 for ; Wed, 30 Oct 2013 20:58:49 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Hi everyone, I am trying to write a minor mode that will help me write a little more efficiently. While I'm in that mode, I want to insert a properties drawer every time I create a new heading. So I would like to temporarily change "org-insert-heading-hook" when the minor mode is active. It's not obvious to me that there's a way to set a file-local variable while in a minor-mode -- does anyone know if there is, and I'm just missing it? Also, I would like if possible for the properties drawer to be pre-populated with certain properties Is that also possible? Thanks, Matt