From: Michael Gauland <mikelygee@no8wireless.co.nz>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Edit source: fix 'end' initialisation
Date: Fri, 07 Dec 2012 10:52:36 +1300 [thread overview]
Message-ID: <50C113A4.5020501@no8wireless.co.nz> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 368 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-Edit-source-fix-end-initialisation.patch --]
[-- Type: text/x-diff; name="0001-Edit-source-fix-end-initialisation.patch", Size: 1227 bytes --]
From 9aca6bb03fe92adc7198c85699b2539bc811b414 Mon Sep 17 00:00:00 2001
From: Michael Gauland <mike_gauland@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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 899 bytes --]
next reply other threads:[~2012-12-06 21:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 21:52 Michael Gauland [this message]
2012-12-13 22:48 ` [PATCH] Edit source: fix 'end' initialisation Bastien
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=50C113A4.5020501@no8wireless.co.nz \
--to=mikelygee@no8wireless.co.nz \
--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).