emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* column view extension
@ 2012-01-16 21:00 ayvango
  2012-01-17  8:50 ` Eric S Fraga
  2012-01-17 19:33 ` Michael Brand
  0 siblings, 2 replies; 3+ messages in thread
From: ayvango @ 2012-01-16 21:00 UTC (permalink / raw)
  To: emacs-orgmode

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

I've found a non-standard use case for org-mode.

There is plenty of spreadsheets engine with common drawback: spreadsheet cells follow original memory cell abstraction that are handy for a computer but is inconvenient for human. Hierarchical structures is more natural  and in some cases may be used much more effective for at almost half of the data models.

I would use a popular wargame Warhammer 40k army list as example. The army list consist of the sections: HQ (headquarters), Elite, Troop, FA (fast attack), HS (heavy support). Every section divides further on squads and their options. Those an hierarchical structure defined. An army list has it limits on choices for points spent on, occupied slots and so on.

Spreadsheets is inconvenient for roster accounting since I doesn't  know the number of squad, persons it incorporates and their wargear in advance. I would rather extend it dynamically. I've tried to write some template in terms of cell-processor but found it too complicated. It have expressed perfectly in terms of  tree-processor (my own name)  though. I defines some kind of attribute grammar as a tree processor.

The file containing referenced army list attached to the post.

Org-mode gives me more powerful instrument than any spreadsheet I've meet. In two strings it can express the structure demands plenty of verbosity to be recorded in any spreadsheet. I've just defined COLUMNS property for an outline and org-mode gather all required information from its subnodes.

This method saves me a lot of time but it may not be used with other hierarchical data models as simply as for the army list. This models may require more complicated  summary types than those provided from ground. Is there any way to incorporate abstract grammar for defining and processing properties. There is already a way to define synthesized attributes as well as  inherited ones. But there is no way to bind them together with a function to calculate output.

Example. Every node has its point point cost. Parent node costs calculated by summing all its subnodes cost. But I'd like to introduce new attribute: node share that represents point weight of the node among its siblings ( 100% * node.cost / parent(node).cost ). Another example. I'd like to separate node own cost from computed subnodes cost sum. That way I escape creating boring virtual parent nodes existing exclusively for summing model cost with costs of it's own wargear.

I'm using org-mode for it convenience  but I don't know much about lisp and can't extend org-mode. I hope someone become interested in creating spreadtree application based on existing properties code.

[-- Attachment #2: BA.org --]
[-- Type: application/octet-stream, Size: 3233 bytes --]

BA Army 2000
* Army
  :PROPERTIES:
  :COLUMNS:  %25ITEM %4Cost{+} %3KP{+} %7Scoring{+} %4Slot{+}
  :END:
** HQ 
*** Mephiston
    :PROPERTIES:
    :Cost:     250
    :KP:       1
    :Slot:     1
    :END:
*** Dante
    :PROPERTIES:
    :Cost:     225
    :Slot:     1
    :KP:       1
    :END:
** Elite
*** Sanguinary priest
    :PROPERTIES:
    :KP:       1
    :Scoring:  0
    :Slot:     1
    :END:
**** priest
***** priest
      :PROPERTIES:
      :Cost:     50
      :END:
***** jump pack
      :PROPERTIES:
      :Cost:     25
      :END:
***** power sword
      :PROPERTIES:
      :Cost:     15
      :END:
***** melta bomb
      :PROPERTIES:
      :Cost:     5
      :END:
**** priest
***** priest
      :PROPERTIES:
      :Cost:     50
      :END:
***** jump pack
      :PROPERTIES:
      :Cost:     25
      :END:
***** power sword
      :PROPERTIES:
      :Cost:     15
      :END:
***** melta bomb
      :PROPERTIES:
      :Cost:     5
      :END:

** Troops
*** Assault space mariners
    :PROPERTIES:
    :KP:       1
    :Scoring:  1
    :Slot:     1
    :END:
**** 10x Assault sm
     :PROPERTIES:
     :Cost:     180
     :END:
**** 2x inferno
     :PROPERTIES:
     :Cost:     30
     :END:
**** Sergeant wargear
***** meltabomb
      :PROPERTIES:
      :Cost:     5
      :END:
***** power weapon
      :PROPERTIES:
      :Cost:     15
      :END:
***** combat shield
      :PROPERTIES:
      :Cost:     5
      :END:
***** Sergeant
      :PROPERTIES:
      :Cost:     10
      :END:
*** Scout squad
    :PROPERTIES:
    :KP:       1
    :Scoring:  1
    :Slot:     1
    :END:
**** scouts x8
     :PROPERTIES:
     :Cost:     104
     :END:
**** missile launcher
     :PROPERTIES:
     :Cost:     10
     :END:
**** Sergeant
     :PROPERTIES:
     :Cost:     10
     :END:
*** Scout squad
    :PROPERTIES:
    :KP:       1
    :Scoring:  1
    :Slot:     1
    :END:
**** scouts x7
     :PROPERTIES:
     :Cost:     91
     :END:
**** missile launcher
     :PROPERTIES:
     :Cost:     10
     :END:
**** Sergeant
     :PROPERTIES:
     :Cost:     10
     :END:
*** Sanguinary guard
    :PROPERTIES:
    :KP:       1
    :Scoring:  1
    :Slot:     1
    :END:
**** Guards x5
     :PROPERTIES:
     :Cost:     200
     :END:
**** Inferno pistols x3
     :PROPERTIES:
     :Cost:     30
     :END:
**** masks x5
     :PROPERTIES:
     :Cost:     25
     :END:
*** Sanguinary guard
    :PROPERTIES:
    :KP:       1
    :Scoring:  1
    :Slot:     1
    :END:
**** Guards x5
     :PROPERTIES:
     :Cost:     200
     :END:
**** Chapter Banner
     :PROPERTIES:
     :Cost:     30
     :END:
**** Inferno pistols x3
     :PROPERTIES:
     :Cost:     30
     :END:
** FastAttack
** HeavySupport
*** StormRaven
    :PROPERTIES:
    :KP:       1
    :Slot:     1
    :END:
**** StormRaven
     :PROPERTIES:
     :Cost:     200
     :END:
**** Extra Armour
     :PROPERTIES:
     :Cost:     15
     :END:
**** Locator Beacon
     :PROPERTIES:
     :Cost:     10
     :END:
**** TwinAssoult
**** TwinMMelta
*** Dreadnought
    :PROPERTIES:
    :KP:       1
    :Slot:     1
    :END:
**** Dreadnought
     :PROPERTIES:
     :Cost:     105
     :END:
**** Assault Canon
     :PROPERTIES:
     :Cost:     10
     :END:

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-17 19:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 21:00 column view extension ayvango
2012-01-17  8:50 ` Eric S Fraga
2012-01-17 19:33 ` Michael Brand

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).