From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marc Tfardy Newsgroups: gmane.emacs.help Subject: Re: Quick math calc on any buffer Date: Sat, 21 Feb 2009 23:53:25 +0100 Message-ID: <70bev5F87qbU1@mid.individual.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235259654 21397 80.91.229.12 (21 Feb 2009 23:40:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Feb 2009 23:40:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 22 00:42:10 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lb1Tw-0003oD-Om for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Feb 2009 00:42:04 +0100 Original-Received: from localhost ([127.0.0.1]:50210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lb1Sc-0004QA-C7 for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Feb 2009 18:40:42 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!newshub.sdsu.edu!feeder.erje.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-X-Trace: individual.net THhbcrmnsHU/bf3Hxxa3jg+M9fHu4IoM4lGvWnPQPGUI5O6Iv/ Cancel-Lock: sha1:5h1DQ7HTlumJNubznbpFYEnq4/Q= User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) In-Reply-To: Original-Xref: news.stanford.edu gnu.emacs.help:166945 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62253 Archived-At: 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