* Emacs 'destroys' latex files
@ 2007-01-16 16:30 Pseudo
2007-01-16 16:59 ` Maarten Bergvelt
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Pseudo @ 2007-01-16 16:30 UTC (permalink / raw)
Hi,
maybe this is a stuid newbe question, but since some time my
GNU Emacs 21.4.1 (on a debian machine) behaves in a way that it
displays greek letters or symbols as they do appear in a printed form.
I admit, that this looks quite pretty, but when saving one encounters a
big problem if there is anywhere a \renewcommand appearing. To explain
the problem, consider e.g. a setting
\renewcommand {\AA} {\mathbb A}.
When opening the file Emacs will replace *all* \AA in the file by a
character
that looks like an A with little o on its head (the standard latex
meaning of \AA).
When saving, this behaviour destroys entirely the intention of my
renewcommand!
This behaviour is so annoying that in the moment I prefer running emacs
in a console mode even if I thereby loose some other nice functionality
..
Question: is there a way to stop emacs from doing so? If possible
please
don't explain me that \renewcommand is stupid anyhow ...
thank you very much! Pseudo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs 'destroys' latex files
2007-01-16 16:30 Emacs 'destroys' latex files Pseudo
@ 2007-01-16 16:59 ` Maarten Bergvelt
2007-01-16 18:38 ` Pseudo
2007-01-16 22:49 ` David Kastrup
2007-01-16 18:36 ` Peter Dyballa
2007-01-18 3:12 ` Stefan Monnier
2 siblings, 2 replies; 11+ messages in thread
From: Maarten Bergvelt @ 2007-01-16 16:59 UTC (permalink / raw)
In article <1168965020.972207.75690@51g2000cwl.googlegroups.com>, Pseudo wrote:
> maybe this is a stuid newbe question, but since some time my
> GNU Emacs 21.4.1 (on a debian machine) behaves in a way that it
> displays greek letters or symbols as they do appear in a printed form.
> I admit, that this looks quite pretty, but when saving one encounters a
Hm, are you using preview-latex or something? Emacs doesn't do
act like that out of the box. So you have something in your
.emacs that make it do this. You have to tell us what this something
is. Go hack your .emacs untill you find what causes this behaviour.
Start with a latex file like
\documentclass{amsart}
\renewcommand{\AA}{\mathbb A}
\begin{document}
\[
\AA
\]
\end{document}
When I use preview-latex on this file I see the blackboard bold A, not
the original \AA.
--
Maarten Bergvelt
Mathematics Department, University of Illinois
Urbana-Champaign, IL 61801
Ph: 217-333-6326 email: bergv@math.uiuc.edu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs 'destroys' latex files
2007-01-16 16:59 ` Maarten Bergvelt
@ 2007-01-16 18:38 ` Pseudo
2007-01-16 18:55 ` Maarten Bergvelt
2007-01-16 22:49 ` David Kastrup
1 sibling, 1 reply; 11+ messages in thread
From: Pseudo @ 2007-01-16 18:38 UTC (permalink / raw)
Dear Maarten,
Thank you for your reply. In fact, my emacs does not seem to know
latex-preview. I used the testfile you suggest
> \documentclass{amsart}
> \renewcommand{\AA}{\mathbb A}
> \begin{document}
> \[
> \AA
> \]
> \end{document}
it produces the following behaviour: the \AA inside the document
environment is visible as \AA, the first one in the header is displayed
in this strange form A with an o on its head.
Is there a 'logging' system in emacs that tells me what modules, parts,
whatsoever are run when opening a document? That would be a hint where
to search for my problem ...
Here is my .emacs file. Its mainly a collection of things I found
somewhere. And: on a much older version of debian / emacs it worked
quite well. Hope posting all these lines helps in understanding what I
messed up.
At least I don't see any strange parts in it.
(custom-set-variables
'(case-fold-search t)
'(current-language-environment "German")
'(global-font-lock-mode t nil (font-lock))
'(load-home-init-file t t)
'(text-mode-hook (quote (turn-on-auto-fill text-mode-hook-identify))
t)
'(transient-mark-mode t))
(custom-set-faces)
;; -------------------- font lock mode
(cond ((fboundp 'global-font-lock-mode)
;; Turn on font-lock in all modes that support it
(global-font-lock-mode t)
;; Maximum colors
(setq font-lock-maximum-decoration t)))
;; ---------------------
;; --------------------- AUC-TEX
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
;; ---------------------
;; --------------------- REF-TEX
(add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
(add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(setq reftex-plug-into-AUCTeX t
reftex-enable-partial-scans t)
(setq reftex-use-external-file-finders t)
(setq reftex-external-file-finders
'(("tex" . "kpsewhich -format=.tex %f")
("bib" . "kpsewhich -format=.bib %f")))
;; ---------------------
;; --------------------- PHP
(setq load-path
(append '("~/elisp") load-path ))
(add-to-list 'auto-mode-alist '("\\.php3?\\'" . c-mode))
;; ---------------------- Start flyspell automatically
(setq ispell-dictionary "british")
(setq ispell-local-dictionary "british")
(setq flyspell-default-dictionary "british")
(defun turn-on-flyspell-mode()
(flyspell-mode t)
)
(add-hook 'latex-mode-hook 'turn-on-flyspell-mode)
(add-hook 'tex-mode-hook 'turn-on-flyspell-mode)
(add-hook 'html-mode-hook 'turn-on-flyspell-mode)
(setq minibuffer-max-depth nil)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs 'destroys' latex files
2007-01-16 18:38 ` Pseudo
@ 2007-01-16 18:55 ` Maarten Bergvelt
2007-01-17 2:35 ` Nikos Apostolakis
[not found] ` <mailman.3177.1169001640.2155.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 11+ messages in thread
From: Maarten Bergvelt @ 2007-01-16 18:55 UTC (permalink / raw)
In article <1168972738.843874.79670@l53g2000cwa.googlegroups.com>,
Pseudo wrote:
> Dear Maarten,
>
> Thank you for your reply. In fact, my emacs does not seem to know
> latex-preview. I used the testfile you suggest
>
>> \documentclass{amsart}
>> \renewcommand{\AA}{\mathbb A}
>> \begin{document}
>> \[
>> \AA
>> \]
>> \end{document}
>
> it produces the following behaviour: the \AA inside the document
> environment is visible as \AA, the first one in the header is displayed
> in this strange form A with an o on its head.
What do mean: "is visible as \AA", which definition of \AA?
What do you mean "first one in the header"? What header? I have no
clue what you are talking about here....
> Is there a 'logging' system in emacs that tells me what modules, parts,
> whatsoever are run when opening a document? That would be a hint where
> to search for my problem ...
look in the *Messages* buffer. Look also what modes are active:
M-x help[ret]m
> Here is my .emacs file. Its mainly a collection of things I found
> somewhere. And: on a much older version of debian / emacs it worked
> quite well. Hope posting all these lines helps in understanding what I
> messed up.
> At least I don't see any strange parts in it.
The thing to do is first start emacs without customization:
emacs -q latextest.tex
Do you see the strange behaviour? If yes, then there is some
systemwide customization, but I doubt that.
If no, then copy .emacs to .emacsold and start hacking on .emacs.
--
Maarten Bergvelt
Mathematics Department, University of Illinois
Urbana-Champaign, IL 61801
Ph: 217-333-6326 email: bergv@math.uiuc.edu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs 'destroys' latex files
2007-01-16 18:55 ` Maarten Bergvelt
@ 2007-01-17 2:35 ` Nikos Apostolakis
[not found] ` <mailman.3177.1169001640.2155.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 11+ messages in thread
From: Nikos Apostolakis @ 2007-01-17 2:35 UTC (permalink / raw)
Maarten Bergvelt <bergv@math.uiuc.edu> writes:
>
> The thing to do is first start emacs without customization:
>
> emacs -q latextest.tex
>
> Do you see the strange behaviour? If yes, then there is some
> systemwide customization, but I doubt that.
>
> If no, then copy .emacs to .emacsold and start hacking on .emacs.
>
If yes then try
emacs -q -no-site-file latextest.tex
especialy since the OP runs Debian. Usually part of the
installation of a Debian emacs package (like x-symbol that David
mentioned) is site-wide customization.
HTH
Nikos
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.3177.1169001640.2155.help-gnu-emacs@gnu.org>]
* Re: Emacs 'destroys' latex files
[not found] ` <mailman.3177.1169001640.2155.help-gnu-emacs@gnu.org>
@ 2007-01-17 9:53 ` Pseudo
2007-01-17 12:21 ` Nikos Apostolakis
[not found] ` <mailman.3196.1169036509.2155.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 11+ messages in thread
From: Pseudo @ 2007-01-17 9:53 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1418 bytes --]
Thank you all for your suggestions! To answer some questions.
1) emacs -q produces the strange behaviour
2) emacs -q -no-site-file does not. If I understand Maarten right,
this points to a system-wide customization
3) I should mention that before 'destroying' my actual working file,
emacs asks for the coding system, suggesting (default x-ctext).
Normally, emacs suggests something intelligent, so I just hit enter.
Maybe I thereby 'ask' emacs to destroy my file ...
4) The 5-line test file we were discussing is *not* being altered but
only visualised strangely: first appearance is Å the second is \AA
(characters backslash, A, A in verbatim). Note that Emacs does not ask
for a coding system with the test file..
5) in *Messages* we find indeed x-symbol (2nd last line) as David
guessed. How do I stop x-symbol from being run ?
Thank you very much!
Loading /var/lib/auctex/emacs21/amsthm.elc...done
Applying style hooks... done
Sorting environment...
Removing duplicates... done
Loading tex-bar...done
Loading flyspell...
Loading byte-opt...done
Loading flyspell...done
Starting new Ispell process...
Loading reftex...done
Loading reftex-auc...done
Loading reftex-dcr...done
Automatic display of crossref information was turned on
Loading preview...done
Loading cl-extra...done
Loading quail...done
Loading x-symbol-image...done
Applying style hooks... done
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs 'destroys' latex files
2007-01-16 16:59 ` Maarten Bergvelt
2007-01-16 18:38 ` Pseudo
@ 2007-01-16 22:49 ` David Kastrup
1 sibling, 0 replies; 11+ messages in thread
From: David Kastrup @ 2007-01-16 22:49 UTC (permalink / raw)
Maarten Bergvelt <bergv@math.uiuc.edu> writes:
> In article <1168965020.972207.75690@51g2000cwl.googlegroups.com>, Pseudo wrote:
>> maybe this is a stuid newbe question, but since some time my
>> GNU Emacs 21.4.1 (on a debian machine) behaves in a way that it
>> displays greek letters or symbols as they do appear in a printed form.
>> I admit, that this looks quite pretty, but when saving one encounters a
>
> Hm, are you using preview-latex or something?
Pulease. preview-latex does not touch the buffer at all unless you
explicitly ask it. Packages that are less careful not to annoy the
user unless he explicitly asks for it:
talcum. Does not change the buffer, but changes the appearance.
However, I doubt that talcum would start acting in a way that people
don't want without being asked it, either.
x-symbol. Probably the culprit here. Actually changes the buffer.
There is some minor mode indicator for its presence.
Then there are some iso-cvt-functions which can be enabled when
loading and saving TeX files.
Of all those, I think the probability is highest that x-symbol does
this sort of interference if you install it as a Debian package.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs 'destroys' latex files
2007-01-16 16:30 Emacs 'destroys' latex files Pseudo
2007-01-16 16:59 ` Maarten Bergvelt
@ 2007-01-16 18:36 ` Peter Dyballa
2007-01-18 3:12 ` Stefan Monnier
2 siblings, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2007-01-16 18:36 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 16.01.2007 um 17:30 schrieb Pseudo:
> When opening the file Emacs will replace *all* \AA in the file by a
> character
This does not happen! Open the file read-only? Does an asterisk
appear in mode-line? All you see is a feature of AUCTeX: *presenting*
non-Latin/non-7 bit characters as themselves. Have you ever checked
the LaTeX output?
--
Greetings
Pete
"There's no place like 127.0.0.1"
origin unknown
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Emacs 'destroys' latex files
2007-01-16 16:30 Emacs 'destroys' latex files Pseudo
2007-01-16 16:59 ` Maarten Bergvelt
2007-01-16 18:36 ` Peter Dyballa
@ 2007-01-18 3:12 ` Stefan Monnier
2 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2007-01-18 3:12 UTC (permalink / raw)
> maybe this is a stuid newbe question, but since some time my
> GNU Emacs 21.4.1 (on a debian machine) behaves in a way that it
> displays greek letters or symbols as they do appear in a printed form.
Sounds like X-Symbol.
> I admit, that this looks quite pretty, but when saving one encounters a
> big problem if there is anywhere a \renewcommand appearing. To explain
> the problem, consider e.g. a setting
> \renewcommand {\AA} {\mathbb A}.
> When opening the file Emacs will replace *all* \AA in the file by a
> character
> that looks like an A with little o on its head (the standard latex
> meaning of \AA).
> When saving, this behaviour destroys entirely the intention of my
> renewcommand!
I don't understand the problem. When saving, the Å should be converted back
to \AA. Oh wait, yes I think I see: the default config probably prevents
this back-conversion for latin-1 chars.
You should probably report this as a bug to X-Symbol maintainers.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-01-18 3:12 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-16 16:30 Emacs 'destroys' latex files Pseudo
2007-01-16 16:59 ` Maarten Bergvelt
2007-01-16 18:38 ` Pseudo
2007-01-16 18:55 ` Maarten Bergvelt
2007-01-17 2:35 ` Nikos Apostolakis
[not found] ` <mailman.3177.1169001640.2155.help-gnu-emacs@gnu.org>
2007-01-17 9:53 ` Pseudo
2007-01-17 12:21 ` Nikos Apostolakis
[not found] ` <mailman.3196.1169036509.2155.help-gnu-emacs@gnu.org>
2007-01-17 13:52 ` Pseudo
2007-01-16 22:49 ` David Kastrup
2007-01-16 18:36 ` Peter Dyballa
2007-01-18 3:12 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).