[Top][All Lists]

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

Re: [AUCTeX-devel] latex-mode or context-mode in startup

From: Carlos
Subject: Re: [AUCTeX-devel] latex-mode or context-mode in startup
Date: Fri, 26 Jun 2015 01:43:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

>I’m not entirely sure I understand what you’re looking for, but does 

 >  (add-hook 'find-file-hook #'latex-mode)

> do what you want?


Ivan, hello, how 've you been man?

But the suggestion with the (add-hook 'find-file-hook #'latex-mode)
takes me to point A, with its View instead of LaTeX-command, and its
infamous and expected message of "Error occurred after last TeX file

Let me start from the beginning.

Let's say you fire emacs, and have a new file named "foo" without
extension, then everything that is needed is loaded automatically, and
all my effort is in making sure I type "hello world!".

Of course, a `C-e` and `C-c` is almost mandatory.

That is pretty much what I'd like.


That's why I said earlier that I can have in the `.emacs` file something
like the following:

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


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

or have a

(add-to-list 'auto-mode-alist '("\\.xyz\\|\\.abc\\'" . latex-mode))

and specify the "xyz" and "abc" in TeX-file-extensions in tex.el

But the latter is not what I'm after, really. I want no extension in the
new file.

The main purpose is to have an emacs solely for typesetting
documents. It's not practical, and I'm aware of it, but I'm in denial to
accept that the above, with the first example to have no file extension,
is not possible.

Some other languages have implemented to have some sort of regex in the
contents of the file, like the string `documentclass` or `starttext` to 
accomplish .....

I do believe it's possible. 

Ivan, I appreciate it. Where it's Mosè and Tassilo? Maybe the three of
you can come up with something here.

reply via email to

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