From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Use the same TODO keyword as the current heading Date: Tue, 17 Oct 2017 09:47:42 +0200 Message-ID: <87bml6z04h.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4MbM-0005sF-Vw for emacs-orgmode@gnu.org; Tue, 17 Oct 2017 03:47:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4MbJ-0007zH-3f for emacs-orgmode@gnu.org; Tue, 17 Oct 2017 03:47:49 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:49503) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e4MbI-0007ym-TE for emacs-orgmode@gnu.org; Tue, 17 Oct 2017 03:47:45 -0400 In-Reply-To: (Allen Li's message of "Mon, 16 Oct 2017 12:38:21 -0700") 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" To: Allen Li Cc: emacs-orgmode@gnu.org Hello, Allen Li writes: > This makes org-insert-todo-heading-respect-content use the previous > heading of the same level instead of the previous heading regardless > of level. > > Given: > > * TODO some task > ** WAITING other task > > The original code yields: > > * TODO some task > ** WAITING other task > * WAITING > > This commit yields: > > * TODO some task > ** WAITING other task > * TODO > > * lisp/org.el (org-insert-todo-heading): Use keyword of previous same > level heading Thank you. Would you mind adding a test in "test-org.el", to `insert-todo-heading-respect-content' test? Regards, -- Nicolas Goaziou