From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Is there a way to start Calc, taking the region as input and replacing it with the value? Date: Sat, 1 Feb 2014 20:17:02 +0100 Organization: WMI UAM Message-ID: <20140201201702.109b2238@aga-netbook> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1391282243 18837 80.91.229.3 (1 Feb 2014 19:17:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Feb 2014 19:17:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 01 20:17:31 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W9g4J-0001eu-5O for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Feb 2014 20:17:31 +0100 Original-Received: from localhost ([::1]:38904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9g4I-0007mm-Cf for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Feb 2014 14:17:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9g40-0007ma-DE for help-gnu-emacs@gnu.org; Sat, 01 Feb 2014 14:17:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W9g3v-0002C0-D1 for help-gnu-emacs@gnu.org; Sat, 01 Feb 2014 14:17:12 -0500 Original-Received: from msg.wmi.amu.edu.pl ([150.254.78.50]:39844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W9g3v-0002Bs-6Y for help-gnu-emacs@gnu.org; Sat, 01 Feb 2014 14:17:07 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id 94CDD77B99 for ; Sat, 1 Feb 2014 20:17:05 +0100 (CET) Original-Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G8NHAAmSBPqx for ; Sat, 1 Feb 2014 20:17:05 +0100 (CET) Original-Received: from aga-netbook (101-138.echostar.pl [213.156.101.138]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 6D75377B96 for ; Sat, 1 Feb 2014 20:17:04 +0100 (CET) In-Reply-To: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.17; i686-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 150.254.78.50 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95880 Archived-At: Dnia 2014-02-01, o godz. 19:24:18 marc tfardy napisa=C5=82(a): > Am 01.02.14 18:40, schrieb Marcin Borkowski: > > Well, the subject is basically what I want. I'd like to be able to > > type, e.g., "2+3", mark it as a region, and press *something* only > > to get it *replaced* by "5". > > > > C-u C-x * g C-x * y q is pretty close, but not the same (and way too > > long to be comfortable). > > > > If there's no such thing, I could probably write it in Elisp myself, > > but why reinvent the wheel? >=20 > Exactly for this purpose I use macro-math: > https://github.com/nschum/macro-math.el/blob/master/macro-math.el >=20 >=20 Thanks a lot, seems to be exactly what I meant (though rounding would be less useful for me)! Meanwhile, I recalled about the embedded mode, which does a very similar thing. Best, --=20 Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University