From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Unable to export babel results Date: Tue, 19 Oct 2010 17:36:48 -0400 Message-ID: <18051.1287524208@alphaville.usa.hp.com> References: <87d3r7gezd.fsf@gmail.com> <878w1uhqjb.fsf@gmail.com> <4CBD1504.2020402@gmail.com> <8739s29tig.fsf@gmail.com> <4CBDD990.6010604@gmail.com> <87y69u83v4.fsf@gmail.com> <9603.1287512688@alphaville.usa.hp.com> <4CBDF38E.4080701@gmail.com> Reply-To: nicholas.dokos@hp.com Return-path: Received: from [140.186.70.92] (port=56343 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8JrY-0003y9-VA for emacs-orgmode@gnu.org; Tue, 19 Oct 2010 17:36:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8JrW-0006Dz-Ub for emacs-orgmode@gnu.org; Tue, 19 Oct 2010 17:36:52 -0400 Received: from g1t0027.austin.hp.com ([15.216.28.34]:6398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8JrW-0006Dd-CL for emacs-orgmode@gnu.org; Tue, 19 Oct 2010 17:36:50 -0400 In-Reply-To: Message from Suvayu Ali of "Tue, 19 Oct 2010 12:37:50 PDT." <4CBDF38E.4080701@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Suvayu Ali Cc: nicholas.dokos@hp.com, org-mode mailing list [Apologies: I replied to Suvayu but I forgot to cc: the list - again...] Suvayu Ali 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" :-)