* flet / my-filt problem
@ 2012-07-30 21:59 Andreas Leha
2012-07-30 22:23 ` Eric Schulte
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Leha @ 2012-07-30 21:59 UTC (permalink / raw)
To: emacs-orgmode
Hi all,
with the current HEAD (commit 0202adb1c02908a75a7845438381e40d811fd99a)
from master I get an error during the export of
one of my files complaining about an undefined my-filt function.
Replacing org-flet with flet in ob-comint.el (line 78) introduces a
compiler warning, but solves the problem.
I am on emacs 24.1.50.1.
Regards,
Andreas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flet / my-filt problem
2012-07-30 21:59 flet / my-filt problem Andreas Leha
@ 2012-07-30 22:23 ` Eric Schulte
2012-07-30 22:42 ` Andreas Leha
0 siblings, 1 reply; 9+ messages in thread
From: Eric Schulte @ 2012-07-30 22:23 UTC (permalink / raw)
To: Andreas Leha; +Cc: emacs-orgmode
Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
> Hi all,
>
> with the current HEAD (commit 0202adb1c02908a75a7845438381e40d811fd99a)
> from master I get an error during the export of
> one of my files complaining about an undefined my-filt function.
>
> Replacing org-flet with flet in ob-comint.el (line 78) introduces a
> compiler warning, but solves the problem.
>
> I am on emacs 24.1.50.1.
>
Hi Andreas,
Does replacing `org-flet' in line 78 of ob-comint.el with `org-labels'
solve this problem?
Thanks,
--
Eric Schulte
http://cs.unm.edu/~eschulte
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flet / my-filt problem
2012-07-30 22:23 ` Eric Schulte
@ 2012-07-30 22:42 ` Andreas Leha
2012-07-30 23:31 ` Eric Schulte
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Leha @ 2012-07-30 22:42 UTC (permalink / raw)
To: emacs-orgmode
Eric Schulte <eric.schulte@gmx.com> writes:
> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
>> Hi all,
>>
>> with the current HEAD (commit 0202adb1c02908a75a7845438381e40d811fd99a)
>> from master I get an error during the export of
>> one of my files complaining about an undefined my-filt function.
>>
>> Replacing org-flet with flet in ob-comint.el (line 78) introduces a
>> compiler warning, but solves the problem.
>>
>> I am on emacs 24.1.50.1.
>>
>
> Hi Andreas,
>
> Does replacing `org-flet' in line 78 of ob-comint.el with `org-labels'
> solve this problem?
>
> Thanks,
Hi Eric,
thanks for the quick response. But org-labels does not solve the
problems for me.
Backtrace is attached. Don't know if this is interesting...
Regards,
Andreas
PS: the backtrace
Debugger entered--Lisp error: (void-function my-filt)
my-filt("")
run-hook-with-args(my-filt "")
comint-send-input()
inferior-ess-send-input()
org-babel-R-evaluate-session("*R*" "totest <- colnames(P_fu)\ntotest <- totest[sapply(totest,\n function(param) !(class(P_fu[[param]])[1] == \"Date\"))]\ntotest <- totest[sapply(totest,\n function(param) !(is.factor(P_fu[[param]]) &&\n !is.ordered(P_fu[[param]])))]\ntotest <- totest[sapply(totest,\n function(param) !is.character(P_fu[[param]]))]\ntotest <- totest[totest != \"time\"]\ntotest <- totest[totest != \"age\"]\n\nP_fu_nofu <- P[P$code %in% P_fu$code,]\n## reorder\nfu_order <- sapply(P_fu$code, function(x) which(P_fu_nofu$code == x))\nP_fu_nofu <- P_fu_nofu[fu_order,]\nfu_comp <- t(t(sapply(totest,\n function(param) testfun(P_fu_nofu[[param]],\n P_fu[[param]],\n use.t.test=(par_shape[param] == \"normal\")))))\n\nttt <- fu_comp\nrownames(ttt) <- nameMap.NameToEnglish[rownames(ttt)]\n\n## add descriptive values\nttt <- data.frame(ttt,\n t1=unlist(sapply(totest,\n function(param) calc_descr(P_fu_nofu[[param]], param)[2])),\n t2=unlist(sapply(totest,\n function(param) calc_descr(P_fu[[param]], param)[2])))\n\n##ttt <- apply(t(t(ttt[!is.na(ttt[,1]),])), 1:2, prettyPvalues, digits=2)\nttt[,1] <- prettyPvalues(ttt[,1], digits=2)\ncolnames(ttt)[1] <- \"p-Value (paired)\"\n\n## strip NA p-Values\nttt <- ttt[!is.na(ttt[,1]),]\n\nprint(ascii(ttt, header=TRUE, include.colnames=TRUE, include.rownames=TRUE), type=\"org\")" output ("silent" "org" "output" "org" "output" "replace") t t)
org-babel-R-evaluate("*R*" "totest <- colnames(P_fu)\ntotest <- totest[sapply(totest,\n function(param) !(class(P_fu[[param]])[1] == \"Date\"))]\ntotest <- totest[sapply(totest,\n function(param) !(is.factor(P_fu[[param]]) &&\n !is.ordered(P_fu[[param]])))]\ntotest <- totest[sapply(totest,\n function(param) !is.character(P_fu[[param]]))]\ntotest <- totest[totest != \"time\"]\ntotest <- totest[totest != \"age\"]\n\nP_fu_nofu <- P[P$code %in% P_fu$code,]\n## reorder\nfu_order <- sapply(P_fu$code, function(x) which(P_fu_nofu$code == x))\nP_fu_nofu <- P_fu_nofu[fu_order,]\nfu_comp <- t(t(sapply(totest,\n function(param) testfun(P_fu_nofu[[param]],\n P_fu[[param]],\n use.t.test=(par_shape[param] == \"normal\")))))\n\nttt <- fu_comp\nrownames(ttt) <- nameMap.NameToEnglish[rownames(ttt)]\n\n## add descriptive values\nttt <- data.frame(ttt,\n t1=unlist(sapply(totest,\n function(param) calc_descr(P_fu_nofu[[param]], param)[2])),\n t2=unlist(sapply(totest,\n function(param) calc_descr(P_fu[[param]], param)[2])))\n\n##ttt <- apply(t(t(ttt[!is.na(ttt[,1]),])), 1:2, prettyPvalues, digits=2)\nttt[,1] <- prettyPvalues(ttt[,1], digits=2)\ncolnames(ttt)[1] <- \"p-Value (paired)\"\n\n## strip NA p-Values\nttt <- ttt[!is.na(ttt[,1]),]\n\nprint(ascii(ttt, header=TRUE, include.colnames=TRUE, include.rownames=TRUE), type=\"org\")" output ("silent" "org" "output" "org" "output" "replace") t t)
org-babel-execute:R("totest <- colnames(P_fu)\ntotest <- totest[sapply(totest,\n function(param) !(class(P_fu[[param]])[1] == \"Date\"))]\ntotest <- totest[sapply(totest,\n function(param) !(is.factor(P_fu[[param]]) &&\n !is.ordered(P_fu[[param]])))]\ntotest <- totest[sapply(totest,\n function(param) !is.character(P_fu[[param]]))]\ntotest <- totest[totest != \"time\"]\ntotest <- totest[totest != \"age\"]\n\nP_fu_nofu <- P[P$code %in% P_fu$code,]\n## reorder\nfu_order <- sapply(P_fu$code, function(x) which(P_fu_nofu$code == x))\nP_fu_nofu <- P_fu_nofu[fu_order,]\nfu_comp <- t(t(sapply(totest,\n function(param) testfun(P_fu_nofu[[param]],\n P_fu[[param]],\n use.t.test=(par_shape[param] == \"normal\")))))\n\nttt <- fu_comp\nrownames(ttt) <- nameMap.NameToEnglish[rownames(ttt)]\n\n## add descriptive values\nttt <- data.frame(ttt,\n t1=unlist(sapply(totest,\n function(param) calc_descr(P_fu_nofu[[param]], param)[2])),\n t2=unlist(sapply(totest,\n function(param) calc_descr(P_fu[[param]], param)[2])))\n\n##ttt <- apply(t(t(ttt[!is.na(ttt[,1]),])), 1:2, prettyPvalues, digits=2)\nttt[,1] <- prettyPvalues(ttt[,1], digits=2)\ncolnames(ttt)[1] <- \"p-Value (paired)\"\n\n## strip NA p-Values\nttt <- ttt[!is.na(ttt[,1]),]\n\nprint(ascii(ttt, header=TRUE, include.colnames=TRUE, include.rownames=TRUE), type=\"org\")" ((:colname-names) (:rowname-names) (:result-params "silent" "org" "output" "org" "output" "replace") (:result-type . output) (:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "yes") (:tangle . "no") (:exports . "code") (:results . "silent org output") (:colname-names) (:rowname-names) (:result-params "org" "output" "replace") (:result-type . output) (:colnames . "yes") (:rownames . "yes") (:session . "*R*") (:padnewline . "yes") (:hlines . "no")))
org-babel-execute-src-block(nil nil ((:results . "silent")))
org-babel-ref-resolve("follow_up_comparison_paired()")
org-babel-ref-parse("results=follow_up_comparison_paired()")
#[(el) "\bA:\203 .\bA\207\301\bA!\207" [el org-babel-ref-parse] 2]((:var . "results=follow_up_comparison_paired()"))
mapcar(#[(el) "\bA:\203 .\bA\207\301\bA!\207" [el org-babel-ref-parse] 2] ((:var . "results=follow_up_comparison_paired()")))
org-babel-process-params(((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "yes") (:tangle . "no") (:exports . "none") (:results . "silent") (:var . "results=follow_up_comparison_paired()") (:hlines . "no") (:padnewline . "yes") (:session . "*R*") (:rownames . "yes") (:colnames . "yes")))
org-babel-exp-results(("emacs-lisp" "results" ((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "yes") (:tangle . "no") (:exports . "none") (:results . "silent") (:var . "results=follow_up_comparison_paired()") (:colnames . "yes") (:rownames . "yes") (:session . "*R*") (:padnewline . "yes") (:hlines . "no")) "" nil 0) lob silent)
#[nil "\303\304\305\b8\"A\211.\205.\0 \306\232?\205.\0\307\b\n\310#)\207" [info session type assoc :session 2 "none" org-babel-exp-results silent] 5]()
org-babel-exp-do-export(("emacs-lisp" "results" ((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "yes") (:tangle . "no") (:exports . "none") (:results . "silent") (:var . "results=follow_up_comparison_paired()") (:colnames . "yes") (:rownames . "yes") (:session . "*R*") (:padnewline . "yes") (:hlines . "no")) "" nil 0) lob)
org-babel-exp-non-block-elements(25187 #<marker at 25316 in *temp*>)
#[(pair) "\b\211.A@)\n\v\"\207" [pair x start end] 4]((src org-babel-exp-non-block-elements))
mapcar(#[(pair) "\b\211.A@)\n\v\"\207" [pair x start end] 4] ((src org-babel-exp-non-block-elements)))
#[(start end) "\301\302\b\"\207" [org-export-interblocks mapcar #[(pair) "\b\211.A@)\n\v\"\207" [pair x start end] 4]] 3](25187 #<marker at 25316 in *temp*>)
org-export-blocks-preprocess()
(let ((org-current-export-file buf)) (org-export-blocks-preprocess))
(if noexpand nil (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess)))
(unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess)))
(progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))
(let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))
(progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))))
(unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- ... --offset) (- ... --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(with-current-buffer temp-buffer (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- ... --offset) (- ... --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
(let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov ... ... ...)) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ... ...)) (goto-char (point-min)) (let (...) (run-hooks ...)) (org-element-parse-buffer nil visible-only)))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
(with-temp-buffer (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))))
(let ((--original-buffer (current-buffer)) (--offset (1- (point-min))) (--buffer-string (buffer-string)) (--overlays (mapcar (quote copy-overlay) (overlays-in (point-min) (point-max))))) (with-temp-buffer (let ((buffer-invisibility-spec nil)) (org-clone-local-variables --original-buffer "^\\(org-\\|orgtbl-\\|major-mode$\\|outline-\\(regexp\\|level\\)$\\)") (insert --buffer-string) (mapc (lambda (ov) (move-overlay ov (- (overlay-start ov) --offset) (- (overlay-end ov) --offset) (current-buffer))) --overlays) (goto-char (point-min)) (progn (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))))
(org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))
(let ((buf (or (buffer-file-name (buffer-base-buffer)) (current-buffer)))) (org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let ((org-current-export-file buf)) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only)))
(let ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) (tree (let ((buf (or (buffer-file-name ...) (current-buffer)))) (org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let (...) (org-export-blocks-preprocess))) (goto-char (point-min)) (let ((org-export-current-backend backend)) (run-hooks (quote org-export-before-parsing-hook))) (org-element-parse-buffer nil visible-only))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (org-export-data tree info))) (template (cdr (assq (quote template) (plist-get info :translate-alist)))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not ...) body-only) body (funcall template body info)) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output))
(save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) (tree (let ((buf (or ... ...))) (org-export-with-current-buffer-copy (unless noexpand (org-export-expand-include-keyword) (let ... ...)) (goto-char (point-min)) (let (...) (run-hooks ...)) (org-element-parse-buffer nil visible-only))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (org-export-data tree info))) (template (cdr (assq (quote template) (plist-get info :translate-alist)))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or ... body-only) body (funcall template body info)) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output)))
(save-excursion (save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let ((info (org-export-install-filters (org-export-get-environment backend subtreep ext-plist))) (tree (let ((buf ...)) (org-export-with-current-buffer-copy (unless noexpand ... ...) (goto-char ...) (let ... ...) (org-element-parse-buffer nil visible-only))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) tree info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (org-export-data tree info))) (template (cdr (assq ... ...))) (output (org-export-filter-apply-functions (plist-get info :filter-final-output) (if ... body ...) info))) (when org-export-copy-to-kill-ring (org-kill-new output)) output))))
org-export-as(e-latex (subtree buffer) nil nil nil nil)
(let ((out (org-export-as backend subtreep visible-only body-only ext-plist noexpand))) (with-temp-buffer (insert out) (let ((coding-system-for-write org-export-coding-system)) (write-file file))))
org-export-to-file(e-latex "/home/andreas/work/mannil/charcot_marie_tooth.tex" (subtree buffer) nil nil nil)
(let ((outfile (org-export-output-file-name ".tex" subtreep pub-dir))) (org-export-to-file (quote e-latex) outfile subtreep visible-only body-only ext-plist))
org-e-latex-export-to-latex((subtree buffer) nil nil nil nil)
(org-e-latex-compile (org-e-latex-export-to-latex subtreep visible-only body-only ext-plist pub-dir))
org-e-latex-export-to-pdf((subtree buffer) nil nil)
(org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))
(cond ((eql --cl-var-- (quote 113)) nil) ((cl-member --cl-var-- (quote (65 78 85))) (org-e-ascii-export-as-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key (65 ...) (78 ...) (t ...))))))) ((cl-member --cl-var-- (quote (97 110 117))) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key (97 ...) (110 ...) (t ...))))))) ((eql --cl-var-- (quote 76)) (org-e-latex-export-as-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 108)) (org-e-latex-export-to-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 112)) (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 100)) (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 72)) (org-e-html-export-as-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 104)) (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 98)) (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 111)) (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 79)) (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 70)) (org-e-publish-current-file (memq (quote force) optns))) ((eql --cl-var-- (quote 80)) (org-e-publish-current-project (memq (quote force) optns))) ((eql --cl-var-- (quote 88)) (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) ((eql --cl-var-- (quote 69)) (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key))))
(let ((--cl-var-- (if (< raw-key 27) (+ raw-key 96) raw-key))) (cond ((eql --cl-var-- (quote 113)) nil) ((cl-member --cl-var-- (quote (65 78 85))) (org-e-ascii-export-as-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key ... ... ...)))))) ((cl-member --cl-var-- (quote (97 110 117))) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key ... ... ...)))))) ((eql --cl-var-- (quote 76)) (org-e-latex-export-as-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 108)) (org-e-latex-export-to-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 112)) (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 100)) (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 72)) (org-e-html-export-as-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 104)) (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 98)) (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 111)) (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) ((eql --cl-var-- (quote 79)) (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) ((eql --cl-var-- (quote 70)) (org-e-publish-current-file (memq (quote force) optns))) ((eql --cl-var-- (quote 80)) (org-e-publish-current-project (memq (quote force) optns))) ((eql --cl-var-- (quote 88)) (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) ((eql --cl-var-- (quote 69)) (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key)))))
(case (if (< raw-key 27) (+ raw-key 96) raw-key) (113 nil) ((65 78 85) (org-e-ascii-export-as-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key (65 ...) (78 ...) (t ...))))))) ((97 110 117) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key (97 ...) (110 ...) (t ...))))))) (76 (org-e-latex-export-as-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (108 (org-e-latex-export-to-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (112 (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (100 (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (72 (org-e-html-export-as-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (104 (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (98 (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (111 (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (79 (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (70 (org-e-publish-current-file (memq (quote force) optns))) (80 (org-e-publish-current-project (memq (quote force) optns))) (88 (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) (69 (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key))))
(let* ((input (org-export-dispatch-ui (if (listp org-export-initial-scope) org-export-initial-scope (list org-export-initial-scope)) org-export-dispatch-use-expert-ui)) (raw-key (car input)) (optns (cdr input))) (case (if (< raw-key 27) (+ raw-key 96) raw-key) (113 nil) ((65 78 85) (org-e-ascii-export-as-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key ... ... ...)))))) ((97 110 117) (org-e-ascii-export-to-ascii (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns) (\` (:ascii-charset (\, (case raw-key ... ... ...)))))) (76 (org-e-latex-export-as-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (108 (org-e-latex-export-to-latex (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (112 (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (100 (org-open-file (org-e-latex-export-to-pdf (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (72 (org-e-html-export-as-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (104 (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (98 (org-open-file (org-e-html-export-to-html (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (111 (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns))) (79 (org-open-file (org-e-odt-export-to-odt (memq (quote subtree) optns) (memq (quote visible) optns) (memq (quote body) optns)))) (70 (org-e-publish-current-file (memq (quote force) optns))) (80 (org-e-publish-current-project (memq (quote force) optns))) (88 (let ((project (assoc (org-icompleting-read "Publish project: " org-e-publish-project-alist nil t) org-e-publish-project-alist))) (org-e-publish project (memq (quote force) optns)))) (69 (org-e-publish-all (memq (quote force) optns))) (t (error "No command associated with key %s" (char-to-string raw-key)))))
org-export-dispatch()
call-interactively(org-export-dispatch record nil)
command-execute(org-export-dispatch record)
execute-extended-command(nil "org-export-dispatch")
call-interactively(execute-extended-command nil nil)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flet / my-filt problem
2012-07-30 22:42 ` Andreas Leha
@ 2012-07-30 23:31 ` Eric Schulte
2012-07-31 7:52 ` Andreas Leha
2012-07-31 8:05 ` Bastien
0 siblings, 2 replies; 9+ messages in thread
From: Eric Schulte @ 2012-07-30 23:31 UTC (permalink / raw)
To: Andreas Leha; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
> Eric Schulte <eric.schulte@gmx.com> writes:
>
>> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>>
>>> Hi all,
>>>
>>> with the current HEAD (commit 0202adb1c02908a75a7845438381e40d811fd99a)
>>> from master I get an error during the export of
>>> one of my files complaining about an undefined my-filt function.
>>>
>>> Replacing org-flet with flet in ob-comint.el (line 78) introduces a
>>> compiler warning, but solves the problem.
>>>
>>> I am on emacs 24.1.50.1.
>>>
>>
>> Hi Andreas,
>>
>> Does replacing `org-flet' in line 78 of ob-comint.el with `org-labels'
>> solve this problem?
>>
>> Thanks,
>
> Hi Eric,
>
> thanks for the quick response. But org-labels does not solve the
> problems for me.
>
> Backtrace is attached. Don't know if this is interesting...
>
Ugh, I wish Emacs wouldn't replace an existing function with a new
function which not only has a different name, but also has different
functionality.
Does the attached patch resolve this bad behavior?
Thanks,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-let-instead-of-flet-so-function-name-may-be-used.patch --]
[-- Type: text/x-patch, Size: 3591 bytes --]
From 39e85dc85a4ba364302fee9319dbf50cb61e9ba7 Mon Sep 17 00:00:00 2001
From: Eric Schulte <eric.schulte@gmx.com>
Date: Mon, 30 Jul 2012 17:29:32 -0600
Subject: [PATCH] let* instead of flet so function name may be used
* lisp/ob-comint.el (org-babel-comint-with-output): Use let* instead of
flet so function name may be used in a hook.
---
lisp/ob-comint.el | 68 +++++++++++++++++++++++++++----------------------------
1 file changed, 34 insertions(+), 34 deletions(-)
diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
index f7403dc..8a7dbc8 100644
--- a/lisp/ob-comint.el
+++ b/lisp/ob-comint.el
@@ -74,40 +74,40 @@ or user `keyboard-quit' during execution of body."
(remove-echo (cadr (cdr meta)))
(full-body (cadr (cdr (cdr meta)))))
`(org-babel-comint-in-buffer ,buffer
- (let ((string-buffer "") dangling-text raw)
- (org-flet ((my-filt (text)
- (setq string-buffer (concat string-buffer text))))
- ;; setup filter
- (add-hook 'comint-output-filter-functions 'my-filt)
- (unwind-protect
- (progn
- ;; got located, and save dangling text
- (goto-char (process-mark (get-buffer-process (current-buffer))))
- (let ((start (point))
- (end (point-max)))
- (setq dangling-text (buffer-substring start end))
- (delete-region start end))
- ;; pass FULL-BODY to process
- ,@body
- ;; wait for end-of-evaluation indicator
- (while (progn
- (goto-char comint-last-input-end)
- (not (save-excursion
- (and (re-search-forward
- (regexp-quote ,eoe-indicator) nil t)
- (re-search-forward
- comint-prompt-regexp nil t)))))
- (accept-process-output (get-buffer-process (current-buffer)))
- ;; thought the following this would allow async
- ;; background running, but I was wrong...
- ;; (run-with-timer .5 .5 'accept-process-output
- ;; (get-buffer-process (current-buffer)))
- )
- ;; replace cut dangling text
- (goto-char (process-mark (get-buffer-process (current-buffer))))
- (insert dangling-text))
- ;; remove filter
- (remove-hook 'comint-output-filter-functions 'my-filt)))
+ (let* ((string-buffer "")
+ (my-filt (lambda (text) (setq string-buffer (concat string-buffer text))))
+ dangling-text raw)
+ ;; setup filter
+ (add-hook 'comint-output-filter-functions 'my-filt)
+ (unwind-protect
+ (progn
+ ;; got located, and save dangling text
+ (goto-char (process-mark (get-buffer-process (current-buffer))))
+ (let ((start (point))
+ (end (point-max)))
+ (setq dangling-text (buffer-substring start end))
+ (delete-region start end))
+ ;; pass FULL-BODY to process
+ ,@body
+ ;; wait for end-of-evaluation indicator
+ (while (progn
+ (goto-char comint-last-input-end)
+ (not (save-excursion
+ (and (re-search-forward
+ (regexp-quote ,eoe-indicator) nil t)
+ (re-search-forward
+ comint-prompt-regexp nil t)))))
+ (accept-process-output (get-buffer-process (current-buffer)))
+ ;; thought the following this would allow async
+ ;; background running, but I was wrong...
+ ;; (run-with-timer .5 .5 'accept-process-output
+ ;; (get-buffer-process (current-buffer)))
+ )
+ ;; replace cut dangling text
+ (goto-char (process-mark (get-buffer-process (current-buffer))))
+ (insert dangling-text))
+ ;; remove filter
+ (remove-hook 'comint-output-filter-functions 'my-filt))
;; remove echo'd FULL-BODY from input
(if (and ,remove-echo ,full-body
(string-match
--
1.7.11.3
[-- Attachment #3: Type: text/plain, Size: 46 bytes --]
--
Eric Schulte
http://cs.unm.edu/~eschulte
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: flet / my-filt problem
2012-07-30 23:31 ` Eric Schulte
@ 2012-07-31 7:52 ` Andreas Leha
2012-07-31 8:05 ` Bastien
1 sibling, 0 replies; 9+ messages in thread
From: Andreas Leha @ 2012-07-31 7:52 UTC (permalink / raw)
To: emacs-orgmode
Eric Schulte <eric.schulte@gmx.com> writes:
> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
>> Eric Schulte <eric.schulte@gmx.com> writes:
>>
>>> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>>>
>>>> Hi all,
>>>>
>>>> with the current HEAD (commit 0202adb1c02908a75a7845438381e40d811fd99a)
>>>> from master I get an error during the export of
>>>> one of my files complaining about an undefined my-filt function.
>>>>
>>>> Replacing org-flet with flet in ob-comint.el (line 78) introduces a
>>>> compiler warning, but solves the problem.
>>>>
>>>> I am on emacs 24.1.50.1.
>>>>
>>>
>>> Hi Andreas,
>>>
>>> Does replacing `org-flet' in line 78 of ob-comint.el with `org-labels'
>>> solve this problem?
>>>
>>> Thanks,
>>
>> Hi Eric,
>>
>> thanks for the quick response. But org-labels does not solve the
>> problems for me.
>>
>> Backtrace is attached. Don't know if this is interesting...
>>
>
> Ugh, I wish Emacs wouldn't replace an existing function with a new
> function which not only has a different name, but also has different
> functionality.
>
> Does the attached patch resolve this bad behavior?
>
No, it does not, unfortunately. Same thing:
,----
| (void-function my-filt)
| my-filt("")
| run-hook-with-args(my-filt "")
| comint-send-input()
| inferior-ess-send-input()
| ....
`----
Regards,
Andreas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flet / my-filt problem
2012-07-30 23:31 ` Eric Schulte
2012-07-31 7:52 ` Andreas Leha
@ 2012-07-31 8:05 ` Bastien
2012-07-31 14:20 ` Eric Schulte
1 sibling, 1 reply; 9+ messages in thread
From: Bastien @ 2012-07-31 8:05 UTC (permalink / raw)
To: Eric Schulte; +Cc: Andreas Leha, emacs-orgmode
Hi Eric,
Eric Schulte <eric.schulte@gmx.com> writes:
> Does the attached patch resolve this bad behavior?
Can't we just get rid of org-flet in this case?
With simply let-defining the temporary function?
(let ((f (lambda(x) (message x))))
(funcall f "Hello!"))
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flet / my-filt problem
2012-07-31 8:05 ` Bastien
@ 2012-07-31 14:20 ` Eric Schulte
2012-07-31 15:17 ` Bastien
0 siblings, 1 reply; 9+ messages in thread
From: Eric Schulte @ 2012-07-31 14:20 UTC (permalink / raw)
To: Bastien; +Cc: Andreas Leha, emacs-orgmode
Bastien <bzg@gnu.org> writes:
> Hi Eric,
>
> Eric Schulte <eric.schulte@gmx.com> writes:
>
>> Does the attached patch resolve this bad behavior?
>
> Can't we just get rid of org-flet in this case?
>
> With simply let-defining the temporary function?
>
> (let ((f (lambda(x) (message x))))
> (funcall f "Hello!"))
This is exactly the tact taken by my previous patch, I'm still not sure
why it didn't work. Regardless, I've just pushed up a fix which
replaces the named function with an anonymous lambda-expression. I've
also pushed up a test case which exercises this function. Everything
now seems to be working.
Best,
--
Eric Schulte
http://cs.unm.edu/~eschulte
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flet / my-filt problem
2012-07-31 14:20 ` Eric Schulte
@ 2012-07-31 15:17 ` Bastien
2012-08-01 21:57 ` Andreas Leha
0 siblings, 1 reply; 9+ messages in thread
From: Bastien @ 2012-07-31 15:17 UTC (permalink / raw)
To: Eric Schulte; +Cc: Andreas Leha, emacs-orgmode
Eric Schulte <eric.schulte@gmx.com> writes:
> Regardless, I've just pushed up a fix which
> replaces the named function with an anonymous lambda-expression. I've
> also pushed up a test case which exercises this function. Everything
> now seems to be working.
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: flet / my-filt problem
2012-07-31 15:17 ` Bastien
@ 2012-08-01 21:57 ` Andreas Leha
0 siblings, 0 replies; 9+ messages in thread
From: Andreas Leha @ 2012-08-01 21:57 UTC (permalink / raw)
To: emacs-orgmode
Bastien <bzg@gnu.org> writes:
> Eric Schulte <eric.schulte@gmx.com> writes:
>
>> Regardless, I've just pushed up a fix which
>> replaces the named function with an anonymous lambda-expression. I've
>> also pushed up a test case which exercises this function. Everything
>> now seems to be working.
>
> Thanks!
Sorry for the late response. But thanks for this patch, I can confirm,
that my problem is solved.
Regards,
Andreas
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-08-01 21:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-30 21:59 flet / my-filt problem Andreas Leha
2012-07-30 22:23 ` Eric Schulte
2012-07-30 22:42 ` Andreas Leha
2012-07-30 23:31 ` Eric Schulte
2012-07-31 7:52 ` Andreas Leha
2012-07-31 8:05 ` Bastien
2012-07-31 14:20 ` Eric Schulte
2012-07-31 15:17 ` Bastien
2012-08-01 21:57 ` Andreas Leha
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.