GNU bug report logs - #37242
orgtbl-to-tsv drops empty cell

Previous Next

Package: emacs;

Reported by: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>

Date: Sat, 31 Aug 2019 07:32:02 UTC

Severity: normal

Done: Bastien <bzg <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37242 in the body.
You can then email your comments to 37242 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#37242; Package emacs. (Sat, 31 Aug 2019 07:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 31 Aug 2019 07:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
To: bug-gnu-emacs <at> gnu.org
Cc: tkk <at> misasa.okayama-u.ac.jp
Subject: orgtbl-to-tsv drops empty cell
Date: Sat, 31 Aug 2019 16:31:02 +0900 (JST)
When org-mode table is converted to tab delimitated text using
orgtbl-to-tsv, empty cell is dropped out.  I think this is bug.

GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29
runemacs -Q
(require 'org-table)
(orgtbl-to-tsv '(("aaa") ("bbb") ("") ("ddd")) nil) ; => "aaa\nbbb\nddd"
(orgtbl-to-tsv '(("aaa") ("bbb") ("") ("ddd")) '(:backend ascii)) ; => " aaa \n bbb \n     \n ddd "




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37242; Package emacs. (Mon, 17 Feb 2020 07:33:02 GMT) Full text and rfc822 format available.

Message #8 received at 37242 <at> debbugs.gnu.org (full text, mbox):

From: Bastien <bzg <at> gnu.org>
To: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
Cc: 37242 <at> debbugs.gnu.org
Subject: Re: bug#37242: orgtbl-to-tsv drops empty cell
Date: Mon, 17 Feb 2020 08:31:56 +0100
Hi Tak,

Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp> writes:

> When org-mode table is converted to tab delimitated text using
> orgtbl-to-tsv, empty cell is dropped out.  I think this is bug.
>
> GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29
> runemacs -Q
> (require 'org-table)
> (orgtbl-to-tsv '(("aaa") ("bbb") ("") ("ddd")) nil) ; => "aaa\nbbb\nddd"
> (orgtbl-to-tsv '(("aaa") ("bbb") ("") ("ddd")) '(:backend ascii)) ; => " aaa \n bbb \n     \n ddd "


(orgtbl-to-tsv '(("aaa") ("bbb") ("") ("ddd")) nil) returns the same
output than orgtbl-to-csv, which is to ignore empty *lines* when the
backend is not set ("nil" here).

I don't think this is a bug.

(orgtbl-to-tsv '(("aaa" "AAA") ("bbb" "BBB") ("" "") ("ddd" "DDD")) nil)
returns something sensible.

Let me know if I miss something.

Otherwise I'll close this bug in a month or so.

Thanks,

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37242; Package emacs. (Tue, 18 Feb 2020 07:14:01 GMT) Full text and rfc822 format available.

Message #11 received at 37242 <at> debbugs.gnu.org (full text, mbox):

From: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
To: bzg <at> gnu.org
Cc: 37242 <at> debbugs.gnu.org, tkk <at> misasa.okayama-u.ac.jp
Subject: Re: bug#37242: orgtbl-to-tsv drops empty cell
Date: Tue, 18 Feb 2020 16:13:26 +0900 (JST)
Dear Bastien,

>> When org-mode table is converted to tab delimited text using
>> orgtbl-to-tsv, empty cell is dropped out.  I think this is bug.
>>
>> GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29
>> runemacs -Q
>> (require 'org-table)
>> (orgtbl-to-tsv '(("aaa") ("bbb") ("") ("ddd")) nil) ; => "aaa\nbbb\nddd"
>> (orgtbl-to-tsv '(("aaa") ("bbb") ("") ("ddd")) '(:backend ascii)) ; => " aaa \n bbb \n     \n ddd "
> 
> (orgtbl-to-tsv '(("aaa") ("bbb") ("") ("ddd")) nil) returns the same
> output than orgtbl-to-csv, which is to ignore empty *lines* when the
> backend is not set ("nil" here).
> 
> I don't think this is a bug.
> 
> (orgtbl-to-tsv '(("aaa" "AAA") ("bbb" "BBB") ("" "") ("ddd" "DDD")) nil)
> returns something sensible.

What orgtbl-to-tsv/csv does is to convert delimiters.  In my opinion,
to drop out empty lines is overwork.

This comes from orgtbl-to-generic.  I cannot tell the behavior from
docstring.  If this is not a bug, I feel like this behavior is random
one.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37242; Package emacs. (Tue, 18 Feb 2020 07:45:01 GMT) Full text and rfc822 format available.

Message #14 received at 37242 <at> debbugs.gnu.org (full text, mbox):

From: Bastien <bzg <at> gnu.org>
To: Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>
Cc: 37242 <at> debbugs.gnu.org
Subject: Re: bug#37242: orgtbl-to-tsv drops empty cell
Date: Tue, 18 Feb 2020 08:43:59 +0100
Dear Tak,

Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp> writes:

> What orgtbl-to-tsv/csv does is to convert delimiters.  In my opinion,
> to drop out empty lines is overwork.

Empty lines in csv/tsv files (when they are not part of a
double-quoted field) are ignored or should be.

For example, the Python CSV parser ignores them.

So Org does the right thing at not reprensenting them at all IMHO.

> This comes from orgtbl-to-generic.  I cannot tell the behavior from
> docstring.  If this is not a bug, I feel like this behavior is random
> one.

Yes, I don't consider this a bug.  If you want to improve the
documentation, can you submit a patch?

Thanks,

-- 
 Bastien




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#37242; Package emacs. (Wed, 04 Mar 2020 23:21:01 GMT) Full text and rfc822 format available.

Message #17 received at 37242 <at> debbugs.gnu.org (full text, mbox):

From: Tak Kunihiro <homeros.misasa <at> gmail.com>
To: Bastien <bzg <at> gnu.org>
Cc: 37242 <at> debbugs.gnu.org, tkk <at> misasa.okayama-u.ac.jp
Subject: Re: bug#37242: orgtbl-to-tsv drops empty cell
Date: Thu, 05 Mar 2020 08:20:39 +0900
Dear Bastien,

>> What orgtbl-to-tsv/csv does is to convert delimiters.  In my opinion,
>> to drop out empty lines is overwork.
>
> Empty lines in csv/tsv files (when they are not part of a
> double-quoted field) are ignored or should be.
>
> For example, the Python CSV parser ignores them.
>
> So Org does the right thing at not reprensenting them at all IMHO.
>
>> This comes from orgtbl-to-generic.  I cannot tell the behavior from
>> docstring.  If this is not a bug, I feel like this behavior is random
>> one.
>
> Yes, I don't consider this a bug.  If you want to improve the
> documentation, can you submit a patch?

I tried to go though orgtbl-to-generic, but I cannot find out how the
line was dropped.  I'm okay, please close the bug.

-Tak




Reply sent to Bastien <bzg <at> gnu.org>:
You have taken responsibility. (Fri, 22 May 2020 13:37:02 GMT) Full text and rfc822 format available.

Notification sent to Tak Kunihiro <tkk <at> misasa.okayama-u.ac.jp>:
bug acknowledged by developer. (Fri, 22 May 2020 13:37:02 GMT) Full text and rfc822 format available.

Message #22 received at 37242-done <at> debbugs.gnu.org (full text, mbox):

From: Bastien <bzg <at> gnu.org>
To: Tak Kunihiro <homeros.misasa <at> gmail.com>
Cc: 37242-done <at> debbugs.gnu.org, tkk <at> misasa.okayama-u.ac.jp
Subject: Re: bug#37242: orgtbl-to-tsv drops empty cell
Date: Fri, 22 May 2020 15:36:49 +0200
Hi Tak Kunihiro,

Tak Kunihiro <homeros.misasa <at> gmail.com> writes:

> I tried to go though orgtbl-to-generic, but I cannot find out how the
> line was dropped.  I'm okay, please close the bug.

Done, thanks.

-- 
 Bastien




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Jun 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.