emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Tag table entries?
@ 2010-05-03 20:19 Johan Ekh
  2010-05-03 20:52 ` Dan Davison
  0 siblings, 1 reply; 7+ messages in thread
From: Johan Ekh @ 2010-05-03 20:19 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 287 bytes --]

Hi all,
I wonder if it is possible to tag rows in a table?

For example, if  I have a table of expenses, i.e. columns with "date",
"note" and "sum",
and then want to group the entries into different categories such as
"groceries", "car" etc.

Can I do this someway?

Best regards,
Johan

[-- Attachment #1.2: Type: text/html, Size: 372 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Tag table entries?
  2010-05-03 20:19 Tag table entries? Johan Ekh
@ 2010-05-03 20:52 ` Dan Davison
  2010-05-04  6:36   ` Johan Ekh
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Davison @ 2010-05-03 20:52 UTC (permalink / raw)
  To: Johan Ekh; +Cc: emacs-orgmode

Johan Ekh <ekh.johan@gmail.com> writes:

> Hi all,
> I wonder if it is possible to tag rows in a table?
>
> For example, if  I have a table of expenses, i.e. columns with "date", "note" and "sum",
> and then want to group the entries into different categories such as "groceries", "car" etc.
>
> Can I do this someway?

Hi Johan,

You can't attach metadata such as tags to table rows. Two things come to
mind.

1. If you just want the table for visual purposes (as opposed for doing
   calculations with it), then you could use column-view. I.e. you would
   have a subtree for groceries and a subtree for car; categories such
   as date, note and sum would be stored in properties.

http://orgmode.org/manual/Column-view.html#Column-view

Visibility cycling works in column view so you can group and ungroup the rows.

[is there anyway of creating a normal Org table from a column view
"table"?]

2. org-babel: If you're happy with a suitable supported language, then
   store the category label in a column and you can transform the master
   table however you want. R would be a convenient language for working
   with a table like this.

Dan



>
> Best regards,
> Johan
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Tag table entries?
  2010-05-03 20:52 ` Dan Davison
@ 2010-05-04  6:36   ` Johan Ekh
  2010-05-04  8:36     ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 7+ messages in thread
From: Johan Ekh @ 2010-05-04  6:36 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1921 bytes --]

Thanks Dan!
My idea was to go through a long imported table and quickly categorize the
different rows
into a number of predefined categories, without having to actually type the
category for
each row. Can I do that?

If babel is a way, I think I would prefer to use python as I am familiar
with it. But I have not used
it with babel, is that possible?

Best regards,
Johan


On Mon, May 3, 2010 at 10:52 PM, Dan Davison <davison@stats.ox.ac.uk> wrote:

> Johan Ekh <ekh.johan@gmail.com> writes:
>
> > Hi all,
> > I wonder if it is possible to tag rows in a table?
> >
> > For example, if  I have a table of expenses, i.e. columns with "date",
> "note" and "sum",
> > and then want to group the entries into different categories such as
> "groceries", "car" etc.
> >
> > Can I do this someway?
>
> Hi Johan,
>
> You can't attach metadata such as tags to table rows. Two things come to
> mind.
>
> 1. If you just want the table for visual purposes (as opposed for doing
>   calculations with it), then you could use column-view. I.e. you would
>   have a subtree for groceries and a subtree for car; categories such
>   as date, note and sum would be stored in properties.
>
> http://orgmode.org/manual/Column-view.html#Column-view
>
> Visibility cycling works in column view so you can group and ungroup the
> rows.
>
> [is there anyway of creating a normal Org table from a column view
> "table"?]
>
> 2. org-babel: If you're happy with a suitable supported language, then
>   store the category label in a column and you can transform the master
>   table however you want. R would be a convenient language for working
>   with a table like this.
>
> Dan
>
>
>
> >
> > Best regards,
> > Johan
> >
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 2828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Tag table entries?
  2010-05-04  6:36   ` Johan Ekh
@ 2010-05-04  8:36     ` Darlan Cavalcante Moreira
  2010-05-04 14:35       ` Johan Ekh
  0 siblings, 1 reply; 7+ messages in thread
