emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Unable to export babel results
@ 2010-10-18  4:31 suvayu ali
  2010-10-19  1:15 ` Eric Schulte
  0 siblings, 1 reply; 14+ messages in thread
From: suvayu ali @ 2010-10-18  4:31 UTC (permalink / raw)
  To: org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 657 bytes --]

Hi,

I am having some trouble with org-babel and exporting results. I am
not sure what I am doing wrong.


+ while exporting to LaTeX->pdf if I answer y to evaluating source
  blocks, I get a message like this and nothing is exported.

> Evaluate this gnuplot code on your system? (y or n)  y
> executing Gnuplot code block (plot-k-factor-w-err-png)...
> org-babel-ref-resolve-reference: reference 'k-factor-red-table' not found in this buffer


+ Whereas if I evaluate the src block separately and then export,
  every thing works as expected.


What is wrong with my setup? How do I troubleshoot?


-- 
Suvayu

Open source is the future. It sets us free.

[-- Attachment #2: babel_test.org --]
[-- Type: application/vnd.lotus-organizer, Size: 3344 bytes --]

[-- Attachment #3: babel_test.pdf --]
[-- Type: application/pdf, Size: 67317 bytes --]

[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Unable to export babel results
  2010-10-18  4:31 Unable to export babel results suvayu ali
@ 2010-10-19  1:15 ` Eric Schulte
  2010-10-19  2:02   ` suvayu ali
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Schulte @ 2010-10-19  1:15 UTC (permalink / raw)
  To: suvayu ali; +Cc: org-mode mailing list

Hi,

I've tried to export your file and I had no problems.  I believe the
problem you describe may be fixed in a recent (the last month or so)
patch to Org-mode.  Could you try checking out the latest development
version of Org-mode and let me know if the problem persists?

http://orgmode.org/worg/org-faq.php#Keeping-current

Best -- Eric

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> Hi,
>
> I am having some trouble with org-babel and exporting results. I am
> not sure what I am doing wrong.
>
>
> + while exporting to LaTeX->pdf if I answer y to evaluating source
>   blocks, I get a message like this and nothing is exported.
>
>> Evaluate this gnuplot code on your system? (y or n)  y
>> executing Gnuplot code block (plot-k-factor-w-err-png)...
>> org-babel-ref-resolve-reference: reference 'k-factor-red-table' not found in this buffer
>
>
> + Whereas if I evaluate the src block separately and then export,
>   every thing works as expected.
>
>
> What is wrong with my setup? How do I troubleshoot?

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

* Re: Unable to export babel results
  2010-10-19  1:15 ` Eric Schulte
@ 2010-10-19  2:02   ` suvayu ali
  2010-10-19  2:20     ` Eric Schulte
  0 siblings, 1 reply; 14+ messages in thread
From: suvayu ali @ 2010-10-19  2:02 UTC (permalink / raw)
  To: Eric Schulte; +Cc: org-mode mailing list

Hi Eric,

On 18 October 2010 18:15, Eric Schulte <schulte.eric@gmail.com> wrote:
> Could you try checking out the latest development
> version of Org-mode and let me know if the problem persists?

Sorry I should have mentioned this, my version of org-mode is 3 days
old. This is the exact version that I'm using. I'll still update my
installation and report back.


