* bug#37242: orgtbl-to-tsv drops empty cell
@ 2019-08-31 7:31 Tak Kunihiro
2020-02-17 7:31 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Tak Kunihiro @ 2019-08-31 7:31 UTC (permalink / raw)
To: 37242; +Cc: tkk
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 "
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#37242: orgtbl-to-tsv drops empty cell
2019-08-31 7:31 bug#37242: orgtbl-to-tsv drops empty cell Tak Kunihiro
@ 2020-02-17 7:31 ` Bastien
2020-02-18 7:13 ` Tak Kunihiro
0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2020-02-17 7:31 UTC (permalink / raw)
To: Tak Kunihiro; +Cc: 37242
Hi Tak,
Tak Kunihiro <tkk@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#37242: orgtbl-to-tsv drops empty cell
2020-02-17 7:31 ` Bastien
@ 2020-02-18 7:13 ` Tak Kunihiro
2020-02-18 7:43 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Tak Kunihiro @ 2020-02-18 7:13 UTC (permalink / raw)
To: bzg; +Cc: 37242, tkk
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#37242: orgtbl-to-tsv drops empty cell
2020-02-18 7:13 ` Tak Kunihiro
@ 2020-02-18 7:43 ` Bastien
2020-03-04 23:20 ` Tak Kunihiro
0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2020-02-18 7:43 UTC (permalink / raw)
To: Tak Kunihiro; +Cc: 37242
Dear Tak,
Tak Kunihiro <tkk@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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#37242: orgtbl-to-tsv drops empty cell
2020-02-18 7:43 ` Bastien
@ 2020-03-04 23:20 ` Tak Kunihiro
2020-05-22 13:36 ` Bastien
0 siblings, 1 reply; 6+ messages in thread
From: Tak Kunihiro @ 2020-03-04 23:20 UTC (permalink / raw)
To: Bastien; +Cc: 37242, tkk
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-22 13:36 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-31 7:31 bug#37242: orgtbl-to-tsv drops empty cell Tak Kunihiro
2020-02-17 7:31 ` Bastien
2020-02-18 7:13 ` Tak Kunihiro
2020-02-18 7:43 ` Bastien
2020-03-04 23:20 ` Tak Kunihiro
2020-05-22 13:36 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.