[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [BUG][PATCH] Marker points into wrong buffer
From: |
Rasmus |
Subject: |
Re: [O] [BUG][PATCH] Marker points into wrong buffer |
Date: |
Tue, 12 Nov 2013 23:14:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Achim Gratz <address@hidden> writes:
> Introduced with r114064 on Emacs trunk. Not sure if this is a bug in
> Org or Emacs, but the patch restores the previous behaviour.
> ---
> 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 5a3c8ba..251fa55 100644
> --- a/lisp/ob-ref.el
> +++ b/lisp/ob-ref.el
> @@ -85,7 +85,9 @@ (defun org-babel-ref-parse (assignment)
> (cons (intern var)
> (let ((out (save-excursion
> (when org-babel-current-src-block-location
> - (goto-char org-babel-current-src-block-location))
> + (goto-char (if (markerp
> org-babel-current-src-block-location)
> + (marker-position
> org-babel-current-src-block-location)
> + org-babel-current-src-block-location)))
Right. I didn't know that marker ≠ char and that marker contains the
buffer. markerp is the better test here.
–Rasmus
--
Summon the Mothership!