commit c9b017632eefdb40da3632c191c5c2321eff1569
Author: Eric Schulte <schulte.eric@gmail.com>
Date:   Fri Oct 15 09:25:33 2010 -0600

    ob-sh: no longer fails on empty results

    * lisp/ob-sh.el (org-babel-sh-evaluate): no longer assumes that
      results are non-nil

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Unable to export babel results
  2010-10-19  2:02   ` suvayu ali
@ 2010-10-19  2:20     ` Eric Schulte
  2010-10-19  3:48       ` Suvayu Ali
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Schulte @ 2010-10-19  2:20 UTC (permalink / raw)
  To: suvayu ali; +Cc: org-mode mailing list

Hmm,

Are you sure that the version of Org-mode loaded in Emacs is the very
same version?  What output do you get when you run the org-version
command?  I get

  Org-mode version 7.01trans (release_7.01h.747.g57e7)

It is common for people to have a local checkout of the latest version
of org-mode, but still have an older version located somewhere in their
site-lisp directory loaded overtop of the new checkout.  If this is the
case you may need to tweak your classpaths.

If you are using the latest version of Org-mode, then I'm not sure what
the problem could be.  I've exported your attached example file with
org-confirm-babel-evaluate set to both nil and to true, in both cases it
worked for me without problem.  Are you on a windows box (another one of
my go-to potential culprits)?

Best -- Eric

suvayu ali <fatkasuvayu+linux@gmail.com> writes:

> Hi Eric,
>
> On 18 October 2010 18:15, Eric Schulte <schulte.eric@gmail.com> wrote:
>> Could you try checking out the latest development
>> version of Org-mode and let me know if the problem persists?
>
> Sorry I should have mentioned this, my version of org-mode is 3 days
> old. This is the exact version that I'm using. I'll still update my
> installation and report back.
>
>
> commit c9b017632eefdb40da3632c191c5c2321eff1569
> Author: Eric Schulte <schulte.eric@gmail.com>
> Date:   Fri Oct 15 09:25:33 2010 -0600
>
>     ob-sh: no longer fails on empty results
>
>     * lisp/ob-sh.el (org-babel-sh-evaluate): no longer assumes that
>       results are non-nil

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

* Re: Unable to export babel results
  2010-10-19  2:20     ` Eric Schulte
@ 2010-10-19  3:48       ` Suvayu Ali
  2010-10-19 13:36         ` Eric Schulte
  2010-10-19 17:37         ` Achim Gratz
  0 siblings, 2 replies; 14+ messages in thread
From: Suvayu Ali @ 2010-10-19  3:48 UTC (permalink / raw)
  To: Eric Schulte; +Cc: org-mode mailing list

Hi Eric,

On Monday 18 October 2010 07:20 PM, Eric Schulte wrote:
> Hmm,
>
> Are you sure that the version of Org-mode loaded in Emacs is the very
> same version?  What output do you get when you run the org-version
> command?  I get
>
>    Org-mode version 7.01trans (release_7.01h.747.g57e7)
>

I just updated to the master HEAD, still no luck. Before and after
updating I get this, "Org-mode version 7.01trans". I don't know why I
have never seen the part within the parentheses before.

> It is common for people to have a local checkout of the latest version
> of org-mode, but still have an older version located somewhere in their
> site-lisp directory loaded overtop of the new checkout.  If this is the
> case you may need to tweak your classpaths.
>
> If you are using the latest version of Org-mode, then I'm not sure what
> the problem could be.  I've exported your attached example file with
> org-confirm-babel-evaluate set to both nil and to true, in both cases it
> worked for me without problem.  Are you on a windows box (another one of
> my go-to potential culprits)?
>

I use "GNU Emacs 24.0.50.1 (2010-10-15)" on Fedora 13. To install 
org-mode, I overwrite the default emacs org directory,

$EMACS_INSTALL_PATH/share/emacs/24.0.50/lisp/org

I know this works because after I update emacs, `org-version' returns 
"7.01h" and subsequently updating org-mode changes the version as I 
stated above. Do you think I might have mixed version of files? I used 
to install it under,

$EMACS_INSTALL_PATH/share/emacs/site-lisp

but I prefer having things all organised inside a directory and I am not 
confident enough to write my own site-lisp file.

FWIW, I have this same issue on a similar Ubuntu 10.04 installation of 
Emacs 24 and org-mode HEAD.

> Best -- Eric

Thanks a lot for looking into this.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Unable to export babel results
  2010-10-19  3:48       ` Suvayu Ali
@ 2010-10-19 13:36         ` Eric Schulte
  2010-10-19 17:46           ` Suvayu Ali
  2010-10-19 17:37         ` Achim Gratz
  1 sibling, 1 reply; 14+ messages in thread
