From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Habert Newsgroups: gmane.emacs.bugs Subject: tex-mode Date: Mon, 27 Oct 2003 13:32:51 +0100 (MET) Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200310271232.h9RCWpf13046@quassia.ens.fr> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1067272469 10771 80.91.224.253 (27 Oct 2003 16:34:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 27 Oct 2003 16:34:29 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 27 15:09:31 2003 Return-path: Original-Received: from mail-relay.eunet.no ([193.71.71.242]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AE7ts-0002A7-02 for ; Mon, 27 Oct 2003 14:59:16 +0100 Original-Received: from monty-python.gnu.org (monty-python.gnu.org [199.232.76.173]) by mail-relay.eunet.no (8.12.2/8.12.2/GN) with ESMTP id h9RCehJi041487 for ; Mon, 27 Oct 2003 13:40:43 +0100 (CET) (envelope-from bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org) Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AE6ZC-0006rx-N9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Oct 2003 07:33:50 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AE6Z5-0006qc-9y for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2003 07:33:43 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AE6YZ-0006ad-HZ for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2003 07:33:41 -0500 Original-Received: from [129.199.96.32] (helo=nef.ens.fr) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AE6YT-0006ND-15 for bug-gnu-emacs@gnu.org; Mon, 27 Oct 2003 07:33:05 -0500 Original-Received: from di.ens.fr (di.ens.fr [129.199.99.1]) by nef.ens.fr (8.12.10/1.01.28121999) with ESMTP id h9RCWtcp036382 for ; Mon, 27 Oct 2003 13:32:55 +0100 (CET) Original-Received: from quassia.ens.fr (lhabert@quassia [129.199.99.70]) by di.ens.fr (8.12.9/jb-1.1) id h9RCWr3l015406 for ; Mon, 27 Oct 2003 13:32:54 +0100 (MET) Original-Received: from (lhabert@localhost) by quassia.ens.fr (8.11.0/jb-1.1) Original-To: bug-gnu-emacs@gnu.org X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:6036 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:6036 In GNU Emacs 21.2.1 (sparc-sun-solaris2.7, X toolkit, Xaw3d scroll bars) of 2002-10-05 on clipper configured using `configure --prefix=/usr/local/util/packages/emacs-21.2' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: fr value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil locale-coding-system: iso-latin-1 default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Hi. I am reporting two bugs in tex-mode.el that have appeared with emacs 21. First, visit a new .tex file (say `foo.tex'), type some text, do not save and type `C-c C-f' (and eventually save when prompted to). Then emacs attempts to run tex upon `foo.tex.tex'. This is due to the fact that `tex-file' calls `save-some-buffers' only after calling `tex-main-file', so that `foo.tex' does not exist yet when `tex-main-file' is called. Now, `tex-main-file' ends with : (if (file-exists-p file) file (concat file ".tex")) ... A fix would be to call `save-some-buffers' before `tex-main-file'. Second (only in latex-mode), put point at the end of the buffer and do `C-c C-o'. Then emacs immediately complains that : latex-indent: Wrong type argument: integerp, nil before even prompting for the environment to insert. I found out that removing the first `\n' in the definition of the skeleton in `tex-latex-block' solves the problem. Note that this is not a purely academic problem : I use `C-c C-o' to insert the `document' environment, and I often do it at the end of the file...