From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: My attempt of org babel inline src block highlighting Date: Wed, 18 Dec 2013 10:49:45 +0100 Message-ID: <86ppou7akm.fsf@somewhere.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, Bowen Li wrote: > I just naively modified org-fontify-drawers to fontify org babel inline src > block. The result looks reasonable to me. I put these two functions in a > src block in my org file and executed it, then refreshed display with M-x > org-mode. > > > (defun org-fontify-inline-src-block (limit) > "Fontify inline source block." > (when (re-search-forward org-babel-inline-src-block-regexp limit t) > (add-text-properties > *(match-beginning 1*) (match-end 0) > '(font-lock-fontified t face (t (:foreground "#008ED1" :background > "#FFFFEA")))) > (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0)) > t)) > > (defun org-set-font-lock-defaults () > ...... > ;; Drawers > '(org-fontify-drawers) > * ;; Inline source block* > * '(org-fontify-inline-src-block)* I may have missed obvious things, but I don't understand which problem you are trying to resolve. Could you elaborate, please? Best regards, Seb -- Sebastien Vauban