Re: Trying to understand ledger-mode

2020-07-28 Thread Ghanashyam Prabhu
I tried using a new init.el file on my Emacs so that I start with a fresh
initialization file without any of my personal customization.
I used the below contents in my init.el.

;; use init file as the one provided under --load-init
> (setq user-init-file (or load-file-name (buffer-file-name)))
> (setq user-emacs-directory (file-name-directory user-init-file))
> ;; setup ledger mode
> (add-to-list 'load-path (expand-file-name
> "~/.emacs.d/elpa/ledger-mode-20200530.1710/"))
> (require 'ledger-mode)
> (autoload 'ledger-mode "ledger-mode" "A major mode for Ledger" t)
> (add-to-list 'auto-mode-alist '("\\.ledger$" . ledger-mode))
> ;; some handy ledger mode hooks
> (add-hook 'ledger-mode-hook
>   (lambda ()
>   (setq-local tab-always-indent 'complete)
>   (setq-local completion-cycle-threshold t)
>   (setq-local ledger-complete-in-steps t)
>   (setq-local ledger-clear-whole-transaction t)


Note that I've used the ledger-mode elisp package downloaded from melpa.
You may find it here https://melpa.org/#/ledger-mode
With the init.el setup, I invoke emacs using the following command to load
this init.el file while invoking Emacs.

> emacs -q --load init.el


I wrote a sample example.ledger file for your reference

> 2019/10/23 * Opening Balance
> Assets:Checking:bofa
>  $25.00
> Liabilities:cc-visabofa
>  $0.00
> Equity:
> 2020/07/26 * Salary
> Income:Salary:biweekly
> -$1000.00
> Assets:Checking:bofa
> 2020/07/28 * Ralphs Purchase
> Expenses:Food:Grocery:ralphs
> $100.00
> Assets:Checking:bofa
> 2020/07/28 * Vonns Shopping
> Expenses:Food:Grocery:vonns
>  $200.00
> Assets:Checking:bofa
> 2020/07/28 * Chevron Gas
> Expenses:Transportation:Auto:Gas:chevron
>  $30.00

Assets:Checking:bofa


With this example file, if I type in a new entry with C-c C-a, after the
date is added I type in * for indicating a "completed" transaction and then
if I type in V and tab it, it auto-completes to Vonns Shopping.
Hope you find this useful.

Thanks
Ghanashyam


On Tue, 28 Jul 2020 at 06:05, Oliver Hardy  wrote:

> I thank you for that but it still doesn't work. Company mode enabled,
> company mode disabled. Tab, no tab. Partial payee name, complete payee name.
> All I ever get is today's date with C-c C-a.
>
> In addition to being new to ledger I'm also new to emacs so I'm sure I'm
> making some simple beginner mistake.
>
> On Monday, July 27, 2020 at 11:39:47 PM UTC, Ghanashyam Prabhu wrote:
>>
>> On my Emacs setup, I have company mode enabled and typing a part of the
>> Payee automatically completes the Payee entry.
>> I tried disabling Company mode and typing in part of the Payee name, this
>> time I have to Tab to initiate completion.
>> Tabbing further then cycles through different existing Payees. I have the
>> following in my .emacs
>>
>> (add-hook 'ledger-mode-hook
>> (lambda ()
>> (setq-local tab-always-indent 'complete) ;; I guess this does the
>> job of completion of Payee Entries..
>> (setq-local completion-cycle-threshold t)
>> (setq-local ledger-complete-in-steps t)
>> (setq-local ledger-clear-whole-transaction t)
>> )
>> )
>>
>> - Ghanashyam
>>
>>
>> On Mon, 27 Jul 2020 at 13:02, Oliver Hardy  wrote:
>>
>>> Following the ledger-mode docs, in emacs I do C-c C-a.  This brings up a
>>> calendar with today's date highlighted. I'm then instructed
>>> to type a close match to the payee. Hitting enter then enters the date
>>> in my ~/journal.ledger file and that's it. No further details even
>>> though the payee I'm entering appears several times through out the
>>> file.
>>>
>>> What am I doing Wrong?
>>>
>>> Thank you.
>>>
>>> --
>>>
>>> ---
>>> 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 ledge...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ledger-cli/17a37eb7-20ee-41ac-938e-973c27297b9co%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ledger-cli/17a37eb7-20ee-41ac-938e-973c27297b9co%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop rece

Re: Trying to understand ledger-mode

2020-07-27 Thread Ghanashyam Prabhu
On my Emacs setup, I have company mode enabled and typing a part of the
Payee automatically completes the Payee entry.
I tried disabling Company mode and typing in part of the Payee name, this
time I have to Tab to initiate completion.
Tabbing further then cycles through different existing Payees. I have the
following in my .emacs

(add-hook 'ledger-mode-hook
(lambda ()
(setq-local tab-always-indent 'complete) ;; I guess this does the
job of completion of Payee Entries..
(setq-local completion-cycle-threshold t)
(setq-local ledger-complete-in-steps t)
(setq-local ledger-clear-whole-transaction t)
)
)

- Ghanashyam


On Mon, 27 Jul 2020 at 13:02, Oliver Hardy  wrote:

> Following the ledger-mode docs, in emacs I do C-c C-a.  This brings up a
> calendar with today's date highlighted. I'm then instructed
> to type a close match to the payee. Hitting enter then enters the date in
> my ~/journal.ledger file and that's it. No further details even
> though the payee I'm entering appears several times through out the file.
>
> What am I doing Wrong?
>
> Thank you.
>
> --
>
> ---
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ledger-cli/17a37eb7-20ee-41ac-938e-973c27297b9co%40googlegroups.com
> 
> .
>

-- 

--- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/CABieCESvtum7snrTk3T3YZB9nB9aYVyyaZt%2BwCSuj%3Dno2J0DzQ%40mail.gmail.com.


Re: Need help just getting started

2020-07-17 Thread Ghanashyam Prabhu
I recently got interested and started using ledger from the below primer
for ledger
with Emacs - Though the video has some information specific to Emacs
editor, it has
very good introduction to ledger's double entry system for bookkeeping
https://www.reddit.com/r/emacs/comments/46hs9q/conquering_your_finances_with_emacs_and_ledger/



On Fri, 17 Jul 2020 at 13:05, Kent R. Spillner  wrote:

> I couldn't wrap my head around it either until I set aside some time and
> sat down to read the fine docs from start to finish:
> https://www.ledger-cli.org/3.0/doc/ledger3.html#Introduction-to-Ledger
>
> You should have a basic understanding by the end of section 1.1, but at
> the very least I think you should read all the way through the end of
> section 5.
>
> I know that's probably not the answer you're looking for, but honestly all
> of that information is there in the first 5 sections.  There just isn't one
> single, self-contained "5 minute getting started guide" in the docs.
>
> Disclaimer: *everything* I know about accounting I learned from section 3
> of the docs, and by asking questions on this list.  ;)
>
>
> -Original Message-
> From: "Oliver Hardy" 
> Sent: Friday, July 17, 2020 14:37
> To: "Ledger" 
> Subject: Need help just getting started
>
> The fact that other people have actually figured out how to use this
> program makes me hang my head in shame.
>
> If someone can point me to where in the man pages it describes how to
> create a journal I would be grateful. Also how does one create accounts,
> add entries
> etc.
>
> Thank you
>
> --
>
> ---
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ledger-cli/8d5e81a1-1874-44a7-bac1-765f525cfc13o%40googlegroups.com
> .
>
>
> --
>
> ---
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ledger-cli/1595016319.21528752%40apps.rackspace.com
> .
>

-- 

--- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/CABieCET2V6daWryBj2%2BjJ5%3DhL3LhFc%2BKDD%2BN9Fk3teioAntVqA%40mail.gmail.com.


UUID based Filtering

2020-07-15 Thread mail . ghanashyam . prabhu
Hello, 

I started to use ledger recently for tracking finances and the primary 
inputs 
my ledger is my checking account and credit card statement. Using a 
rudimentary 
python script, I parse out these statements to populate the ledger. 

For credit card bill payment transactions, I have duplicate transactions 
and I use 
UUID metadata to drop of them. My script uses a UUID format of 
: 
while parsing the statement. 

See suggestion here from reddit Dealing with Duplicate Transactions 

 
I'd like to therefore double check at any time, I had same UUID used more 
than 
twice. Does ledger allow for reporting transactions based on UUID 
filtering? 

Any other options to make sure UUIDs are not duplicate for more than one 
pair 
of transactions?

An example of the transactions that I am talking about

2020/01/09 * BANK OF AMERICA CREDIT CARD Bill Payment
> ; bofacc
> ; UUID: 2020.01.09-cc-ma:bofa
> Liabilities:cc-ma:bofa $563.85
> Assets:checking:bofa
>
> 2019/01/09 * PAYMENT - THANK YOU
> ; payment to CC
> ; UUID: 2020.01.09:cc-ma:bofa
> Liabilities:cc-ma:bofa $-$563.85
> Assets:checking:bofa

-- 

--- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/639d1c41-e35e-4475-a50c-0625064a127ao%40googlegroups.com.