emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG][PATCH] Marker points into wrong buffer
Date: Tue, 12 Nov 2013 22:06:38 +0100	[thread overview]
Message-ID: <87k3gdfhy9.fsf@Rainer.invalid> (raw)
In-Reply-To: 87iovyxukw.fsf@gmx.us

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

Rasmus writes:
> Rasmus <rasmus@gmx.us> 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).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-ref-Fix-Marker-points-into-wrong-buffer-error.patch --]
[-- Type: text/x-patch, Size: 1228 bytes --]

From c297d59c7ec6ce04ebba3cbeb9641217d1ff5cf1 Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
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


[-- Attachment #3: Type: text/plain, Size: 197 bytes --]



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

  parent reply	other threads:[~2013-11-12 21:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 23:55 [BUG] Marker points into wrong buffer Rasmus
2013-11-12  1:44 ` [BUG][PATCH] " Rasmus
2013-11-12 10:41   ` Eric S Fraga
2013-11-12 16:57   ` Eric S Fraga
2013-11-12 21:06   ` Achim Gratz [this message]
2013-11-12 21:48     ` Bastien
2013-11-13 18:28       ` Achim Gratz
2013-11-12 22:14     ` Rasmus
2013-11-12 19:49 ` [BUG] " Achim Gratz

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=87k3gdfhy9.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.org \
    /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).