From: Darlan Cavalcante Moreira @ 2010-05-04  8:36 UTC (permalink / raw)
  To: Johan Ekh; +Cc: emacs-orgmode


For that I just use separate tables. I use a headline for each month, say
"May 2010" and subheadings for each category (groceries, bills, transport,
etc.) with a corresponding table in each one. Each table calculates the
total for that category and has a unique name, say "BillsMay2010".

All of the totals for each table are concatenated in a table
"ExpensesMay2010" (also in a subheadings of the month headline) that has
one line for each category and calculates the total. There is even gnuplot
code with org-babel to plot the amount spent in each category from the
"ExpensesMay2010" table.

Of course there is a snippet (with yasnippet) for all of this and in the
first day of the month I call the snippet and only provide the month name
and the year (both used to make the name of each table unique). This
snippet makes easy creating all the infrastructure for each month and org
speedkeys makes easy navigating the categories to quickly add
something.

This works very well and I only need to be careful and update each table
(C-u C-u C-c *) when I make some change.

Darlan

At Tue, 4 May 2010 08:36:05 +0200,
Johan Ekh <ekh.johan@gmail.com> wrote:
> 
> Thanks Dan!
> My idea was to go through a long imported table and quickly categorize the
> different rows
> into a number of predefined categories, without having to actually type the
> category for
> each row. Can I do that?
> 
> If babel is a way, I think I would prefer to use python as I am familiar
> with it. But I have not used
> it with babel, is that possible?
> 
> Best regards,
> Johan
> 
> 
> On Mon, May 3, 2010 at 10:52 PM, Dan Davison <davison@stats.ox.ac.uk> wrote:
> 
> > Johan Ekh <ekh.johan@gmail.com> writes:
> >
> > > Hi all,
> > > I wonder if it is possible to tag rows in a table?
> > >
> > > For example, if  I have a table of expenses, i.e. columns with "date",
> > "note" and "sum",
> > > and then want to group the entries into different categories such as
> > "groceries", "car" etc.
> > >
> > > Can I do this someway?
> >
> > Hi Johan,
> >
> > You can't attach metadata such as tags to table rows. Two things come to
> > mind.
> >
> > 1. If you just want the table for visual purposes (as opposed for doing
> >   calculations with it), then you could use column-view. I.e. you would
> >   have a subtree for groceries and a subtree for car; categories such
> >   as date, note and sum would be stored in properties.
> >
> > http://orgmode.org/manual/Column-view.html#Column-view
> >
> > Visibility cycling works in column view so you can group and ungroup the
> > rows.
> >
> > [is there anyway of creating a normal Org table from a column view
> > "table"?]
> >
> > 2. org-babel: If you're happy with a suitable supported language, then
> >   store the category label in a column and you can transform the master
> >   table however you want. R would be a convenient language for working
> >   with a table like this.
> >
> > Dan
> >
> >
> >
> > >
> > > Best regards,
> > > Johan
> > >
> > > _______________________________________________
> > > Emacs-orgmode mailing list
> > > Please use `Reply All' to send replies to the list.
> > > Emacs-orgmode@gnu.org
> > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> >

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

* Re: Tag table entries?
  2010-05-04  8:36     ` Darlan Cavalcante Moreira