From: Eric Schulte @ 2010-10-19 13:36 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: org-mode mailing list

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> Hi Eric,
>
> On Monday 18 October 2010 07:20 PM, Eric Schulte wrote:
>> Hmm,
>>
>> Are you sure that the version of Org-mode loaded in Emacs is the very
>> same version?  What output do you get when you run the org-version
>> command?  I get
>>
>>    Org-mode version 7.01trans (release_7.01h.747.g57e7)
>>
>
> I just updated to the master HEAD, still no luck. Before and after
> updating I get this, "Org-mode version 7.01trans". I don't know why I
> have never seen the part within the parentheses before.
>

The part within parenthesis is pulled directly from the git repository
with the command

  git describe --abbrev=4 HEAD

Do you have git installed on your system?  If you do (which I'd think
you'd have to in order to have made it this far) then I'm not sure why
your org-version command doesn't include a part in parenthesis.  If you
really wanted to dig into this you could;
1) call describe-function on the `org-version' function
2) evaluate org-version with edebug by pressing C-u C-M-x
3) call the function with M-x org-version
4) and then step through the function by repeatedly pressing space-bar
   to see why it is failing to call git

>
>> It is common for people to have a local checkout of the latest version
>> of org-mode, but still have an older version located somewhere in their
>> site-lisp directory loaded overtop of the new checkout.  If this is the
>> case you may need to tweak your classpaths.
>>
>> If you are using the latest version of Org-mode, then I'm not sure what
>> the problem could be.  I've exported your attached example file with
>> org-confirm-babel-evaluate set to both nil and to true, in both cases it
>> worked for me without problem.  Are you on a windows box (another one of
>> my go-to potential culprits)?
>>
>
> I use "GNU Emacs 24.0.50.1 (2010-10-15)" on Fedora 13. To install
> org-mode, I overwrite the default emacs org directory,
>
> $EMACS_INSTALL_PATH/share/emacs/24.0.50/lisp/org
>
> I know this works because after I update emacs, `org-version' returns
> "7.01h" and subsequently updating org-mode changes the version as I
> stated above. Do you think I might have mixed version of files? I used
> to install it under,
>
> $EMACS_INSTALL_PATH/share/emacs/site-lisp
>
> but I prefer having things all organised inside a directory and I am
> not confident enough to write my own site-lisp file.
>

It might be worthwhile removing the old install under
share/emacs/site-lisp

>
> FWIW, I have this same issue on a similar Ubuntu 10.04 installation of
> Emacs 24 and org-mode HEAD.
>

Hmm, I'm still leaning towards thinking that this could be an
installation issue.  I'd try cleaning up old versions of org-mode and
your load-path until you manage to get something like the following out
of the org-version command

  Org-mode version 7.01trans (release_7.01h.718.g0cb3c5)

My guess is that once you get there the problem will be fixed.

>
>> Best -- Eric
>
> Thanks a lot for looking into this.

Happy to Help, Best of Luck -- Eric

also, if nothing else works, another unrelated thing to try is setting
org-confirm-babel-evaluate to nil (just temporarily)

  (setq org-confirm-babel-evaluate nil)

and then trying once again to export the file.  I doubt this will fix
the problem (and I almost hope it doesn't because then I don't
understand the problem as well as I thought I did, and an actual bug is
implied), but I suppose it may be an outside possibility.

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

* Re: Unable to export babel results
  2010-10-19  3:48       ` Suvayu Ali
  2010-10-19 13:36         ` Eric Schulte
@ 2010-10-19 17:37         ` Achim Gratz
  2010-10-19 17:52           ` suvayu ali
  1 sibling, 1 reply; 14+ messages in thread
From: Achim Gratz @ 2010-10-19 17:37 UTC (permalink / raw)
  To: emacs-orgmode

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> I use "GNU Emacs 24.0.50.1 (2010-10-15)" on Fedora 13. To install
> org-mode, I overwrite the default emacs org directory,
>
> $EMACS_INSTALL_PATH/share/emacs/24.0.50/lisp/org

