On Wed, Feb 22, 2017 at 2:13 PM, Marcin Borkowski <[email protected]> wrote: > > On 2017-02-21, at 18:56, o1bigtenor <[email protected]> wrote: > >> Greetings >> >> Not sure how to phrase the request so apologies if I'm doing a poor job. >> >> I'm finding that I often get a receipt with multiple same items (plus >> others). >> To create an amount I need to multiply the cost of each item by the >> total number of items and then apply the sales tax to this subtotal. >> >> To date I've being doing this using a calculator on the screen. Today >> tried to use a mathematical expression to achieve the same without >> needing to move back and forth on the system. (Ledger is on a VM that >> is using 1 monitor and the calculator is on a separate monitor.) >> Tried: >> >> =((2.21*6)*1.08) and >> ((2.21*6)*1.08) >> >> neither of which then display the resultant. >> >> Is there some way to do this in ledger? > > Not really what you want, but a similar thing. > > I don't like mathematical expressions in my ledger file, so I wrote > a simple Emacs Lisp function which takes everything to the left of the > point (≈cursor in Emacs-speak) consisting of digits, point, operation > signs and parens and having at least 3 characters (I later changed that > to two), feeds this into Emacs Calc and replaces with the result > (formatted with two digits after point), optionally with the currency > symbol added. I use it on a daily basis and I have to say it's > /extremely/ useful. > > Here's the story: http://mbork.pl/2015-06-20_Fast-calc >
Thanks for your response!!! Looks like useful except for one little problem. When I tried to install emacs - - - boy do I run into a maze. I turned for advice to a long time emacs user who suggested that I just stay with vi(or vim). That was interesting advice as I know that emacs is his editor of choice. Oh well, I can continue doing things the way I was just thought there might be an elegant solution that I just wasn't seeing in ledger docs! Regards Dee -- --- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
