From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lawrence Bottorff Subject: Bizarre C-c ' error Date: Wed, 21 Oct 2015 15:25:37 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3c47c8b71cc05229efde1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48436) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZovGp-00066t-D8 for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 11:25:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZovGk-0000BK-Tx for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 11:25:43 -0400 Received: from mail-lb0-x22e.google.com ([2a00:1450:4010:c04::22e]:35329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZovGk-0000At-Hf for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 11:25:38 -0400 Received: by lbbes7 with SMTP id es7so41152429lbb.2 for ; Wed, 21 Oct 2015 08:25:37 -0700 (PDT) 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 Mailinglist --001a11c3c47c8b71cc05229efde1 Content-Type: text/plain; charset=UTF-8 I found this bizarre thing while doing some babel coding. I start by putting this template together #+name: leibniz_3 #+begin_src lisp :session :exports code :results silent #+end_src Then from this page I copy this code (some 40 lines down) . . . (push (make-rule :goal (first r) :pattern (second r) :action (third r) :name (fourth r)) *rules*) ) into a C-c ' buffer. But when I return to my org buffer (with an additional C-c '), it has done this: #+name: leibtest #+begin_src lisp :session :exports code :results silent (push (make-rule :goal (first r) :pattern (second r) :action (third r) :name (fourth r)) ,*rules*) ) #+end_src Can you spot the difference? Subtle bug as it is, the code now has a comma thrown in on the last line. At first I thought this was some copying crud -- for example, if I simply highlight my code directly off this email (in Chrome/gmail) and try to XWinows-paste (middle wheel mouse click) it in, it throws in weird white-space crud -- but no, this comma add thing is only from doing a C-c ' round trip! And no, it's not an issue of how I put in the code: copy or type -- into the original org buffer or into the C-c ' buffer. Again, just a C-c ' round trip throws in this comma. Odd coincidence, but this might have been legitimate CL code, except the list needs a backquote too. This has been a hair-pulling, all-time-top-ten bug, to be sure. And diff shows only this problem on the whole LEIBNIZ.CL file. Any ideas what's causing this? Lb --001a11c3c47c8b71cc05229efde1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I found this bizarre thing while doing some babel coding. = I start by putting this template together

#+name: l= eibniz_3
#+begin_src lisp :session :exports code :results silent<= /div>

#+end_src

Then from= =C2=A0= this page=C2=A0I copy this code (some 40 lines down)

. . .
=C2=A0 (push (make-rule :goal (first r)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:pa= ttern (second r)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0:action (third r)
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:name (fourth r))
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 *rules*) )

into = a C-c ' buffer. But when I return to my org buffer (with an additional = C-c '), it has done this:

#+name: leibtes= t
#+begin_src lisp :session :exports code :results silent
=C2=A0 (push (make-rule :goal (first r)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:pattern (second r)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:ac= tion (third r)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0:name (fourth r))
=C2=A0 =C2=A0 =C2=A0 =C2=A0= ,*rules*) )
#+end_src

Can you spo= t the difference? Subtle bug as it is, the code now has a comma thrown in o= n the last line. At first I thought this was some copying crud -- for examp= le, if I simply highlight my code directly off this email (in Chrome/gmail)= and try to XWinows-paste (middle wheel mouse click) it in, it throws in we= ird white-space crud -- but no, this comma add thing is only from doing a C= -c ' round trip! And no, it's not an issue of how I put in the code= : copy or type -- into the original org buffer or into the C-c ' buffer= . Again, just a C-c ' round trip throws in this comma. Odd coincidence,= but this might have been legitimate CL code, except the list needs a backq= uote too. This has been a hair-pulling, all-time-top-ten bug, to be sure. A= nd diff shows only this problem on the whole = LEIBNIZ.CL file. Any ideas what's causing this?

Lb


--001a11c3c47c8b71cc05229efde1-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Bizarre C-c ' error Date: Wed, 21 Oct 2015 21:06:13 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp4Kh-0006hx-8z for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 21:06:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zp4Ke-0000RC-2F for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 21:06:19 -0400 Received: from mail-qg0-x232.google.com ([2607:f8b0:400d:c04::232]:34646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zp4Kd-0000R8-Ui for emacs-orgmode@gnu.org; Wed, 21 Oct 2015 21:06:15 -0400 Received: by qgem9 with SMTP id m9so43804718qge.1 for ; Wed, 21 Oct 2015 18:06:15 -0700 (PDT) In-reply-to: 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: Lawrence Bottorff Cc: emacs-orgmode Mailinglist I think that is normal. The comma is some way that org escapes the * so it cannot be mistaken for a headline. The comma should have no effect on running the code with C-c C-c, and it should go away when you run C-c ' in the src-block, and reappear when you exit that. If you get rid of the leading *, the comma will disappear. Is there an actual problem running the code? Lawrence Bottorff writes: > I found this bizarre thing while doing some babel coding. I start by > putting this template together > > #+name: leibniz_3 > #+begin_src lisp :session :exports code :results silent > > #+end_src > > Then from this page > I copy this code > (some 40 lines down) > > . . . > (push (make-rule :goal (first r) > :pattern (second r) > :action (third r) > :name (fourth r)) > *rules*) ) > > into a C-c ' buffer. But when I return to my org buffer (with an additional > C-c '), it has done this: > > #+name: leibtest > #+begin_src lisp :session :exports code :results silent > (push (make-rule :goal (first r) > :pattern (second r) > :action (third r) > :name (fourth r)) > ,*rules*) ) > #+end_src > > Can you spot the difference? Subtle bug as it is, the code now has a comma > thrown in on the last line. At first I thought this was some copying crud > -- for example, if I simply highlight my code directly off this email (in > Chrome/gmail) and try to XWinows-paste (middle wheel mouse click) it in, it > throws in weird white-space crud -- but no, this comma add thing is only > from doing a C-c ' round trip! And no, it's not an issue of how I put in > the code: copy or type -- into the original org buffer or into the C-c ' > buffer. Again, just a C-c ' round trip throws in this comma. Odd > coincidence, but this might have been legitimate CL code, except the list > needs a backquote too. This has been a hair-pulling, all-time-top-ten bug, > to be sure. And diff shows only this problem on the whole LEIBNIZ.CL file. > Any ideas what's causing this? > > Lb -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu