Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-16 Thread Le Wang
On Fri, Dec 14, 2012 at 5:39 PM, Bastien b...@altern.org wrote: Le Wang l26w...@gmail.com writes: ;; Move marker with inserted text for case when src block is ;; just one empty line, i.e. beg == end. - (end (copy-marker (make-marker) t)) + (end (let ((marker

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-14 Thread Bastien
Hi Bernt, Bernt Hansen be...@norang.ca writes: I get the following error when doing C-c ' in a table Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) org-edit-src-code() org-edit-special() call-interactively(org-edit-special nil nil) I fixed this, thanks!

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-14 Thread Bastien
- (if (= end beg) temp - (goto-char beg) - (insert \n) - (org-edit-src-find-region-and-lang + (if (and beg end) + (if (= end beg) + temp + (goto-char beg) + (insert \n) +

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-14 Thread Le Wang
On Fri, Dec 14, 2012 at 8:04 AM, Bernt Hansen be...@norang.ca wrote: I get the following error when doing C-c ' in a table --8---cut here---start-8--- Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) org-edit-src-code()

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-14 Thread Bastien
Hi Le, Le Wang l26w...@gmail.com writes: If I press C-' before on a line BEFORE +begin_src ..., then doing comparison with = with beg==nil and end==nil causes wrong-type-argument error. I think the check should happen before, see how I did it here:

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-14 Thread Bastien
Le Wang l26w...@gmail.com writes: ;; Move marker with inserted text for case when src block is ;; just one empty line, i.e. beg == end. - (end (copy-marker (make-marker) t)) + (end (let ((marker (make-marker))) + (set-marker-insertion-type marker t) +

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Bastien
Hi Bernt, thanks for chasing this down. I tried to install emacs-23.2 but it does not compile on my machine. Does this patch fixes the problem for you? My guess is that (copy-marker nil t) returns an error on emacs-23.2. It's a weird sexp anyway, make-marker and set-marker-insertion-type are

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Bernt Hansen
Nick Dokos nicholas.do...@hp.com writes: Bernt Hansen be...@norang.ca wrote: git bisect identifies the following commit: 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 is the first bad commit commit 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 Author: Le Wang le.w...@agworld.com.au Date: Sun Nov

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Bernt Hansen
Bernt Hansen be...@norang.ca writes: Nick Dokos nicholas.do...@hp.com writes: Bernt Hansen be...@norang.ca wrote: git bisect identifies the following commit: 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 is the first bad commit commit 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 Author: Le Wang

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Bernt Hansen
Bastien b...@altern.org writes: Hi Bernt, thanks for chasing this down. I tried to install emacs-23.2 but it does not compile on my machine. Does this patch fixes the problem for you? My guess is that (copy-marker nil t) returns an error on emacs-23.2. It's a weird sexp anyway,

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Le Wang
On Thu, Dec 13, 2012 at 9:42 PM, Bernt Hansen be...@norang.ca wrote: I'll try this patch and report back later today. That commit was from me, and I did not test against Emacs 24.2. I will submit another patch to add some tests. Do tests get automatically run on some kind of Travis CI setup?

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Bastien
Hi Le, Le Wang l26w...@gmail.com writes: On Thu, Dec 13, 2012 at 9:42 PM, Bernt Hansen be...@norang.ca wrote: I'll try this patch and report back later today. That commit was from me, and I did not test against Emacs 24.2. I will submit another patch to add some tests. Do tests get

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Bernt Hansen
Bastien b...@altern.org writes: Hi Bernt, thanks for chasing this down. I tried to install emacs-23.2 but it does not compile on my machine. Does this patch fixes the problem for you? My guess is that (copy-marker nil t) returns an error on emacs-23.2. It's a weird sexp anyway,

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Bastien
Hi Bernt, Bernt Hansen be...@norang.ca writes: Your patch fixes it for me on both versions (linux 23.2.1, windows 23.3.1) Thanks! I pushed the patch, thanks for confirming this. PS: Le, I used my version, shorter, and not that unlispy IMO. But thanks for the patch anyway! -- Bastien

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Le Wang
On Thu, Dec 13, 2012 at 11:17 PM, Bastien b...@altern.org wrote: Hi Le, No we don't. If anyone knows how to set this up for our needs, please share. I've only done this for projects hosted on github, others may have more experience. But having a continuous integration service is definitely

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Bastien
Le Wang l26w...@gmail.com writes: I haven't investigated further though. We can easily setup a mirror on github and use the platform from this repo. But I'm unsure how this would work. If someone wants to take this in charge, let me know. I've attached 3 patches to fix this and another bug

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Le Wang
On Fri, Dec 14, 2012 at 12:25 AM, Bastien b...@altern.org wrote: I superseded the first one with my patch, and just applied the third one. Can you explain the bug behind the second one? If I press C-' before on a line BEFORE +begin_src ..., then doing comparison with = with beg==nil and

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Le Wang
... one more to fix misuse of signal -- Le 0006-fix-mix-use-of-signal.patch Description: Binary data

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-13 Thread Bernt Hansen
Bastien b...@altern.org writes: Hi Bernt, Bernt Hansen be...@norang.ca writes: Your patch fixes it for me on both versions (linux 23.2.1, windows 23.3.1) Thanks! I pushed the patch, thanks for confirming this. PS: Le, I used my version, shorter, and not that unlispy IMO. But thanks

[O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-12 Thread Bastien
Hi Chong, Chong Yidong c...@gnu.org writes: Could you please take a look at Bug#12905? If it causes data loss, I think it should be fixed in the emacs-24 branch. Thanks. This is fixed, thanks for the heads up. I just merged the Org bugfix branch into emacs-24. I made one mistake: I

[O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-12 Thread Andy Moreton
On Wed 12 Dec 2012, Bastien wrote: This is fixed, thanks for the heads up. I just merged the Org bugfix branch into emacs-24. I can confirm the bug is fixed for emacs-24 after this merge. Thanks Bastien, AndyM

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-12 Thread Bernt Hansen
Hi Bastien, I'm not sure if this is related or not - I don't have time to track down the offending commit right now. org-edit-special (C-c ') is currently broken in master. I get the following backtrace --8---cut here---start-8--- Debugger entered--Lisp

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-12 Thread Jonathan Leech-Pepin
On 12 December 2012 16:05, Bernt Hansen be...@norang.ca wrote: Hi Bastien, I'm not sure if this is related or not - I don't have time to track down the offending commit right now. org-edit-special (C-c ') is currently broken in master. I get the same thing when trying (C-c ') on the

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-12 Thread Bernt Hansen
For me it occurs both inside the block (begin_src or begin_example) and on the first line. Regards, Bernt Jonathan Leech-Pepin jonathan.leechpe...@gmail.com writes: On 12 December 2012 16:05, Bernt Hansen be...@norang.ca wrote: Hi Bastien, I'm not sure if this is related or not

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-12 Thread Bastien
Hi Bernt, Bernt Hansen be...@norang.ca writes: I'm not sure if this is related or not - I don't have time to track down the offending commit right now. There is nothing new regarding editing source code in master, except Eric's last few patches. org-edit-special (C-c ') is currently broken

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-12 Thread Bernt Hansen
Bastien b...@altern.org writes: Hi Bernt, Bernt Hansen be...@norang.ca writes: I'm not sure if this is related or not - I don't have time to track down the offending commit right now. There is nothing new regarding editing source code in master, except Eric's last few patches.

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-12 Thread Bernt Hansen
Bernt Hansen be...@norang.ca writes: Bastien b...@altern.org writes: Hi Bernt, Bernt Hansen be...@norang.ca writes: I'm not sure if this is related or not - I don't have time to track down the offending commit right now. There is nothing new regarding editing source code in master,

Re: [O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-12 Thread Nick Dokos
Bernt Hansen be...@norang.ca wrote: Bernt Hansen be...@norang.ca writes: Bastien b...@altern.org writes: Hi Bernt, Bernt Hansen be...@norang.ca writes: I'm not sure if this is related or not - I don't have time to track down the offending commit right now. There is nothing

[O] bug#12905: 24.2.50; org: edit source block causes data loss

2012-12-07 Thread Chong Yidong
Hi Bastien, Could you please take a look at Bug#12905? If it causes data loss, I think it should be fixed in the emacs-24 branch. Thanks.