@ 2010-05-04 14:35       ` Johan Ekh
  2010-05-05  9:27         ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 7+ messages in thread
From: Johan Ekh @ 2010-05-04 14:35 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 3684 bytes --]

That sounds very good! This is the functionality I am looking for!
Would you like to share your yasnippet and any other settings that you have
worked out?
It would help me alot!

Thanks!

Johan

On Tue, May 4, 2010 at 10:36 AM, Darlan Cavalcante Moreira <
darcamo@gmail.com> wrote:

>
> For that I just use separate tables. I use a headline for each month, say
> "May 2010" and subheadings for each category (groceries, bills, transport,
> etc.) with a corresponding table in each one. Each table calculates the
> total for that category and has a unique name, say "BillsMay2010".
>
> All of the totals for each table are concatenated in a table
> "ExpensesMay2010" (also in a subheadings of the month headline) that has
> one line for each category and calculates the total. There is even gnuplot
> code with org-babel to plot the amount spent in each category from the
> "ExpensesMay2010" table.
>
> Of course there is a snippet (with yasnippet) for all of this and in the
> first day of the month I call the snippet and only provide the month name
> and the year (both used to make the name of each table unique). This
> snippet makes easy creating all the infrastructure for each month and org
> speedkeys makes easy navigating the categories to quickly add
> something.
>
> This works very well and I only need to be careful and update each table
> (C-u C-u C-c *) when I make some change.
>
> Darlan
>
> At Tue, 4 May 2010 08:36:05 +0200,
> Johan Ekh <ekh.johan@gmail.com> wrote:
> >
> > Thanks Dan!
> > My idea was to go through a long imported table and quickly categorize
> the
> > different rows
> > into a number of predefined categories, without having to actually type
> the
> > category for
> > each row. Can I do that?
> >
> > If babel is a way, I think I would prefer to use python as I am familiar
> > with it. But I have not used
> > it with babel, is that possible?
> >
> > Best regards,
> > Johan
> >
> >
> > On Mon, May 3, 2010 at 10:52 PM, Dan Davison <davison@stats.ox.ac.uk>
> wrote:
> >
> > > Johan Ekh <ekh.johan@gmail.com> writes:
> > >
> > > > Hi all,
> > > > I wonder if it is possible to tag rows in a table?
> > > >
> > > > For example, if  I have a table of expenses, i.e. columns with
> "date",
> > > "note" and "sum",
> > > > and then want to group the entries into different categories such as
> > > "groceries", "car" etc.
> > > >
> > > > Can I do this someway?
> > >
> > > Hi Johan,
> > >
> > > You can't attach metadata such as tags to table rows. Two things come
> to
> > > mind.
> > >
> > > 1. If you just want the table for visual purposes (as opposed for doing
> > >   calculations with it), then you could use column-view. I.e. you would
> > >   have a subtree for groceries and a subtree for car; categories such
> > >   as date, note and sum would be stored in properties.
> > >
> > > http://orgmode.org/manual/Column-view.html#Column-view
> > >
> > > Visibility cycling works in column view so you can group and ungroup
> the
> > > rows.
> > >
> > > [is there anyway of creating a normal Org table from a column view
> > > "table"?]
> > >
> > > 2. org-babel: If you're happy with a suitable supported language, then
> > >   store the category label in a column and you can transform the master
> > >   table however you want. R would be a convenient language for working
> > >   with a table like this.
> > >
> > > Dan
> > >
> > >
> > >
> > > >
> > > > Best regards,
> > > > Johan
> > > >
> > > > _______________________________________________
> > > > Emacs-orgmode mailing list
> > > > Please use `Reply All' to send replies to the list.
> > > > Emacs-orgmode@gnu.org
> > > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> > >
>

