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 wrote: > Le Wang 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))) >> +

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

2012-12-14 Thread Bastien
Le Wang 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) > + mar

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

2012-12-14 Thread Bastien
Hi Le, Le Wang 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: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id

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 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() > org-edit-speci

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 Bastien
Hi Bernt, Bernt Hansen 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! -- Basti

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

2012-12-13 Thread Bernt Hansen
Bastien writes: > Hi Bernt, > > Bernt Hansen 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 a

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 Le Wang
On Fri, Dec 14, 2012 at 12:25 AM, Bastien 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 end==nil ca

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

2012-12-13 Thread Bastien
Le Wang 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 I found while >

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 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 helpful. Fo

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

2012-12-13 Thread Bastien
Hi Bernt, Bernt Hansen 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 Bernt Hansen
Bastien 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, make-marker an

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

2012-12-13 Thread Bastien
Hi Le, Le Wang writes: > On Thu, Dec 13, 2012 at 9:42 PM, Bernt Hansen 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 kin

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 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? In the mean t

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

2012-12-13 Thread Bernt Hansen
Bastien 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, make-marker an

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

2012-12-13 Thread Bernt Hansen
Bernt Hansen writes: > Nick Dokos writes: > >> Bernt Hansen wrote: >> >>> git bisect identifies the following commit: >>> >>> 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 is the first bad commit >>> commit 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 >>> Author: Le Wang >>> Date: Sun Nov 18 13:39:5

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

2012-12-13 Thread Bernt Hansen
Nick Dokos writes: > Bernt Hansen wrote: > >> git bisect identifies the following commit: >> >> 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 is the first bad commit >> commit 206257aa7eb83a0a62f297e7cf0e3a7c32ff6f05 >> Author: Le Wang >> Date: Sun Nov 18 13:39:51 2012 +0800 >> >> Reverting 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-12 Thread Nick Dokos
Bernt Hansen wrote: > Bernt Hansen writes: > > > Bastien writes: > > > >> Hi Bernt, > >> > >> Bernt Hansen 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

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

2012-12-12 Thread Bernt Hansen
Bernt Hansen writes: > Bastien writes: > >> Hi Bernt, >> >> Bernt Hansen 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 pat

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

2012-12-12 Thread Bernt Hansen
Bastien writes: > Hi Bernt, > > Bernt Hansen 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 ')

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

2012-12-12 Thread Bastien
Hi Bernt, Bernt Hansen 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 in master. >

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 writes: > On 12 December 2012 16:05, Bernt Hansen wrote: > > Hi Bastien, > > I'm not sure if this is related or not - I don't have time to track down >

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 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 #+begin_src l

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 err

[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

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

2012-12-12 Thread Bastien
Hi Chong, Chong Yidong 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 backported Paul's

[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.