Re: [NTG-context] [PATCH] Small improvement for 'setuptex'

2011-09-23 Thread Mojca Miklavec
On Thu, Sep 22, 2011 at 15:46, Vladimir Lomov lomov...@gmail.com wrote:
 Hello.

 I'm using standard 'setuptex' file to set apropriate variables for my
 shell. I'd like to suggest small improvement for this file. See
 attached patch.

 P.S. The real use of this file is in my shell initialization scripts.
 It is sourced in specific way so I faced a situation when 'export' is
 required. Besides that unsetting unused variables also good habit to
 interactive session.

Done, thanks.

But I also unset TEXMFOS. Out of curiosity: why/when do you need export?

Mojca
___
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] [PATCH] Small improvement for 'setuptex'

2011-09-23 Thread Vladimir Lomov
Hello,
** Mojca Miklavec [2011-09-23 09:38:40 +0200]:

 On Thu, Sep 22, 2011 at 15:46, Vladimir Lomov lomov...@gmail.com wrote:
 Hello.

 I'm using standard 'setuptex' file to set apropriate variables for my
 shell. I'd like to suggest small improvement for this file. See
 attached patch.

 P.S. The real use of this file is in my shell initialization scripts.
 It is sourced in specific way so I faced a situation when 'export' is
 required. Besides that unsetting unused variables also good habit to
 interactive session.

 Done, thanks.

 But I also unset TEXMFOS.
I wasn't sure about that variable. Quick search (grep -r 'TEXMFOS'
CONTEXT_MINIMAL/*) shows me a lot places where that variable is used.

 Out of curiosity: why/when do you need export?
In short: for shell session set up.

IMHO, this is not right place to disscuss shell sessions, but I use `setuptex'
for tmux window initialization (see here:
https://github.com/vp1981/scripts/tree/master/tmux/scripts, files
smoon{,3,4}, though I didn't test with export yet).

---
WBR, Vladimir Lomov

-- 
It is wise to keep in mind that neither success nor failure is ever final.
-- Roger Babson
___
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] [PATCH] Small improvement for 'setuptex'

2011-09-22 Thread Vladimir Lomov
Hello.

I'm using standard 'setuptex' file to set apropriate variables for my
shell. I'd like to suggest small improvement for this file. See
attached patch.

P.S. The real use of this file is in my shell initialization scripts.
It is sourced in specific way so I faced a situation when 'export' is
required. Besides that unsetting unused variables also good habit to
interactive session.

---
WBR, Vladimir Lomov

-- 
Violence is molding.
--- setuptex.orig   2011-09-22 22:36:37.0 +0900
+++ setuptex2011-09-22 22:38:12.0 +0900
@@ -148,13 +148,16 @@
fi
 
 # ConTeXt binaries have to be added to PATH
-TEXMFOS=$TEXROOT/texmf-$platform
-PATH=$TEXMFOS/bin:$PATH
+export TEXMFOS=$TEXROOT/texmf-$platform
+export PATH=$TEXMFOS/bin:$PATH
 # TODO: we could set OSFONTDIR on Mac for example
 
 # not sure why this would be needed
 # export CTXMINIMAL=yes
 
+# unset variables that won't be used lately
+unset platform cpu system OWNPATH SCRIPTPATH ARGPATH
+
 else
echo provide a proper tex root (like '. setuptex /something/tex') ;
 fi
___
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
___