[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Quick math calc on any buffer
From: |
Richard Riley |
Subject: |
Re: Quick math calc on any buffer |
Date: |
Sun, 22 Feb 2009 00:37:07 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.90 (gnu/linux) |
Marc Tfardy <m-t-o___CUT__IT@web.de> writes:
> Rodrigo Lazo schrieb:
>> Hi all,
>>
>> Is there a way to compute a math expression on any buffer? I mean, if I
>> have a buffer with the following expression
>>
>> 2 + 3
>>
>> I want to mark the region and compute the result
>>
>> 2 + 3 = 5
>>
>> It doesn't seems too hard to do, I've looked on calculator.el for a
>> "computing" function I can call but I didn't find it.
>
> Try with embeded mode of calc: C-x * E (no need to mark the region)
> and similar commands (J or W in place of E). You need to type C-x * E
> again to exit the embeded mode.
>
>
> Another solution:
>
> - mark the region with math expression and put it into kill-ring (M-w)
> - type SPC = SPC
> - run the calc (C-x * c)
> - type ' (apostrophe) and yank yor math expression (C-y)
> - type RET
> - type y (or C-x * y) to copy the result into buffer
> - exit calc (q)
>
>
> regards
> marc
>
>
You might consider using "anything". There is a plugin
"anything-c-source-calculation-result".
http://www.emacswiki.org/emacs/Anything
http://www.emacswiki.org/emacs-en/init-anything.el
--
important and urgent problems of the technology of today are no longer the
satisfactions of the primary needs or of archetypal wishes, but the reparation
of the evils and damages by the technology of yesterday. ~Dennis Gabor,
Innovations: Scientific, Technological and Social, 1970