emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Enriched/Org is a colorful Org


From: Sebastien Vauban
Subject: Re: [O] Enriched/Org is a colorful Org
Date: Wed, 10 Apr 2013 13:20:35 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (windows-nt)

Carsten Dominik wrote:
> On 10 apr. 2013, at 12:48, Suvayu Ali <address@hidden> wrote:
>> On Wed, Apr 10, 2013 at 12:16:28PM +0200, Carsten Dominik wrote:
>>> On 10 apr. 2013, at 11:54, Suvayu Ali <address@hidden> wrote:
>>>> On Wed, Apr 10, 2013 at 09:32:44AM +0530, Jambunathan K wrote:
>>>>> 
>>>>> See "Side note" towards the end of this message
>>>>> 
>>>>>       http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14157#8
>>>>> 
>>>> 
>>>> This request is common enough; every time it comes up overlays are
>>>> proposed as a solution.  It would be good if this is available even as a
>>>> library outside of Org.
>>> 
>>> Yes, overlays are better.  However, maybe I am just no getting it, but
>>> what is even the purpose of facemenu?  AFAICS, the faces are
>>> non-permanent, so when I save the file and reopen it, all the faces
>>> are gone.  I really cannot see a useful application for this.
>> 
>> AFAIR, the use cases presented so far involved adding highlighting-like
>> information in Org files.  If the overlays are generated consistently
>> based on the user's setup, it doesn't matter if they are non-permanent
>> (as in not part of the Org file, but dependent on the Emacs setup
>> instead).  Of course this means the highlighting information will not be
>> portable; but I don't think people mind that.
>> 
>> I personally do not find any use for the feature as such; although it
>> might be interesting to be able to insert plain text cookies in Org
>> files and have them highlighted in some fashion.  I could then use a
>> list of ideas like this:
>> 
>>  Some topic ...
>>  1. Idea 1
>>  2. Idea 2 (?)
>> 
>> where I'm doubtful about idea (2); having (?) highlighted would remind
>> me of that.  Just an idea.
>
> Yes, this would make sense if the highlighting would be reestablished
> automatically next time you visit the file.  If not, it would be pretty
> useless in my eyes.

IIUC, I do use something similar: automatic highlighting of some words, hooked
on the mode (so, permanent... for me).

--8<---------------cut here---------------start------------->8---
  (defface lvn/highlight-face
    '((t (:weight normal :slant normal :box '(:line-width 1 :color "#CC0000")
          :foreground "#CC0000" :background "#FFFF88")))
    "Face for making FIXME and other warnings stand out.")

  (defvar lvn/highlight-org-regexps
    "\\(FIXME\\|BUG\\|XXX\\|[Ee]rror\\|[Ww]arning\\|WARNING\\)"
    "Patterns to highlight (for Org mode only).")

  ;; set up highlighting of special patterns for Org mode only
  (dolist (mode '(org-mode))
    (font-lock-add-keywords mode
     `((,lvn/highlight-org-regexps 1 'lvn/highlight-face prepend))))
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]