Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display the result of a selected form when M-x eval-region is executed in emacs

Tags:

emacs

When I execute M-x eval-region with (+ 1 1) selected in emacs, I can not see the result 2 in the minibuffer . How can I see the result just like C-x C-e?

like image 466
TomCaps Avatar asked Nov 17 '25 03:11

TomCaps


1 Answers

Try this function:

(defun my-eval-region (start end)
  "Evaluate the region, printing the result to the minibuffer."
  (interactive "r")
  (eval-region start end t))
like image 51
Trey Jackson Avatar answered Nov 20 '25 02:11

Trey Jackson