From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Gauland Subject: [PATCH] Edit source: fix 'end' initialisation Date: Fri, 07 Dec 2012 10:52:36 +1300 Message-ID: <50C113A4.5020501@no8wireless.co.nz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig01A759AE81FBE96CC8C105C4" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgjN7-0004nd-JI for emacs-orgmode@gnu.org; Thu, 06 Dec 2012 16:52:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgjN6-000768-B0 for emacs-orgmode@gnu.org; Thu, 06 Dec 2012 16:52:45 -0500 Received: from jersey.rurallink.co.nz ([114.134.15.197]:47832 helo=smtp.rurallink.co.nz) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgjN5-00075A-Ng for emacs-orgmode@gnu.org; Thu, 06 Dec 2012 16:52:44 -0500 Received: from 218-101-54-25.trimble.co.nz ([218.101.54.25] helo=[172.16.12.229]) by smtp.rurallink.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TgjN0-0006z6-RM for emacs-orgmode@gnu.org; Fri, 07 Dec 2012 10:52:39 +1300 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 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig01A759AE81FBE96CC8C105C4 Content-Type: multipart/mixed; boundary="------------070207020500010101000403" This is a multi-part message in MIME format. --------------070207020500010101000403 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 --------------070207020500010101000403 Content-Type: text/x-diff; name="0001-Edit-source-fix-end-initialisation.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Edit-source-fix-end-initialisation.patch" =46rom 9aca6bb03fe92adc7198c85699b2539bc811b414 Mon Sep 17 00:00:00 2001 From: Michael Gauland 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= =2E2.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 s= et 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 =3D=3D 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) --=20 1.7.2.5 --------------070207020500010101000403-- --------------enig01A759AE81FBE96CC8C105C4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQIcBAEBAgAGBQJQwROpAAoJEKnkgIXLqylXV1cQAI5mRuqBcpvu40pmJAQMYq9n TPKxN8G/2zo5vDjIvjOmYgFesM1DErwS98pq/dBy7dlCchf1fGN5V/R/DbV593Fn WF1m0dWKP0bNHE1Dz2ZCo0k9xEUx9WMvOhPlFNyzq1cDvkWogqH1aQNc56hdyeNM ZLgX3neB9Y967VxmX2nv3Bieii3Ie9IpJNfsTXKxlVhC/tjecm2eXF1n5Z/jr7gf B48RXMZXLpYoRAfzi7hC2mIURF1CMlG9TMQCy7paRoSgI4pTl0wab66yuvXY+6tN jPEORgrUSekmimSjdjr9tXgzoeVoWmgHYxA5Vnz/lV+rkMoFpX36PYdG5F4aLvwp GYw+jjY0c33gwbbxw6rUV5NZQ1EFT6MFIc8rO7p9nYEAXtT7gMwNI5fq89e2sdC3 f37+I7y1m3hBmbJzP3HclprqHfb+vkvrLwnK6Q2XaU6ecPbPAh3bHUbWbD8eiIhW EiLkOLxUupiGSa7ehbl7yvLZBNMY8cLmD0TSUlVLCBRhS6lr9DqL+Icf7X2d31FI +jqwTA5M1F+5d8MCCHE7NK/cpdenAkTrNtq+rGu30zQ/IG9VTCQn8QcT7QzLU9pn Kabhr5YVhjouUA1jtAn1Nge+JCK/y9mH287+BPmlhgu2wacktpwOIgk7KbL6P/wd 4Z/KhXTbiNaHysOWoWd0 =ZqTb -----END PGP SIGNATURE----- --------------enig01A759AE81FBE96CC8C105C4--