After running C-c ‘ (apostrophe) on a shell script between #+BEGIN_SRC and #+END_SRC tags and returning to the org file using C-c ‘ again, comments in the script have a , (comma) prepended.

 

If I have

 

#+BEGIN_SRC shell-script

#! /bin/bash

# some comments here... they'll be preceded by commas after C-c ' editing

#

ls

cat myfile # inline comment here, isn't affected

#+END_SRC

 

and do C-c ‘ to pull it into an edit buffer, then C-c ‘ again to go back to the org file, the result is

 

#+BEGIN_SRC shell-script

,#! /bin/bash

,# some comments here... they'll be preceded by commas after C-c ' editing

,#

ls

cat myfile # inline comment here, isn't affected

#+END_SRC

 

Note the commas in front of each # (comment character).

 

This seems to happen to # characters regardless of the editing mode… I tried a Java snippet with the same results:

 

Before:

 

#+BEGIN_SRC java

# hash comment

// java comment here

public class MyClass() {

    private String myVariable; // inline comment here

}

#+END_SRC

 

After:

 

#+BEGIN_SRC java

,# hash comment

// java comment here

public class MyClass() {

    private String myVariable; // inline comment here

}

#+END_SRC

 

I’m running the following:

 

Org-mode version 6.06b

GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-08-19 on LENNART-69DE564 (patched)

 

Thanks for org-mode… I’ve been using this amazing piece of software almost as long as I’ve been using Emacs (a couple of years now).

 

Regards,

Don Womick