emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Cc: nicholas.dokos@hp.com, org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Unable to export babel results
Date: Tue, 19 Oct 2010 17:36:48 -0400	[thread overview]
Message-ID: <18051.1287524208@alphaville.usa.hp.com> (raw)
In-Reply-To: Message from Suvayu Ali <fatkasuvayu+linux@gmail.com> of "Tue, 19 Oct 2010 12:37:50 PDT." <4CBDF38E.4080701@gmail.com>

[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" :-)

  reply	other threads:[~2010-10-19 21:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-10-19 21:52                     ` suvayu ali
2010-10-19 17:37         ` Achim Gratz
2010-10-19 17:52           ` suvayu ali

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18051.1287524208@alphaville.usa.hp.com \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fatkasuvayu+linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).