From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Prettier (or at least fancier) code block delimiters Date: Tue, 21 Jan 2014 13:31:29 -0700 Message-ID: <87vbxdnkke.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57671) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5i0v-0005bC-BH for emacs-orgmode@gnu.org; Tue, 21 Jan 2014 15:33:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5i0q-0006Kn-76 for emacs-orgmode@gnu.org; Tue, 21 Jan 2014 15:33:37 -0500 Received: from mail-pb0-x22b.google.com ([2607:f8b0:400e:c01::22b]:36335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5i0p-0006K0-Vh for emacs-orgmode@gnu.org; Tue, 21 Jan 2014 15:33:32 -0500 Received: by mail-pb0-f43.google.com with SMTP id md12so8839170pbc.16 for ; Tue, 21 Jan 2014 12:33:30 -0800 (PST) Received: from bagel (c-174-56-50-60.hsd1.nm.comcast.net. [174.56.50.60]) by mx.google.com with ESMTPSA id yd4sm15147453pbc.13.2014.01.21.12.33.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jan 2014 12:33:29 -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 Mailing List Hi, I tried the following on a lark not thinking I'd like it. However, after a week or two I've yet to turn it off and I think it makes my code block heavy Org-mode buffers somewhat more readable, so I'm sharing it here. ;; -*- emacs-lisp -*- (defun prettier-org-code-blocks () (interactive) (font-lock-add-keywords nil '(("\\(\+begin_src\\)" (0 (progn (compose-region (match-beginning 1) (match-end 1) ?=C2= =A6) nil))) ("\\(\+end_src\\)" (0 (progn (compose-region (match-beginning 1) (match-end 1) ?=C2= =A6) nil)))))) (add-hook 'org-mode-hook 'prettier-org-code-blocks) Add it to your config or evaluate in your scratch buffer, then open a new Org-mode file with code blocks to give it a try. Best, --=20 Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D