From: Oleg Sivokon <olegsivokon@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>, emacs-orgmode@gnu.org
Subject: Re: 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 [thread overview]
Message-ID: <87zj5g2idd.fsf@gmail.com> (raw)
In-Reply-To: <87a8xgi27p.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Thu, 07 May 2015 22:04:26 +0200")
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
Nicolas Goaziou <mail@nicolasgoaziou.fr> 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).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: marker in wrong buffer patch --]
[-- Type: text/x-patch, Size: 993 bytes --]
From fdc1409602b48ba5f4cd1b5be6264d8311b8b11c Mon Sep 17 00:00:00 2001
From: wvxvw <olegsivokon@gmail.com>
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
[-- Attachment #3: Type: text/plain, Size: 13 bytes --]
Best,
Oleg
next prev parent reply other threads:[~2015-05-07 21:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 15:50 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-07 20:04 ` Nicolas Goaziou
2015-05-07 21:22 ` Oleg Sivokon [this message]
2015-05-08 8:24 ` Nicolas Goaziou
2015-05-08 13:18 ` Oleg Sivokon
2015-05-08 22:08 ` Nicolas Goaziou
2015-05-08 23:01 ` Oleg Sivokon
2015-05-09 9:04 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zj5g2idd.fsf@gmail.com \
--to=olegsivokon@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).