From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Valentin_W=C3=BCstholz?= Subject: [BUG] Export to ascii fails Date: Fri, 14 Jan 2011 13:36:10 +0100 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016367f998217b7fe0499cdafb2 Return-path: Received: from [140.186.70.92] (port=41184 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PditN-0005VM-RK for emacs-orgmode@gnu.org; Fri, 14 Jan 2011 07:36:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PditM-00059p-O8 for emacs-orgmode@gnu.org; Fri, 14 Jan 2011 07:36:33 -0500 Received: from mail-qy0-f176.google.com ([209.85.216.176]:60243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PditM-000569-Jm for emacs-orgmode@gnu.org; Fri, 14 Jan 2011 07:36:32 -0500 Received: by qyk10 with SMTP id 10so2960354qyk.0 for ; Fri, 14 Jan 2011 04:36:31 -0800 (PST) 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 --0016367f998217b7fe0499cdafb2 Content-Type: text/plain; charset=UTF-8 Hi, I ran into a bug with the ascii export. Exporting the attached org file to ascii fails (see the attached backtrace). The failure seems to be related to the 'H:10' option. I had a look at the code and the following patch seemed to alleviate the issue: ------------------------------ lisp/org-ascii.el ------------------------------ index 99facb1..25cdf12 100644 @@ -637 +637 @@ publishing directory." - (let (char (n (- level umax 1)) (ind 0)) + (let (char (n (- level 1)) (ind 0)) @@ -655 +655 @@ publishing directory." - (setq char (nth (- umax level) (reverse org-export-ascii-underline))) + (setq char (nth n (reverse org-export-ascii-underline))) This will however still fail, if (length org-export-ascii-underline) <= n. Best regards, Valentin --0016367f998217b7fe0499cdafb2 Content-Type: application/octet-stream; name="bug.org" Content-Disposition: attachment; filename="bug.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gix279g10 IytPUFRJT05TOiBIOjEwDQoNCg0KVGl0bGUNCg0KDQoqIEENCg0KKiBCDQoNCg== --0016367f998217b7fe0499cdafb2 Content-Type: application/octet-stream; name=backtrace Content-Disposition: attachment; filename=backtrace Content-Transfer-Encoding: base64 X-Attachment-Id: f_gix283rs1 RGVidWdnZXIgZW50ZXJlZC0tTGlzcCBlcnJvcjogKHdyb25nLXR5cGUtYXJndW1lbnQgaW50ZWdl cnAgbmlsKQ0KICBtYWtlLXN0cmluZyg0IG5pbCkNCiAgKGluc2VydCB0aXRsZSAiXG4iIChtYWtl LXN0cmluZyAoc3RyaW5nLXdpZHRoIHRpdGxlKSBjaGFyKSAiXG4iKQ0KICAoaWYgKD4gbGV2ZWwg dW1heCkgKHByb2duIChpbnNlcnQgLi4uIC4uLiAiICIgdGl0bGUgIlxuIikgKGNhdGNoIC4uLiAu Li4pIChzZXRxIG9yZy1hc2NpaS1jdXJyZW50LWluZGVudGF0aW9uIC4uLikpIChpZiAob3IgLi4u IC4uLikgKGluc2VydCAiXG4iKSkgKHNldHEgY2hhciAobnRoIC4uLiAuLi4pKSAodW5sZXNzIG9y Zy1leHBvcnQtd2l0aC10YWdzIChpZiAuLi4gLi4uKSkgKGlmIG9yZy1leHBvcnQtd2l0aC1zZWN0 aW9uLW51bWJlcnMgKHNldHEgdGl0bGUgLi4uKSkgKGluc2VydCB0aXRsZSAiXG4iIChtYWtlLXN0 cmluZyAuLi4gY2hhcikgIlxuIikgKHNldHEgb3JnLWFzY2lpLWN1cnJlbnQtaW5kZW50YXRpb24g KHF1b3RlIC4uLikpKQ0KICAobGV0IChjaGFyIChuIC4uLikgKGluZCAwKSkgKGlmICg+IGxldmVs IHVtYXgpIChwcm9nbiAuLi4gLi4uIC4uLikgKGlmIC4uLiAuLi4pIChzZXRxIGN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998217b7fe0499cdafb2 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --0016367f998217b7fe0499cdafb2--