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

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

Re: processing latex files without \\documentclass


From: Robin Barker
Subject: Re: processing latex files without \\documentclass
Date: Tue, 12 Feb 2002 14:08:26 GMT

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.1.1 (sparc-sun-solaris2.7, X toolkit)
 of 2001-11-28 on tempest
configured using `configure  --prefix=/opt/emacs'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: nil

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Here is the dribble file from a session which shows two bugs

<help-echo><help-echo>abc.tex<return>\typeout{foo}\stopyxyz.tex<return>\documentclass{article}\begin{document}foo\end{document}y<help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><menu-bar><buffer><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><menu-bar><buffer><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><menu-bar><files><kill-buffer><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo>!
<h!
elp-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><help-echo><menu-bar><files><exit-emacs>

I started emacs with
% mkdir foo; cd foo; /opt/emacs/bin/emacs &

I opened a dribble file with (open-dribble-file "dribble"),
created a file abc.tex (without \documentclass etc.)
did C-c C-f to run latex and emacs attempted to latex abc.tex.tex (BUG 1)
did C-c C-f to try latex again and emacs managed to latex abc.tex
created a file xyz.tex (with \documentclass)
did C-c C-f to run latex and again emacs attempted to latex xyz.tex.tex (BUG 1)
did C-c C-f to run latex and emacs managed to latex xyz.tex
changed to the abc.tex buffer 
did C-c C-f to run latex on abc.tex 
but emacs instead did latex xyz.tex (BUG 2)
changed to xyz.tex buffer, closed the buffer
in the abc.tex buffer (again) did C-c C-f to run latex on abc.tex
and (without another tex buffer open) emacs correctly did latex abc.tex.

My .emacs file set the tex default to latex:
;;
;; GNU Emacs initialisation file.

;; Allow use of sun function keys:
;; (setq sun-esc-bracket t)

;; Prevent `Novice' mode from popping up if I hit ESC-ESC by mistake:
(put 'eval-expression 'disabled nil)

;; Display 8-bit chars properly:
(standard-display-european t)

;; Set up some useful keys:
(global-set-key [f27] 'beginning-of-buffer)
(global-set-key [f33] 'end-of-buffer)
(global-set-key [f31] 'recenter)
(global-set-key [f29] 'scroll-down)
(global-set-key [f35] 'scroll-up)
(global-set-key [C-delete] 'undo)

;; Various others which it may be nice to have:
(global-set-key [f19] 'isearch-forward)         ;; find
(global-set-key [S-f19] 'isearch-backward)      ;; shift-find
(global-set-key [C-f19] 'isearch-forward-regexp)  ;; control-find
(global-set-key [M-f19] 'isearch-backward-regexp) ;; meta-find
(global-set-key [f14] 'undo)                    ;; undo
(global-set-key [f16] 'kill-ring-save)          ;; copy
(global-set-key [f18] 'yank)                    ;; paste
(global-set-key [f20] 'kill-region)             ;; cut
(global-set-key [help] 'info)                   ;; help

;; set up function keys
(global-set-key [f1] 'goto-line)
(global-set-key [f2] 'what-line)

;; Set up default mode selection:
(setq TeX-default-mode 'latex-mode )

;; load latex-mode on .tex files
(setq auto-mode-alist   (append (list (cons "\\.tex$" 'latex-mode))
                        auto-mode-alist
                        )
)

;; ;; set dvi-view to pageview
;; (setq tex-dvi-view-command
;;       (if (eq window-system 'x) "dvips -Ppageview" "dvi2tty * | cat -s"))

;; set dvi-view to xdvi
(setq tex-dvi-view-command
      (if (eq window-system 'x) "xdvi" "dvi2tty * | cat -s"))
;;
;; END .emacs

Robin

P.S  I don't know if this behaviour is related to the use of 
the tex-main-file variable functionality, but I can't get that
to work either. 


Recent input:
M-x r e p o r t - e m a c s - b u g <return>

Recent messages:
(/opt/emacs/bin/emacs)
Loading disp-table...done
Loading tool-bar...done
Loading image...done
Loading tooltip...done
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...done



reply via email to

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