emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] emacs calc and src block editing


From: Florian Beck
Subject: Re: [O] emacs calc and src block editing
Date: Mon, 27 Jan 2014 00:10:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

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.



reply via email to

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