From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Re: Insert TODO or plain heading depending on context Date: Tue, 10 Aug 2010 16:41:59 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=54017 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiwaA-0004ZJ-RF for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 17:42:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oiwa9-0003Ek-JN for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 17:42:02 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:37417) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oiwa9-0003EK-FD for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 17:42:01 -0400 Received: by wwi17 with SMTP id 17so477748wwi.30 for ; Tue, 10 Aug 2010 14:41:59 -0700 (PDT) In-Reply-To: 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 the bump -- maybe I'll phrase the question differently ---- Is there a function in org-mode that returns the TODO status of the heading that the cursor is currently in? Thanks, --Nate On Thu, Aug 5, 2010 at 10:43 AM, Nathan Neff wrote: > 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 >