emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: simulating counter macro in property values
Date: Thu, 20 Jul 2017 07:52:28 -0400	[thread overview]
Message-ID: <CAN_Dec9c5mrp21MnJaH3wg238MVjxrekT7NsYKf+WB6Q1fJCcQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 771 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 984 bytes --]

                 reply	other threads:[~2017-07-20 11:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN_Dec9c5mrp21MnJaH3wg238MVjxrekT7NsYKf+WB6Q1fJCcQ@mail.gmail.com \
    --to=moptop99@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).