auctex-devel
[Top][All Lists]
Advanced

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

Re: Intro


From: Jan Braun
Subject: Re: Intro
Date: Fri, 4 Mar 2022 17:42:32 +0100

Hi Arash,


Am 04.03.2022 um 12:48 schrieb Arash Esbati <arash@gnu.org>:

Hi Jan,

Jan Braun <Jan.Braun@klein-gallien.org> writes:

I was able to start a clean Emacsen (v27.2 of Nov. 2021).  I used
options —no-init-file and —no-site-file to start Emacs.  In scratch
buffer I added and evaled

(add-to-list 'load-path 
  "~/.emacs.d/elpa/auctex-13.1.1")
(load "auctex.el" nil t t)

only to find out, that it looks exactly the same, as if 
I had started Emacs and loaded my full-grown ~/.emacs 
file with 20+ years of adding more and more functions.

I'm not sure if I understand this part since I don't know how it looks
with and without loading your .emacs.

It makes no difference, if I start emacs with my init-file or 
if I start emacs naked.  AUCTEX works and produces in both 
cases the same results.

But since you've installed AUCTeX from ELPA, your should refrain from
doing the above.  Instead, start Emacs with

 emacs --no-init-file --no-site-file

and then eval these forms in scratch

 (require 'package)
 (package-initialize)

AUCTeX should be then at your service.

(Just for clarification: it was on my service 
before for over 20 years!).

And nope: starting Emacs and AUCTeX this way, no 
difference. :-(

Also have a look at the quick start section in the manual[1].  
That should get you going. 

Arash, AUCTeX works for me, every day, while writing 
normal LaTeX files.  I just recently started working 
with DocTeX files and there I have problems.  

I tried to sort out, if it was some side effects of my 
init file, but it turns out, even a naked minimal 
emacs produces this strange behaviour.

(I can provide a screenshot, if thats OK for 
you?)

Maybe we can sort the first part out and then proceed.  Sending
screenshots is usually no problem, just don't make them huge.

OK, thanks. 

I think, the first part is sorted out: what I see, seems to 
be the normal behaviour of AUCTeX, regardless of starting 
emacs with or without init files.

Here is a screenshot of one of my .dtx files.  Emacs is again 
one of the latest (27.2) and latest AUCTeX.  I started it 
with options —no-init-file —no-site-file, copied the above 
code into scratch, evaled it and loaded and a .dtx-file.  Eh 
voila, this is the result:


As you can see, from the menu line as well as the mode 
line, AUCTeX is activated.  Major mode is docTeX, … 
Again: please compare this image with the example 
screenshot on the AUCTeX web page.  You’ll notice, 
that the lines containing the documentation have a 
grey background color, but the background color 
does not extent to the right hand side of the 
window pane, as it does in your example screenshot.

I am missing the clear line, where the documentation 
ends and the real package code starts.

I have problems to insert the basic DocTeX environments, 
such as `macrocode’, `macro’, `variable’, `syntax’ and 
so on.  They seem to be unknown to AUCTeX.  I insert 
them by `LaTeX-Environment’, which is still bound to 
normal C-c C-e.  I expect auto-completion to work, 
which isn’t the case.  Typing in the environment name 
by hand will insert and indent the environment correctly, 
but the extra goodies are missing.  Take the variable or 
macro environment shown in my screenshot.  One should 
expect emacs to ask the name of the variables or macros 
to be inserted in the braces after `\begin{macro}{}’, 
but AUCTeX inserts only `\begin{macro}’ without the 
mandatory argument.

Also, when typing C-c C-e macrocode RET.  (Again: I have 
to type the complete environment name, as there is no 
auto-completion.) AUCTeX should IMHO insert 

%    \begin{macrocode}

%    \end{macrocode}

but instead it inserts

%    \begin{macrocode}
%      @
%    \end{macrocode}

(The @ representing point.)

Funny enough, even though AUCTeX pretends not to know this 
particualr environment, it correctly inserts the needed 
four spaces before \begin and \end.

I can’t imagine, that this should be the normal AUCTeX 
behaviour.  AUCTeX is so smart in almost everything it 
does, it supports the authors so broad and well, I can’t 
image, that it won’t have the same smartness on DTX files.  
Please tell me, my assumption is not completely wrong.

Bye

   Jan



reply via email to

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