Don't do this, the next time you install a newer package from your
distribution all your changes go "poof".  Or they aren't used anymore
because you have a newer version of Emacs by then - in any case things
will break.

> I know this works because after I update emacs, `org-version' returns
> "7.01h" and subsequently updating org-mode changes the version as I
> stated above. Do you think I might have mixed version of files? I used
> to install it under,
>
> $EMACS_INSTALL_PATH/share/emacs/site-lisp

I think you've found your own problem -- I suspect you still have an old
version of org-mode in site-lisp.  This directory is searched first,
unless you've changed Emacs' default settings.


Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

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

* Re: Unable to export babel results
  2010-10-19 13:36         ` Eric Schulte
@ 2010-10-19 17:46           ` Suvayu Ali
  2010-10-19 17:54             ` Eric Schulte
  0 siblings, 1 reply; 14+ messages in thread
From: Suvayu Ali @ 2010-10-19 17:46 UTC (permalink / raw)
  To: Eric Schulte; +Cc: org-mode mailing list

Hi Eric,

On Tuesday 19 October 2010 06:36 AM, Eric Schulte wrote:
> Suvayu Ali<fatkasuvayu+linux@gmail.com>  writes:
>>
>> I just updated to the master HEAD, still no luck. Before and after
>> updating I get this, "Org-mode version 7.01trans". I don't know why I
>> have never seen the part within the parentheses before.
>>
>
> The part within parenthesis is pulled directly from the git repository
> with the command
>
>    git describe --abbrev=4 HEAD
>
> Do you have git installed on your system?  If you do (which I'd think
> you'd have to in order to have made it this far) then I'm not sure why
> your org-version command doesn't include a part in parenthesis.  If you
> really wanted to dig into this you could;
> 1) call describe-function on the `org-version' function
> 2) evaluate org-version with edebug by pressing C-u C-M-x
> 3) call the function with M-x org-version
> 4) and then step through the function by repeatedly pressing space-bar
>     to see why it is failing to call git
>

Yes I have git on my system, I use it fairly regularly for my research 
projects. I see that `org-version' looks for git repository in the 
toplevel install directory (/opt/emacs-lisp/share/emacs/site-lisp/org) 
and it doesn't find it. Which is expected because my install directory 
and my build directory (i.e. the git repository) are different. How do I 
make it look at the build directory (~/build/org-mode) instead?

>
> It might be worthwhile removing the old install under
> share/emacs/site-lisp
>
>>
>> FWIW, I have this same issue on a similar Ubuntu 10.04 installation of
>> Emacs 24 and org-mode HEAD.
>>
>
> Hmm, I'm still leaning towards thinking that this could be an
> installation issue.  I'd try cleaning up old versions of org-mode and
> your load-path until you manage to get something like the following out
> of the org-version command
>
>    Org-mode version 7.01trans (release_7.01h.718.g0cb3c5)
>
> My guess is that once you get there the problem will be fixed.
>

I removed my entire Emacs 24 install, reinstalled it in 
/opt/emacs-lisp/share/emacs. Then installed org-mode in 
/opt/emacs-lisp/share/emacs/site-lisp/org. Then I put a site-start file 
called org-mode.el in /opt/emacs-lisp/share/emacs/site-lisp with the 
following contents:

