Hello, Louis Strous <lo...@quae.nl> writes:
> When I edit a c++ code block using C-c ' and then finish the edit using > C-c ' again, then org-mode sometimes adds a comma to the code. > > Start of reproduction scenario: > > 1. Start emacs using "emacs -Q" > > 2. Execute "org-mode" to change the *scratch* buffer's major mode to > org-mode. > > 3. Add the following text to the buffer: > > #+BEGIN_SRC c++ > #+END_SRC > > > 4. Put the cursor at the beginning of the #+BEGIN_SRC line and press > "C-c > '" to start editing the code block. The "*Org Src *scratch*[ c++ ]*" > buffer is displayed. > > 5. Enter the following c++ code in the "*Org Src *scratch*[ c++ ]*" > buffer: > > if (foo) > *foo = 3; > > 6. Note the absence of a comma in front of the "*". Now press "C-c '" > again to end editing the code block. The code block in the *scratch* > buffer changes to > > #+BEGIN_SRC c++ > if (foo) > ,*foo = 3; > #+END_SRC > > Note the appearance of a comma in front of the "*". > > 7. Press "C-c '" to edit the code block again. The code displayed in > the "*Org Src *scratch*[ c++ ]*" buffer does not contain the comma: > > if (foo) > *foo = 3; > > 8. Press "C-c '" to finish the editing. The code in the *scratch* > buffer still contains the comma. > > End of reproduction scenario. See (info "(org) Literal examples"), fourth footnote Regards, -- Nicolas Goaziou