auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Redefining the context engine


From: Vladimir Lomov
Subject: Re: [AUCTeX] Redefining the context engine
Date: Tue, 30 Nov 2010 12:02:34 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

** Ralf Angeli [2010-11-23 23:04:37 +0100]:

> * Vladimir Lomov (2010-11-17) writes:
> 
>> I changed the code to
>> -------------------------- 8< --------------------------
>> (eval-after-load "tex"
>>   '(setq TeX-command-list
>>     (cons '("ConTeXt" 
>> "/usr/local/opt/texlive/context/tex/texmf-linux-64/bin/context %s" 
>> TeX-run-TeX t t :help "Run context (MarkIV)")
>>        TeX-command-list)))
>> -------------------------- 8< --------------------------
>> and it works. But two drawbacks:
>>  - when I do C-c C-c I see the command (ConTeXt) and after I hit Enter I
>>    see the command to be execute which would be executed only after the
>>    next hit on Enter.
> 
> You have to set the fourth element in the list defining the new entry to
> nil instead of t.  This is explained in the doc string of
> `TeX-command-list'.  You can read it e.g. by typing `C-h v
> TeX-command-list <RET>'.
> 
>>  - if compilation was successful auctex shows (at bottom line,
>>    minibuffer?) that 0 page were generated.
> 
> After typing `C-c C-l' you should see the output buffer which may give
> you some info about what went wrong.
> 
>> Seems that I use wrong way to achime the goal. Also I wonder how to
>> tell auctex that 'View' should look for PDF file not DVI in that case?
> 
> Did you enable TeX PDF mode?  See
> (info "(auctex)Processor Options") <-- Type `C-x C-e' here.

Thank you Ralf.

I must confess I almost don't have experience with (e)lisp.

I came to following solution. It works beside 'View':
-------------------------- 8< --------------------------
(add-hook 'ConTeXt-mode-hook (lambda ()
  (setq TeX-PDF-mode t)
  (setq TeX-command-list
    (cons '("ConTeXt" "PATH=/usr/local/opt/context/tex/texmf-linux-64/bin:$PATH 
context %s" TeX-run-command nil t :help "Run context (MarkIV)")
          TeX-command-list))
  ))
-------------------------- 8< --------------------------

If I understand this right then this 1) sets pdf mode for any context file
2) sets default command to context (I use context minimal).

But there is a problem with 'View': when I start emacs and open a context
file I see at status line 'ConTeXt-en/P'. If I hit C-c C-c I see
'ConTeXt' at bottom, then context compiles document. But next C-c C-c
shows 'ConTeXt' again. If I toggle pdf mode (off-on) and do C-c C-c
(compilation), now C-c C-c will show 'View'.

I again do something wrong?(!)

---
WBR, Vladimir Lomov

-- 
* woot smiles serenely.
<woot> I don't want to seem over eager about getting into knghtbrd's
       siglist.



reply via email to

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