How to configure context command in Emacs
Hello, I hope there are some Emacs users out there. ;-) I can use emacs with context-mode when I start the program like this: . ~/context/tex/setuptex ; emacs & I could not find a way to set this in my emacs init file. Neither of the ways described here worked for me: https://www.emacswiki.org/emacs/ExecPath I set this in .bashrc: if [-f ~/context/tex/setuptex ]; then . ~/context/tex/setuptex fi to always have context available in a shell and in emacs if I start it from bash. Starting Emacs via the start menu of Gnome results in an Emacs that does not know ConTeXt. I found some hints how to source .bashrc in emacs but this only affects the emacs shell not the command calling from within AucTeX. Has anyone found a solution for this? juh
On 24 Oct 2018, at 15:30, Jan U. Hasecke
wrote: Hello,
I hope there are some Emacs users out there. ;-)
I can use emacs with context-mode when I start the program like this:
. ~/context/tex/setuptex ; emacs &
I could not find a way to set this in my emacs init file. Neither of the ways described here worked for me:
AFAIK, combining both of these should have worked, but it has been ages since I used emacs that way, and I do not even have one installed any more, sorry.
https://www.emacswiki.org/emacs/ExecPath
I set this in .bashrc:
Perhaps if you use .profile instead, as that should be executed during login (before gnome even starts)? Best wishes, Taco
On Wed, Oct 24, 2018 at 3:30 PM Jan U. Hasecke
Hello,
I hope there are some Emacs users out there. ;-)
I can use emacs with context-mode when I start the program like this:
. ~/context/tex/setuptex ; emacs &
I could not find a way to set this in my emacs init file. Neither of the ways described here worked for me:
https://www.emacswiki.org/emacs/ExecPath
I set this in .bashrc:
if [-f ~/context/tex/setuptex ]; then . ~/context/tex/setuptex fi
to always have context available in a shell and in emacs if I start it from bash.
Starting Emacs via the start menu of Gnome results in an Emacs that does not know ConTeXt.
I found some hints how to source .bashrc in emacs but this only affects the emacs shell not the command calling from within AucTeX.
Has anyone found a solution for this?
juh
not a solution for your problem (I manually run setuptex when I open an emacs shell) but I guess that looking at https://www.gnu.org/software/auctex/ can help.
-- luigi
I have a hacky solution, which I haven't tested in a while.
Make a shell script called "mycontext" somewhere in the PATH. Include the
following in it:
#!/bin/bash
. ~/context/tex/setuptex
context $@
Make it executable. And then use "mycontext" as the TeX command inside
emacs. For example, you can refer to AucTeX's documentation for that.
On Wed, Oct 24, 2018 at 10:08 AM luigi scarso
On Wed, Oct 24, 2018 at 3:30 PM Jan U. Hasecke < juh+ntg-context@mailbox.org> wrote:
Hello,
I hope there are some Emacs users out there. ;-)
I can use emacs with context-mode when I start the program like this:
. ~/context/tex/setuptex ; emacs &
I could not find a way to set this in my emacs init file. Neither of the ways described here worked for me:
https://www.emacswiki.org/emacs/ExecPath
I set this in .bashrc:
if [-f ~/context/tex/setuptex ]; then . ~/context/tex/setuptex fi
to always have context available in a shell and in emacs if I start it from bash.
Starting Emacs via the start menu of Gnome results in an Emacs that does not know ConTeXt.
I found some hints how to source .bashrc in emacs but this only affects the emacs shell not the command calling from within AucTeX.
Has anyone found a solution for this?
juh
not a solution for your problem (I manually run setuptex when I open an emacs shell) but I guess that looking at https://www.gnu.org/software/auctex/ can help.
-- luigi
___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net
___________________________________________________________________________________
On Wed, 24 Oct 2018 15:30:37 +0200
"Jan U. Hasecke"
I hope there are some Emacs users out there. ;-)
I also wonder about the current quality of ConTeXt support within Emacs? In the past Patrick did some work on it, but, probably, atm he is busy with Speedata Publisher... Sincerely, Gour -- Therefore, without being attached to the fruits of activities, one should act as a matter of duty, for by working without attachment one attains the Supreme.
I 've been using emacs + auctex for years and they work fine with ConTeXt:
I modified the \etc\environment file as:
OSFONTDIR="/usr/share/fonts;/home/fvleung/.fonts"
PATH="/home/fvleung/ConTeXt/tex/texmf-linux-64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
I added the following in the .emacs file:
;; ConTeXt mkiv
(eval-after-load 'tex
'(add-to-list
'TeX-command-list
'("ConTeXt mkiv" "context --nonstopmode %t"
TeX-run-command nil (context-mode) :help "Run ConTeXt mkiv")))
Gour
On Wed, 24 Oct 2018 15:30:37 +0200 "Jan U. Hasecke"
wrote: I hope there are some Emacs users out there. ;-)
I also wonder about the current quality of ConTeXt support within Emacs?
In the past Patrick did some work on it, but, probably, atm he is busy with Speedata Publisher...
Sincerely, Gour
-- Therefore, without being attached to the fruits of activities, one should act as a matter of duty, for by working without attachment one attains the Supreme.
___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net
___________________________________________________________________________________
On Fri, 15 Feb 2019 10:05:07 +0800
fv leung
I 've been using emacs + auctex for years and they work fine with ConTeXt: I modified the \etc\environment file as:
Thank you! Do you possibly use RefTeX as well? Sincerely, Gour -- As a strong wind sweeps away a boat on the water, even one of the roaming senses on which the mind focuses can carry away a man's intelligence.
participants (6)
-
fv leung
-
Gour
-
Jan U. Hasecke
-
luigi scarso
-
Mohammad Hossein Bateni
-
Taco Hoekwater