Re: [NTG-context] Configure AUCTeX to run context not texec

2014-06-27 Thread Peter Münster
On Fri, Jun 27 2014, Gour wrote:

> What is the recommnded way to configure one's preferred viewer in AUCTeX
> to by used when processing ConTeXt files?

I don't know what is recommended, but this works for me:

(setq-default
 TeX-PDF-mode   t
 TeX-default-mode   'context-mode
 TeX-view-program-list
 '(("Okular" ("okular %(oo)" (mode-io-correlate "#src:%n%a"
 TeX-view-program-selection
 '(((output-dvi style-pstricks) "dvips and gv") (output-dvi "xdvi")
   (output-pdf "Okular") (output-html "xdg-open")))

-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Configure AUCTeX to run context not texec

2014-06-27 Thread Gour
Peter Münster  writes:

> Also on my todo-list, but again at low priority: "View" is in my
> history, so just pressing "up" does it. And once the viewer (evince
> in my case) is launched, there is no further need for "View".

What is the recommnded way to configure one's preferred viewer in AUCTeX
to by used when processing ConTeXt files?


Sincerely,
Gour


-- 
As the ignorant perform their duties with attachment to results, 
the learned may similarly act, but without attachment, for the 
sake of leading people on the right path.

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-11 Thread Jean Magnan de Bornier
Le 11 novembre à 23:36:08 Peter Münster  écrit notamment:

| On Mon, Nov 11 2013, Jean Magnan de Bornier wrote:
>
| > Here is my complete customization regarding ConTeXt:
| > [...]
| > context %s" TeX-run-command nil t :help "Run context (MarkIV)") ("TeX"
>
| You use "TeX-run-command" instead of "TeX-run-TeX". Thus you're not able
| to handle errors the usual way.

I must admit I was not aware of there being a difference there...
-- 
Jean
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-11 Thread Peter Münster
On Mon, Nov 11 2013, Jean Magnan de Bornier wrote:

> Here is my complete customization regarding ConTeXt:
> [...]
> context %s" TeX-run-command nil t :help "Run context (MarkIV)") ("TeX"

You use "TeX-run-command" instead of "TeX-run-TeX". Thus you're not able
to handle errors the usual way.

-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-11 Thread Jean Magnan de Bornier
Le 10 novembre à 22:38:33 Peter Münster  écrit notamment:

| On Sat, Nov 09 2013, Jean Magnan de Bornier wrote:
>
| > emacs 24.3.1 ubuntu
| > context minimal many versions (I update about once a week)
| > auctex 11.87.2 (installed via elpa and frequently updated)
>
| Strange. I use also the latest versions, but I observe the same
| behaviour as the OP...

Here is my complete customization regarding ConTeXt:

 '(ConTeXt-engine "luatex")
 '(TeX-PDF-mode t)
 '(TeX-command-list (quote (("ConTeXt" 
