Re: [NTG-context] searching in the source browser

2022-09-05 Thread Max Chernoff via ntg-context

Hi Hraban,

> Am 05.09.22 um 21:07 schrieb Pablo Rodriguez via ntg-context:
> > has it to be the source browser?
> > 
> > I mean, I use grep in Linux (MSYS2 in Windows [and brew.sh is available
> > for macOS]) and it works perfectly fine with ConTeXt.
> > 
> >$ grep -irl fi[eë][eë] context
> >context/tex/texmf-context/tex/context/base/mkiv/char-def.lua
> >context/tex/texmf-modules/tex/context/third/lilypond/t-lilypond.tex
> > 
> > Althought regular expressions are fine, I don’t know why "fi[eë]+"
> > doesn’t work in this case.
> > 
> > Just in case it might help,
> 
> Thank you – I found
> 
> grep -R "regex" ~/context
> 
> to be most easy.
> 
> But I like the source browser with its syntax highlighting, and it’s a
> pity that the search is so limited.

I usually use the new GitHub "Code Search". This works pretty well,
although you need a (free) account to use it:

   https://cs.github.com/contextgarden/context-mirror?q=%5Cstarttext
   
Sourcegraph should work pretty much the same way. I don't usually use
it, but it has the advantage of not requiring an account:

   
https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/contextgarden/context-mirror%24+%5Cstarttext=standard
   
Both of these have syntax highlighting and work with literal strings or
regexes.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] searching in the source browser

2022-09-05 Thread Henning Hraban Ramm via ntg-context

Am 05.09.22 um 20:59 schrieb Wolfgang Schuster via ntg-context:

Henning Hraban Ramm via ntg-context schrieb am 05.09.2022 um 20:28:

Hi, this is probably for Taco:

Is there a possibility in the source browser to search for macros 
(\something) or anything containing dots (logs.errors)?

Because neither “simple” nor with Lua patterns I get any results.

E.g. I wanted to look for all trackers and/or directives.


To get a list of trackers and directives you can use

     \showtrackers
     \showdirectives

in a document (the list appear in the log file and terminal) or you use 
the following two modules:


     context --global m-trackers.mkiv
     context --global m-directives.mkiv


Thank you!

While this was just an example for a search, I will include these in my 
book and somewhere on the wiki.


I’m not looking forward to trying all of these options to find out what 
they do (and document it, of course).


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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] searching in the source browser

2022-09-05 Thread Henning Hraban Ramm via ntg-context

Am 05.09.22 um 21:07 schrieb Pablo Rodriguez via ntg-context:

On 9/5/22 20:28, Henning Hraban Ramm via ntg-context wrote:

Hi, this is probably for Taco:

Is there a possibility in the source browser to search for macros
(\something) or anything containing dots (logs.errors)?
Because neither “simple” nor with Lua patterns I get any results.

E.g. I wanted to look for all trackers and/or directives.


Hi Hraban,

has it to be the source browser?

I mean, I use grep in Linux (MSYS2 in Windows [and brew.sh is available
for macOS]) and it works perfectly fine with ConTeXt.

   $ grep -irl fi[eë][eë] context
   context/tex/texmf-context/tex/context/base/mkiv/char-def.lua
   context/tex/texmf-modules/tex/context/third/lilypond/t-lilypond.tex

Althought regular expressions are fine, I don’t know why "fi[eë]+"
doesn’t work in this case.

Just in case it might help,


Thank you – I found

grep -R "regex" ~/context

to be most easy.

But I like the source browser with its syntax highlighting, and it’s a 
pity that the search is so limited.


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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] searching in the source browser

2022-09-05 Thread Hans Hagen via ntg-context

On 9/5/2022 9:07 PM, Pablo Rodriguez via ntg-context wrote:

On 9/5/22 20:28, Henning Hraban Ramm via ntg-context wrote:

Hi, this is probably for Taco:

Is there a possibility in the source browser to search for macros
(\something) or anything containing dots (logs.errors)?
Because neither “simple” nor with Lua patterns I get any results.

E.g. I wanted to look for all trackers and/or directives.


Hi Hraban,

has it to be the source browser?

I mean, I use grep in Linux (MSYS2 in Windows [and brew.sh is available
for macOS]) and it works perfectly fine with ConTeXt.

   $ grep -irl fi[eë][eë] context
   context/tex/texmf-context/tex/context/base/mkiv/char-def.lua
   context/tex/texmf-modules/tex/context/third/lilypond/t-lilypond.tex

Althought regular expressions are fine, I don’t know why "fi[eë]+"
doesn’t work in this case.

Just in case it might help,

an oldie (the one i use):

  mtxrun --script grep

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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] searching in the source browser

2022-09-05 Thread Pablo Rodriguez via ntg-context
On 9/5/22 20:28, Henning Hraban Ramm via ntg-context wrote:
> Hi, this is probably for Taco:
>
> Is there a possibility in the source browser to search for macros
> (\something) or anything containing dots (logs.errors)?
> Because neither “simple” nor with Lua patterns I get any results.
>
> E.g. I wanted to look for all trackers and/or directives.

Hi Hraban,

has it to be the source browser?

I mean, I use grep in Linux (MSYS2 in Windows [and brew.sh is available
for macOS]) and it works perfectly fine with ConTeXt.

  $ grep -irl fi[eë][eë] context
  context/tex/texmf-context/tex/context/base/mkiv/char-def.lua
  context/tex/texmf-modules/tex/context/third/lilypond/t-lilypond.tex

Althought regular expressions are fine, I don’t know why "fi[eë]+"
doesn’t work in this case.

Just in case it might help,

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] searching in the source browser

2022-09-05 Thread Wolfgang Schuster via ntg-context

Henning Hraban Ramm via ntg-context schrieb am 05.09.2022 um 20:28:

Hi, this is probably for Taco:

Is there a possibility in the source browser to search for macros 
(\something) or anything containing dots (logs.errors)?

Because neither “simple” nor with Lua patterns I get any results.

E.g. I wanted to look for all trackers and/or directives.


To get a list of trackers and directives you can use

    \showtrackers
    \showdirectives

in a document (the list appear in the log file and terminal) or you use 
the following two modules:


    context --global m-trackers.mkiv
    context --global m-directives.mkiv

Wolfgang

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] searching in the source browser

2022-09-05 Thread Henning Hraban Ramm via ntg-context

Hi, this is probably for Taco:

Is there a possibility in the source browser to search for macros 
(\something) or anything containing dots (logs.errors)?

Because neither “simple” nor with Lua patterns I get any results.

E.g. I wanted to look for all trackers and/or directives.

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___