From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christian Johansson Newsgroups: gmane.emacs.devel Subject: Re: I want to add a package to GNU ELPA: infix-notation-calculator Date: Tue, 17 Aug 2021 09:32:37 +0200 Message-ID: <90971c32-68c7-f59e-c426-ef0ecc5af0d0@cvj.se> References: <90e77688-8912-2002-7fe8-86c5e58fb42d@cvj.se> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24798"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 17 09:33:30 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mFtbF-0006H0-91 for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Aug 2021 09:33:29 +0200 Original-Received: from localhost ([::1]:42810 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFtbD-0000Qi-LQ for ged-emacs-devel@m.gmane-mx.org; Tue, 17 Aug 2021 03:33:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42500) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFtaa-0008Ae-Uu for emacs-devel@gnu.org; Tue, 17 Aug 2021 03:32:48 -0400 Original-Received: from mailrelay3-3.pub.mailoutpod1-cph3.one.com ([46.30.212.12]:56096) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFtaW-00008X-5E for emacs-devel@gnu.org; Tue, 17 Aug 2021 03:32:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cvj.se; s=20191106; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:references:cc:to:subject:from; bh=QCw4kgsGlunkbZEgJNwXCfsJEBqNYimSptwZCQ5lTQ8=; b=AqPqBNfGgEBvoBAj4h58fRqe4+aX9JbZMigUki/PFUu/xgPZcDuDAhp8CYm/deBSdh/uZTrgf8Cvg 3bnJqXPz2+S6YB+llmw8tmkoP4oVTRfQl6/M7ycRY58f1G7QRAhvvYRdfM0S5e63xakNSD09A0HUER 95xJRGjNK/G9ix6FJ6NQauk4EwOmJNL8ZHaPrvGPveVSKj/B6N2eRyu5Il2IxfVPiXBK/fwzMQYry1 09bbdcdLOL/AoEdnL6xau+bNxJG3kKU23IDGsBehA6B3ZNG6cNigWNcEF0nFGHNNzpK6zo+0c3kxsH Ia4m+HRjJSMP3Obyw7pLPWhoArO3E6w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cvj.se; s=rsa1; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:references:cc:to:subject:from; bh=QCw4kgsGlunkbZEgJNwXCfsJEBqNYimSptwZCQ5lTQ8=; b=QJ2GJpNM/U/KNC1hm2BvDDQdtm4O7lVizAcXwde7Utt2gnV+dJa920uSjdz6uDozUuQfE7KN5/vkI yk0sbjaI6c/qYpDclvBuzv6lnb7Q0uUnD4y1zQPfJ2qZRIT9g3AZDx8NIuUYRV0ueRgKr2T3Dmupo8 wGCUJ0BOaLPpY7cN8BpnwVYs2Etq1kyLywwx5PY6+QrwiDLODk+XTkigNyGfsmsKR+OpvK0xIXivOC sn/wAO5r6h0LbimCG3qf13glwSaVga0xCEDf2sKqIZaykNTqpKqPJlDWW8SwM2oyqpb540xBQ124hb gV0CFhKCdsDZ1RLZ3YNfIF5gf6qpD8Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=cvj.se; s=ed1; h=content-transfer-encoding:content-type:in-reply-to:mime-version:date: message-id:from:references:cc:to:subject:from; bh=QCw4kgsGlunkbZEgJNwXCfsJEBqNYimSptwZCQ5lTQ8=; b=spw9Gz/9LsDNTWZampRrfG57RIbOZdfvgABcjPztGHmXuAJRiOx1rB7/8k8lmN5L7bbUUanuwecxx 5JQNdJVDw== X-HalOne-Cookie: 71b395644008f10d76b088b6739023c81dae2807 X-HalOne-ID: 4bccf26f-ff2d-11eb-879b-d0431ea8bb03 Original-Received: from [192.168.50.160] (c188-150-212-230.bredband.tele2.se [188.150.212.230]) by mailrelay3.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id 4bccf26f-ff2d-11eb-879b-d0431ea8bb03; Tue, 17 Aug 2021 07:32:38 +0000 (UTC) In-Reply-To: Content-Language: en-US Received-SPF: none client-ip=46.30.212.12; envelope-from=christian@cvj.se; helo=mailrelay3-3.pub.mailoutpod1-cph3.one.com X-Spam_score_int: -57 X-Spam_score: -5.8 X-Spam_bar: ----- X-Spam_report: (-5.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-3.71, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272478 Archived-At: Hi! Sure, I think calc and calculator are more full-focused calculators that require a learning-curve, this plugin is more of an quick ad-hoc calculator that calculates values like (infix notation) * 1+3*5 * 4 + 4.5 - (34/(8*3+-3)) * -56 + 2 * 3^2 So you can just select a region (regardless of mode) containing any expression like that and you will get the calculated result in the echo area and in the calculation log buffer. You can also use the mode infix-notation-calculator-mode in a buffer to make calculations at chosen places in the buffer, so you can mix notes with calculations (like a spreadsheet but less advanced), example buffer-contents: --- Morgage: 100000*0.05 =5000.0 Skates to my daughter: 6000+2000+1500 =9500.0 ;; Some random notes here Ratio: 4 + 4.5 - (34/(8*3+-3)) =6.880952380952381 --- Here the calculations are inserted automatically on the next line when pressing . This is very handy I think when making everyday ad-hoc notes Lastly you can calculate any input in the mini-buffer on demand Hälsningar / Best Regards Christian On 17/08/2021 00:01, Stefan Monnier wrote: > Christian Johansson [2021-08-16 23:14:27] wrote: > >> Hi! >> >> Here is the plugin: >> https://github.com/cjohansson/emacs-infix-notation-calculator >> >> Features are: >> * Calculate selected text >> * Calculate input in minibuffer >> * A calculate-mode where calculation of line is done automatically when >> pressing C-return >> * A history buffer of all calculations > Any chance you could expand a bit on what this does? > The `README.md` and the `Commentary:` are both fairly limited, basically > the only description of what it computes is given by the package's name. > > I think it needs some description of the format it accepts, and maybe > a brief comparison with other Emacs calculators (such as the bundled > `calc` and `calculator`). > > > Stefan > >