Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8853187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:35:25+00:00 2026-06-14T13:35:25+00:00

Related to question: org-mode: fontify code blocks natively I’ve got the latest org-mode and

  • 0

Related to question: org-mode: fontify code blocks natively

I’ve got the latest org-mode and emacs versions as of November 1, 2012 (org stored in org-20121105).

I’ve also got the sql-mode that comes with emacs-24.

I’ve got fontification turned one:

;; fontify code in code blocks
(setq org-src-fontify-natively t)

Yet this does not fontify in my org documents. Java, bash, etc. all work.

#+BEGIN_SRC SQL
   SELECT foo FROM bar
#+END_SRC 

When I open a file foobar.sql, the mode indicator says SQL[ANSI] (which I also tried as the source type), and font-locking works.

Thanks in advance for any tips.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:35:26+00:00Added an answer on June 14, 2026 at 1:35 pm

    Firstly, the name of the SRC block mode is case-sensitive. It should be sql instead of SQL.

    #+BEGIN_SRC sql
       SELECT foo FROM bar
    #+END_SRC
    

    Secondly, the initial font-lock of sql-mode seams not to highlight SQL keywords, (at least to me, it looks no difference no matter you turn it on or off). Therefore, you need to specify which kind of SQL you want to highlight. If you are using MySQL for example:

    (add-hook 'sql-mode-hook
              (lambda ()
                (sql-highlight-mysql-keywords)))
    

    Then Restart Emacs. It should work now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got a question related to the new compute shaders. I am currently working
The code related to this question is here: https://github.com/jchester/lua-polarssl/tree/master/src Currently I'm trying to wrap
I´ve got this site build in Drupal. This is not a Drupal related question.
My question is related to http://jira.mongodb.org/browse/SERVER-991 . I need a nested array of a
This question is related to Cross-Origin Resource Sharing (CORS, http://www.w3.org/TR/cors/ ). If there is
Related question [stackoverflow] here . I'm trying to do the above, but I want
Related question, about assignment-initialization-declaration. $ javac MatchTest.java MatchTest.java:7: ')' expected for((int i=-1 && String
This question is an extension of this Related question . Taking Derick's advice, I
I posted a related question to no response but here I'll be less narrow.
There is another possibly related question on this but it didn't have answers and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.