1

I'm writing questions and answers in org-mode for project purposes (like meeting notes). A sample looks like this:

1. [X] Equipment name for tags associated with pumps - Discuss Comment: We can just use MP-516A/T. I’ve updated your ACM names as well 2. [X] Why have the steps D12516_DirectXfer and D12516_LnClr not included in the steps? Step enable conditions to be added Comment: I bet the tool didn’t add the columns. If you manually added the columns to this tab, it will be perfectly fine. We can proceed with filling out the enable conditions for these columns.

The screenshot shows how I see it on the screen

enter image description here

Question:

I would want at least one of them (either the answer or question) to be shown in a different color. Is that possible? or am I asking for too much?

  • It would help if you clarified which part is the question and which part is the answer. But if you stick to a consistent syntax, like prefix questions with Q: and answers with A:, or something like that, you could just use something like highlight-regexp. – blujay Aug 29 '17 at 18:19
1

Maybe try using a description list instead:

- Question :: Answer
0

I think that Prasanna is right! I used this bit of code to add italics to web-mode just now:

        (highlight-regexp "<em>\\([a-zA-Z0-9 ]+\\)</em>" 'web-mode-italic-face)

So now in web-mode, most characters between "<em>" and "</em>" will have an italic face. Cool no?

  • 1
    Can you please clarify your answer. I guess web-mode and org-mode are two different modes – Prasanna Aug 30 '17 at 5:10
0

Assume all questions start with "Q: ", then you can add this to your init.el to highlight all questions using comment color:

(font-lock-add-keywords
  'org-mode
  '(("\\( Q: .+\\)" (1 'font-lock-comment-face t))))

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.