From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Colin Williams" Subject: Proposed patch for customizable org-table-export Date: Tue, 28 Oct 2008 23:24:38 -0400 Message-ID: <1b97198a0810282024q3aa44199s26bd2a166964345e@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_662_27705752.1225250678240" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kv1fm-00059c-RJ for emacs-orgmode@gnu.org; Tue, 28 Oct 2008 23:24:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kv1fk-00059Q-B7 for emacs-orgmode@gnu.org; Tue, 28 Oct 2008 23:24:41 -0400 Received: from [199.232.76.173] (port=36251 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kv1fk-00059N-46 for emacs-orgmode@gnu.org; Tue, 28 Oct 2008 23:24:40 -0400 Received: from mu-out-0910.google.com ([209.85.134.184]:10662) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kv1fj-0004fu-U6 for emacs-orgmode@gnu.org; Tue, 28 Oct 2008 23:24:40 -0400 Received: by mu-out-0910.google.com with SMTP id i2so2607800mue.6 for ; Tue, 28 Oct 2008 20:24:38 -0700 (PDT) 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 ------=_Part_662_27705752.1225250678240 Content-Type: multipart/alternative; boundary="----=_Part_663_9929055.1225250678240" ------=_Part_663_9929055.1225250678240 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline I've created the custom variable org-table-export-delimiter so that the user may customize the string that delimits the columns exported. I believe this is useful because in some areas (namely, my office) people insist on the files being in csv (comma separated values). I've also noticed (but haven't bothered fixing yet) that if a field contains the delimiter string (be it a tab or a comma), then the resulting exported file has misaligned columns. In csv format, this is remedied by surround the offending columns in double quotes. I'm not sure, but I believe tab separated format usually handles separator character disambiguation in a similar way. I've attached the patch for my change, but as this patch is the first thing I've contributed to org-mode, I'm still waiting on the paperwork from the gnu foundation. Also, I've actually never contributed a patch to a free project before, so I'm sorry if the patch file is incorrectly formatted. ------=_Part_663_9929055.1225250678240 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline I've created the custom variable org-table-export-delimiter so that the user may customize the string that delimits the columns exported.

I believe this is useful because in some areas (namely, my office) people insist on the files being in csv (comma separated values).

I've also noticed (but haven't bothered fixing yet) that if a field contains the delimiter string (be it a tab or a comma), then the resulting exported file has misaligned columns.  In csv format, this is remedied by surround the offending columns in double quotes.  I'm not sure, but I believe tab separated format usually handles separator character disambiguation in a similar way.

I've attached the patch for my change, but as this patch is the first thing I've contributed to org-mode, I'm still waiting on the paperwork from the gnu foundation.  Also, I've actually never contributed a patch to a free project before, so I'm sorry if the patch file is incorrectly formatted.
------=_Part_663_9929055.1225250678240-- ------=_Part_662_27705752.1225250678240 Content-Type: application/octet-stream; name=org.el.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fmveks250 Content-Disposition: attachment; filename=org.el.patch LS0tIG9yZy5lbH4JMjAwOC0wNS0wNSAyMzowOTo1MC4wMDAwMDAwMDAgLTA0MDAKKysrIG9yZy5l bAkyMDA4LTEwLTI4IDIyOjUwOjE4LjIwNDg4MDcwMCAtMDQwMApAQCAtODUxMCw2ICs4NTEwLDEx IEBAIGFyZSBmb3VuZCwgbGluZXMgd2lsbCBiZSBzcGxpdCBvbiB3aGl0ZXMKICAgICAoaW5zZXJ0 LWZpbGUtY29udGVudHMgZmlsZSkKICAgICAob3JnLXRhYmxlLWNvbnZlcnQtcmVnaW9uIGJlZyAo KyAocG9pbnQpICgtIChwb2ludC1tYXgpIHBtKSkgYXJnKSkpCiAKKyhkZWZjdXN0b20gb3JnLXRh YmxlLWV4cG9ydC1kZWxpbWl0ZXIgIlx0IgorICAiVGhlIGRlZmF1bHQgc2VwYXJhdG9yIGZvciBl eHBvcnRlZCB0YWJsZXMuIgorICA6Z3JvdXAgJ29yZy10YWJsZS1zZXR0aW5ncworICAgOnR5cGUg J3N0cmluZykKKwogKGRlZnVuIG9yZy10YWJsZS1leHBvcnQgKCkKICAgIkV4cG9ydCB0YWJsZSBh cyBhIHRhYi1zZXBhcmF0ZWQgZmlsZS4KIFN1Y2ggYSBmaWxlIGNhbiBiZSBpbXBvcnRlZCBpbnRv IGEgc3ByZWFkc2hlZXQgcHJvZ3JhbSBsaWtlIEV4Y2VsLiIKQEAgLTg1NDIsNyArODU0Nyw3IEBA IFN1Y2ggYSBmaWxlIGNhbiBiZSBpbXBvcnRlZCBpbnRvIGEgc3ByZWEKIAkgICAgKGRlbGV0ZS1j aGFyIDEpKSkKICAgICAgIChnb3RvLWNoYXIgKHBvaW50LW1pbikpCiAgICAgICAod2hpbGUgKHJl LXNlYXJjaC1mb3J3YXJkICJbIFx0XSp8WyBcdF0qIiBuaWwgdCkKLQkocmVwbGFjZS1tYXRjaCAi XHQiIHQgdCkpCisJKHJlcGxhY2UtbWF0Y2ggb3JnLXRhYmxlLWV4cG9ydC1kZWxpbWl0ZXIgdCB0 KSkKICAgICAgIChzYXZlLWJ1ZmZlcikpCiAgICAgKGtpbGwtYnVmZmVyIGJ1ZikpKQogCg== ------=_Part_662_27705752.1225250678240 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ------=_Part_662_27705752.1225250678240--