From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: [BUG][PATCH] Marker points into wrong buffer Date: Tue, 12 Nov 2013 22:06:38 +0100 Message-ID: <87k3gdfhy9.fsf@Rainer.invalid> References: <87eh6mcx3i.fsf@pank.iue.private> <87iovyxukw.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgLAu-000715-UG for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 16:07:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgLAp-0001Hi-Kr for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 16:07:04 -0500 Received: from plane.gmane.org ([80.91.229.3]:47698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgLAp-0001Ha-Dc for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 16:06:59 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VgLAj-0002Ir-VM for emacs-orgmode@gnu.org; Tue, 12 Nov 2013 22:06:53 +0100 Received: from pd9eb2fd7.dip0.t-ipconnect.de ([217.235.47.215]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Nov 2013 22:06:53 +0100 Received: from Stromeko by pd9eb2fd7.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Nov 2013 22:06:53 +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 --=-=-= Content-Type: text/plain Rasmus writes: > Rasmus writes: > >> If anyone can figure out what is wrong on the Org side or what "broke" >> in Emacs-Core it would be great! "Luckily" it's an all-C commit so I >> don't know how to proceed from here. . . > > This really stupid patch allows me to export the document I was unable > to export yesterday with emacs-bzr r115062 (latest or almost latest) > and the latest version Org. Here's a better patch (I hope). --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-ob-ref-Fix-Marker-points-into-wrong-buffer-error.patch >From c297d59c7ec6ce04ebba3cbeb9641217d1ff5cf1 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Tue, 12 Nov 2013 21:55:53 +0100 Subject: [PATCH] ob-ref: Fix "Marker points into wrong buffer" error * lisp/ob-ref.el (org-babel-ref-parse): If `org-babel-current-src-block-location' is a marker, it can be from another buffer, use marker-position instead in this case. 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))) (org-babel-read ref)))) (if (equal out ref) (if (string-match "^\".*\"$" ref) -- 1.8.4.2 --=-=-= Content-Type: text/plain Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for KORG EX-800 and Poly-800MkII V0.9: http://Synth.Stromeko.net/Downloads.html#KorgSDada --=-=-=--