From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Bug in org-table-convert-region? Date: Tue, 28 May 2013 00:59:45 +0200 Message-ID: <87vc64vxjy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uh6Ob-0000kr-8P for emacs-orgmode@gnu.org; Mon, 27 May 2013 19:00:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uh6OV-0004LN-CQ for emacs-orgmode@gnu.org; Mon, 27 May 2013 19:00:05 -0400 Received: from plane.gmane.org ([80.91.229.3]:52891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uh6OV-0004LG-6d for emacs-orgmode@gnu.org; Mon, 27 May 2013 18:59:59 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uh6OT-0008K2-JY for emacs-orgmode@gnu.org; Tue, 28 May 2013 00:59:57 +0200 Received: from g231111031.adsl.alicedsl.de ([92.231.111.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 May 2013 00:59:57 +0200 Received: from tjolitz by g231111031.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 May 2013 00:59:57 +0200 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 Hi List, using 'M-: (org-table-convert-region beg end 2) on this output (with beg/end being the points before and after the tabular data) ,------------------------------------------------------------------- | === Error on training data === | | Correctly Classified Instances 147 98 % | Incorrectly Classified Instances 3 2 % | Kappa statistic 0.97 | Mean absolute error 0.0233 | Root mean squared error 0.108 | Relative absolute error 5.2482 % | Root relative squared error 22.9089 % | Total Number of Instances 150 `------------------------------------------------------------------- I get what I want: | Correctly Classified Instances | 144 | 96 | % | | Incorrectly Classified Instances | 6 | 4 | % | | Kappa statistic | 0.94 | | | | Mean absolute error | 0.035 | | | | Root mean squared error | 0.1586 | | | | Relative absolute error | 7.8705 % | | | | Root relative squared error | 33.6353 % | | | | Total Number of Instances | 150 | | | However, using 'C-u 2 M-x org-table-convert-region' on the marked region yields this: | Correctly | Classified | Instances | 144 | 96 | % | | Incorrectly | Classified | Instances | 6 | 4 | % | | Kappa | statistic | 0.94 | | | | | Mean | absolute | error | 0.035 | | | | Root | mean | squared | error | 0.1586 | | | Relative | absolute | error | 7.8705 | % | | | Root | relative | squared | error | 33.6353 | % | | Total | Number | of | Instances | 150 | | >From the comment-string: ,----------------------------------------------------------------------- | (org-table-convert-region BEG0 END0 &optional SEPARATOR) | | Convert region to a table.[...] | SEPARATOR specifies the field separator in the lines. It can have the | following values: | | '(4) Use the comma as a field separator | '(16) Use a TAB as field separator | integer When a number, use that many spaces as field separator | nil When nil, the command tries to be smart and figure out the `----------------------------------------------------------------------- and from the elisp manual: ,----------------------------------------------------------------------- | Here are the results of calling display-prefix with various raw prefix | arguments: | | C-u M-x display-prefix -| (4) | | C-u C-u M-x display-prefix -| (16) | | C-u 3 M-x display-prefix -| 3 `----------------------------------------------------------------------- Looks like a bug in the argument handling? -- cheers, Thorsten