Heime <[email protected]> writes: > Have deleted (org-mode) from the function pandu and executed the crommand. > The text gets coloured as expect in the new buffer. > > But enabling org-mode, the highlighting disappears because Org mode has its > rules for how text is highlighted. > > How can I ovorcome this problem, so I can propertize my text in a org-mode > buffer?
This is expected in all the major modes in Emacs that use font-lock-mode. Check out 16.13 Font Lock mode section of Emacs manual. > (defface panface > '((t :height 1.2 :weight bold :foreground "#00ff00")) > "Face for outline-regexp heading.") > > (defun panlabel (label facekt) > "Insert guage LABEL with specified face coating FACEKT, enabling > appearance customisation to mach user preferences." > (insert (propertize (concat "\n" label ":\n\n") 'face facekt))) > > (defun pandu () > "Print outline configuration to a display unit buffer." > (interactive) > (let ( (bufr (get-buffer "Pandu")) ) > (when bufr (kill-buffer bufr)) > (with-current-buffer (get-buffer-create "Pandu") > (org-mode) > (erase-buffer) > (panlabel "Coloured Text" 'panface) > (display-buffer (current-buffer))) )) Consider hi-lock-mode. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
