help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: calc-embedded keep equation


From: henry atting
Subject: Re: calc-embedded keep equation
Date: Fri, 07 Feb 2014 08:35:24 +0100

> (defun replace-with-solved-equation (start-of-equation end-of-equation)
>   (interactive "r")
>   (if (not (region-active-p))
>       (error "Requires an active region"))
>
>   (let ((equation-string (buffer-substring start-of-equation 
> end-of-equation)))
>     (calc-embedded nil)
>     (calc-embedded nil)
>     (save-excursion
>       (goto-char start-of-equation)
>       (insert equation-string " = "))))

This is great! Tim, thanks.

henry


reply via email to

[Prev in Thread] Current Thread [Next in Thread]