From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cheng Subject: Re: requesting help debugging tangle on windows Date: Mon, 20 Feb 2012 10:11:12 -0500 Message-ID: References: <87boowtarx.fsf@gmx.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04463168a82c1f04b966b549 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzUtx-0007Pb-KP for emacs-orgmode@gnu.org; Mon, 20 Feb 2012 10:11:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzUtq-0004m9-8T for emacs-orgmode@gnu.org; Mon, 20 Feb 2012 10:11:41 -0500 Received: from mail-tul01m020-f169.google.com ([209.85.214.169]:34067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzUtp-0004lp-WB for emacs-orgmode@gnu.org; Mon, 20 Feb 2012 10:11:34 -0500 Received: by obbta7 with SMTP id ta7so8830479obb.0 for ; Mon, 20 Feb 2012 07:11:32 -0800 (PST) In-Reply-To: <87boowtarx.fsf@gmx.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org --f46d04463168a82c1f04b966b549 Content-Type: text/plain; charset=ISO-8859-1 #1 worked. My assumption about how I could get the latest org was wrong. Thanks very much for the help! On Sat, Feb 18, 2012 at 10:16 AM, Eric Schulte wrote: > Unfortunately I don't have access to a windows machine for testing of > tangle behavior. Before we delve deeper, could you confirm two things. > > 1. It sounds as though you are not using the latest version of Org-mode > from git. Please upgrade to the latest -- which should also get you > the latest ob-clojure.el so you don't have to evaluate the snippet > posted below. There are instructions for keeping current with org > development at http://orgmode.org/worg/org-faq.html#Keeping-current. > > 2. Try to reproduce the problem using "emacs -Q" which will launch emacs > without any personal configuration. That way we can see if this > windows issue is someone related to your config, or is general. > > Thanks, > > Andrew Cheng writes: > > > Tangle works in my linux environment but doesn't quite work in my windows > > environment. Here's my org file. It defines a code snippet named "block" > > and then has a tangle section that refers to "block". Tangle results in a > > file with two blank lines in my windows environment. > > > > #+name: block > > #+begin_src clojure :results silent > > (+ 2 3) > > #+end_src > > > > #+begin_src clojure :tangle ../src/tmp.clj :results silent :exports none > > :noweb yes > > <> > > #+end_src > > > > But --- If my tangle section has regular code in it instead of referring > to > > other named <> then the resulting file after tangle has the code > > you'd expect. > > > > Below is my org setup. The *Messages* buffer doesn't contain any > > interesting error messages. What can I do to find out what's going on? > > > > I did evaluate the following snippet to get C-c C-c to properly evaluate > a > > clojure code block successfully on my machine. It didn't affect the issue > > of tangling. Just thought I'd mention it to be thorough. The snippet is > > from Eric Schulte. I thought that by deleting my elpa org folder and > > starting emacs again I'd get the latest (with his fix) but I discovered > > that I still needed to run this snippet to get C-c C-c to work. > > > > Thanks in advance for any help! > > > > (defun org-babel-execute:clojure (body params) > > "Execute a block of Clojure code with Babel." > > (require 'slime) > > (with-temp-buffer > > (insert (org-babel-expand-body:clojure body params)) > > ((lambda (result) > > (let ((result-params (cdr (assoc :result-params params)))) > > (if (or (member "scalar" result-params) > > (member "verbatim" result-params)) > > result > > (condition-case nil (org-babel-script-escape result) > > (error result))))) > > (slime-eval > > `(swank:eval-and-grab-output > > ,(buffer-substring-no-properties (point-min) (point-max))) > > (cdr (assoc :package params)))))) > > > > Emacs : GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600) > > of 2011-09-03 on SHAN-PC > > Package: Org-mode version 7.7 > > > > current state: > > ============== > > (setq > > org-export-blocks '((src org-babel-exp-src-block nil) (comment > > org-export-blocks-format-comment t) > > (ditaa org-export-blocks-format-ditaa nil) (dot > > org-export-blocks-format-dot nil)) > > org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point > > org-babel-execute-safely-maybe) > > org-export-preprocess-before-selecting-backend-code-hook > > '(org-beamer-select-beamer-code) > > org-tab-first-hook '(org-hide-block-toggle-maybe > > org-src-native-tab-command-maybe > > org-babel-hide-result-toggle-maybe) > > org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers > > org-cycle-show-empty-lines > > org-optimize-window-after-visibility-change) > > org-agenda-before-write-hook '(org-agenda-add-entry-text) > > org-speed-command-hook '(org-speed-command-default-hook > > org-babel-speed-command-hook) > > org-babel-pre-tangle-hook '(save-buffer) > > org-occur-hook '(org-first-headline-recenter) > > org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src > > org-babel-exp-inline-src-blocks)) > > org-metaup-hook '(org-babel-load-in-session-maybe) > > org-confirm-elisp-link-function 'yes-or-no-p > > org-export-latex-format-toc-function > 'org-export-latex-format-toc-default > > org-export-preprocess-before-normalizing-links-hook > > '(org-remove-file-link-modifiers) > > org-clock-out-hook '(org-clock-remove-empty-clock-drawer) > > org-export-first-hook '(org-beamer-initialize-open-trackers) > > org-mode-hook '(#[nil "\300\301\302\303\304$\207" > > [org-add-hook change-major-mode-hook > org-show-block-all > > append local] 5] > > #[nil "\300\301\302\303\304$\207" > > [org-add-hook change-major-mode-hook > > org-babel-show-result-all append local] 5] > > org-babel-result-hide-spec org-babel-hide-all-hashes) > > org-from-is-user-regexp nil > > org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc > > org-beamer-auto-fragile-frames > > > org-beamer-place-default-actions-for-lists) > > org-export-latex-after-initial-vars-hook > '(org-beamer-after-initial-vars) > > org-metadown-hook '(org-babel-pop-to-session-maybe) > > org-src-mode-hook '(org-src-babel-configure-edit-buffer > > org-src-mode-configure-edit-buffer) > > org-after-todo-state-change-hook '(org-clock-out-if-current) > > org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) > > org-babel-tangle-lang-exts '(("clojure" . "clj") ("emacs-lisp" . "el")) > > org-confirm-shell-link-function 'yes-or-no-p > > ) > > -- > Eric Schulte > http://cs.unm.edu/~eschulte/ > --f46d04463168a82c1f04b966b549 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable #1 worked. My assumption about how I could get the latest org was wrong. Th= anks very much for the help!

On Sat, Feb = 18, 2012 at 10:16 AM, Eric Schulte <eric.schulte@gmx.com> wrote:
Unfortunately I don't have access to a w= indows machine for testing of
tangle behavior. =A0Before we delve deeper, could you confirm two things.
1. It sounds as though you are not using the latest version of Org-mode
=A0 from git. =A0Please upgrade to the latest -- which should also get you=
=A0 the latest ob-clojure.el so you don't have to evaluate the snippet=
=A0 posted below. =A0There are instructions for keeping current with org =A0 development at http://orgmode.org/worg/org-faq.html#Keeping-cu= rrent.

2. Try to reproduce the problem using "emacs -Q" which will launc= h emacs
=A0 without any personal configuration. =A0That way we can see if this
=A0 windows issue is someone related to your config, or is general.

Thanks,

Andrew Cheng <achengs@gmail.com= > writes:

> Tangle works in my linux environment but doesn't quite work in my = windows
> environment. Here's my org file. It defines a code snippet named &= quot;block"
> and then has a tangle section that refers to "block". Tangle= results in a
> file with two blank lines in my windows environment.
>
> #+name: block
> #+begin_src clojure :results silent
> (+ 2 3)
> #+end_src
>
> #+begin_src clojure :tangle ../src/tmp.clj :results silent :exports no= ne
> :noweb yes
> <<block>>
> #+end_src
>
> But --- If my tangle section has regular code in it instead of referri= ng to
> other named <<blocks>> then the resulting file after tangl= e has the code
> you'd expect.
>
> Below is my org setup. The *Messages* buffer doesn't contain any > interesting error messages. What can I do to find out what's going= on?
>
> I did evaluate the following snippet to get C-c C-c to properly evalua= te a
> clojure code block successfully on my machine. It didn't affect th= e issue
> of tangling. Just thought I'd mention it to be thorough. The snipp= et is
> from Eric Schulte. I thought that by deleting my elpa org folder and > starting emacs again I'd get the latest (with his fix) but I disco= vered
> that I still needed to run this snippet to get C-c C-c to work.
>
> Thanks in advance for any help!
>
> (defun org-babel-execute:clojure (body params)
> =A0"Execute a block of Clojure code with Babel."
> =A0(require 'slime)
> =A0(with-temp-buffer
> =A0 =A0(insert (org-babel-expand-body:clojure body params))
> =A0 =A0((lambda (result)
> =A0 =A0 =A0 (let ((result-params (cdr (assoc :result-params params))))=
> =A0 =A0 =A0 =A0 (if (or (member "scalar" result-params)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (member "verbatim" result-pa= rams))
> =A0 =A0 =A0 =A0 =A0 =A0 result
> =A0 =A0 =A0 =A0 =A0 (condition-case nil (org-babel-script-escape resul= t)
> =A0 =A0 =A0 =A0 =A0 =A0 (error result)))))
> =A0 =A0 (slime-eval
> =A0 =A0 =A0`(swank:eval-and-grab-output
> =A0 =A0 =A0 =A0,(buffer-substring-no-properties (point-min) (point-max= )))
> =A0 =A0 =A0(cdr (assoc :package params))))))
>
> Emacs =A0: GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
> =A0of 2011-09-03 on SHAN-PC
> Package: Org-mode version 7.7
>
> current state:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> (setq
> =A0org-export-blocks '((src org-babel-exp-src-block nil) (comment<= br> > org-export-blocks-format-comment t)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(ditaa org-export-blocks-fo= rmat-ditaa nil) (dot
> org-export-blocks-format-dot nil))
> =A0org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
> org-babel-execute-safely-maybe)
> =A0org-export-preprocess-before-selecting-backend-code-hook
> '(org-beamer-select-beamer-code)
> =A0org-tab-first-hook '(org-hide-block-toggle-maybe
> org-src-native-tab-command-maybe
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 org-babel-hide-result-togg= le-maybe)
> =A0org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hid= e-drawers
> org-cycle-show-empty-lines
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 org-optimize-window-after-visibili= ty-change)
> =A0org-agenda-before-write-hook '(org-agenda-add-entry-text)
> =A0org-speed-command-hook '(org-speed-command-default-hook
> org-babel-speed-command-hook)
> =A0org-babel-pre-tangle-hook '(save-buffer)
> =A0org-occur-hook '(org-first-headline-recenter)
> =A0org-export-interblocks '((lob org-babel-exp-lob-one-liners) (sr= c
> org-babel-exp-inline-src-blocks))
> =A0org-metaup-hook '(org-babel-load-in-session-maybe)
> =A0org-confirm-elisp-link-function 'yes-or-no-p
> =A0org-export-latex-format-toc-function 'org-export-latex-format-t= oc-default
> =A0org-export-preprocess-before-normalizing-links-hook
> '(org-remove-file-link-modifiers)
> =A0org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
> =A0org-export-first-hook '(org-beamer-initialize-open-trackers) > =A0org-mode-hook '(#[nil "\300\301\302\303\304$\207"
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0[org-add-hook change-major-mode= -hook org-show-block-all
> append local] 5]
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0#[nil "\300\301\302\303\304$\2= 07"
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0[org-add-hook change-major-mode= -hook
> org-babel-show-result-all append local] 5]
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0org-babel-result-hide-spec org-babe= l-hide-all-hashes)
> =A0org-from-is-user-regexp nil
> =A0org-export-latex-final-hook '(org-beamer-amend-header org-beame= r-fix-toc
> org-beamer-auto-fragile-frames
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0org-bea= mer-place-default-actions-for-lists)
> =A0org-export-latex-after-initial-vars-hook '(org-beamer-after-ini= tial-vars)
> =A0org-metadown-hook '(org-babel-pop-to-session-maybe)
> =A0org-src-mode-hook '(org-src-babel-configure-edit-buffer
> org-src-mode-configure-edit-buffer)
> =A0org-after-todo-state-change-hook '(org-clock-out-if-current) > =A0org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup= )
> =A0org-babel-tangle-lang-exts '(("clojure" . "clj&q= uot;) ("emacs-lisp" . "el"))
> =A0org-confirm-shell-link-function 'yes-or-no-p
> =A0)

--
Eric Schulte
http://cs.unm.ed= u/~eschulte/

--f46d04463168a82c1f04b966b549--