[-- Attachment #1.2: Type: text/html, Size: 5138 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Tag table entries?
  2010-05-04 14:35       ` Johan Ekh
@ 2010-05-05  9:27         ` Darlan Cavalcante Moreira
  2010-05-05 18:29           ` Johan Ekh
  0 siblings, 1 reply; 7+ messages in thread
From: Darlan Cavalcante Moreira @ 2010-05-05  9:27 UTC (permalink / raw)
  To: Johan Ekh; +Cc: emacs-orgmode

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


The snippet is attached.

In my case I call the snippet inside a 2-level heading (also using odd
number of start for each level) and you will probably want to modify the
snippet to your needs.

The snippet only asks the name of the current month, the current year and
the name of the last month. I suppose this could be completely automatic if
you know how to get this information with lisp.

Darlan


[-- Attachment #2: expenses --]
[-- Type: application/octet-stream, Size: 6518 bytes --]

#name : expenses
# contributor: Darlan Cavalcante Moreira
# --
$0***** ${1:Month} ${2:Year}
      Org speed keys is your friend to navigate the headlines
******* Food
        Expenses with food (not including groceries)
        #+TBLNAME: Food$1$2
        |   | *Local* | *Date*  | *Value* |
        |---+---------+---------+---------|
        |   | Lunch   |         |    0.00 |
        |   | Coffee  |         |    0.00 |
        |---+---------+---------+---------|
        | # |         | *Total* |    0.00 |
        #+TBLFM: @4\$4=vsum(@2..@-1);%.2f

******* Bills
        #+TBLNAME: Bills$1$2
        |   | *Bill*                   | *Date* | *Value* |
        |---+--------------------------+--------+---------|
        |   | Health Insurance         |        |    0.00 |
        |   | Cell Phone               |        |    0.00 |
        |   | Something else           |        |    0.00 |
        | # | Credit Card (last month) |        |         |
        |---+--------------------------+--------+---------|
        | # | *Total*                  |        |    0.00 |
        #+TBLFM: @5\$4=remote(CreditCard${3:Last month}$2,\$LR4);%.2f::@6\$4=vsum(@2\$4..@-1\$4);%.2f

******* Entertainment
        #+TBLNAME: Entertainment$1$2
        |   | *Type*  | *Date* | *Value* |
        |---+---------+--------+---------|
        |   | Movies  |        |    0.00 |
        |   | etc     |        |    0.00 |
        |---+---------+--------+---------|
        | # | *Total* |        |    0.00 |
        #+TBLFM: @4\$4=vsum(@2..@-1);%.2f

******* Transport
        #+TBLNAME: Transport$1$2
        |   | *Type*       | *Date* | *Valor* |
        |---+--------------+--------+---------|
        |   | Fuel         |        |    0.00 |
        |   | Bus ticket   |        |    0.00 |
        |   | Train ticket |        |    0.00 |
        |---+--------------+--------+---------|
        | # | *Total*      |        |    0.00 |
        #+TBLFM: @5\$4=vsum(@2..@-1);%.2f

******* Miscellaneous
        Whatever does not fit the other categories
        #+TBLNAME: Miscellaneous$1$2
        |   | *Type*  | *Date* | *Value* |
        |---+---------+--------+---------|
        |   | FNAC    |        |    0.00 |
        |---+---------+--------+---------|
        | # | *Total* |        |    0.00 |
        #+TBLFM: @3\$4=vsum(@2..@-1);%.2f

******* Groceries
        I like to put each item here and separate the dates with hlines.

        If an item cost according to weight I put the weight in the
        "Quantity" and the cost/kg in the "Cost per unit"

        #+TBLNAME: Groceries$1$2
        |   | *Date* | *Item* | *Quantity* | *Cost per unit* | *Payed* |
        |---+--------+--------+------------+-----------------+---------|
        | # | Date1  | item   |          0 |            0.00 |    0.00 |
        | # |        | item   |       0.00 |            0.00 |    0.00 |
        |---+--------+--------+------------+-----------------+---------|
        | # | Date2  | item   |        0.0 |            0.00 |    0.00 |
        |---+--------+--------+------------+-----------------+---------|
        | # |        |        |            |                 |    0.00 |
        #+TBLFM: \$6=\$4*\$5;%.2f::@5\$6=vsum(@2..@-1);%.2f
        
******* Total of expenses in the month
        The table here concatenates the results from all of the other
        tables. Update the table with C-u C-u C-c *
#+TBLNAME: Expenses$1$2
#+PLOT: ind:2 deps:(4) with:histograms
        |   | *Category*     | *Value* |
        |---+----------------+---------|
        | # | Entertainment  |         |
        | # | Bills          |         |
        | # | Food           |         |
        | # | Transport      |         |
        | # | Miscellaneous  |         |
        | # | Groceries      |         |
        |---+----------------+---------|
        | # | *Total*        |         |
        | # | Total + Credit |         |
        #+TBLFM: @2\$3=remote(Entertainment$1$2,\$LR4);%.2f::@3\$3=remote(Bills$1$2,\$LR4);%.2f::@4\$3=remote(Food$1$2,\$LR4);%.2f::@5\$3=remote(Transport$1$2,\$LR4);%.2f::@6\$3=remote(Miscellaneous$1$2,\$LR4);%.2f::@7\$3=remote(Groceries$1$2,\$LR6);%.2f::@8\$3=vsum(@2\$3..@-1);%.2f::@9\$3=@-1+remote(CreditCard$1$2,\$LR4);%.2f

        Use C-c C-c to run the code below (requires org-babel and gnuplot)
        #+BEGIN_SRC gnuplot :var data=Expenses$1$2[1:-3] :var summation=Expenses$1$2[9,2] :results silent :exports none
          reset
          set key off
          set title "Expenses de $1 $2"
          set xtics nomirror rotate by -10
          plot data using 3:xticlabels(2) with histograms
          set label "Max in a single category: %.2f",GPVAL_Y2_MAX at graph 0.03, graph 0.93
          set label "Total: %.2f",summation at graph 0.03, graph 0.88 textcolor rgbcolor "red"
        #+END_SRC

******* Credit Cards Expenses
        Expenses with Credit Card will not be counted in this month
        expenses but in the next one.

        However, the total expenses table also has "Total + Credit" that
        included the expenses with the credit card for the current month.

        Since international expenses with the credit card are in dollar I
        use the constant *DolarParaReal* to convert from dollar to
        Brazilian Reais in order to have the total spent with credit
        card. I update this constant each month when I know the correct
        value used by the bank for the month.

        #+CAPTION: Expenses using credit card in $1-$2
        #+TBLNAME: CreditCard$1$2
        |    | *Date* | *Purchase*                       | *Value* | *Valor (\$)* |
        |----+--------+----------------------------------+---------+--------------|
        |    |        | item                             |    0.00 |         0.00 |
        |    |        | item                             |    0.00 |         0.00 |
        |----+--------+----------------------------------+---------+--------------|
        | \$ |        | DolarParaReal=1.718              |         |              |
        | #  |        | *Total in each currency*         |    0.00 |         0.00 |
        | #  |        | *Total (in reais)*               |    0.00 |         0.00 |
        |----+--------+----------------------------------+---------+--------------|
        | #  |        | *Sum of the expenses (in reais)* |    0.00 |              |
        #+TBLFM: @5\$4=vsum(@2..@-1);%.2f::@5\$5=vsum(@2..@-1);%.2f::@6\$4=@5\$4;%.2f::@6\$5=@5\$5*\$DolarParaReal;%.2f::@7\$4=@-1\$4+@-1\$5;%.2f

[-- Attachment #3: Type: text/plain, Size: 4370 bytes --]




At Tue, 4 May 2010 16:35:07 +0200,
Johan Ekh <ekh.johan@gmail.com> wrote:
> 
> [1  <multipart/alternative (7bit)>]
> [1.1  <text/plain; ISO-8859-1 (7bit)>]
> That sounds very good! This is the functionality I am looking for!
> Would you like to share your yasnippet and any other settings that you have
> worked out?
> It would help me alot!
> 
> Thanks!
> 
> Johan
> 
> On Tue, May 4, 2010 at 10:36 AM, Darlan Cavalcante Moreira <
> darcamo@gmail.com> wrote:
> 
> >
> > For that I just use separate tables. I use a headline for each month, say
> > "May 2010" and subheadings for each category (groceries, bills, transport,
> > etc.) with a corresponding table in each one. Each table calculates the
> > total for that category and has a unique name, say "BillsMay2010".
> >
> > All of the totals for each table are concatenated in a table
> > "ExpensesMay2010" (also in a subheadings of the month headline) that has
> > one line for each category and calculates the total. There is even gnuplot
> > code with org-babel to plot the amount spent in each category from the
> > "ExpensesMay2010" table.
> >
> > Of course there is a snippet (with yasnippet) for all of this and in the
> > first day of the month I call the snippet and only provide the month name
> > and the year (both used to make the name of each table unique). This
> > snippet makes easy creating all the infrastructure for each month and org
> > speedkeys makes easy navigating the categories to quickly add
> > something.
> >
> > This works very well and I only need to be careful and update each table
> > (C-u C-u C-c *) when I make some change.
> >
> > Darlan
> >
> > At Tue, 4 May 2010 08:36:05 +0200,
> > Johan Ekh <ekh.johan@gmail.com> wrote:
> > >
> > > Thanks Dan!
> > > My idea was to go through a long imported table and quickly categorize
> > the
> > > different rows
> > > into a number of predefined categories, without having to actually type
> > the
> > > category for
> > > each row. Can I do that?
> > >
> > > If babel is a way, I think I would prefer to use python as I am familiar
> > > with it. But I have not used
> > > it with babel, is that possible?
> > >
> > > Best regards,
> > > Johan
> > >
> > >
> > > On Mon, May 3, 2010 at 10:52 PM, Dan Davison <davison@stats.ox.ac.uk>
> > wrote:
> > >
> > > > Johan Ekh <ekh.johan@gmail.com> writes:
> > > >
> > > > > Hi all,
> > > > > I wonder if it is possible to tag rows in a table?
> > > > >
> > > > > For example, if  I have a table of expenses, i.e. columns with
> > "date",
> > > > "note" and "sum",
> > > > > and then want to group the entries into different categories such as
> > > > "groceries", "car" etc.
> > > > >
> > > > > Can I do this someway?
> > > >
> > > > Hi Johan,
> > > >
> > > > You can't attach metadata such as tags to table rows. Two things come
> > to
> > > > mind.
> > > >
> > > > 1. If you just want the table for visual purposes (as opposed for doing
> > > >   calculations with it), then you could use column-view. I.e. you would
> > > >   have a subtree for groceries and a subtree for car; categories such
> > > >   as date, note and sum would be stored in properties.
> > > >
> > > > http://orgmode.org/manual/Column-view.html#Column-view
> > > >
> > > > Visibility cycling works in column view so you can group and ungroup
> > the
> > > > rows.
> > > >
> > > > [is there anyway of creating a normal Org table from a column view
> > > > "table"?]
> > > >
> > > > 2. org-babel: If you're happy with a suitable supported language, then
> > > >   store the category label in a column and you can transform the master
> > > >   table however you want. R would be a convenient language for working
> > > >   with a table like this.
> > > >
> > > > Dan
> > > >
> > > >
> > > >
> > > > >
> > > > > Best regards,
> > > > > Johan
> > > > >
> > > > > _______________________________________________
> > > > > Emacs-orgmode mailing list
> > > > > Please use `Reply All' to send replies to the list.
> > > > > Emacs-orgmode@gnu.org
> > > > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> > > >
> >
> [1.2  <text/html; ISO-8859-1 (quoted-printable)>]
> 
> [2  <text/plain; us-ascii (7bit)>]
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Tag table entries?
  2010-05-05  9:27         ` Darlan Cavalcante Moreira
@ 2010-05-05 18:29           ` Johan Ekh
  0 siblings, 0 replies; 7+ messages in thread
From: Johan Ekh @ 2010-05-05 18:29 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 5250 bytes --]

