help-gnu-emacs
[Top][All Lists]
Advanced

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

latex-mode frequently re-fontifies buffer


From: Thorsten Jolitz
Subject: latex-mode frequently re-fontifies buffer
Date: Tue, 02 Sep 2014 15:11:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hi List, 

I tried to use outshine/navi-mode with latex-mode, and it works quite
well so far, I even added a few convenience functions to outshine (still
in the tj-outshine branch), see the PS. 

But there is a slightly annoying issue: latex-mode seems to re-fontify
the buffer frequently, so when I modify and save the buffer, quite often
the (Org-style) headline fontification is lost and all outshine headers
are shown in comment font. 

I have to call 'M-x latex-mode' again to get the outshine headline fonts
back. This did not happen in any other major-mode where I used
outline-minor-mode with outshine so far.

I'm not sure where to look for the culprit of this behaviour - any hints
would be welcome.

PS

,----[ C-h f outshine-TeX-command-region-on-subtree RET ]
| outshine-TeX-command-region-on-subtree is an interactive Lisp function
| in `outshine.el'.
| 
| (outshine-TeX-command-region-on-subtree &optional ARG)
| 
| Mark subtree and run `TeX-command-region'.
| With one prefix ARG, try to move up one level before marking the
| subtree, with two prefix ARGs, try to move up two levels before
| marking subtree (and subsequently run the tex command).
`----

for quickly running LATEX on current subtree('s parent or grantparent),
and 

,----[ C-h f outshine-latex-insert-headers-in-buffer RET ]
| outshine-latex-insert-headers-in-buffer is an interactive Lisp
| function.
| 
| (outshine-latex-insert-headers-in-buffer &optional BUF-OR-NAME
| NO-PREAMBLE-P)
| 
| Insert outshine-headers for all sections in latex-mode buffer.
| Use current-buffer, unless BUF-OR-NAME is given. Add a 1st-level
| preamble header unless NO-PREAMBLE-P is non-nil.
`----

for inserting outshine headers for all sections in a latex-mode buffer,
and 

,----[ C-h f outshine-latex-insert-header RET ]
| outshine-latex-insert-header is an interactive Lisp function.
| 
| (outshine-latex-insert-header &optional BUF-OR-NAME PT-OR-MARKER)
| 
| Insert outshine-header for section at point in latex-buffer.
| Use current-buffer, unless BUF-OR-NAME is given. Move to
| PT-OR-MARKER first if given.
`----

These functions depends on customizable variable:

,----[ C-h v outshine-latex-classes RET ]
| outshine-latex-classes is a variable defined in `outshine.el'.
| Its value is shown below.
| 
| Documentation:
| Sectioning structure of LaTeX classes.
| For each class, the outline level and a regexp matching the latex
| section are given (with section title in submatch 1).
| 
| You can customize this variable.
| 
| Value: (("scrbook"
|   (1 . "^[[:space:]]*\\\\part\\*?{\\(.+\\)}")
|   (2 . "^[[:space:]]*\\\\chapter\\*?{\\(.+\\)}")
|   (3 . "^[[:space:]]*\\\\section\\*?{\\(.+\\)}")
|   (4 . "^[[:space:]]*\\\\subsection\\*?{\\(.+\\)}")
|   (5 . "^[[:space:]]*\\\\subsubsection\\*?{\\(.+\\)}")
|   (6 . "^[[:space:]]*\\\\paragraph\\*?{\\(.+\\)}")
|   (7 . "^[[:space:]]*\\\\subparagraph\\*?{\\(.+\\)}"))
|  ("book"
|   (1 . "^[[:space:]]*\\\\part\\*?{\\(.+\\)}")
|   (2 . "^[[:space:]]*\\\\chapter\\*?{\\(.+\\)}")
|   (3 . "^[[:space:]]*\\\\section\\*?{\\(.+\\)}")
|   (4 . "^[[:space:]]*\\\\subsection\\*?{\\(.+\\)}")
|   (5 . "^[[:space:]]*\\\\subsubsection\\*?{\\(.+\\)}"))
|  ("report"
|   (1 . "^[[:space:]]*\\\\part\\*?{\\(.+\\)}")
|   (2 . "^[[:space:]]*\\\\chapter\\*?{\\(.+\\)}")
|   (3 . "^[[:space:]]*\\\\section\\*?{\\(.+\\)}")
|   (4 . "^[[:space:]]*\\\\subsection\\*?{\\(.+\\)}")
|   (5 . "^[[:space:]]*\\\\subsubsection\\*?{\\(.+\\)}"))
|  ("scrartcl"
|   (1 . "^[[:space:]]*\\\\section\\*?{\\(.+\\)}")
|   (2 . "^[[:space:]]*\\\\subsection\\*?{\\(.+\\)}")
|   (3 . "^[[:space:]]*\\\\subsubsection\\*?{\\(.+\\)}")
|   (4 . "^[[:space:]]*\\\\paragraph\\*?{\\(.+\\)}")
|   (5 . "^[[:space:]]*\\\\subparagraph\\*?{\\(.+\\)}"))
|  ("article"
|   (1 . "^[[:space:]]*\\\\section\\*?{\\(.+\\)}")
|   (2 . "^[[:space:]]*\\\\subsection\\*?{\\(.+\\)}")
|   (3 . "^[[:space:]]*\\\\subsubsection\\*?{\\(.+\\)}")
|   (4 . "^[[:space:]]*\\\\paragraph\\*?{\\(.+\\)}")
|   (5 . "^[[:space:]]*\\\\subparagraph\\*?{\\(.+\\)}")))
`----





-- 
cheers,
Thorsten





reply via email to

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