I've been able to run org-edit-src-code just fine under NTEmacs
24.2.50.1 on Windows 7, but under GNU Emacs 23.2.1 on Debian, I got an
error:

    Wrong type argument: integer-or-marker-p, nil

With the attached patch, I've been able to run it on both systems. The
change passes (make-marker) to (copy-marker), instead of nil.

Kind Regards,
Mike Gauland

From 9aca6bb03fe92adc7198c85699b2539bc811b414 Mon Sep 17 00:00:00 2001
From: Michael Gauland <mike_gaul...@stanfordalumni.org>
Date: Fri, 7 Dec 2012 10:44:09 +1300
Subject: [PATCH] Edit source: fix 'end' initialisation

* lisp/org-src.el: Create a marker to pass to copy-marker. This fixes a 'wrong
type argument' error when running org-edit-src-code (observed on Emacs 23.2.1).

The problem was that copy-marker expects a marker, and it was given nil. This
change gives it a marker that doesn't point anywhere, but still lets us set the
insertion type of the end marker.

TINYCHANGE
---
 lisp/org-src.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index 97ee8c5..ab937b8 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -230,7 +230,7 @@ buffer."
 	 (beg (make-marker))
 	 ;; Move marker with inserted text for case when src block is
 	 ;; just one empty line, i.e. beg == end.
-	 (end (copy-marker nil t))
+	 (end (copy-marker (make-marker) t))
 	 (allow-write-back-p (null code))
 	 block-nindent total-nindent ovl lang lang-f single lfmt buffer msg
 	 begline markline markcol line col transmitted-variables)
-- 
1.7.2.5

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to