From: Ian Kelling <ian@iankelling.org>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: Achim Gratz <Stromeko@nexgo.de>, emacs-orgmode@gnu.org
Subject: Re: [PATCH] Fix error prone babel table output format detection
Date: Wed, 07 May 2014 13:57:42 -0700 [thread overview]
Message-ID: <87mwetezzs.fsf@treetowl.lan> (raw)
In-Reply-To: 87mweune56.fsf@gmail.com
[-- Attachment #1: Type: text/plain, Size: 697 bytes --]
Eric Schulte <schulte.eric@gmail.com> writes:
> This looks good to me. Could you reformat the patch with
>
> git format-patch
>
> and attach the results (this will be easier to apply).
Done. I was actually following the instructions in man git-format-patch by
not attaching it before, but I will avoid that in future.
> Also, this patch
> is small enough to apply without any sort of copyright attribution, but
> if you think you might make larger contributions in the future, please
> look over the org contribution instructions [1].>
I've completed emacs fsf copyright assignment. I also have another patch
that has been on the mailing list for about 2 weeks or so waiting for a reply.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-Fix-error-prone-babel-table-output-format-detection.patch --]
[-- Type: text/x-diff, Size: 1298 bytes --]
From 4122d20f1253c2cbf5e73070ea00665bbc802275 Mon Sep 17 00:00:00 2001
From: Ian Kelling <ian@iankelling.org>
Date: Wed, 30 Apr 2014 21:56:52 -0700
Subject: [PATCH] Fix error prone babel table output format detection
* lisp/ob-core.el: Test that all elements are in a list are lists or
'hline instead of just the first.
org-babel table output uses different formatting for a list of lists,
but detects it incorrectly causing an error. An example of a block
causing an error is an emacs lisp source block containing just 1 line:
'((1) 2)
---
lisp/ob-core.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 1348f04..4ddafaf 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2184,9 +2184,9 @@ code ---- the results are extracted in the syntax of the source
((funcall proper-list-p result)
(goto-char beg)
(insert (concat (orgtbl-to-orgtbl
- (if (or (eq 'hline (car result))
- (and (listp (car result))
- (listp (cdr (car result)))))
+ (if (org-every
+ (lambda (el) (or (listp el) (eq el 'hline)))
+ result)
result (list result))
'(:fmt (lambda (cell) (format "%s" cell)))) "\n"))
(goto-char beg) (when (org-at-table-p) (org-table-align)))
--
1.7.10.4
next prev parent reply other threads:[~2014-05-09 4:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-01 4:56 [PATCH] Fix error prone babel table output format detection Ian Kelling
2014-05-01 7:08 ` Achim Gratz
2014-05-01 8:30 ` Ian Kelling
2014-05-01 9:13 ` Ian Kelling
2014-05-01 9:32 ` Ian Kelling
2014-05-01 9:55 ` Ian Kelling
2014-05-04 15:51 ` Eric Schulte
2014-05-04 19:42 ` Ian Kelling
2014-05-07 9:15 ` Eric Schulte
2014-05-07 20:57 ` Ian Kelling [this message]
2014-05-21 13:05 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mwetezzs.fsf@treetowl.lan \
--to=ian@iankelling.org \
--cc=Stromeko@nexgo.de \
--cc=emacs-orgmode@gnu.org \
--cc=schulte.eric@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.