emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* symbol's value as vatiable is void:: result-params
@ 2016-06-20 21:11 Charles Millar
  2016-06-21 11:56 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Millar @ 2016-06-20 21:11 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

When I evaluate the following the above error results (this source blosk 
and all others that are similar evaluated successfully  a few days ago)

#+NAME: SCHEDAP
#+begin_src rec :data foo.rec :type Finance :fields 
AccountDate,Description,AccountAmount :results silent
  (File = 'RevTrust' && AccountSchedule = 'A')
#+end_src

degug on error -

Debugger entered--Lisp error: (void-variable result-params)
   (member "scalar" result-params)
   (or (member "scalar" result-params) (member "html" result-params) 
(member "code" result-params) (member "verbatim" result-params) (equal 
(point-min) (point-max)))
   (let* ((in-file ((lambda (el) (or el (error "rec code block requires 
:data header argument"))) (cdr (assoc :data params)))) (cmdline (cdr 
(assoc :cmdline params))) (rec-type (cdr (assoc :type params))) (fields 
(cdr (assoc :fields params))) (join (cdr (assoc :join params))) (sort 
(cdr (assoc :sort params))) (groupby (cdr (assoc :groupby params))) (cmd 
(concat "recsel" (if rec-type (progn (concat " -t " rec-type " "))) " " 
(expand-file-name in-file) (if (> (length (org-babel-trim body)) 0) 
(progn (concat " -e " "\"" (replace-regexp-in-string "\"" "\\\\\"" body) 
"\""))) (if join (progn (concat " -j " join " "))) (if sort (progn 
(concat " -S " sort " "))) (if groupby (progn (concat " -G " groupby " 
"))) (if fields (progn (concat " -p " fields " "))))) (do-raw (or 
(member "scalar" result-params) (member "html" result-params) (member 
"code" result-params) (member "verbatim" result-params) (equal 
(point-min) (point-max))))) (if do-raw nil (setq cmd (concat cmd " | 
rec2csv"))) (let ((temp-buffer (generate-new-buffer " *temp*"))) 
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn 
(shell-command cmd (current-buffer)) (if do-raw (buffer-string) 
(org-table-convert-region (point-min) (point-max) (quote ...)) (let 
(...) (cons ... ...)))) (and (buffer-name temp-buffer) (kill-buffer 
temp-buffer))))))
   org-babel-execute:rec("(File = 'RevTrust' && AccountSchedule = 'A')" 
((:colname-names) (:rowname-names) (:result-params "silent") 
(:result-type . value) (:results . "silent") (:exports . "results") 
(:session . "none") (:cache . "no") (:noweb . "no") (:hlines . "no") 
(:tangle . "no") (:eval . "never-export") (:data . "foo.rec") (:type . 
"Finance") (:fields . "AccountDate,Description,AccountAmount")))
   org-babel-execute-src-block(nil nil ((:results . "silent")))
   #[0 "\305\302\306\307#\203l

GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) of 
2015-03-07 on trouble, modified by Debian
Org-mode version 8.3.4 (release_8.3.4-958-gf8eb0b @ 
/usr/local/share/emacs/site-lisp/org-mode/lisp/)

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

* Re: symbol's value as vatiable is void:: result-params
  2016-06-20 21:11 symbol's value as vatiable is void:: result-params Charles Millar
@ 2016-06-21 11:56 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-06-21 11:56 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode@gnu.org

Hello,

Charles Millar <millarc@verizon.net> writes:

> When I evaluate the following the above error results (this source blosk 
> and all others that are similar evaluated successfully  a few days ago)
>
> #+NAME: SCHEDAP
> #+begin_src rec :data foo.rec :type Finance :fields 
> AccountDate,Description,AccountAmount :results silent
>   (File = 'RevTrust' && AccountSchedule = 'A')
> #+end_src
>
> degug on error -
>
> Debugger entered--Lisp error: (void-variable result-params)

This is a bug in "ob-rec.el" from Recutils package. 

I switched Babel evaluation (ob-core.el) to lexical binding recently,
and "ob-rec.el" still uses dynamic binding (probably unwillingly in that
case) for `result-params'.

A trivial fix could be to add the binding 

  (result-params (cdr (assq :result-params params)))

in `org-babel-execute:rec'.

Since ob-rec.el is not included in Org per se, I cannot do much more
here. I suggest to report it upstream.

Thank you.


Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2016-06-21 11:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-20 21:11 symbol's value as vatiable is void:: result-params Charles Millar
2016-06-21 11:56 ` Nicolas Goaziou

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).