From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Insert TODO or plain heading depending on context Date: Thu, 5 Aug 2010 10:43:50 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=46165 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oh2br-0003pK-Oj for emacs-orgmode@gnu.org; Thu, 05 Aug 2010 11:44:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oh2bo-00070f-8A for emacs-orgmode@gnu.org; Thu, 05 Aug 2010 11:43:53 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:34189) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oh2bo-00070F-42 for emacs-orgmode@gnu.org; Thu, 05 Aug 2010 11:43:52 -0400 Received: by wyg36 with SMTP id 36so7569633wyg.0 for ; Thu, 05 Aug 2010 08:43:50 -0700 (PDT) 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: emacs-orgmode Sorry for a rudimentary question, but someone almost certainly has done this before: I'd like define a function that would: a) Create a new heading if the cursor is on a heading or the body of a heading. or b) Create a new TODO heading if the cursor is on a TODO heading or the body of a TODO heading. Essentially, it would be a "smart" function to either press M-Return or M-S-Return, depending on the context. I realize I can press M-Return to always create a new heading, and M-S-Return to always create a new TODO, but I'd like to eliminate an extra keypress for the most common cases. Any ideas? Thanks, --Nate