all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* A question about Syntax highlighting, different modes.
@ 2005-07-11 19:45 Jim Zhang
  0 siblings, 0 replies; 5+ messages in thread
From: Jim Zhang @ 2005-07-11 19:45 UTC (permalink / raw)


Hi there,

I am a rookie here.
I am using Emacs for Mac to edit some latex files. And when I click  
"syntax highlight" from the menu, or set "M_x font_lock_mode". Emacs  
gives me a really fancy kind of highlighting scheme.
I believe it's some embedded latex mode or something.

For example, if you input "x^y", the y will be put in a smaller font  
and put on the top of x, which is nice. But it slows down the text  
input speed.
I have to wait a while for my words to show up!

Another annoying thing. I don't know why? some time if I finish a $ 
\begin{align}$ environment, I can not input "$" sign. It shows in the  
minibuffer: "math mode because of align, Use C_q $ to force a dollar  
sign"! Heck, what's wrong with it???

I tried "M_x text-mode", it 's way faster. I just really don't need  
all those fancy gadgets. What i need is a very very simple syntax  
hightlighting scheme that runs functionally for editing tex file.  
Like what i have used before in Unix. Nothing fancy that will eat up  
my memory, or anything that slows down the main purpose: writing!

Does anyone have an idea how to handle this? How can I set up my  
syntax highlighting, without those fancy packages involved?

many many thanks,

earnest,
Jim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A question about Syntax highlighting, different modes.
       [not found] <mailman.2829.1121111625.2857.help-gnu-emacs@gnu.org>
@ 2005-07-11 20:46 ` Ralf Angeli
  2005-07-12  3:42 ` N. Raghavendra
  1 sibling, 0 replies; 5+ messages in thread
From: Ralf Angeli @ 2005-07-11 20:46 UTC (permalink / raw)


* Jim Zhang (2005-07-11) writes:

> I am using Emacs for Mac to edit some latex files. And when I click  
> "syntax highlight" from the menu, or set "M_x font_lock_mode". Emacs  
> gives me a really fancy kind of highlighting scheme.
> I believe it's some embedded latex mode or something.

Where do you have your Emacs from?  Your description sounds like you
are running a CVS Emacs with AUCTeX enabled.  The distributor should
be able to tell you if this is the case.

> For example, if you input "x^y", the y will be put in a smaller font  
> and put on the top of x, which is nice. But it slows down the text  
> input speed.
> I have to wait a while for my words to show up!

Assuming you are using AUCTeX, could you please prepare a bug report
by typing `M-x TeX-submit-bug-report RET' and send it to the given
address?  Please include an example file which triggers the slow down.

> Another annoying thing. I don't know why? some time if I finish a $ 
> \begin{align}$ environment, I can not input "$" sign. It shows in the  
> minibuffer: "math mode because of align, Use C_q $ to force a dollar  
> sign"! Heck, what's wrong with it???

Don't you close an align environment with "\end{align}"?

> I tried "M_x text-mode", it 's way faster. I just really don't need  
> all those fancy gadgets. What i need is a very very simple syntax  
> hightlighting scheme that runs functionally for editing tex file.  
> Like what i have used before in Unix. Nothing fancy that will eat up  
> my memory, or anything that slows down the main purpose: writing!
>
> Does anyone have an idea how to handle this? How can I set up my  
> syntax highlighting, without those fancy packages involved?

You can reduce the amount of content to be highlighted by customizing
the variable `font-lock-maximum-decoration'.  For example, you can put
something like

