Emacs commands to calculate sum, average, etc. of region

خرید بک لینک

Suppose I have highlighted a region of text in a buffer. The region contains numbers separated by whitespace. E.g.

1 19 23 28 41

Is there some package with ready-made interactive commands that parse the numbers from this region and do common calculations like sum and average, similar to what spreadsheet programs show in their status bar? Something like:

  • M-x sum-region => 112 shown in minibuffer
  • M-x average-region => 22.4 shown in minibuffer

or a combined command to do different calculations at once, or a modeline display.

I suppose org-mode has spreadsheet functions like this, but can they be used easily if you're not already working with an org spreadsheet? Does calc have functions that operate on region?

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 204 تاريخ: دوشنبه 27 ارديبهشت 1395 ساعت: 0:15

صفحه بندی