From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleh Subject: Make ,* show up as * in babel blocks Date: Mon, 23 Dec 2013 22:12:52 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvCo2-00026B-Vu for emacs-orgmode@gnu.org; Mon, 23 Dec 2013 16:12:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VvCo2-00004u-4X for emacs-orgmode@gnu.org; Mon, 23 Dec 2013 16:12:54 -0500 Received: from mail-we0-x230.google.com ([2a00:1450:400c:c03::230]:57601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VvCo1-0008WF-UM for emacs-orgmode@gnu.org; Mon, 23 Dec 2013 16:12:54 -0500 Received: by mail-we0-f176.google.com with SMTP id p61so5390382wes.35 for ; Mon, 23 Dec 2013 13:12:52 -0800 (PST) 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: org mode Hi all, When a line of babel source code starts with leading star (also some other characters, see `org-unescape-code-in-string') org-mode auto-escapes it with a comma. I assume that there's no easy way not to add the comma. But I think it should be possible to fontify it as if it's not there. This comma is auto-removed for purposes of evaluation or when switching to native mode to edit a source block. The issue is that it's not removed when viewing the org-file. Small example to illustrate: J souce "*/ 2 2" displays as #+begin_src J ,*/ 2 2 #+end_src I've found a work around: (defvar keyword-comma-star '(("^\\(,\\*\\)" (1 (prog1 () (compose-region (match-beginning 1) (match-end 1) ?*)))))) (font-lock-add-keywords 'org-mode keyword-comma-star) Is this good enough to add to org-babel core? Maybe someone has a different option to fix the issue? regards Oleh