> (add-to-list 'load-path (expand-file-name "org"))
>
> (require 'org-install)
> (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

On restarting Emacs and calling org-version, I get "Org-mode version 
7.01trans". There shouldn't be any mixed files after all this. The 
problem still persists. Does that mean I am doing the installation wrong?

> also, if nothing else works, another unrelated thing to try is setting
> org-confirm-babel-evaluate to nil (just temporarily)
>
>    (setq org-confirm-babel-evaluate nil)
>

That doesn't help. Which is probably good. :)


Thanks,
-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Re: Unable to export babel results
  2010-10-19 17:37         ` Achim Gratz
@ 2010-10-19 17:52           ` suvayu ali
  0 siblings, 0 replies; 14+ messages in thread
From: suvayu ali @ 2010-10-19 17:52 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode

Hi Achim

On 19 October 2010 10:37, Achim Gratz <Stromeko@nexgo.de> wrote:
> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
>> I use "GNU Emacs 24.0.50.1 (2010-10-15)" on Fedora 13. To install
>> org-mode, I overwrite the default emacs org directory,
>>
>> $EMACS_INSTALL_PATH/share/emacs/24.0.50/lisp/org
>
> Don't do this, the next time you install a newer package from your
> distribution all your changes go "poof".  Or they aren't used anymore
> because you have a newer version of Emacs by then - in any case things
> will break.
>

I was not overwriting my distribution's emacs install. I am using
Emacs 24 HEAD in a separate install path. Since this mixup seems like
an installation issue, I reinstalled everything this morning and this
time I put org in a separate directory under site-lisp.

>> I know this works because after I update emacs, `org-version' returns
>> "7.01h" and subsequently updating org-mode changes the version as I
>> stated above. Do you think I might have mixed version of files? I used
>> to install it under,
>>
>> $EMACS_INSTALL_PATH/share/emacs/site-lisp
>
> I think you've found your own problem -- I suspect you still have an old
> version of org-mode in site-lisp.  This directory is searched first,
> unless you've changed Emacs' default settings.
>

There were no old files in the site-lisp directory, I had removed
stale files before installing afresh. The problem still persists.

>
> Achim.

Thanks a lot for helping to diagnose my problem.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Unable to export babel results
  2010-10-19 17:46           ` Suvayu Ali
@ 2010-10-19 17:54             ` Eric Schulte
  2010-10-19 18:24               ` Nick Dokos
  0 siblings, 1 reply; 14+ messages in thread
From: Eric Schulte @ 2010-10-19 17:54 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: org-mode mailing list

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

>
> On restarting Emacs and calling org-version, I get "Org-mode version
> 7.01trans". There shouldn't be any mixed files after all this. The
> problem still persists. Does that mean I am doing the installation
> wrong?
>

Yes, I believe that until you see the parenthesized portion of the
org-version string you are still not loading the latest version (from
git head).  It might be worth installing outside of the emacs directory
and following the following instructions for activation

http://orgmode.org/guide/Installation.html#Installation

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

* Re: Unable to export babel results
  2010-10-19 17:54             ` Eric Schulte
@ 2010-10-19 18:24               ` Nick Dokos
  2010-10-19 19:37                 ` Suvayu Ali
  0 siblings, 1 reply; 14+ messages in thread
From: Nick Dokos @ 2010-10-19 18:24 UTC (permalink / raw)
  To: Eric Schulte; +Cc: org-mode mailing list, nicholas.dokos

Eric Schulte <schulte.eric@gmail.com> wrote:

> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> 
> >
> > On restarting Emacs and calling org-version, I get "Org-mode version
> > 7.01trans". There shouldn't be any mixed files after all this. The
> > problem still persists. Does that mean I am doing the installation
> > wrong?
> >
> 
> Yes, I believe that until you see the parenthesized portion of the
> org-version string you are still not loading the latest version (from
> git head).

Not necessarily: the info inside the parens is generated through a git
command that makes an assumption about where the git directory is relative
to the lisp directory. If the assumption is violated, then the git command
fails and the extra info is not generated, despite having the latest org
version installed.

The assumption is that the following expression evaluates to the
git directory itself (the directory that contains the .git subdirectory):

	 (concat (file-name-directory (locate-library "org")) "../" )

In particular if you install the whole org lisp directory into the emacs
site-lisp directory, the assumption is violated.

>  It might be worth installing outside of the emacs directory
> and following the following instructions for activation
> 
> http://orgmode.org/guide/Installation.html#Installation
> 

I think this way avoids most of the problems: it allows one to customize
load-path and be *sure* that the correct org-version gets loaded and it
does eliminate the problem above.

Nick

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

* Re: Unable to export babel results
  2010-10-19 18:24               ` Nick Dokos
@ 2010-10-19 19:37                 ` Suvayu Ali
  2010-10-19 21:36                   ` Nick Dokos
  0 siblings, 1 reply; 14+ messages in thread
From: Suvayu Ali @ 2010-10-19 19:37 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: org-mode mailing list

[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]

Hi Eric and Nick,

On Tuesday 19 October 2010 11:24 AM, Nick Dokos wrote:
> Eric Schulte<schulte.eric@gmail.com>  wrote:
>>
>>   It might be worth installing outside of the emacs directory
>> and following the following instructions for activation
>>
>> http://orgmode.org/guide/Installation.html#Installation
>>
>
> I think this way avoids most of the problems: it allows one to customize
> load-path and be *sure* that the correct org-version gets loaded and it
> does eliminate the problem above.
>

I tried this,

> (add-to-list 'load-path (expand-file-name "~/build/org-mode/lisp"))
> (add-to-list 'load-path (expand-file-name "~/build/org-mode/contrib"))
> (require 'org-install)
>
> (org-babel-do-load-languages
>  'org-babel-load-languages
>  '((ditaa . t)
>    (emacs-lisp . t)
>    (gnuplot . t)
>    (python . t)
>    (sh . t)))


After this `org-version' returns "Org-mode version 7.01trans 
(release_7.01h.753.g5cdf)". However on opening the test org file and 
exporting to pdf I get a backtrace (attached). If I quit the backtrace 
and try to export again, I get a well formatted pdf as we would expect.

If I check the "*gnuplot*" buffer after the backtrace, I see none of the 
src block commands have been run. Where as after quiting the backtrace 
and re-exporting the file shows all the src block commands in the 
"*gnuplot*" buffer.

I have noticed this behaviour before. When I try to evaluate the src 
block after I have started emacs, it fails the first time giving me a 
"*gnuplot*" buffer with no commands. On repeated evaluations, it works 
as expected.

Do you think this is because of an incorrectly installed `gnuplot-mode'? 
Or could this be a problem with babel?

> Nick
>

Thank you all of you for taking the time to look at the issue. I 'll 
switch to using org this way.

-- 
Suvayu

Open source is the future. It sets us free.

[-- Attachment #2: bt.log --]
[-- Type: application/octet-stream, Size: 19921 bytes --]

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Unable to export babel results
  2010-10-19 19:37                 ` Suvayu Ali
@ 2010-10-19 21:36                   ` Nick Dokos
  2010-10-19 21:52                     ` suvayu ali
  0 siblings, 1 reply; 14+ messages in thread
From: Nick Dokos @ 2010-10-19 21:36 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: nicholas.dokos, org-mode mailing list

[Apologies: I replied to Suvayu but I forgot to cc: the list - again...]

Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:


> After this `org-version' returns "Org-mode version 7.01trans
> (release_7.01h.753.g5cdf)". However on opening the test org file and
> exporting to pdf I get a backtrace (attached). If I quit the backtrace
> and try to export again, I get a well formatted pdf as we would
> expect.
> 
> If I check the "*gnuplot*" buffer after the backtrace, I see none of
> the src block commands have been run. Where as after quiting the
> backtrace and re-exporting the file shows all the src block commands
> in the "*gnuplot*" buffer.
> 
> I have noticed this behaviour before. When I try to evaluate the src
> block after I have started emacs, it fails the first time giving me a
> "*gnuplot*" buffer with no commands. On repeated evaluations, it works
> as expected.
> 
> Do you think this is because of an incorrectly installed
> `gnuplot-mode'? Or could this be a problem with babel?
> 

Well, the backtrace is complaining about make-local-hook being an
void function, and C-h f make-local-hook says:

,----
| make-local-hook is a compiled Lisp function in `subr.el'.
| 
| (make-local-hook HOOK)
| 
| This function is obsolete since 21.1;
| not necessary any more.
`----

so either you don't load subr.el (which sounds unlikely but who
knows?) or the function has been deleted - maybe because it's been
obsolete for such a long time: I just checked a recent build of
emacs and it seems to be the latter.

The backtrace also shows that gnuplot-make-gnuplot-buffer is the
caller: 

,----
| (defun gnuplot-make-gnuplot-buffer ()
|   "Switch to the gnuplot program buffer or create one if none exists."
|   (or (and gnuplot-process (get-process gnuplot-process)
| 	   gnuplot-buffer (get-buffer gnuplot-buffer))
|       (progn
| 	(message "Starting gnuplot plotting program...")
| 	(setq gnuplot-buffer (make-comint gnuplot-process-name gnuplot-program)
| 	      gnuplot-process (get-process gnuplot-process-name))
| 	(process-kill-without-query gnuplot-process nil)
| 	(save-excursion
| 	  (set-buffer gnuplot-buffer)
| 	  (make-local-hook 'kill-buffer-hook)                 ;;<<<<<<<<<<<<<<<<<<<
| 	  (add-hook 'kill-buffer-hook 'gnuplot-close-down nil t)
| 	  (gnuplot-comint-start-function)
|           (make-local-variable 'comint-output-filter-functions)
|           (setq comint-output-filter-functions
|                 (append comint-output-filter-functions
|                         '(comint-postoutput-scroll-to-bottom
|                           gnuplot-protect-prompt-fn)))
| 	  (message "Starting gnuplot plotting program...Done")))))
`----

but it calls add-hook with the LOCAL arg set to t, which does what
make-local-hook used to do, so it is safe to just delete the marked
line above. And don't forget to submit a bug report to the gnuplot.el
people :-)

Nick

PS. OK, time for a second rant:

If you *have* to use attachments, *please* take the time to make the
MIME type correct. In particular, application/octet-stream is a last
ditch default for machines: it's a "I don't know what to do - I'm
throwing up my hands" response - perhaps OK for a machine, but never for
a human.

In particular, a backtrace attachment should be "text/plain" - as should
be the case for an org file too: your earlier attachment of an org file
was of type "application/vnd.lotus-organizer".

Remember the motto: It's "Org-mode: your life in plain text",
not "Org-mode: your life in lotus-organizer format" :-)

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

* Re: Unable to export babel results
  2010-10-19 21:36                   ` Nick Dokos
@ 2010-10-19 21:52                     ` suvayu ali
  0 siblings, 0 replies; 14+ messages in thread
From: suvayu ali @ 2010-10-19 21:52 UTC (permalink / raw)
  Cc: org-mode mailing list

And just for the archives.

On 19 October 2010 14:36, Nick Dokos <nicholas.dokos@hp.com> wrote:
> but it calls add-hook with the LOCAL arg set to t, which does what
> make-local-hook used to do, so it is safe to just delete the marked
> line above. And don't forget to submit a bug report to the gnuplot.el
> people :-)
>

Nick's solution solved the issue. I'll report it to the `gnuplot-mode'
author when I have the time. :)

-- 
Suvayu

Open source is the future. It sets us free.

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

end of thread, other threads:[~2010-10-19 22:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-18  4:31 Unable to export babel results suvayu ali
2010-10-19  1:15 ` Eric Schulte
2010-10-19  2:02   ` suvayu ali
2010-10-19  2:20     ` Eric Schulte
2010-10-19  3:48       ` Suvayu Ali
2010-10-19 13:36         ` Eric Schulte
2010-10-19 17:46           ` Suvayu Ali
2010-10-19 17:54             ` Eric Schulte
2010-10-19 18:24               ` Nick Dokos
2010-10-19 19:37                 ` Suvayu Ali
2010-10-19 21:36                   ` Nick Dokos
2010-10-19 21:52                     ` suvayu ali
2010-10-19 17:37         ` Achim Gratz
2010-10-19 17:52           ` suvayu ali

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