From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Beck Subject: Re: emacs calc and src block editing Date: Mon, 27 Jan 2014 00:10:02 +0100 Message-ID: <52E595CA.3020902@miszellen.de> References: <87fvocw7is.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7YqG-0003ue-Rl for emacs-orgmode@gnu.org; Sun, 26 Jan 2014 18:10:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7YqB-0001Tc-1H for emacs-orgmode@gnu.org; Sun, 26 Jan 2014 18:10:16 -0500 Received: from mo6-p04-ob.smtp.rzone.de ([2a01:238:20a:202:5304::10]:52348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7YqA-0001SV-Kr for emacs-orgmode@gnu.org; Sun, 26 Jan 2014 18:10:10 -0500 Received: from [10.37.57.25] ([89.204.137.25]) by smtp.strato.de (RZmta 32.21 SBL|AUTH) with ESMTPSA id 601c84q0QNA6QzA (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) for ; Mon, 27 Jan 2014 00:10:06 +0100 (CET) In-Reply-To: <87fvocw7is.fsf@ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode List On 25.01.2014 13:49, Eric S Fraga wrote: > There is a niggling aspect of editing source code blocks. If, while in > the src block buffer (reached by C-c '), if you start up calc and > request "calc-copy-to-buffer" to place a result in the source code being > edited, the copy is actually placed in the original org buffer and > subsequently lost when exiting the src buffer. In my opinion, the copy > should be place in the src buffer at point. It is a feature of calc, not to copy to internal (starred) buffers. > I have no idea whether or how this could be fixed. It's not a major > problem but I thought I would mention it in case it's easy to fix. I'm afraid the only way to fix this is inside calc. You can do it yourself with advice, e.g.: (advice-add 'calc-find-writable-buffer :before-until (lambda (buf mode) (if (and (string-match "\\`\\*Org Src" (buffer-name (car buf))) (get-buffer-window (car buf))) (car buf))) '((name . calc-copy-to-org-src))) Remove it with: (advice-remove 'calc-find-writable-buffer 'calc-copy-to-org-src) HTH.