From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johan Ekh Subject: Re: Tag table entries? Date: Wed, 5 May 2010 20:29:42 +0200 Message-ID: References: <878w80674c.fsf@stats.ox.ac.uk> <4bdfdc7c.1067f10a.4239.3cc3@mx.google.com> <4be13a0f.0f67f10a.3411.7b8e@mx.google.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1016350848==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9jwq-0002Ef-1i for emacs-orgmode@gnu.org; Wed, 05 May 2010 15:07:56 -0400 Received: from [140.186.70.92] (port=33554 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9jTb-0003zC-AU for emacs-orgmode@gnu.org; Wed, 05 May 2010 14:37:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9jLt-0003Tp-9P for emacs-orgmode@gnu.org; Wed, 05 May 2010 14:29:49 -0400 Received: from mail-fx0-f41.google.com ([209.85.161.41]:35370) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9jLt-0003TT-17 for emacs-orgmode@gnu.org; Wed, 05 May 2010 14:29:45 -0400 Received: by fxm1 with SMTP id 1so4504979fxm.0 for ; Wed, 05 May 2010 11:29:42 -0700 (PDT) In-Reply-To: <4be13a0f.0f67f10a.3411.7b8e@mx.google.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1016350848== Content-Type: multipart/alternative; boundary=001485f726ea76e5330485dd02ac --001485f726ea76e5330485dd02ac Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > > > > [1 ] > > [1.1 ] > > 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 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 > > > > wrote: > > > > > > > > > Johan Ekh 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 ] > > > > [2 ] > > _______________________________________________ > > 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 > > --001485f726ea76e5330485dd02ac Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Darlan!!
I will try this as soon as I can.
Best regards,
Jo= han

On Wed, May 5, 2010 at 11:27 AM, Darl= an 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 =A0<multipart/alternative (7bit)>]
> [1.1 =A0<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:<= br> >
> >
> > For that I just use separate tables. I use a headline for each mo= nth, say
> > "May 2010" and subheadings for each category (groceries= , bills, transport,
> > etc.) with a corresponding table in each one. Each table calculat= es the
> > total for that category and has a unique name, say "BillsMay= 2010".
> >
> > All of the totals for each table are concatenated in a table
> > "ExpensesMay2010" (also in a subheadings of the month h= eadline) that has
> > one line for each category and calculates the total. There is eve= n gnuplot
> > code with org-babel to plot the amount spent in each category fro= m 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 mo= nth name
> > and the year (both used to make the name of each table unique). T= his
> > 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 eac= h 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@gm= ail.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 ac= tually 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 <ek= h.johan@gmail.com> writes:
> > > >
> > > > > Hi all,
> > > > > I wonder if it is possible to tag rows in a table?=
> > > > >
> > > > > For example, if =A0I 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 row= s. Two things come
> > to
> > > > mind.
> > > >
> > > > 1. If you just want the table for visual purposes (as o= pposed for doing
> > > > =A0 calculations with it), then you could use column-vi= ew. I.e. you would
> > > > =A0 have a subtree for groceries and a subtree for car;= categories such
> > > > =A0 as date, note and sum would be stored in properties= .
> > > >
> > > > http://orgmode.org/manual/Column-view.html#Co= lumn-view
> > > >
> > > > Visibility cycling works in column view so you can grou= p 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 suppo= rted language, then
> > > > =A0 store the category label in a column and you can tr= ansform the master
> > > > =A0 table however you want. R would be a convenient lan= guage for working
> > > > =A0 with a table like this.
> > > >
> > > > Dan
> > > >
> > > >
> > > >
> > > > >
> > > > > Best regards,
> > > > > Johan
> > > > >
> > > > > _______________________________________________ > > > > > Emacs-orgmode mailing list
> > > > > Please use `Reply All' to send replies to the = list.
> > > > > Emacs-org= mode@gnu.org
> > > > > http://lists.gnu.org/mailman/listinfo/emacs= -orgmode
> > > >
> >
> [1.2 =A0<text/html; ISO-8859-1 (quoted-printable)>]
>
> [2 =A0<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


--001485f726ea76e5330485dd02ac-- --===============1016350848== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1016350848==--