(setq font-lock-maximum-decoration '((latex-mode . 1) (t . t)))

into your init file.

-- 
Ralf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A question about Syntax highlighting, different modes.
       [not found] <mailman.2829.1121111625.2857.help-gnu-emacs@gnu.org>
  2005-07-11 20:46 ` A question about Syntax highlighting, different modes Ralf Angeli
@ 2005-07-12  3:42 ` N. Raghavendra
  2005-07-12  7:08   ` David Kastrup
  1 sibling, 1 reply; 5+ messages in thread
From: N. Raghavendra @ 2005-07-12  3:42 UTC (permalink / raw)


At 2005-07-11T15:45:52-04:00, Jim Zhang wrote:

> some time if I finish a $ \begin{align}$ environment, I can not
> input "$" sign. It shows in the minibuffer: "math mode because of
> align, Use C_q $ to force a dollar sign"!

The `\begin{align}' control sequence automatically introduces math
mode, so there is no need to enclose it in `$' symbols.  This also
means that you cannot use `$' inside an `align' environment without
escaping it.  That explains the error message.  You may want to see
the examples in the "User's Guide for the `amsmath' Package".  If you
are using `teTeX', you could do that with the command `texdoc
amsldoc'.

> What i need is a very very simple syntax hightlighting scheme that
> runs functionally for editing tex file.

You can try `tex-mode' instead of `AUCTeX'.  You can do that an
expression like this in your Emacs startup file:

  (add-to-list 'auto-mode-alist '("\\.tex\\'" . tex-mode))

Raghavendra.

-- 
N. Raghavendra <raghu@mri.ernet.in> | See message headers for contact
Harish-Chandra Research Institute   | and OpenPGP details.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A question about Syntax highlighting, different modes.
  2005-07-12  3:42 ` N. Raghavendra
@ 2005-07-12  7:08   ` David Kastrup
  2005-07-12  9:25     ` N. Raghavendra
  0 siblings, 1 reply; 5+ messages in thread
From: David Kastrup @ 2005-07-12  7:08 UTC (permalink / raw)


"N. Raghavendra" <raghu@mri.ernet.in> writes:

> You can try `tex-mode' instead of `AUCTeX'.  You can do that an
> expression like this in your Emacs startup file:
>
>   (add-to-list 'auto-mode-alist '("\\.tex\\'" . tex-mode))

This won't work reliably as AUCTeX aliases tex-mode to TeX-mode.  Once
AUCTeX is activated, it is not really simple to get rid of it again.
AUCTeX 11.80 will have documented ways to do that, even on a
mode-to-mode basis.

However, in this case it makes much more sense to figure out what the
problem is.  Of course, reducing the font lock detail is a simple
measure.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: A question about Syntax highlighting, different modes.
  2005-07-12  7:08   ` David Kastrup
@ 2005-07-12  9:25     ` N. Raghavendra
  0 siblings, 0 replies; 5+ messages in thread
From: N. Raghavendra @ 2005-07-12  9:25 UTC (permalink / raw)


At 2005-07-12T09:08:44+02:00, David Kastrup wrote:

> > You can try `tex-mode' instead of `AUCTeX'.  You can do that an
> > expression like this in your Emacs startup file:
> >
> >   (add-to-list 'auto-mode-alist '("\\.tex\\'" . tex-mode))
> 
> This won't work reliably as AUCTeX aliases tex-mode to TeX-mode.  Once
> AUCTeX is activated, it is not really simple to get rid of it again.

You are right.  I didn't realize that AUCTeX is difficult to
deactivate.  However, putting this at the end of my init file ---
after the AUCTeX customization --- and restarting Emacs does
deactivate AUCTeX in my system:

  (delete 'tex-site features)
  (add-to-list 'auto-mode-alist '("\\.tex\\'" . tex-mode))
  (autoload 'tex-mode "tex-mode"
    "Use standard `tex-mode.el' instead of AUCTeX."
    t nil)

> However, in this case it makes much more sense to figure out what
> the problem is.

I like and use AUCTeX, and agree with you.  I suggested standard
`tex-mode.el' only because the OP wanted a "simple" mode.

Raghavendra.

-- 
N. Raghavendra <raghu@mri.ernet.in> | See message headers for contact
Harish-Chandra Research Institute   | and OpenPGP details.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-07-12  9:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.2829.1121111625.2857.help-gnu-emacs@gnu.org>
2005-07-11 20:46 ` A question about Syntax highlighting, different modes Ralf Angeli
2005-07-12  3:42 ` N. Raghavendra
2005-07-12  7:08   ` David Kastrup
2005-07-12  9:25     ` N. Raghavendra
2005-07-11 19:45 Jim Zhang

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.