emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [babel] evaluating ledger source block now scans large number of org files
@ 2011-07-01  9:07 Eric S Fraga
  2011-07-01 19:11 ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: Eric S Fraga @ 2011-07-01  9:07 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello,

I don't know what has changed or when but, being the start of a new
month, I am doing my finances.  I use ledger for this and, of course,
within org!

Evaluating a ledger source code block now takes a significant amount of
time.  Babel seems to search org files throughout my disk for IDs.  I
get messages like this:

,----
| ...
| Finding ID locations (13/65 files): ~/git/notes/personal.org
| Finding ID locations (14/65 files): ~/git/notes/research.org
| Finding ID locations (15/65 files): ~/git/notes/tasks.org
| ...
`----

I am using ":noweb yes" but otherwise I cannot see why org + babel need
to scan files throughout the disk?

A minimal example that exhibits this behaviour is attached.  Evaluating
the second code block generates the lines shown above.  Evaluating the
first block does not which is why I think this may have something to do
with :noweb.

Up to date org (see signature below).

thanks,
eric


[-- Attachment #2: ledger babel example --]
[-- Type: text/orgmode, Size: 755 bytes --]

# -*- coding: utf-8; -*-
#+TITLE:     examplebug.org
#+AUTHOR:    Eric S Fraga
#+EMAIL:     e.fraga@ucl.ac.uk
#+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS:   TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:nil

* finances
  #+srcname: transactions
  #+begin_src ledger :noweb yes
2011/06/01 * Income
  assets:bank  £1000
  income:pay
2011/06/30 * Rent
  expenses:rent  £500
  assets:bank
  #+end_src


  #+srcname: balance
  #+begin_src ledger :cmdline bal :noweb yes
<<transactions>>
  #+end_src

  #+results: balance
  :                 £500  assets:bank
  :                 £500  expenses:rent
  :               £-1000  income:pay
  : --------------------
  :                    0

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


-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.530.g23bb.dirty)

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

* Re: [babel] evaluating ledger source block now scans large number of org files
  2011-07-01  9:07 [babel] evaluating ledger source block now scans large number of org files Eric S Fraga
@ 2011-07-01 19:11 ` Eric Schulte
  2011-07-03 18:13   ` Eric S Fraga
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Schulte @ 2011-07-01 19:11 UTC (permalink / raw)
  To: emacs-orgmode

Hi Eric,

Thanks for pointing this out.  IDs can be used to resolve code block
references, however it appears that the `org-id-goto' function is
attempting to re-scan all ID locations when a reference is not found.
I've just pushed up a patch which side-steps this rescanning behavior.

Best -- Eric

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Hello,
>
> I don't know what has changed or when but, being the start of a new
> month, I am doing my finances.  I use ledger for this and, of course,
> within org!
>
> Evaluating a ledger source code block now takes a significant amount of
> time.  Babel seems to search org files throughout my disk for IDs.  I
> get messages like this:
>
> ,----
> | ...
> | Finding ID locations (13/65 files): ~/git/notes/personal.org
> | Finding ID locations (14/65 files): ~/git/notes/research.org
> | Finding ID locations (15/65 files): ~/git/notes/tasks.org
> | ...
> `----
>
> I am using ":noweb yes" but otherwise I cannot see why org + babel need
> to scan files throughout the disk?
>
> A minimal example that exhibits this behaviour is attached.  Evaluating
> the second code block generates the lines shown above.  Evaluating the
> first block does not which is why I think this may have something to do
> with :noweb.
>
> Up to date org (see signature below).
>
> thanks,
> eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: [babel] evaluating ledger source block now scans large number of org files
  2011-07-01 19:11 ` Eric Schulte
@ 2011-07-03 18:13   ` Eric S Fraga
  0 siblings, 0 replies; 3+ messages in thread
From: Eric S Fraga @ 2011-07-03 18:13 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode

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

> Hi Eric,
>
> Thanks for pointing this out.  IDs can be used to resolve code block
> references, however it appears that the `org-id-goto' function is
> attempting to re-scan all ID locations when a reference is not found.
> I've just pushed up a patch which side-steps this rescanning behavior.

Thanks.  This too seems to be working just fine now.
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.561.g9e7ef)

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

end of thread, other threads:[~2011-07-03 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-01  9:07 [babel] evaluating ledger source block now scans large number of org files Eric S Fraga
2011-07-01 19:11 ` Eric Schulte
2011-07-03 18:13   ` Eric S Fraga

Code repositories for project(s) associated with this 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).