emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG][PATCH] Commit '3142297d69f6063221215757a3ba9c74adcf3e43' breaks some my files
@ 2013-07-29  4:17 Vladimir Lomov
  2013-07-29 13:59 ` Eric Schulte
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Lomov @ 2013-07-29  4:17 UTC (permalink / raw)
  To: General discussions about Org-mode

Hello,
as title states, commit '3142297d69f6063221215757a3ba9c74adcf3e43'
breaks one of my Org document (I have many but faced with a bug only
with particular one). In that file tables contain data (three columns,
one header) which are transformed and tangle to files (xml, txt). Before
the commit '3142297d69f6063221215757a3ba9c74adcf3e43' all works fine,
begining with it I can't tangle files with error message
BEGIN_EXAMPLE
  mapc: Wrong type argument: consp, nil
END_EXAMPLE

By means of trial-and-error I made small patch which fixes the problem
for me. As I'm know very few in Emacs Lisp I'm not sure if my fix is
correct, so I just added two lines without "proper" reindenting of whole
block.

BEGIN_EXAMPLE
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index c2722db..013646b 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2353,6 +2353,7 @@ parameters when merging lists."
     (setq vars (reverse vars))
     (while vars (setq params (cons (cons :var (cddr (pop vars))) params)))
     ;; clear out col-names and row-names for replaced variables
+    (when (and (consp :colname-names) (consp :rowname-names))
     (mapc
      (lambda (name)
        (mapc
@@ -2365,6 +2366,7 @@ parameters when merging lists."
 				  params)))
 	(list :colname-names :rowname-names)))
      clearnames)
+    )
     (mapc
      (lambda (hd)
        (let ((key (intern (concat ":" (symbol-name hd))))
END_EXAMPLE


P.S. I was lazy to prepare MWE. The mentioned document is available at
https://github.com/vp1981/scripts/blob/master/docs/openbox/rc.org

---
WBR, Vladimir Lomov


-- 
pessimist:
	A man who spends all his time worrying about how he can keep the
	wolf from the door.

optimist:
	A man who refuses to see the wolf until he seizes the seat of
	his pants.

opportunist:
	A man who invites the wolf in and appears the next day in a fur coat.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [BUG][PATCH] Commit '3142297d69f6063221215757a3ba9c74adcf3e43' breaks some my files
  2013-07-29  4:17 [BUG][PATCH] Commit '3142297d69f6063221215757a3ba9c74adcf3e43' breaks some my files Vladimir Lomov
@ 2013-07-29 13:59 ` Eric Schulte
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2013-07-29 13:59 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: General discussions about Org-mode

Hi Vladimir,

Thanks for mentioning this bug and sending along your trial and error
patch.  It helped me to confirm the location of the bug.  I've just
pushed up a fix.

Best,

Vladimir Lomov <lomov.vl@gmail.com> writes:

> Hello,
> as title states, commit '3142297d69f6063221215757a3ba9c74adcf3e43'
> breaks one of my Org document (I have many but faced with a bug only
> with particular one). In that file tables contain data (three columns,
> one header) which are transformed and tangle to files (xml, txt). Before
> the commit '3142297d69f6063221215757a3ba9c74adcf3e43' all works fine,
> begining with it I can't tangle files with error message
> BEGIN_EXAMPLE
>   mapc: Wrong type argument: consp, nil
> END_EXAMPLE
>
> By means of trial-and-error I made small patch which fixes the problem
> for me. As I'm know very few in Emacs Lisp I'm not sure if my fix is
> correct, so I just added two lines without "proper" reindenting of whole
> block.
>
> BEGIN_EXAMPLE
> diff --git a/lisp/ob-core.el b/lisp/ob-core.el
> index c2722db..013646b 100644
> --- a/lisp/ob-core.el
> +++ b/lisp/ob-core.el
> @@ -2353,6 +2353,7 @@ parameters when merging lists."
>      (setq vars (reverse vars))
>      (while vars (setq params (cons (cons :var (cddr (pop vars))) params)))
>      ;; clear out col-names and row-names for replaced variables
> +    (when (and (consp :colname-names) (consp :rowname-names))
>      (mapc
>       (lambda (name)
>         (mapc
> @@ -2365,6 +2366,7 @@ parameters when merging lists."
>  				  params)))
>  	(list :colname-names :rowname-names)))
>       clearnames)
> +    )
>      (mapc
>       (lambda (hd)
>         (let ((key (intern (concat ":" (symbol-name hd))))
> END_EXAMPLE
>
>
> P.S. I was lazy to prepare MWE. The mentioned document is available at
> https://github.com/vp1981/scripts/blob/master/docs/openbox/rc.org
>
> ---
> WBR, Vladimir Lomov

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-29 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-29  4:17 [BUG][PATCH] Commit '3142297d69f6063221215757a3ba9c74adcf3e43' breaks some my files Vladimir Lomov
2013-07-29 13:59 ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).