Thanks Darlan!!
I will try this as soon as I can.
Best regards,
Johan

On Wed, May 5, 2010 at 11:27 AM, Darlan Cavalcante Moreira <
darcamo@gmail.com> wrote:

>
> The snippet is attached.
>
> In my case I call the snippet inside a 2-level heading (also using odd
> number of start for each level) and you will probably want to modify the
> snippet to your needs.
>
> The snippet only asks the name of the current month, the current year and
> the name of the last month. I suppose this could be completely automatic if
> you know how to get this information with lisp.
>
> Darlan
>
>
>
>
>
> At Tue, 4 May 2010 16:35:07 +0200,
> Johan Ekh <ekh.johan@gmail.com> wrote:
> >
> > [1  <multipart/alternative (7bit)>]
> > [1.1  <text/plain; ISO-8859-1 (7bit)>]
> > That sounds very good! This is the functionality I am looking for!
> > Would you like to share your yasnippet and any other settings that you
> have
> > worked out?
> > It would help me alot!
> >
> > Thanks!
> >
> > Johan
> >
> > On Tue, May 4, 2010 at 10:36 AM, Darlan Cavalcante Moreira <
> > darcamo@gmail.com> wrote:
> >
> > >
> > > For that I just use separate tables. I use a headline for each month,
> say
> > > "May 2010" and subheadings for each category (groceries, bills,
> transport,
> > > etc.) with a corresponding table in each one. Each table calculates the
> > > total for that category and has a unique name, say "BillsMay2010".
> > >
> > > All of the totals for each table are concatenated in a table
> > > "ExpensesMay2010" (also in a subheadings of the month headline) that
> has
> > > one line for each category and calculates the total. There is even
> gnuplot
> > > code with org-babel to plot the amount spent in each category from the
> > > "ExpensesMay2010" table.
> > >
> > > Of course there is a snippet (with yasnippet) for all of this and in
> the
> > > first day of the month I call the snippet and only provide the month
> name
> > > and the year (both used to make the name of each table unique). This
> > > snippet makes easy creating all the infrastructure for each month and
> org
> > > speedkeys makes easy navigating the categories to quickly add
> > > something.
> > >
> > > This works very well and I only need to be careful and update each
> table
> > > (C-u C-u C-c *) when I make some change.
> > >
> > > Darlan
> > >
> > > At Tue, 4 May 2010 08:36:05 +0200,
> > > Johan Ekh <ekh.johan@gmail.com> wrote:
> > > >
> > > > Thanks Dan!
> > > > My idea was to go through a long imported table and quickly
> categorize
> > > the
> > > > different rows
> > > > into a number of predefined categories, without having to actually
> type
> > > the
> > > > category for
> > > > each row. Can I do that?
> > > >
> > > > If babel is a way, I think I would prefer to use python as I am
> familiar
> > > > with it. But I have not used
> > > > it with babel, is that possible?
> > > >
> > > > Best regards,
> > > > Johan
> > > >
> > > >
> > > > On Mon, May 3, 2010 at 10:52 PM, Dan Davison <davison@stats.ox.ac.uk
> >
> > > wrote:
> > > >
> > > > > Johan Ekh <ekh.johan@gmail.com> writes:
> > > > >
> > > > > > Hi all,
> > > > > > I wonder if it is possible to tag rows in a table?
> > > > > >
> > > > > > For example, if  I have a table of expenses, i.e. columns with
> > > "date",
> > > > > "note" and "sum",
> > > > > > and then want to group the entries into different categories such
> as
> > > > > "groceries", "car" etc.
> > > > > >
> > > > > > Can I do this someway?
> > > > >
> > > > > Hi Johan,
> > > > >
> > > > > You can't attach metadata such as tags to table rows. Two things
> come
> > > to
> > > > > mind.
> > > > >
> > > > > 1. If you just want the table for visual purposes (as opposed for
> doing
> > > > >   calculations with it), then you could use column-view. I.e. you
> would
> > > > >   have a subtree for groceries and a subtree for car; categories
> such
> > > > >   as date, note and sum would be stored in properties.
> > > > >
> > > > > http://orgmode.org/manual/Column-view.html#Column-view
> > > > >
> > > > > Visibility cycling works in column view so you can group and
> ungroup
> > > the
> > > > > rows.
> > > > >
> > > > > [is there anyway of creating a normal Org table from a column view
> > > > > "table"?]
> > > > >
> > > > > 2. org-babel: If you're happy with a suitable supported language,
> then
> > > > >   store the category label in a column and you can transform the
> master
> > > > >   table however you want. R would be a convenient language for
> working
> > > > >   with a table like this.
> > > > >
> > > > > Dan
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > > Best regards,
> > > > > > Johan
> > > > > >
> > > > > > _______________________________________________
> > > > > > Emacs-orgmode mailing list
> > > > > > Please use `Reply All' to send replies to the list.
> > > > > > Emacs-orgmode@gnu.org
> > > > > > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> > > > >
> > >
> > [1.2  <text/html; ISO-8859-1 (quoted-printable)>]
> >
> > [2  <text/plain; us-ascii (7bit)>]
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

[-- Attachment #1.2: Type: text/html, Size: 7708 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-05-05 19:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-03 20:19 Tag table entries? Johan Ekh
2010-05-03 20:52 ` Dan Davison
2010-05-04  6:36   ` Johan Ekh
2010-05-04  8:36     ` Darlan Cavalcante Moreira
2010-05-04 14:35       ` Johan Ekh
2010-05-05  9:27         ` Darlan Cavalcante Moreira
2010-05-05 18:29           ` Johan Ekh

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