[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: Sat, 27 Jun 2015 17:12:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Ivan Andrus <address@hidden> writes:

> 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

Ivan. Hello again.

I had the above suggestion in .emacs, that is, the (add-hook
'find-file-hook #'latex-mode).

So a new file named "foo" without extension, would default to the View
command, which is not wanted. The expected behavior would be, to save the buffer
before LaTeX-command is run. 

So next to modify was tex-buf.el to

          (let ((filepath (concat path orig "" ext)))
            (if (or (file-exists-p filepath)
                    (get-file-buffer filepath))
                (setq existingoriginals (cons filepath existingoriginals)))))))

(defcustom TeX-file-extensions '("") 

So it would prompt to save it, before LaTeX-command is run, which
successfully does, but takes me back to the behavior I mentioned
earlier, the "error occurred after..."

Of course, if only an extension is specified in tex.el, then everything is 

(defcustom TeX-file-extensions '("" "tex" "abc" "xyz" "sty" "cls" "ltx" "texi" 
"txi" "texinfo" "dtx")
  "*File extensions used by manually generated TeX files."
  :group 'TeX-file-extension
  :type '(repeat (string :format "%v")))

In the end, I wish I could trace the code to where the problem
lies. But I acknowledge this is not a problem, in the sense that an
extension for an input file is the default. Even though, if it is Not what I 
had in mind.

reply via email to

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