emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: org-babel-ref-parse needs to set current buffer to the buff


From: Oleg Sivokon
Subject: Re: [O] Bug: org-babel-ref-parse needs to set current buffer to the buffer of the marker [8.2.2 (release_8.2.2-188-gc57372 @ /home/wvxvw/Projects/org-mode/lisp/)]
Date: Fri, 08 May 2015 16:18:58 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> This won't work as `org-babel-read' is not called within the scope of
> `with-current-buffer'.
>
> I think it should be something like this:
>
>   (with-current-buffer
>       (if (markerp org-babel-current-src-block-location)
>           (marker-buffer org-babel-current-src-block-location)
>         (current-buffer))
>     (save-excursion
>       (goto-char org-babel-current-src-block-location)
>       (org-babel-read ref)))
>
> Bonus points if you can write a test about it in "test-ob.el".

Hi Nicolas,

I've started working on the test as I realized that the behavior no
longer reproduces (since I've filed the bug, I've rebuilt my
Emacs...).  Now even if the marker is initially in the wrong buffer, if
you call `marker-position', it still succeeds.  I checked the history of
`marker-position' source and `CHECK_MARKER' source, but there was no
change there recent enough to suspect them to be the reason of the
behavior I've seen.  I've tried going back to Emacs 24.5 (the one
installed from distribution package manager), but it's not compatible
with the Org version that I've build from the master yesterday.  If this
is important, it is incompatible in that ox-latex expects there to be a
`cl-struct-define' macro, but it probably didn't exist yet in the 24.5
times.

So, I'm not sure, is this still relevant?

Best,

Oleg



reply via email to

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