From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] org-capture-place-item better alignment for new lists. Date: Tue, 07 Oct 2014 15:49:09 +0200 Message-ID: <87sij02dnu.fsf@nicolasgoaziou.fr> References: <20141007105611.GC3627@embecosm.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbV7y-0006VP-Ui for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 09:48:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XbV7q-00083o-SO for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 09:48:34 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:36566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbV7q-00083f-MJ for emacs-orgmode@gnu.org; Tue, 07 Oct 2014 09:48:26 -0400 In-Reply-To: <20141007105611.GC3627@embecosm.com> (Andrew Burgess's message of "Tue, 7 Oct 2014 11:56:11 +0100") 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: Andrew Burgess Cc: emacs-orgmode@gnu.org Hello, Andrew Burgess writes: > Creating an entry in org-capture-templates of type item adds entries > into a list, however, if the list is empty then the first list item > will be indented to depth 0 (so hard on the left) like this: > > * Top Level > ** Second Level > - item #1 > - item #2 > - item #3 > > I prefer to indent content, including lists, to a level matching the > parent, so something like this: > > * Top Level > ** Second Level > - item #1 > - item #2 > - item #3 > > The patch below changes org-capture-place-item so that, when starting > a new list, the items are indented as in the second example above. Thanks for the patch. However, this behaviour is wrong when `org-adapt-indentation' is nil. It is better to use `org-indent-line' than hard-coding (1+ (org-current-level)). Regards, -- Nicolas Goaziou