From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [RFC] The "c" Org macro Date: Tue, 09 May 2017 13:25:30 +0200 Message-ID: <87y3u6l1at.fsf@gmx.us> References: <2ee94a64a94b46259b0da6e7d34675c9@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87y3u7o3dj.fsf@t3610> <87pofjtk4b.fsf@t3610> <87bmr35lzs.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d83H4-00089L-54 for emacs-orgmode@gnu.org; Tue, 09 May 2017 07:25:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d83H0-0007x1-5u for emacs-orgmode@gnu.org; Tue, 09 May 2017 07:25:50 -0400 Received: from [195.159.176.226] (port=36801 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d83Gz-0007we-VB for emacs-orgmode@gnu.org; Tue, 09 May 2017 07:25:46 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1d83Gs-0008H3-Bs for emacs-orgmode@gnu.org; Tue, 09 May 2017 13:25:38 +0200 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Hello, > > Eric S Fraga writes: > >> On Monday, 8 May 2017 at 15:32, Dushyant Juneja wrote: >>> A very useful macro indeed! >>> >>> One suggestion: can this also be made to support nested headings. For instance: >>> * Part {{{c}}} >>> ** Part {{{c}}}.{{{c}}} >>> * Part {{{c}}} >> >> I think this is what separate counters will enable but also motivates >> need to be able to reset a counter (e.g. the sub-heading one in above >> example if it were to be used in the second part). > > Good idea. > > Here is an updated patch, in which one can write > > {{{c(sub,reset)}}} > {{{c(sub, 5)}}} > > or even, for the default macro > > {{{c(,reset)}}} > {{{c(, 99)}}} Seems fine. To me, "n" or "N" would be a better name for the macro, as that suggests some sort of number, whereas "c" doesn’t really associated with "counter" to me. Perhaps it’s just because the syntax looks a lot like the R combine command... Are there a lot of cases where it would not be able to just configure how heading numbers are printed in the backend? Rasmus -- May the Force be with you