emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: c++ code block automatically adds comma [8.2.10 (release_8.


From: Nicolas Goaziou
Subject: Re: [O] Bug: c++ code block automatically adds comma [8.2.10 (release_8.2.10 @ c:/Users/Louis/home/bin/emacs-24.5/share/emacs/24.5/lisp/org/)]
Date: Sun, 22 Oct 2017 19:30:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello,

Louis Strous <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]