From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [BUG][PATCH] Marker points into wrong buffer Date: Tue, 12 Nov 2013 23:14:37 +0100 Message-ID: <87fvr1w9ma.fsf@gmx.us> References: <87eh6mcx3i.fsf@pank.iue.private> <87iovyxukw.fsf@gmx.us> <87k3gdfhy9.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgMEk-0001Cv-CG for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 17:15:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgMEZ-0000jI-Rj for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 17:15:06 -0500 Received: from plane.gmane.org ([80.91.229.3]:58789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgMEZ-0000j5-L1 for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 17:14:55 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VgMEY-0006DK-MH for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 23:14:54 +0100 Received: from ip-pool-141.iue.it ([192.167.90.141]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Nov 2013 23:14:54 +0100 Received: from rasmus by ip-pool-141.iue.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Nov 2013 23:14:54 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Achim Gratz 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!