ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jim <zlists+context@jdvb.ca>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: context / auctex problem?
Date: Wed, 19 Jun 2024 10:43:12 -0300	[thread overview]
Message-ID: <ZnLgcKqcF2/XIzDP@x360.localdomain> (raw)
In-Reply-To: <20240618161249.Horde.fiw_KMlqgeQTTalG1yBf-Ja@home.staff.uni-marburg.de> <20240618112316.Horde.-Z3f2oHGwxXAOa5cMY9fkAJ@home.staff.uni-marburg.de>

Hi Jürgen (and other auctex users)...

On Tue, Jun 18, 2024 at 11:23 (+0200), Jürgen Hanneder via ntg-context wrote:


> 1. This sounded like a good solution:

> Despite the contextgarden wiki page, which says:

>>  ;; AUCTeX defaults to mkii; change to iv for iv and lmtx
>>  (ConTeXt-Mark-version "IV")

> this seemed like a good idea,

I think the contextgarden wiki page is very out of date on that point.  I
was using auctex 13.x.y and updated to 14.0.4 a while back, and never had
to customize (or otherwise set) any variables to use the executable
"context", as opposed to the (I assume) Mk II "texexec".

>> (custom-set-variables
>>    '(ConTeXt-Mark-version "lmtx")
>>    '(ConTeXt-engine "lmtx"))

> but on my system the error just changes:

> Running `ConTeXt Full' on `context-test' with ``texexec  --engine=lmtx
> --nonstop context-test.tex''
> /usr/bin/texexec: Zeile 2: mtxrun: Kommando nicht gefunden.

> auctex apparently stops using the command "context" directly, but via texexec.

Not on my system.  Are you by any chance running an "ancient" version of
auctex?


> 2.

>> Apparently, your Emacs doesn’t use the same PATH as your terminal.
>> The error message is from /bin/sh, I guess you usually run bash, zsh or
>> the like, and that gets its PATH from .bashrc or something like that.
>> Check how Emacs calls that script, and if you can define a PATH.

> I tried the method from https://www.emacswiki.org/emacs/ExecPath
> and set explicitly a path as

> (setq exec-path (append exec-path '("-Path as in Bashrc-")))

> Does not work.

I've been using emacs for over thirty years, and have managed to never need
to explicitly setq exec-path.  How are you starting emacs?  If you start it
from a terminal session, it should inherit the PATH from your shell, which
presumably has the directory where your context executable is found.

If you are starting emacs by clicking on some window manager (or desktop
environment) button / icon / widget / ...  (or 'accelerator key') then
evidently your window manager doesn't have the same PATH as your shell.
Without knowing what window manager / desktop environment you use, and how
you are starting emacs, I can't suggest a specific solution.

In my opinion, the Right Thing to do is to ensure your window manager is
started with the correct PATH.  But depending on your system that could be
easy or tricky.

More pragmatically, if you created a .desktop file to run emacs, and have a
line in that file like
        Exec=emacs
you might replace it with
        Exec=env PATH=<your path> emacs
where <your path> is what you have when you
        echo $PATH
from a terminal session.

> 3.
>> And the information in AucTeX on how to change that is frankly deficient.

> Exactly. It is a little absurd that it should be so difficult to tell auctex
> anything.

I recently filed an auctex bug report and one of the auctex developers
updated the context.el file (to be put in the next release).  I was told
that none of the auctex developers use ConTeXt (imagine!!) and that they
were happy to have some reports from ConTeXt users.  But before you
consider contacting them, I strongly advise you to upgrade to the newest
auctex release.


>> To the point that I, who
>> am an Emacs user for almost everything, when I write in ConTeXt I prefer
>> to use Vim.

"The horror, the horror."
        - Marlon Brando


On Tue, Jun 18, 2024 at 16:12 (+0200), Jürgen Hanneder via ntg-context wrote:



> Here just an inelegant half-solution:

> I added the whole program path to the 'TeX-command-list and it works, but
> this is hardly satisfying.
> At least it suggests that nothing else is wrong except that emacs 29.3 and
> auctex 14.0.5 together decide
> not to find a path, which is in .bashrc and works fine when called from a
> shell (not from eshell though).

Again, I suspect your window manager is not started with the complete PATH
that you have set up in your shell init file(s).

If you wish to dig into this further, I'd be happy to try to help you with
it.

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2024-06-19 13:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 12:15 [NTG-context] " Jürgen Hanneder via ntg-context
2024-06-17 17:23 ` [NTG-context] " Henning Hraban Ramm
2024-06-17 17:41   ` seyal zavira
2024-06-17 17:55     ` Joaquín Ataz López
2024-06-17 19:04       ` Peter Münster
2024-06-18  5:34 ` [NTG-context] " Lizardo Reyna via ntg-context
2024-06-18  9:23   ` [NTG-context] " Jürgen Hanneder via ntg-context
2024-06-19 13:43     ` Jim [this message]
2024-06-18 14:12   ` [NTG-context] Re: context / auctex problem? half-solved Jürgen Hanneder via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZnLgcKqcF2/XIzDP@x360.localdomain \
    --to=zlists+context@jdvb.ca \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).