Re: [O] Alignment Regexp Should Recognize Currencies

2011-10-22 Thread Bastien
Hi Daniel,

Daniel E. Doherty ded-...@ddoherty.net writes:

 I noticed that the regular expression for recognizing what columns are
 numeric in a table for purposes of right-aligning does not pick up
 dollar values with commas.

 For example, $23,821,415.18 would be treated as text and left-aligned,
 which I don't believe is what one would expect.

To me, values that are right-aligned are those who are ready for further
computation, and letting $3 be right-aligned would be confusing.

But I understand your need.

Carsten, what do you think?

-- 
 Bastien



Re: [O] Alignment Regexp Should Recognize Currencies

2011-10-22 Thread Daniel E . Doherty
Bastien,

I thought this issue was going to die.  Thanks for reviving it.  I am
still interested and would love to hear Carsten's views.

Maybe numeric fields could have the grouping character (,) and currency
symbols stripped before being used for coumputation?

Regards,

At Sat, 22 Oct 2011 12:43:55 +0200,
bzg wrote:
 
 Hi Daniel,
 
 Daniel E. Doherty ded-...@ddoherty.net writes:
 
  I noticed that the regular expression for recognizing what columns are
  numeric in a table for purposes of right-aligning does not pick up
  dollar values with commas.
 
  For example, $23,821,415.18 would be treated as text and left-aligned,
  which I don't believe is what one would expect.
 
 To me, values that are right-aligned are those who are ready for further
 computation, and letting $3 be right-aligned would be confusing.
 
 But I understand your need.
 
 Carsten, what do you think?
 
 -- 
  Bastien



[O] Alignment Regexp Should Recognize Currencies

2011-09-09 Thread Daniel E . Doherty

All,

I noticed that the regular expression for recognizing what columns are
numeric in a table for purposes of right-aligning does not pick up
dollar values with commas.

For example, $23,821,415.18 would be treated as text and left-aligned,
which I don't believe is what one would expect.

It can be fixed by customizing the variable org-table-number-regexp,
like so:

^\([]?\(\$ *\)?[-+^.,0-9]*[0-9][-+^.0-9eEdDx()%:]*\| ... \)$
  ^
Adding the underlined parts.

My question is should this not be the default, perhaps with the Euro
symbol and other likely currency symbols added in?

Regards,
-- 



Daniel E. Doherty

Up the airy mountain,
Down the rushy glen,
We daren't go a-hunting,
For fear of little men.
  --- William Allingham (Donegal, Ireland)