ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* how to prevent stupid typos?
@ 2017-06-06 20:02 Pablo Rodriguez
  2017-06-06 20:56 ` Idris Samawi Hamid ادريس سماوي حامد
  2017-06-06 20:57 ` Alan BRASLAU
  0 siblings, 2 replies; 18+ messages in thread
From: Pablo Rodriguez @ 2017-06-06 20:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following sample:

    \starttext
    This is \linenote{abed intended.
    \stoptext

From which I get the error:

close source    > level 2, order 3, name '/home/ousia/untitled.tex'
close source    > level 1, order 3, name
'/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

*

tex error       > tex error on line 0 in file : ! Emergency stop

<*> cont-yes.mkiv

<empty file>

End of file on the terminal!

Would it be any way to make ConTeXt report that \linenote{ hasn’t been
closed?

I mean, with a three line source, it is stupid to get this. But in a
longer file, it can be an exhausting task.

The scenario may be worse.

At work I have a system to generate some documents (mainly letters)
automatically. I have to add an option (which I didn’t find the time to
fully implement it).

The system uses ConTeXt and there are about 30 source files. Depending
on the options you need, the main file requires the other files (via
modes and \input commands).

Well, in this context (no pun intended), I get an error such as this:

open source     > level 3, order 4, name 'untitled.tex'

But the source isn’t closed. I don’t have the files here, but I don’t
know even how to start searching.

In this second case, how could I get a hint of what is ConTeXt expecting?

May thanks fory your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-06 20:02 how to prevent stupid typos? Pablo Rodriguez
@ 2017-06-06 20:56 ` Idris Samawi Hamid ادريس سماوي حامد
  2017-06-07  5:02   ` Pablo Rodriguez
  2017-06-06 20:57 ` Alan BRASLAU
  1 sibling, 1 reply; 18+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2017-06-06 20:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear Pablo,

On Tue, 06 Jun 2017 14:02:24 -0600, Pablo Rodriguez <oinos@gmx.es> wrote:

> Dear list,
>
> I have the following sample:
>
>     \starttext
>     This is \linenote{abed intended.
>     \stoptext
>
> From which I get the error:
>
> close source    > level 2, order 3, name '/home/ousia/untitled.tex'
> close source    > level 1, order 3, name
> '/home/ousia/ctxbeta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
>
> *
>
> tex error       > tex error on line 0 in file : ! Emergency stop
>
> <*> cont-yes.mkiv
>
> <empty file>
>
> End of file on the terminal!
>
> Would it be any way to make ConTeXt report that \linenote{ hasn’t been
> closed?

Just check your file before running it:

mtxrun --autogenerate --script check test.tex

Running this on your example gives

2  grouping error  \starttext <cr>  <lf>  This is \linenote{abed intended.  
<cr>  <lf> \stoptext <cr>  <lf>

-)

Best wishes
Idris

> I mean, with a three line source, it is stupid to get this. But in a
> longer file, it can be an exhausting task.
>
> The scenario may be worse.
>
> At work I have a system to generate some documents (mainly letters)
> automatically. I have to add an option (which I didn’t find the time to
> fully implement it).
>
> The system uses ConTeXt and there are about 30 source files. Depending
> on the options you need, the main file requires the other files (via
> modes and \input commands).
>
> Well, in this context (no pun intended), I get an error such as this:
>
> open source     > level 3, order 4, name 'untitled.tex'
>
> But the source isn’t closed. I don’t have the files here, but I don’t
> know even how to start searching.
>
> In this second case, how could I get a hint of what is ConTeXt expecting?
>
> May thanks fory your help,
>
>
> Pablo


-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-06 20:02 how to prevent stupid typos? Pablo Rodriguez
  2017-06-06 20:56 ` Idris Samawi Hamid ادريس سماوي حامد
@ 2017-06-06 20:57 ` Alan BRASLAU
  2017-06-07  5:04   ` Pablo Rodriguez
  1 sibling, 1 reply; 18+ messages in thread
From: Alan BRASLAU @ 2017-06-06 20:57 UTC (permalink / raw)
  To: Pablo Rodriguez; +Cc: mailing list for ConTeXt users

My favorite is:

\startext

;-)


On Tue, 6 Jun 2017 22:02:24 +0200
Pablo Rodriguez <oinos@gmx.es> wrote:

> Dear list,
> 
> I have the following sample:
> 
>     \starttext
>     This is \linenote{abed intended.
>     \stoptext

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-06 20:56 ` Idris Samawi Hamid ادريس سماوي حامد
@ 2017-06-07  5:02   ` Pablo Rodriguez
  2017-06-07  8:09     ` Hans Hagen
  0 siblings, 1 reply; 18+ messages in thread
From: Pablo Rodriguez @ 2017-06-07  5:02 UTC (permalink / raw)
  To: ntg-context

On 06/06/2017 10:56 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>> [...]
>> Would it be any way to make ConTeXt report that \linenote{ hasn’t been
>> closed?
> 
> Just check your file before running it:
> 
> mtxrun --autogenerate --script check test.tex
> 
> Running this on your example gives
> 
> 2  grouping error  \starttext <cr>  <lf>  This is \linenote{abed intended.  
> <cr>  <lf> \stoptext <cr>  <lf>

Dear Idris,

many thanks for the advice.

I’m afraid that it doesn’t report errors in files loaded with the \input
command

    %%% contents of file a.tex:
    \starttext
    This is \linenote{error intended
    \stoptext

    %%% contents of file b.tex:
    \starttext
    This only loads a file.

    \input a.tex
    \stoptext

If I runt "mtxrunjit --autogenerate --script check b.tex", I get the
following message:

    no error

Is there no way to check also the files loaded by the main source?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-06 20:57 ` Alan BRASLAU
@ 2017-06-07  5:04   ` Pablo Rodriguez
  0 siblings, 0 replies; 18+ messages in thread
From: Pablo Rodriguez @ 2017-06-07  5:04 UTC (permalink / raw)
  To: ntg-context

On 06/06/2017 10:57 PM, Alan BRASLAU wrote:
> My favorite is:
> 
> \startext
> 
> ;-)

Well, I guess this is our star typo :-).

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07  5:02   ` Pablo Rodriguez
@ 2017-06-07  8:09     ` Hans Hagen
  2017-06-07 18:11       ` Pablo Rodriguez
  2017-06-07 18:55       ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 2 replies; 18+ messages in thread
From: Hans Hagen @ 2017-06-07  8:09 UTC (permalink / raw)
  To: ntg-context

On 6/7/2017 7:02 AM, Pablo Rodriguez wrote:
> On 06/06/2017 10:56 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>>> [...]
>>> Would it be any way to make ConTeXt report that \linenote{ hasn’t been
>>> closed?
>>
>> Just check your file before running it:
>>
>> mtxrun --autogenerate --script check test.tex
>>
>> Running this on your example gives
>>
>> 2  grouping error  \starttext <cr>  <lf>  This is \linenote{abed intended.
>> <cr>  <lf> \stoptext <cr>  <lf>
> 
> Dear Idris,
> 
> many thanks for the advice.
> 
> I’m afraid that it doesn’t report errors in files loaded with the \input
> command
> 
>      %%% contents of file a.tex:
>      \starttext
>      This is \linenote{error intended
>      \stoptext
> 
>      %%% contents of file b.tex:
>      \starttext
>      This only loads a file.
> 
>      \input a.tex
>      \stoptext
> 
> If I runt "mtxrunjit --autogenerate --script check b.tex", I get the
> following message:
> 
>      no error
> 
> Is there no way to check also the files loaded by the main source?
i just run that command from the editor (configured under a key) so i 
can use it when editing a file

(but i have to admit that i normally just run files and redo after 
fixing an error, running is fast enough)


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07  8:09     ` Hans Hagen
@ 2017-06-07 18:11       ` Pablo Rodriguez
  2017-06-07 19:02         ` Idris Samawi Hamid ادريس سماوي حامد
  2017-06-07 19:08         ` Hans Hagen
  2017-06-07 18:55       ` Idris Samawi Hamid ادريس سماوي حامد
  1 sibling, 2 replies; 18+ messages in thread
From: Pablo Rodriguez @ 2017-06-07 18:11 UTC (permalink / raw)
  To: ntg-context

On 06/07/2017 10:09 AM, Hans Hagen wrote:
> On 6/7/2017 7:02 AM, Pablo Rodriguez wrote:
>> [...]
>> If I runt "mtxrunjit --autogenerate --script check b.tex", I get the
>> following message:
>>
>>      no error
>>
>> Is there no way to check also the files loaded by the main source?
> 
> i just run that command from the editor (configured under a key) so i 
> can use it when editing a file

Hans,

I have just discovered the command (thanks to the kind help of Idris),
so I still have to experiment with it.

First of all, many thanks for the command (method, or whatever it should
be called). It is really useful.

In my real-world issue, the tool it spotted my mistake (a non-closed
\startnotmode nested in \startmode and followed by another \startmode).

My previous reply came before having used the checking method.

> (but i have to admit that i normally just run files and redo after 
> fixing an error, running is fast enough)

My question here isn’t about speed. If a source may load twenty source
files and it actually loads five source files, the problem is having to
check the files individually.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07  8:09     ` Hans Hagen
  2017-06-07 18:11       ` Pablo Rodriguez
@ 2017-06-07 18:55       ` Idris Samawi Hamid ادريس سماوي حامد
  1 sibling, 0 replies; 18+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2017-06-07 18:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 07 Jun 2017 02:09:48 -0600, Hans Hagen <pragma@wxs.nl> wrote:

> On 6/7/2017 7:02 AM, Pablo Rodriguez wrote:
>> On 06/06/2017 10:56 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>>>> [...]
>>>> Would it be any way to make ConTeXt report that \linenote{ hasn’t been
>>>> closed?
>>>
>>> Just check your file before running it:
>>>
>>> mtxrun --autogenerate --script check test.tex
>>>
>>> Running this on your example gives
>>>
>>> 2  grouping error  \starttext <cr>  <lf>  This is \linenote{abed  
>>> intended.
>>> <cr>  <lf> \stoptext <cr>  <lf>
>>  Dear Idris,
>>  many thanks for the advice.
>>  I’m afraid that it doesn’t report errors in files loaded with the  
>> \input
>> command
>>       %%% contents of file a.tex:
>>      \starttext
>>      This is \linenote{error intended
>>      \stoptext
>>       %%% contents of file b.tex:
>>      \starttext
>>      This only loads a file.
>>       \input a.tex
>>      \stoptext
>>  If I runt "mtxrunjit --autogenerate --script check b.tex", I get the
>> following message:
>>       no error
>>  Is there no way to check also the files loaded by the main source?
> i just run that command from the editor (configured under a key) so i  
> can use it when editing a file

Same here.

> (but i have to admit that i normally just run files and redo after  
> fixing an error, running is fast enough)

Again, same here.

Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07 18:11       ` Pablo Rodriguez
@ 2017-06-07 19:02         ` Idris Samawi Hamid ادريس سماوي حامد
  2017-06-07 20:05           ` Pablo Rodriguez
  2017-06-07 21:01           ` Hans Hagen
  2017-06-07 19:08         ` Hans Hagen
  1 sibling, 2 replies; 18+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2017-06-07 19:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 07 Jun 2017 12:11:14 -0600, Pablo Rodriguez <oinos@gmx.es> wrote:

>> (but i have to admit that i normally just run files and redo after
>> fixing an error, running is fast enough)
>
> My question here isn’t about speed. If a source may load twenty source
> files and it actually loads five source files, the problem is having to
> check the files individually.

I suppose it wouldn't be too hard for someone with the requisite ability  
to write a script to pipe and run the check on the argument of each \input  
in a main file.

OTOH, \input's can have \input's so it could get unwieldy pretty quick..

As a matter of workflow, I would just check each \input when editing it,  
don't see the need to check them all over and over - but maybe you have  
some huge collaborative project with lots of \inputs frequently changing..

Best wishes
Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07 18:11       ` Pablo Rodriguez
  2017-06-07 19:02         ` Idris Samawi Hamid ادريس سماوي حامد
@ 2017-06-07 19:08         ` Hans Hagen
  2017-06-07 20:08           ` Pablo Rodriguez
  1 sibling, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2017-06-07 19:08 UTC (permalink / raw)
  To: ntg-context

On 6/7/2017 8:11 PM, Pablo Rodriguez wrote:

> My question here isn’t about speed. If a source may load twenty source
> files and it actually loads five source files, the problem is having to
> check the files individually.
in that case i always run the individual files independently when 
editing them

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07 19:02         ` Idris Samawi Hamid ادريس سماوي حامد
@ 2017-06-07 20:05           ` Pablo Rodriguez
  2017-06-07 21:01           ` Hans Hagen
  1 sibling, 0 replies; 18+ messages in thread
From: Pablo Rodriguez @ 2017-06-07 20:05 UTC (permalink / raw)
  To: ntg-context

On 06/07/2017 09:02 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> [...]
> As a matter of workflow, I would just check each \input when editing it,  
> don't see the need to check them all over and over - but maybe you have  
> some huge collaborative project with lots of \inputs frequently changing..

My project isn’t collaborative (I’m the only one who writes code there)
and it is by no means huge. It is probably too complex for such simple
mind as mine 😉.

\inputs don’t change too frequently. But the code I wrote a month ago is
totally forgotten to me. I mean, I read and I understand what I wrote,
but I may not remember why I did something in that particular way.

I don’t need external examination to see that the code is unnecessarily
complex in many ways. But I’m neither a ConTeXt or programming expert.

The most common problem is that we have different conditions that
weren’t considered when writing the original code.

And these code additions may cause trouble. Because they need to be
implemented in the shortest period of time and in the not the quietest
working environment. At least for me, this is the perfect scenario to
forget to close something I opened before.

That being said, "mtxrunjit --autogenerate --script check" is the
perfect tool to spot those stupid errors.

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07 19:08         ` Hans Hagen
@ 2017-06-07 20:08           ` Pablo Rodriguez
  2017-06-07 20:16             ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 18+ messages in thread
From: Pablo Rodriguez @ 2017-06-07 20:08 UTC (permalink / raw)
  To: ntg-context

On 06/07/2017 09:08 PM, Hans Hagen wrote:
> On 6/7/2017 8:11 PM, Pablo Rodriguez wrote:
>> My question here isn’t about speed. If a source may load twenty source
>> files and it actually loads five source files, the problem is having to
>> check the files individually.
> 
> in that case i always run the individual files independently when 
> editing them

As Idris pointed out too, I need to get the habit of ckecking source
files every time I edit them.

And creating a keyboard shortcut to launch the script automatically
helps a lot.

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07 20:08           ` Pablo Rodriguez
@ 2017-06-07 20:16             ` Idris Samawi Hamid ادريس سماوي حامد
  2017-06-07 20:33               ` Pablo Rodriguez
  0 siblings, 1 reply; 18+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2017-06-07 20:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguez <oinos@gmx.es> wrote:

> And creating a keyboard shortcut to launch the script automatically
> helps a lot.

Scite: Ctrl-0
Notepad++: Ctrl-Shift-0

(new n++ setup for context currently under development)

Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07 20:16             ` Idris Samawi Hamid ادريس سماوي حامد
@ 2017-06-07 20:33               ` Pablo Rodriguez
  2017-06-07 20:45                 ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 18+ messages in thread
From: Pablo Rodriguez @ 2017-06-07 20:33 UTC (permalink / raw)
  To: ntg-context

On 06/07/2017 10:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguez <oinos@gmx.es> wrote:
> 
>> And creating a keyboard shortcut to launch the script automatically
>> helps a lot.
> 
> Scite: Ctrl-0
> Notepad++: Ctrl-Shift-0
> 
> (new n++ setup for context currently under development)

Where are these setops? I mean, in the past, I tried to add them to
Notepad++ with the help of the wiki and I gave up because I couldn’t
make it work.

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07 20:33               ` Pablo Rodriguez
@ 2017-06-07 20:45                 ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 0 replies; 18+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2017-06-07 20:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 07 Jun 2017 14:33:05 -0600, Pablo Rodriguez <oinos@gmx.es> wrote:

> On 06/07/2017 10:16 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
>> On Wed, 07 Jun 2017 14:08:21 -0600, Pablo Rodriguez <oinos@gmx.es>  
>> wrote:
>>
>>> And creating a keyboard shortcut to launch the script automatically
>>> helps a lot.
>>
>> Scite: Ctrl-0
>> Notepad++: Ctrl-Shift-0
>>
>> (new n++ setup for context currently under development)
>
> Where are these setops? I mean, in the past, I tried to add them to
> Notepad++ with the help of the wiki and I gave up because I couldn’t
> make it work.

Best to forget the old stuff on the wiki... Will make an announcement once  
the new system is ready. It includes a dedicated lexer plugin and some  
other neat things; stay tuned.

Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07 19:02         ` Idris Samawi Hamid ادريس سماوي حامد
  2017-06-07 20:05           ` Pablo Rodriguez
@ 2017-06-07 21:01           ` Hans Hagen
  2017-06-08  4:05             ` Pablo Rodriguez
  1 sibling, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2017-06-07 21:01 UTC (permalink / raw)
  To: ntg-context

On 6/7/2017 9:02 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> On Wed, 07 Jun 2017 12:11:14 -0600, Pablo Rodriguez <oinos@gmx.es> wrote:
> 
>>> (but i have to admit that i normally just run files and redo after
>>> fixing an error, running is fast enough)
>>
>> My question here isn’t about speed. If a source may load twenty source
>> files and it actually loads five source files, the problem is having to
>> check the files individually.
> 
> I suppose it wouldn't be too hard for someone with the requisite ability 
> to write a script to pipe and run the check on the argument of each 
> \input in a main file.
> 
> OTOH, \input's can have \input's so it could get unwieldy pretty quick..
> 
> As a matter of workflow, I would just check each \input when editing it, 
> don't see the need to check them all over and over - but maybe you have 
> some huge collaborative project with lots of \inputs frequently changing..
sure it's no big deal to write such a script but in decades of tex i 
never felt the need

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-07 21:01           ` Hans Hagen
@ 2017-06-08  4:05             ` Pablo Rodriguez
  2017-06-08  4:39               ` Brian Ballsun-Stanton
  0 siblings, 1 reply; 18+ messages in thread
From: Pablo Rodriguez @ 2017-06-08  4:05 UTC (permalink / raw)
  To: ntg-context

On 06/07/2017 11:01 PM, Hans Hagen wrote:
> sure it's no big deal to write such a script but in decades of tex i 
> never felt the need

I wrote a small script for my Linux machine (check-context.sh), to be
able to check a single file:

  source $HOME/ctxbeta/tex/setuptex
  mtxrunjit --autogenerate --script check $1
  echo $1

But when applied to a file, I get the following:

  $ check-context untitled.tex
  The argument "/home/ousia/untitled.tex" is not a valid TEXROOT path.
  (There is no file "/home/ousia/untitled.tex/texmf/tex/plain
  /base/plain.tex")
      8  grouping error  ode[abc] <lf>     This is \linenote{abed
   intended. <lf>      <lf>     \stopt
   10  missing stop  enote{abed intended. <lf>      <lf>     \stoptext
   <lf>  (see line 7)

  untitled.tex

I mean, I get the output, but after an error. $1 has full path in the
first ocurrence, but it has only the relative path with echo.

Of course, I get not error by direct invocation:

  $ mtxrunjit --autogenerate --script check untitled.tex
      8  grouping error  ode[abc] <lf>     This is \linenote{abed
   intended. <lf>      <lf>     \stopt
   10  missing stop  enote{abed intended. <lf>      <lf>     \stoptext
  <lf>  (see line 7)

What am I doing wrong here?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: how to prevent stupid typos?
  2017-06-08  4:05             ` Pablo Rodriguez
@ 2017-06-08  4:39               ` Brian Ballsun-Stanton
  0 siblings, 0 replies; 18+ messages in thread
From: Brian Ballsun-Stanton @ 2017-06-08  4:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2568 bytes --]

Hi Pablo,

Your script doesn't have texroot set.

You either need to source ~/.profile (or whatever sets texroot) or
explicitly set it.

At the top of my compile script, I've got:

TEXROOT=/opt/context/tex/
TEXMFOS=$TEXROOT/texmf-linux-64
export PATH=$TEXMFOS/bin:$PATH

I think the fact that you're sourcing setuptex but passing in $1 as a file
path is problematic, since setuptex eats $1 as the texroot.


On 8 June 2017 at 14:05, Pablo Rodriguez <oinos@gmx.es> wrote:

> On 06/07/2017 11:01 PM, Hans Hagen wrote:
> > sure it's no big deal to write such a script but in decades of tex i
> > never felt the need
>
> I wrote a small script for my Linux machine (check-context.sh), to be
> able to check a single file:
>
>   source $HOME/ctxbeta/tex/setuptex
>   mtxrunjit --autogenerate --script check $1
>   echo $1
>
> But when applied to a file, I get the following:
>
>   $ check-context untitled.tex
>   The argument "/home/ousia/untitled.tex" is not a valid TEXROOT path.
>   (There is no file "/home/ousia/untitled.tex/texmf/tex/plain
>   /base/plain.tex")
>       8  grouping error  ode[abc] <lf>     This is \linenote{abed
>    intended. <lf>      <lf>     \stopt
>    10  missing stop  enote{abed intended. <lf>      <lf>     \stoptext
>    <lf>  (see line 7)
>
>   untitled.tex
>
> I mean, I get the output, but after an error. $1 has full path in the
> first ocurrence, but it has only the relative path with echo.
>
> Of course, I get not error by direct invocation:
>
>   $ mtxrunjit --autogenerate --script check untitled.tex
>       8  grouping error  ode[abc] <lf>     This is \linenote{abed
>    intended. <lf>      <lf>     \stopt
>    10  missing stop  enote{abed intended. <lf>      <lf>     \stoptext
>   <lf>  (see line 7)
>
> What am I doing wrong here?
>
> Many thanks for your help,
>
> Pablo
> --
> http://www.ousia.tk
> ____________________________________________________________
> _______________________
> 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
> ____________________________________________________________
> _______________________
>



-- 

<http://fedarch.org/>

Brian Ballsun-Stanton Ph.D.
FAIMS Project <http://fedarch.org/> - Data Architect
<http://www.mendeley.com/profiles/brian-ballsun-stanton/>
brian@fedarch.org 0479 178 749

[-- Attachment #1.2: Type: text/html, Size: 5063 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2017-06-08  4:39 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-06 20:02 how to prevent stupid typos? Pablo Rodriguez
2017-06-06 20:56 ` Idris Samawi Hamid ادريس سماوي حامد
2017-06-07  5:02   ` Pablo Rodriguez
2017-06-07  8:09     ` Hans Hagen
2017-06-07 18:11       ` Pablo Rodriguez
2017-06-07 19:02         ` Idris Samawi Hamid ادريس سماوي حامد
2017-06-07 20:05           ` Pablo Rodriguez
2017-06-07 21:01           ` Hans Hagen
2017-06-08  4:05             ` Pablo Rodriguez
2017-06-08  4:39               ` Brian Ballsun-Stanton
2017-06-07 19:08         ` Hans Hagen
2017-06-07 20:08           ` Pablo Rodriguez
2017-06-07 20:16             ` Idris Samawi Hamid ادريس سماوي حامد
2017-06-07 20:33               ` Pablo Rodriguez
2017-06-07 20:45                 ` Idris Samawi Hamid ادريس سماوي حامد
2017-06-07 18:55       ` Idris Samawi Hamid ادريس سماوي حامد
2017-06-06 20:57 ` Alan BRASLAU
2017-06-07  5:04   ` Pablo Rodriguez

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).