From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dushyant Juneja Subject: Re: [RFC] The "c" Org macro Date: Mon, 08 May 2017 15:32:55 +0000 Message-ID: References: <2ee94a64a94b46259b0da6e7d34675c9@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <87y3u7o3dj.fsf@t3610> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114349d6a628f6054f04f4a1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7keq-00071e-N2 for emacs-orgmode@gnu.org; Mon, 08 May 2017 11:33:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7kep-00076K-JZ for emacs-orgmode@gnu.org; Mon, 08 May 2017 11:33:08 -0400 Received: from mail-it0-x233.google.com ([2607:f8b0:4001:c0b::233]:35192) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7kep-000763-Dr for emacs-orgmode@gnu.org; Mon, 08 May 2017 11:33:07 -0400 Received: by mail-it0-x233.google.com with SMTP id c15so68918970ith.0 for ; Mon, 08 May 2017 08:33:07 -0700 (PDT) In-Reply-To: <87y3u7o3dj.fsf@t3610> 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: Eric S Fraga , emacs-orgmode@gnu.org --001a114349d6a628f6054f04f4a1 Content-Type: text/plain; charset=UTF-8 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}}} should export to: * Part 1 ** Part 1.1 * Part 2 I reckon this will be very useful when a paragraphs need to be broken into several subheadings for clarity/context management. Dushyant On Mon, May 8, 2017 at 10:01 AM Eric S Fraga wrote: > On Monday, 8 May 2017 at 11:26, Nicolas Goaziou wrote: > > Hello, > > > > I would like to scratch a long-standing itch and introduce the "c" > > macro, which is basically a way to handle multiple counters in an Org > > document. So, the following document > > This sounds like a very useful macro to have. Some suggestions: > > 1. I would prefer the argument to be called "COUNTER" instead of "SEED" > as the latter is more commonly associated with random number > generators. This would make the documentation clearer potentially. > > 2. I wonder if a second argument could be optionally available to allow > the counter to start at an arbitrary number and/or be reset? > > I would definitely be using the macro for, as an example, in preparing > exams and courseworks where I often have to manually put the numbers in. > > thanks, > eric > > -- > : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.6-407-gc28ec3 > --001a114349d6a628f6054f04f4a1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
A very useful macro indeed!

One suggest= ion: can this also be made to support nested headings. For instance:
<= div>* Part {{{c}}}
** Part {{{c}}}.{{{c}}}=C2=A0
* Part= {{{c}}}

should export to:

* Part 1
** Part 1.1
* Part 2

I reckon this will be very useful when a paragraphs need to be broken int= o several subheadings for clarity/context management.

<= div>Dushyant


On Mon, May 8, 2017 at 10:01 AM Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
On Monday,=C2=A0 8 May 2017 at 11:26, Nicolas Goaziou = wrote:
> Hello,
>
> I would like to scratch a long-standing itch and introduce the "c= "
> macro, which is basically a way to handle multiple counters in an Org<= br> > document. So, the following document

This sounds like a very useful macro to have.=C2=A0 Some suggestions:

1. I would prefer the argument to be called "COUNTER" instead of = "SEED"
as the latter is more commonly associated with random number
generators.=C2=A0 This would make the documentation clearer potentially.
2. I wonder if a second argument could be optionally available to allow
the counter to start at an arbitrary number and/or be reset?

I would definitely be using the macro for, as an example, in preparing
exams and courseworks where I often have to manually put the numbers in.
thanks,
eric

--
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.6-407-gc28ec3
--001a114349d6a628f6054f04f4a1--