David Kastrup | 5 Nov 2005 13:13
Picon
Picon

Re: [AUCTeX-diffs] Changes to auctex/tex.el

Ralf Angeli <angeli <at> iwi.uni-sb.de> writes:

>  (defun TeX-newline ()
>    "Call the function specified by the variable `TeX-newline-function'."
>    (interactive) (funcall TeX-newline-function))
>  <at>  <at>  -3311,6 +3326,8  <at>  <at> 
>      (define-key map "\C-c\C-m" 'TeX-insert-macro)
>      (if TeX-electric-escape
>  	(define-key map "\\" 'TeX-electric-macro))
> +    (define-key map "^"      'TeX-insert-sub-or-superscript)
> +    (define-key map "_"      'TeX-insert-sub-or-superscript)

If we have those for _ and ^ in our release, then it does not seem to
make much sense to do \ conditionally.  I think we should then have
TeX-maybe-electric-macro bound to \, and that should look something
like

(defun TeX-maybe-electric-macro (???) (interactive "???")
  (if TeX-electric-escape (TeX-insert-macro ???)
     (self-insert-command ???)))

That way the complaint that TeX-electric escape can't be changed in
session would go away.  Sure, there might be some problem we did not
yet notice, but the same holds for _ and ^, so it seems pointless to
wait.

--

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
David Kastrup | 5 Nov 2005 16:55
Picon
Picon

Re: [AUCTeX-diffs] Changes to auctex/tex.el

Ralf Angeli <angeli <at> iwi.uni-sb.de> writes:

> Index: auctex/tex.el
> diff -u auctex/tex.el:5.542 auctex/tex.el:5.543
> --- auctex/tex.el:5.542	Sat Nov  5 09:27:37 2005
> +++ auctex/tex.el	Sat Nov  5 13:43:12 2005
>  <at>  <at>  -3290,6 +3290,14  <at>  <at> 
>  		 (const reindent-then-newline-and-indent)
>  		 (sexp :tag "Other")))
>  
> +(defun TeX-insert-backslash (arg)
> +  "Either insert typed key ARG times or call `TeX-electric-macro'.
> +`TeX-electric-macro' will be called if `TeX-electric-escape' is non-nil."
> +  (interactive "*p")
> +  (if TeX-electric-escape
> +      (funcall 'TeX-electric-macro)
> +    (self-insert-command arg)))

What's the funcall good for?

--

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
David Kastrup | 5 Nov 2005 16:52
Picon
Picon

Re: [AUCTeX] Re: Debugging LaTeX warnings

Ralf Angeli <angeli <at> iwi.uni-sb.de> writes:

> * Ralf Angeli (2005-11-05) writes:
>
>> The attached patch (against CVS) will remedy some of these problems
>> and do some more:
>
> Ahem, "... and do some more goodness" would probably be less
> misleading. (c;

Well, according to some recent thread on comp.text.tex or
de.comp.text.tex (don't remember which), most additions should be
considered the work of the devel, anyway.  Probably the patch would
have been more appropriate on auctex-devel.

Redirecting there.

I think the functionality is probably a step in the right direction
with regard to what the user wants.  But we need to fold the error
processing of preview-latex and AUCTeX at one point of time.  It would
also be nice if errors from AUCTeX could be flagged right in the text
in some manner, and preview-latex runs could make use of that: right
now preview-latex ignores TeX errors altogether.  If it detected them,
it could, for example, refrain from showing previews in the closed
form.  Some errors result in one-pixel images (like when math groups
get confused), and people wonder where their stuff went.

--

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
(Continue reading)

Ralf Angeli | 5 Nov 2005 17:04
Picon

Re: Re: [AUCTeX-diffs] Changes to auctex/tex.el

* David Kastrup (2005-11-05) writes:

> Ralf Angeli <angeli <at> iwi.uni-sb.de> writes:
>
>> +  (if TeX-electric-escape
>> +      (funcall 'TeX-electric-macro)
>> +    (self-insert-command arg)))
>
> What's the funcall good for?

Good question. (c:  I'll change it to a regular function call as soon
as I find some time.

--

-- 
Ralf
Ralf Angeli | 5 Nov 2005 17:56
Picon

Re: [AUCTeX] Re: Debugging LaTeX warnings

* David Kastrup (2005-11-05) writes:

> Well, according to some recent thread on comp.text.tex or
> de.comp.text.tex (don't remember which), most additions should be
> considered the work of the devel, anyway.  Probably the patch would
> have been more appropriate on auctex-devel.

*laugh* YMMD.  Why don't we rename auctex-devel to auctex-devil?

> Redirecting there.
>
> I think the functionality is probably a step in the right direction
> with regard to what the user wants.  But we need to fold the error
> processing of preview-latex and AUCTeX at one point of time.

Is that `preview-parse-messages' and related stuff?  That function
scares me. (c;

Anyway, I don't think that the patch I sent will do much harm when it
comes to integrating AUCTeX and preview-latex error processing, so I
guess I'll commit it after it will have received a bit more testing.

After the frenzy in dctt the overhaul of the style system climbed up a
bit on my priority list.  So I'll probably look at that first.  But it
will take some time to get a grip on it.  I'm probably thinking to
complicated again.  Currently I am wondering if it made sense to
distinguish styles in a tree-like manner, starting from the file a
style is related to.  In a file there can then be different style
classes, e.g. commands, classes, packages, or input files, and related
to these classes there can be different (ordered) options.  Like this,
(Continue reading)

David Kastrup | 5 Nov 2005 19:12
Picon
Picon

Re: Re: [AUCTeX] Re: Debugging LaTeX warnings

Ralf Angeli <dev.null <at> iwi.uni-sb.de> writes:

> * David Kastrup (2005-11-05) writes:
>
>> I think the functionality is probably a step in the right direction
>> with regard to what the user wants.  But we need to fold the error
>> processing of preview-latex and AUCTeX at one point of time.
>
> Is that `preview-parse-messages' and related stuff?  That function
> scares me. (c;

Me too.

Anyway, preview-latex does a lot of futzing around with buffer
encodings and starting one process after another (the sort of thing
that would actually be required for latex+dvips+ghostview) and dumping
document preambles with the help of mylatex.ltx, and most of that
stuff actually would be better done in AUCTeX proper.

> Anyway, I don't think that the patch I sent will do much harm when
> it comes to integrating AUCTeX and preview-latex error processing,

Not really.  I just wanted to keep that objective in mind.

> so I guess I'll commit it after it will have received a bit more
> testing.
>
> After the frenzy in dctt the overhaul of the style system climbed up
> a bit on my priority list.

(Continue reading)

Ralf Angeli | 5 Nov 2005 19:36
Picon

Re: Re: [AUCTeX] Re: Debugging LaTeX warnings

* David Kastrup (2005-11-05) writes:

> I guess that the style subdirectory should probably be accessed only
> by \usepackage.  That means that style/babel.el would have to cater on
> its own for loading francais.el or similar.

Yes, that would make sense.  But for that to work we have to store the
options of the \usepackage call somewhere.  So somewhere we have to
handle some more complicated data structures.  I wish there were
something like a C or C++ struct in Elisp.  Property lists don't
really cut it.

> What to do about user styles and so on?  We have an auto subdirectory.
> If this is supposed to work with DOS style file names or Unix short
> file names (14 characters or so), one might be tempted to create
> subdirectories style, input, bibtex and so in them.  But
> subdirectories are even more cleanup work.  Another possibility is
> filenames like xxx.sty.el, xxx.tex.el xxx.bib.el and so on in the auto
> directory.  On short file name systems, it might mean that the .el
> gets lost, and this will affect the mode when hand-editing those
> files.  Not really an important problem IMO.

And what we have in the file system will somehow have to be mapped to
the name or signature of the style.  We currently use stuff like

(TeX-add-style-hook
 "babel"
 (lambda ()
   ...))

(Continue reading)

Luis A Escobar | 9 Nov 2005 02:51
Favicon

Fw: failed to install AUCTeX in Windows XP


I found in the AUCTeX guide that I could get some support
  from you with the following problem. This is copy of an email
  that I sent to David Kastrup but somebody here told me that
  the email should have been sent to you.

   I do not want to be a pain, see if you can help else
   please suggest somebody to request help from

    Thank you

Best regards,

Luis A. Escobar
Professor
LSU
---------------------- Forwarded by Luis A Escobar/luis/LSU on 11/08/2005
07:46 PM ---------------------------

Luis A Escobar
11/08/2005 11:59 AM

To:    dak <at> gnu.org
cc:

Subject:    failed to install AUCTeX in Windows XP

David: I do not know if you are the person I should be asking for help.
  If you are not the person, please refer me to a group or person to ask
for
(Continue reading)

Ralf Angeli | 9 Nov 2005 10:50
Face
Picon

Verbatim macros in different modes

While trying to get rid of a font-latex-related error with
`LaTeX-verbatim-*' variables when loading plain TeX files I thought
that it would make more sense to move especially the
`LaTeX-verbatim-macros-*' variables to tex.el.

Now, the default of `LaTeX-verbatim-macros-with-delims' is '("verb"
"verb*"), but as far as I understand the TeXbook and plain.tex there
are no such predefined macros in plain TeX.  This is probably also
true for other languages supported by AUCTeX like ConTeXt and Texinfo.
ConTeXt has the environment \starttyping ...\stoptyping but I did not
find a macro for short verbatim content.  And Texinfo has  <at> verb but
IIUC not  <at> verb*.

So I thought we could move the `LaTeX-verbatim-macros-*' variables to
tex.el which will then become `TeX-verbatim-macros-*'.  Every mode
will get its own customizable variables,
e.g. `ConTeXt-verbatim-macros-with-braces', the value of which will be
added to `TeX-verbatim-macros-with-braces-local', i.e. a buffer-local
internal variable, when the mode is activated.  Libraries like
font-latex (which currently is LaTeX-centric, I know) will then only
have to look into `TeX-verbatim-macros-*' variables to determine the
relevant macros.

Does this make sense?  Does anybody have a more sane or more elegant
solution?

--

-- 
Ralf
Robert Knighten | 11 Nov 2005 09:25

Plea for help - anomalous AUCTeX behavior

I am presently writing a mathematics book using AUCTeX.  Recently, probably
after upgrading to AUCTeX version 11.81 on Emacs version 21.4.1, I have the
problem that Emacs will suddenly and for very prolonged periods of time become
nearly unusable because of lack of response.  I will be able to type two,
three or even four lines of plain text (with no macros included) before
anything appears on the screen.  In case there is any relevance, this is a
Linux system (2.6.0-test9) using a 3 GHz Pentium 4 with 1GB of memory.
Once I start typing cpu utilization goes very high with top showing Emacs at
around 85-90% utilization.  Even after I stop typing the Emacs cpu utilization
remains at 85-90% for another five to ten minutes at which point it will
suddenly drop to 0!  While this is happening I can still use other buffers
with no trouble.  But the moment I start typing in the LaTeX buffer the
problem reccurs.

Sometimes I can solve the problem by restarting Emacs.  On occasion I have
been able to work on the book for an entire day before the problem starts, but
at other times it starts immediately.  Here is what I have in my .emacs to get
AUCTeX working:
(require `tex-site)  ;; so aucTex will work
(load "auctex.el" nil t t)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master 'nil)
(setq TeX-insert-braces t)

;; enable reftex with AUCTeX LaTeX mode
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)

I am not using preview-latex.

(Continue reading)


Gmane