[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 00:22:06 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
> Using `with-current-buffer' is more appropriate since the change is
> temporary.
>
>
> Could you provide a patch using git format-patch, with a proper commit
> message?
Hello Nicolas,
Please let me know if I didn't export the patch properly (patch
attached).
>From fdc1409602b48ba5f4cd1b5be6264d8311b8b11c Mon Sep 17 00:00:00 2001
From: wvxvw <address@hidden>
Date: Fri, 8 May 2015 00:14:11 +0300
Subject: [PATCH] Making sure the buffer pointed by
org-babel-current-src-block-location is active when moving to the source
block.
---
lisp/ob-ref.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el
index b8a921e..81d4471 100644
--- a/lisp/ob-ref.el
+++ b/lisp/ob-ref.el
@@ -90,7 +90,9 @@ the variable."
(let ((out (save-excursion
(when org-babel-current-src-block-location
(goto-char (if (markerp
org-babel-current-src-block-location)
- (marker-position
org-babel-current-src-block-location)
+ (with-current-buffer
+ (marker-buffer
org-babel-current-src-block-location)
+ (marker-position
org-babel-current-src-block-location))
org-babel-current-src-block-location)))
(org-babel-read ref))))
(if (equal out ref)
--
2.1.0
Best,
Oleg
- [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/)], Oleg Sivokon, 2015/05/06
- 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/)], Nicolas Goaziou, 2015/05/07
- 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/)],
Oleg Sivokon <=
- 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/)], Nicolas Goaziou, 2015/05/08
- 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/)], Oleg Sivokon, 2015/05/08
- 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/)], Nicolas Goaziou, 2015/05/08
- 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/)], Oleg Sivokon, 2015/05/08
- 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/)], Nicolas Goaziou, 2015/05/09