From mboxrd@z Thu Jan 1 00:00:00 1970 From: ayvango Subject: column view extension Date: Mon, 16 Jan 2012 13:00:50 -0800 Message-ID: <134e8528ba1.-5851758924314670245.5302843484598427533@zoho.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_41143_750190491.1326747650970" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmtfk-00085Y-U2 for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 16:00:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rmtfj-0007K2-II for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 16:00:56 -0500 Received: from sender1.zohomail.com ([72.5.230.95]:31594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rmtfj-0007JT-6l for emacs-orgmode@gnu.org; Mon, 16 Jan 2012 16:00:55 -0500 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org ------=_Part_41143_750190491.1326747650970 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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. ------=_Part_41143_750190491.1326747650970 Content-Type: application/octet-stream; name=BA.org Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=BA.org 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: ------=_Part_41143_750190491.1326747650970--