emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: [babel] ledger tutorial on Worg
Date: Thu, 09 Sep 2010 09:29:29 -0600	[thread overview]
Message-ID: <87r5h33pgm.fsf@gmail.com> (raw)
In-Reply-To: <8762yfktad.fsf@mundaneum.com> ("Sébastien Vauban"'s message of "Thu, 09 Sep 2010 14:14:50 +0200")

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> Hi Eric,
>
> Sébastien Vauban wrote:
>> [...] But right now, I don't get anything back from the following (same as
>> for thread about isodoc letters):
>>
>> #+srcname: ledger-journal
>> #+begin_src ledger
>> 2008/01/03 * (SCORPIOS ) SEB VAUBAN
>> 	Assets:Bank:Checking:799997400530	                        550.00 EUR
>> 	Assets:Bank:Transferred
>>
>> 2008/01/01 * ( ) UNKNOWN-PAYEE
>> 	Assets:Bank:Checking:799997400530	                         21.91 EUR
>> 	Expenses:Unknown
>> #+end_src
>>
>> #+srcname: ledger-registry
>> #+begin_src ledger :cmdline reg unknown :noweb yes :session
>> <<ledger-journal>>
>> #+end_src
>>
>> In the *Messages* buffer, I get:
>>
>> Checking for library `filladapt'... Found
>> Fontifying scorpios.org... (regexps.............................................)
>> Checking for library `filladapt'... Found
>> Fontifying scorpios.org... (regexps..............................................)
>> Checking for library `filladapt'... Found
>> Fontifying scorpios.org... (regexps...............................................)
>> Checking for library `filladapt'... Found
>> Checking for library `filladapt'... Found
>> Org-mode restarted
>> Local setup has been refreshed
>>
>> ... but no result block is added in my Org buffer.
>>
>> I'll carefully test all of this, as soon as I can re-execute Babel under
>> normal conditions.
>
> Stupid from me... I have absolutely no idea why, but, instead of pressing C-c
> C-v C-e, I reused the old binging C-c C-c, hence not much happened -- as it is
> disabled in my `.emacs' file:
>
> (setq org-babel-no-eval-on-ctrl-c-ctrl-c t)
>

as a side note, for experimenting with tangling like in the above, I
find the `org-babel-expand-src-block' command bound to C-c C-v v
(mnemonic "view") to be very useful as it shows the expanded version of
the current code block.

>
> Maybe it'd be good to echo that "no eval" occurs anymore in such a
> condition?
>

hmm, but then it would inhibit C-c C-c from performing the next action
in the `org-ctrl-c-ctrl-c-hook'.

>
> Anyway, not always productive to work late...
>
> Side question, as I searched everywhere for the cause of my problem: is it
> totally equivalent to use `org-babel-do-load-languages' than to load
> individual languages?
>

Yes, they are fully equivalent.

>
> I currently have this in my config file:
>
>         ;; customize the `org-babel-load-languages' variable to enable support
>         ;; for languages which can be evaluated in Org mode buffers
>         (when (fboundp 'org-babel-do-load-languages)
>           (org-babel-do-load-languages
>            'org-babel-load-languages
>            '((R . t)
>              (ditaa . t)
>              (dot . t)
>              (emacs-lisp . t)
>              (gnuplot . t)
>              (haskell . nil)
>              (latex . t)
>              (ledger . t)
>              (ocaml . nil)
>              (octave . t)
>              (org . t)  ;; VIP!
>              (python . t)
>              (ruby . t)
>              (screen . nil)
>              (sh . t)
>              (sql . nil)
>              (sqlite . t))))
>

All of the following require statements should be deleted as the
language support will already be loaded by the call to
`org-babel-do-load-languages' above.

>
>         ;; activate a subset of languages
>         (try-require 'ob-sh)
>
>         (try-require 'ob-ditaa)
>         ;; TODO Install this for Ditaa: sudo aptitude install openjdk-6-jre
>
>         (try-require 'ob-dot)
>
>         (try-require 'ob-emacs-lisp)
>
>         (try-require 'ob-gnuplot)
>         ;; requires gnuplot-mode
>
>         (try-require 'ob-latex)
>
>         ;; get `BEGIN_SRC org'/`END_SRC' blocks interpreted as Org markup
>         (try-require 'ob-org)
>
>         (try-require 'ob-perl)
>
>         (try-require 'ob-python)
>         ;; requires python, and python-mode
>
>         (try-require 'ob-R)
>         ;; requires R and ess-mode
>
>         (try-require 'ob-ruby)
>         ;; requires ruby, irb, ruby-mode, and inf-ruby
>
>         (try-require 'ob-sql)
>
>         ;; (require 'ob-identifier) ; ????????
>
>         ;; support for interactive terminals. Mostly shell scripts. Heavily
>         ;; inspired by `eev'
>         (try-require 'ob-screen)
>         ;; Eric Schulte believes screen has more of a focus on sustained
>         ;; interaction with an interactive terminal, although to be honest he
>         ;; haven't really used it and
>
> I'm not sure to understand *all* the implications of choosing one over the
> other, even after having read:
>
>     (info "(org)Languages")
>
> and `ob-org.el' for example.
>
> Can you give me a hint, please?
>

I'd recommend just using `org-babel-load-languages' and removing the
explicit try-require lines.

Cheers -- Eric

>
> Best regards,
>   Seb
>
> PS- `try-require' is my customized `require', which does not stop if file is
>     not found...

  reply	other threads:[~2010-09-09 15:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26 23:06 [babel] ledger tutorial on Worg Eric S Fraga
2010-08-27 14:53 ` Carsten Dominik
2010-08-27 15:27   ` Eric Schulte
2010-08-27 19:33     ` Eric S Fraga
2010-09-01 11:25     ` Sébastien Vauban
2010-09-01 18:33       ` Eric S Fraga
2010-09-02  0:19         ` Eric Schulte
2010-09-02 12:43         ` Sébastien Vauban
2010-09-02 14:56           ` Eric Schulte
2010-09-03 20:53             ` Sébastien Vauban
2010-09-03 21:35               ` Eric Schulte
2010-09-05 20:49                 ` Sébastien Vauban
2010-09-07 23:03                   ` Eric Schulte
2010-09-08  8:21                     ` Sébastien Vauban
2010-09-08 17:53                       ` Eric Schulte
2010-09-08 21:40                         ` Sébastien Vauban
2010-09-08 22:46                           ` Eric Schulte
2010-09-09 12:14                           ` Sébastien Vauban
2010-09-09 15:29                             ` Eric Schulte [this message]
2010-09-09 19:59                               ` Sébastien Vauban
2010-09-09 21:15                                 ` Sébastien Vauban
2010-09-09 21:42                                   ` Dan Davison
2010-09-03  8:33           ` Eric S Fraga

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=87r5h33pgm.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.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).