add transaction in the new ledger-mode

92 views
Skip to first unread message

Alexandre Rademaker

unread,
May 14, 2013, 9:51:05 AM5/14/13
to ledge...@googlegroups.com
Hello All,

In the new ledger mode, the C-c C-a (add-transaction) is adding the transaction always in the end of the file. Does anyone know how to make it add the transactions in the right place of the file? 

Best,
Alexandre

John Rakestraw

unread,
May 14, 2013, 10:15:41 AM5/14/13
to ledge...@googlegroups.com

In the new ledger mode, the C-c C-a (add-transaction) is adding the transaction always in the end of the file. Does anyone know how to make it add the transactions in the right place of the file? 

My experience is slightly different -- new entries with today's date or later are consistently added after the first entry for the 21st of the current month. Other weirdness:

- An entry dated 2013/04/30 just now landed after entries dated 2013/05/08.
- An entry dated 2013/04/08 just now landed after entries dated 2013/04/20.

GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2) of 2013-04-21 on wani09, modified by Debian

I last updated ldg*.el April 20.

--John

Craig Earls

unread,
May 14, 2013, 10:24:13 AM5/14/13
to ledge...@googlegroups.com
Please tell me what date-format you have set in your .ledgerrc.

Please pull the latest from Master. There veeseveral aes since April 20.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ledger-cli+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

Alexandre Rademaker

unread,
May 14, 2013, 10:55:44 AM5/14/13
to ledge...@googlegroups.com
In my case, none! I am using in all transactions what I think is the
default, YYYY/MM/DD, right?

Best,

Alexandre Rademaker
http://arademaker.github.com/

Craig Earls

unread,
May 14, 2013, 11:17:40 AM5/14/13
to ledge...@googlegroups.com
That should be the default. I will look into what is happening. I
don't have this problem at all.

Craig

Craig Earls

unread,
May 14, 2013, 11:23:35 AM5/14/13
to ledge...@googlegroups.com
Are you using Y year directives at all?

John Rakestraw

unread,
May 14, 2013, 11:26:47 AM5/14/13
to ledge...@googlegroups.com
I'm using the default format as well.

I'm not using Y directives.

Sorry -- I know you said earlier that you don't see the problem on your end, but I've been swamped and haven't had time to attempt to identify the element in our settings that might be different.

--John
I've now upgraded to the latest, and still see the same behavior.

Craig Earls

unread,
May 14, 2013, 11:28:10 AM5/14/13
to ledge...@googlegroups.com
Thanks John, I thought maybe a broken REGEX that I fixed last week
would have fixed it. I will keep trying to reproduce the three
problems reported here. Alexandre, could you log this in Bugzilla?

Alexandre Rademaker

unread,
May 14, 2013, 12:25:49 PM5/14/13
to ledge...@googlegroups.com
No. The only directive that I am using is the

D R$ 1,000.00

Best,

Alexandre Rademaker
http://arademaker.github.com/


Alexandre Rademaker

unread,
May 14, 2013, 12:27:27 PM5/14/13
to ledge...@googlegroups.com
Craig,

Sure, I will do it in the end of the day, right? thank you very much
for all your contribution! the ledger-mode is a fantastic piece of
code!

Best.

Alexandre Rademaker
http://arademaker.github.com/

Craig Earls

unread,
May 14, 2013, 12:29:58 PM5/14/13
to ledge...@googlegroups.com
OK, this has me stumped. Please tell me exactly what key strokes you
are using to cause this. Shoulbe something like
C-c C-a

Minibuffer shows Transaction: 2013/05/

You type "01 Test 45"

And the xact goes in the wrong place.

Thanks for the kind words.

Craig

On Tue, May 14, 2013 at 9:25 AM, Alexandre Rademaker

Craig Earls

unread,
May 14, 2013, 12:51:22 PM5/14/13
to ledge...@googlegroups.com
I think I have found it. It was depending on transactions having
codes, like check numbers or (POS) or (ONL), which I personally use
extensively. I have fixed that and pushed a change to Master. Pull
it and let me know how it works.

John Rakestraw

unread,
May 14, 2013, 1:17:57 PM5/14/13
to ledge...@googlegroups.com
Thanks, Craig. I think this might have fixed it.

I don't have time now to do any extensive testing (sorry -- it's that time of the semester) but I entered three different transactions with three different dates (one in the past, one with today's date, and one in the future) and each of them was filed in the right place.

--John

Alexandre Rademaker

unread,
May 14, 2013, 1:30:19 PM5/14/13
to ledge...@googlegroups.com
In my case, doesn't matter where the pointer is. The steps are:

1. I type C-c C-a
2. Minibuffer shows "Transaction: 2013/05/"
3. I complete with the day, name and value "02 Test R$1" and hit RETURN.
4. Yes. As you said, the transaction is added in the end of the buffer, always.

I am running on Mac OS 10.8.3 Emacs 24.2 with the last version of
ledger-mode. I have just made a git pull.

Best,

Alexandre Rademaker
http://arademaker.github.com/


Alexandre Rademaker

unread,
May 14, 2013, 2:19:56 PM5/14/13
to ledge...@googlegroups.com
Craig,

My local git points to git://github.com/ledger/ledger.git! I have just
made a pull and nothing changed!

urca:ledger arademaker$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://github.com/ledger/ledger.git
[branch "next"]
remote = origin
merge = refs/heads/next
[submodule "lib/utfcpp"]
url = http://github.com/ledger/utfcpp.git

Best,

Alexandre Rademaker
http://arademaker.github.com/


Craig Earls

unread,
May 14, 2013, 2:50:27 PM5/14/13
to ledge...@googlegroups.com, ledge...@googlegroups.com
Looks like you are grabbing "next" please point to "master"

Sent from Mailbox for iPhone

Alexandre Rademaker

unread,
May 14, 2013, 2:59:46 PM5/14/13
to ledge...@googlegroups.com
What a shame! You were (as always) right! I was pointing to next!! Now
it is working!! Transaction added in the right place!! Thank you my
ELisp/Emacs hero! :-)

Best,

Alexandre Rademaker
http://arademaker.github.com/


Craig Earls

unread,
May 14, 2013, 4:16:08 PM5/14/13
to ledge...@googlegroups.com
Thanks for reporting it, I can only really test on my own data set
and this escaped.

Craig

On Tue, May 14, 2013 at 11:59 AM, Alexandre Rademaker

John Rakestraw

unread,
May 14, 2013, 8:50:35 PM5/14/13
to ledge...@googlegroups.com
Hi, Craig -

I think this means you can close bug #952.

Thanks again for the improvements to ledger.el (and the work on the docs).


--John

On Tuesday, May 14, 2013 12:51:22 PM UTC-4, Craig Earls wrote:
Reply all
Reply to author
Forward
0 new messages