In the editing mode (C-c ') I formatted php code using TAB button. But in org mode src block it adds 2 comma to phpDoc.

enter image description here


It has nothing to with your TABs.

org src blocks put a comma before every * that starts a line (that is the first non-space character). I think it's just a way to not confuse other org-mode commands.

  • I found similar topic org-fill-paragraph-leaves-a-comma-at-end-of-c-style-comment and even someone already submit it as a issue spacemacs issue. It looks horrible how I can remove it. I think org-mode should be disable in src code block. Any ideas? – slk500 Jan 27 '19 at 8:07
  • Do you really need to remove it to your org file? If you want to export your file, org-mode will remove it for you. But if it is just to look nice, you can replace all ",*" with "*". Your org-src block should evaluate normally, but I can't guarantee that some other org commands won't conflit with that. – adl Jan 28 '19 at 1:31
  • I see this inconvenient syntax as a way to preserve previous org functions that use * as a special character. – adl Jan 28 '19 at 1:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.