"PATH=~/context/tex/texmf-linux/bin:$PATH 
context %s" TeX-run-command nil t :help "Run context (MarkIV)") ("TeX" 
"%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (plain-tex-mode 
texinfo-mode ams-tex-mode) :help "Run plain TeX") ("LaTeX" "%`%l%(mode)%' %t" 
TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX") ("Makeinfo" 
"makeinfo %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with Info 
output") ("Makeinfo HTML" "makeinfo --html %t" TeX-run-compile nil 
(texinfo-mode) :help "Run Makeinfo with HTML output") ("AmSTeX" "%(PDF)amstex 
%`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX") 
("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX") ("View" "%V" 
TeX-run-discard-or-function t t :help "Run Viewer") ("Print" "%p" 
TeX-run-command t t :help "Print the file") ("Queue" "%q" TeX-run-background 
nil t :help "View the printer queue" :visible TeX-queue-command) ("File" 
"%(o?)dvips %d -o %f " TeX-run-command t t :help "Generate PostScript file") 
("Index" "makeindex %s" TeX-run-command nil t :help "Create index file") 
("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file 
for correctness") ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil t 
:help "Spell-check the document") ("Clean" "TeX-clean" TeX-run-function nil t 
:help "Delete generated intermediate files") ("Clean All" "(TeX-clean t)" 
TeX-run-function nil t :help "Delete generated intermediate and output files") 
("Other" "" TeX-run-command t t :help "Run an arbitrary command"

.

As you can see I deleted all standard context commands in auctex, but I doubt 
that
explains anything. 
-- 
Jean
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-10 Thread Peter Münster
On Sat, Nov 09 2013, Jean Magnan de Bornier wrote:

> emacs 24.3.1 ubuntu
> context minimal many versions (I update about once a week)
> auctex 11.87.2 (installed via elpa and frequently updated)

Strange. I use also the latest versions, but I observe the same
behaviour as the OP...

-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-09 Thread Jean Magnan de Bornier
Le 09 novembre à 11:13:13 Peter Münster  écrit notamment:

| On Sat, Nov 09 2013, Jean Magnan de Bornier wrote:
>
| > This problem does not appear on my machine where instead of "context
| > --nonstopmode %t" I wrote "PATH=~/context/tex/texmf-linux/bin:$PATH 
| > context %s"
>
| Interesting. What's your ConTeXt version, AUCTeX version and
| Emacs version?

emacs 24.3.1 ubuntu
context minimal many versions (I update about once a week)
auctex 11.87.2 (installed via elpa and frequently updated)

I added the PATH thing so emacs can be started by the session manager.

 
-- 
Jean
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-09 Thread Peter Münster
On Sat, Nov 09 2013, Jean Magnan de Bornier wrote:

> This problem does not appear on my machine where instead of "context
> --nonstopmode %t" I wrote "PATH=~/context/tex/texmf-linux/bin:$PATH 
> context %s"

Interesting. What's your ConTeXt version, AUCTeX version and
Emacs version?

-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-08 Thread Jean Magnan de Bornier
Le 08 novembre à 22:03:40 Michael Ash  écrit notamment:

| Thank you very much for the advice on configuring AUCTeX to compile
| context files.
>
| Inserting the following snippet in my .emacs (emacs configuration)
| file worked. 
>
| --8<---cut here---start->8---
| (eval-after-load 'tex
| '(add-to-list
| 'TeX-command-list
| '("ConTeXt" "context --nonstopmode %t"
| TeX-run-TeX nil (context-mode) :help "Run ConTeXt")))
| --8<---cut here---end--->8---
>
| This fix is imperfect because even though context runs properly,
| AUCTeX reports "ConTeXt: problems after [0] pages"
>
| AUCTeX doesn't believe that the file has been compiled and C-c C-c
| offers to run context again. It is necessary to select "View" 

This problem does not appear on my machine where instead of "context
--nonstopmode %t" I wrote "PATH=~/context/tex/texmf-linux/bin:$PATH 
context %s"

bye
-- 
Jean
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-08 Thread Peter Münster
On Fri, Nov 08 2013, Michael Ash wrote:

> This fix is imperfect because even though context runs properly, AUCTeX
> reports "ConTeXt: problems after [0] pages"

It's on my todo-list to fix it, but at very low priority.
In this case "problems after [0] pages" just means "success", so it's
only a cosmetic issue.


> AUCTeX doesn't believe that the file has been compiled and C-c C-c offers to
> run context again. It is necessary to select "View" 

Also on my todo-list, but again at low priority: "View" is in my
history, so just pressing "up" does it. And once the viewer (evince
in my case) is launched, there is no further need for "View".


> Some googling suggests that the return codes from context are not properly
> interpreted by AUCTeX.

I don't think so, the return code is 0 (success). It's probably more a
matter of parsing the last lines of the terminal output.


> I'm not sure if this is a context non-standardization or an AUCTeX
> problem. thoughts?

An AUCTeX problem. If you have some time (I don't) and you like to
program with Emacs Lisp, then you could solve it.

-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-08 Thread Michael Ash
Thank you very much for the advice on configuring AUCTeX to compile context
files.

Inserting the following snippet in my .emacs (emacs configuration) file
worked.

--8<---cut here---start->8---
(eval-after-load 'tex
  '(add-to-list
  'TeX-command-list
  '("ConTeXt" "context --nonstopmode %t"
TeX-run-TeX nil (context-mode) :help "Run ConTeXt")))
--8<---cut here---end--->8---

This fix is imperfect because even though context runs properly, AUCTeX
reports "ConTeXt: problems after [0] pages"

AUCTeX doesn't believe that the file has been compiled and C-c C-c offers
to run context again. It is necessary to select "View"

Some googling suggests that the return codes from context are not properly
interpreted by AUCTeX.  I'm not sure if this is a context
non-standardization or an AUCTeX problem.  thoughts?

Best,
Michael




On Fri, Nov 8, 2013 at 12:47 PM, Michael Ash  wrote:

> Dear all,
>
> I have a working version of context
>
> mash-laptop:~$ context --version
>
> mtx-context | ConTeXt Process Management 0.60
> mtx-context |
> mtx-context | main context file:
> /usr/share/texmf/tex/context/base/context.mkiv
> mtx-context | current version: 2013.11.07 15:28
>
>
> However, I edit files in emacs/AUCTeX and the compile command "C-c C-c"
> calls "texexec" instead of "context" and so can't compile in emacs.  Does
> anyone know how to change the command from "texexec" to "context" in
> emacs/AUCTeX?
>
> Thanks.
>
> Best,
> Michael
>
>
>
> --
> Michael Ash, Chair, Department of Economics
> Professor of Economics and Public Policy
> University of Massachusetts Amherst
> Amherst, MA 01003
> Email m...@econs.umass.edu
> Tel +1-413-545-2590 Twitter https://twitter.com/michaelaoash
>



-- 
Michael Ash, Chair, Department of Economics
Professor of Economics and Public Policy
University of Massachusetts Amherst
Amherst, MA 01003
Email m...@econs.umass.edu
Tel +1-413-545-2590 Twitter https://twitter.com/michaelaoash
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-08 Thread Roland Thiers

Le 8 nov. 2013 à 18:47, Michael Ash a écrit :

> 
> 
>  Does anyone know how to change the command from "texexec" to "context" in 
> emacs/AUCTeX?
> 
I have that  in my preference.el (I use aquamacs) :
--8<---cut here---start->8---
(defun rol-context () 
(interactive)
   (save-current-buffer
(save-buffer)
(TeX-save-document "")
(setq TeX-PDF-mode nil)
 (let ((nomdufichiersansextension (file-name-sans-extension 
(buffer-file-name

(shell-command (format "context --autopdf %s.tex" 
nomdufichiersansextension))
(TeX-view
--8<---cut here---end--->8---

I have bound this function rol-context to the key "F7", it works fine but it's 
definitely non optimal !
Regards, 
Roland 
(math teacher in a high school)


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Configure AUCTeX to run context not texec

2013-11-08 Thread Peter Münster
On Fri, Nov 08 2013, Michael Ash wrote:

> Does anyone know how to change the command from "texexec" to "context"
> in emacs/AUCTeX?

I have this in my emacs init file:

--8<---cut here---start->8---
(eval-after-load 'tex
  '(add-to-list
  'TeX-command-list
  '("ConTeXt" "context --nonstopmode %t"
TeX-run-TeX nil (context-mode) :help "Run ConTeXt")))
--8<---cut here---end--->8---

-- 
   Peter
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Configure AUCTeX to run context not texec

2013-11-08 Thread Michael Ash
Dear all,

I have a working version of context

mash-laptop:~$ context --version

mtx-context | ConTeXt Process Management 0.60
mtx-context |
mtx-context | main context file:
/usr/share/texmf/tex/context/base/context.mkiv
mtx-context | current version: 2013.11.07 15:28


However, I edit files in emacs/AUCTeX and the compile command "C-c C-c"
calls "texexec" instead of "context" and so can't compile in emacs.  Does
anyone know how to change the command from "texexec" to "context" in
emacs/AUCTeX?

Thanks.

Best,
Michael



-- 
Michael Ash, Chair, Department of Economics
Professor of Economics and Public Policy
University of Massachusetts Amherst
Amherst, MA 01003
Email m...@econs.umass.edu
Tel +1-413-545-2590 Twitter https://twitter.com/michaelaoash
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___