From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: simulating counter macro in property values Date: Thu, 20 Jul 2017 07:52:28 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113e46420e42ee0554be6243" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dYA0O-0003yF-CN for emacs-orgmode@gnu.org; Thu, 20 Jul 2017 07:52:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dYA0N-0003lO-KZ for emacs-orgmode@gnu.org; Thu, 20 Jul 2017 07:52:32 -0400 Received: from mail-qt0-x230.google.com ([2607:f8b0:400d:c0d::230]:37516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dYA0N-0003km-Fq for emacs-orgmode@gnu.org; Thu, 20 Jul 2017 07:52:31 -0400 Received: by mail-qt0-x230.google.com with SMTP id m7so19687564qtm.4 for ; Thu, 20 Jul 2017 04:52:29 -0700 (PDT) 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: Org Mode --001a113e46420e42ee0554be6243 Content-Type: text/plain; charset="UTF-8" I export a series of subtrees to a static website. The subtrees are listed in a menu that the site generator creates. The position in the menu is controlled by an org property (":HUGO_MENU_OVERRIDERS: :weight X"). I would really like to automate the "weight" value so that the menu order reflects the order of subtrees in my source file. I'd also like to keep some space between the assigned weightings, though that's not really essential. So essentially I want to be able to write this: ** Some Important Stuff :PROPERTIES: :HUGO_MENU_OVERRIDES: (* {{{n}}} 10) :END: ... and have that lisp expression, AND the counter, evaluated before export. Obviously this does not work, but is there a way to simulate this behaviour? Thanks as always to the community! matt --001a113e46420e42ee0554be6243 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I export a series of subtrees to a static website.=C2= =A0 The subtrees are listed in a menu that the site generator=C2=A0 creates= .=C2=A0 The position in the menu is controlled by an org property (":H= UGO_MENU_OVERRIDERS: :weight X").=C2=A0

= I would really like to automate the "weight" value so that the me= nu order reflects the order of subtrees in my source file. I'd also lik= e to keep some space between the assigned weightings, though that's not= really essential.=C2=A0 So essentially I want to be able to write this:

** Some Important Stuff
:PROPERTIES:
=
:HUGO_MENU_OVERRIDES: (* {{{n}}} 10)
:END:

... and have that lisp expression, AND the counter, evaluated befor= e export.=C2=A0 Obviously this does not work, but is there a way to simulat= e this behaviour?

Thanks as always to the communit= y!
matt
--001a113e46420e42ee0554be6243--