From 22e4a4ecb9c36bddf7960f532838ddbbddb21414 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Thu, 13 Dec 2012 23:45:55 +0100 Subject: [PATCH 1/2] Revert "org-src.el (org-edit-src-code): Fix bug on Emacs <24.1." This reverts commit 7a770c10c142dae5e585c529c2232affbc313585. --- lisp/org-src.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index d2c3e195e..f91da19ec 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -228,11 +228,12 @@ buffer." (full-info (org-babel-get-src-block-info 'light)) (org-mode-p (derived-mode-p 'org-mode)) ;; derived-mode-p is reflexive (beg (make-marker)) - (end (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)) (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) - (set-marker-insertion-type end t) (if (not info) nil (setq beg (move-marker beg (nth 0 info)) From 4524a02b39e55b1ab3989c0c5281121ad84f4fb0 Mon Sep 17 00:00:00 2001 From: Michael Gauland Date: Fri, 7 Dec 2012 10:44:09 +1300 Subject: [PATCH 2/2] Edit source: fix 'end' initialisation * 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index f91da19ec..188f9d2bd 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)