f



Notepad++ functions list

Hi,

From version 6.4.3 the new feature "function list" seems usable. ( http://notepad-plus-plus.org/features/function-list.html ). I want to list everything that is a procedure so I added in the file functionList.xml the following lines :

After the association map :
--------------------------

<association langID = "29" id="tcl_procedure"/>

And then, in the parser section, the lines :
--------------------------------------------

<parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
 <function
   mainExpr="^[\t ]*((proc)[\s]+)"
   displayMode="$className->$functionName">
   <functionName>
     <nameExpr expr="([\w]|:)+"/>
   </functionName>
   <className>
     <nameExpr expr="[\w_]+"/>
   </className>
  </function>
</parser>

But the display only gives :
--------------------------------

 -- (Filename)
 -----"proc" as a class
 ------- proc
 ------- proc
 ------- .... (there is a proc foreach procedure that has been found )

I cannot catch the name of the procedure.

Has anyone tried to use this feature ( with success ;-) ) ?

Thanks,

Olivier.
0
9/3/2013 12:38:53 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

7 Replies
2301 Views

Similar Articles

[PageSpeed] 1

Hi Olivier,

Indeed Npp looks promising with the function list.

You made the error of just grabbing only the (proc) part in the main expression.

This works for me:

<parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
	<function
	mainExpr="^[\t ]*((proc)[\s]+)[^\n]+\{"
	displayMode="$className->$functionName">
	<functionName>
	<nameExpr expr="[\w: ]+ \{.*\}"/>
	</functionName>
	<className>
	<nameExpr expr="[\w_]+"/>
	</className>
	</function>
</parser> 

It would be rather nice to extend this for Itcl and the Other OO-frameworks writing the mixed parser.

regards,
Detlef

Am Dienstag, 3. September 2013 14:38:53 UTC+2 schrieb oc_forums:
> Hi,
> 
> 
> 
> From version 6.4.3 the new feature "function list" seems usable. ( http://notepad-plus-plus.org/features/function-list.html ). I want to list everything that is a procedure so I added in the file functionList.xml the following lines :
> 
> 
> 
> After the association map :
> 
> --------------------------
> 
> 
> 
> <association langID = "29" id="tcl_procedure"/>
> 
> 
> 
> And then, in the parser section, the lines :
> 
> --------------------------------------------
> 
> 
> 
> <parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
> 
>  <function
> 
>    mainExpr="^[\t ]*((proc)[\s]+)"
> 
>    displayMode="$className->$functionName">
> 
>    <functionName>
> 
>      <nameExpr expr="([\w]|:)+"/>
> 
>    </functionName>
> 
>    <className>
> 
>      <nameExpr expr="[\w_]+"/>
> 
>    </className>
> 
>   </function>
> 
> </parser>
> 
> 
> 
> But the display only gives :
> 
> --------------------------------
> 
> 
> 
>  -- (Filename)
> 
>  -----"proc" as a class
> 
>  ------- proc
> 
>  ------- proc
> 
>  ------- .... (there is a proc foreach procedure that has been found )
> 
> 
> 
> I cannot catch the name of the procedure.
> 
> 
> 
> Has anyone tried to use this feature ( with success ;-) ) ?
> 
> 
> 
> Thanks,
> 
> 
> 
> Olivier.

0
dgroth (33)
9/13/2013 8:35:27 AM
Op dinsdag 3 september 2013 14:38:53 UTC+2 schreef oc_forums:
> Hi,
> 
> 
> 
> From version 6.4.3 the new feature "function list" seems usable. ( http://notepad-plus-plus.org/features/function-list.html ). I want to list everything that is a procedure so I added in the file functionList.xml the following lines :
> 
> 
> 
> After the association map :
> 
> --------------------------
> 
> 
> 
> <association langID = "29" id="tcl_procedure"/>
> 
> 
> 
> And then, in the parser section, the lines :
> 
> --------------------------------------------
> 
> 
> 
> <parser id="tcl_procedure" displayName="Tcl source" commentExpr="(#)">
> 
>  <function
> 
>    mainExpr="^[\t ]*((proc)[\s]+)"
> 
>    displayMode="$className->$functionName">
> 
>    <functionName>
> 
>      <nameExpr expr="([\w]|:)+"/>
> 
>    </functionName>
> 
>    <className>
> 
>      <nameExpr expr="[\w_]+"/>
> 
>    </className>
> 
>   </function>
> 
> </parser>
> 
> 
> 
> But the display only gives :
> 
> --------------------------------
> 
> 
> 
>  -- (Filename)
> 
>  -----"proc" as a class
> 
>  ------- proc
> 
>  ------- proc
> 
>  ------- .... (there is a proc foreach procedure that has been found )
> 
> 
> 
> I cannot catch the name of the procedure.
> 
> 
> 
> Has anyone tried to use this feature ( with success ;-) ) ?
> 
> 
> 
> Thanks,
> 
> 
> 
> Olivier.

0
emacs68 (1)
11/14/2013 4:46:07 PM
Hi Detlef ,

> 
> You made the error of just grabbing only the (proc) part in the main expression.
> 

Thank you for the hint and help, it works fine now ! Concerning object procedures, I am not used to it , and the number of writing possibilities would be puzzling to me.

Best regards,

Olivier
0
11/15/2013 9:46:09 AM
Hi Guys, 
I've created a functionList.xml which supports Tcl and Bash. You can download it from my site: http://99-developer-tools.com/notepad-function-list-tcl-bash/
Best Regards, Andreas
0
aw99 (3)
4/18/2014 11:28:03 AM
> 
> I've created a functionList.xml which supports Tcl and Bash. You can download it from my site: http://99-developer-tools.com/notepad-function-list-tcl-bash/
> 
> Best Regards, Andreas

Hi,

I've tried it : replacing only the Tcl part, or using your file available for download. It keeps crashing on 6.4.3 version of NotePad++ though it works well with Detlef version. What version of NotePad++ are you using ?

Olivier

0
oc_forums
4/18/2014 6:51:55 PM
Hi Olivier, 

Oh, shi**. I'm using 6.5.5. 
Andreas 
0
aw99 (3)
4/21/2014 11:41:42 PM
Hi Olivier, 
 I've rechecked this, you are right. My functionList.xml does not work with Npp 6.4.3. It does work at least with versions 6.4.5, 6.5 and 6.5.5, though.
Regards, Andreas
0
aw99 (3)
4/21/2014 11:43:20 PM
Reply:

Similar Artilces:

Function of list of functions
Hello! May be anybody can help me. So, I have this: L = {{1, 2, 3}, {1, 2, 3}, {1, 2, 3}}; Fun1[t_] := ListPlot[L[[1, t]]]; Fun2[t_] := ListPlot[L[[2, t]]]; Fun3[t_] := ListPlot[L[[3, t]]]; FunRes[t_] := {Fun1[t], Fun2[t], Fun3[t]}; Everything is ok, BUT if I want to add element to list of FunRes[t_] in loop, I have an error? so I mean this: FunRes[t_] := {}; For[i = 1, i <= 3, i++, {Subscript[Fun, i][t_] := ListPlot[L[[i, t]]], AppendTo[FunRes[t], Subscript[Fun, i][t]]}] Please, help me, where I am wrong? On 10/16/09 at 7:17 AM, oradev@rambler.ru (Andrey) wr...

List of lists of lists of lists...
I would like to have a list of lists N times deep, and my solution is (in pseudocode): def deep(x): a=[x] return a mylist=[] for N: mylist=deep(mylist) Is there a more elegant way to do it? The maine idea is: from a list having the numbre of steps along N dimensions, generate a list with an item at each possible point. Example 1: N=2 list=[2,3] result=[[1,2],[1,2],[1,2]] Example 2: N=3 list=[3,1,2] result=[[[1,2,3]],[[1,2,3]]] -- Ángel Gutiérrez Rodríguez - agr@fq.uniovi.es Instituto de Ciencia de los Materiales de Madrid - CSIC SpLine - European Syncrothorn Radiat...

list of lists of lists ....
Hi, I have a list of data (type A) my list can includes element of type A or a lists, these list can includes element of type A or a lists, and so on ... is there a simple way to obtain a single list of all the elemets of type A ? thanks yomgui I forgot the most important, I am looking for a non recursive method. thanks yomgui yomgui wrote: > > Hi, > > I have a list of data (type A) > my list can includes element of type A or a lists, > these list can includes element of type A or a lists, and so on ... > > is there a simple way to obtain a single list of all the elemets > of type A ? > > thanks > > yomgui recursion. def get_As(L): res = [] for elem in L: if isinstance(elem, A): res.append(elem) elif isinstance(elem, list): res += get_As(elem) return res i also have a Tree class in my rc: http://home.comcast.net/~faulkner612/programming/python/pythonrc.py yomgui wrote: > Hi, > > I have a list of data (type A) > my list can includes element of type A or a lists, > these list can includes element of type A or a lists, and so on ... > > is there a simple way to obtain a single list of all the elemets > of type A ? > > thanks > > yomgui doh. ok, so, recursion is just functional programming sugar for a loop. def get_As(L): checking = [elem for elem in L if isinstance(elem, list)] # the equivalent of elem in recursion all_As =...

tcl list to python list?
Hi, I have a file that contains a "tcl" list stored as a string. The list members are sql commands ex: { begin { select * from foo where baz='whatever'} {select * from gooble } end { insert into bar values('Tom', 25) } } I would like to parse the tcl list into a python list... Any suggestions ( I am running Tkinter...) Jerry jerry.levan@gmail.com wrote: > Hi, > > I have a file that contains a "tcl" list stored as a string. The list > members are > sql commands ex: > { begin { select * from foo > ...

Applying a function to a list of functions
I'm sure that what I want here is extremely simple to do and I'm just missing a CL function... I'd like to pass the same argument to a list of functions and apply those results (as a list) to another function -- at runtime. For example: ; Some functions (setf alpha #'alpha-char-p) (setf digit #'digit-char-p) ; A list of the above functions (setf functions (list alpha digit)) ; Test to see if 'c' is true for any item in the list (defun is-alpha-numeric (c) (apply #'or (mapcar #'(lambda (f c) (funcall f c))) functions c)) Hopefully this makes sense. Yes, I...

Sort a List, in a List of Lists of Lists
Dear Mathgroup, I have a lsit of Lists of Lists: {{{1,2},{2,1},{1,1}},{{1,1},{1,1},{1,2}},{{2,1},{2,2},{1,2}},{{2,2},{1,2},{2,2}},{{1,1},{2,1},{1,2}},{{1,2},{2,2},{2,2}}} I would like to sort the elements in the lowest level of brackets to give {{{1, 2}, {1, 2}, {1, 1}}, {{1, 1}, {1, 1}, {1, 2}}, {{1, 2}, {2, 2}, {1, 2}}, {{2, 2}, {1, 2}, {2, 2}}, {{1, 1}, {1, 2}, {1, 2}}, {{1, 2}, {2, 2}, {2, 2}}} i.e retaining the same structure with the paired elements in the original order. I can't seem to get the syntax right to do this apart from the obvious {{Sort[{1,...

Re: Applying a function to a list of functions
> I'm sure that what I want here is extremely simple to do and I'm just > missing a CL function... I'd like to pass the same argument to a list > of functions and apply those results (as a list) to another function -- > at runtime. For example: > > ; Some functions > (setf alpha #'alpha-char-p) > (setf digit #'digit-char-p) > > ; A list of the above functions > (setf functions (list alpha digit)) > > ; Test to see if 'c' is true for any item in the list > (defun is-alpha-numeric (c) > (apply #'or (map...

passing lists of lists (functional programming)
Hi! The following code closely follows http://en.wikibooks.org/wiki/Tcl_Programming/Examples proc iota n { set res {} for {set i 0} {$i<$n} {incr i} {lappend res $i} set res } # what follows is a nice trick but can it be made even more "functional?" [NOT the critical question--just a "fun" challenge]: proc t _matrix { upvar 1 $_matrix matrix set cols [iota [llength [lindex $matrix 0]]] foreach row $matrix { foreach element $row col $cols { lappend $col $element } } set res {} foreach col $cols {lappend res [set $col]} s...

Applying a list of functions to a list of arguments
I have a list of functions, and a list of arguments: For example, f = {f1, f2, f3} a = {a1,a2,a3} I would like to return {f1[a1],f2[a2],f3[a3]} I thought this should easy, but am stumped. Obviously the lists are of equal, but arbitrary length, and the arguments may or may not be atomic expressions. In my particular case, the arguments are likely to be combinations of Real, and List[Real,...], but I hope this is irrelevant. Any suggestions? Many thanks, Derek Yates Hi, Apply @@@ Thread[{f, {#} & /@ a}] ?? Regards Jens "D M Yates" &...

function to execute all functions listed in an array
I am trying to create a function that executes all the functions listed in an array. I cannot get it to work. <html> <body> <script language="JavaScript"> var length_of_array = 2; var function_array = new Array( "no1()", "no2()", length_of_array); function main_function(cat, cow) { for(var x = 0; x<cow; x++) { cat[x]; } } function no1() { alert("hello"); } function no2() { alert("good bye"); } </script> <input type="button" value="click" onClick="main_function(function_a...

Is there a function that applies list of functions to a value?
Hi, From time to time I have to apply a series of functions to a value in such a way: func4(func3(func2(func1(myval)))) I was wondering if there is a function in standard library that would take a list of functions and a initial value and do the above like this: func_im_looking_for([func1, func2, func3, func4], myval) I looked in itertools but nothing seamed to do the job. This seams like something vary obvious that was needed many times elsewhere so maybe you could help me? Am 2013-08-28 14:52 schrieb AdamKal: > Hi, > > From time to time I have to apply a series of functions to a value in such a way: > > func4(func3(func2(func1(myval)))) > > I was wondering if there is a function in standard library that would take a list of functions and a initial value and do the above like this: > > func_im_looking_for([func1, func2, func3, func4], myval) > > I looked in itertools but nothing seamed to do the job. This seams like something vary obvious that was needed many times elsewhere so maybe you could help me? reduce(lambda x, f: f(x), funcs, myval) would do the job. Thomas AdamKal writes: > Hi, > > From time to time I have to apply a series of functions to a value > in such a way: > > func4(func3(func2(func1(myval)))) > > I was wondering if there is a function in standard library that > would take a list of functions and a initial value and do the above > like...

fun with functions (some proposed functions acting on lists)
Here are some proposed functions for acting on lists (arrays). Proposed implementations are in Ptolemy CVS. A 'filter' higher-order function extracts subarrays consisting of all elements in an array for which some function returns true: >> even = function(x:int)(x%2==0) (function(x:int) ((x%2)==0)) >> filter(even, [1:1:25].toArray) {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24} Define an array to use in our examples: >> colors = {"red","orange","yellow","green","blue","indigo","violet&q...

Putting Own Matlab function into inbuilt function list
I want to now how to put my own matlab function in to inbuilt function list. I know how to put a function in a .m file. What I want is to put that .m file into the standard function list in matlab so that I would be able to call that just like any other function in matlab like plot, fft , interp1 and etc. "Udaranga " <udaranga@gmail.com> wrote in message news:igpofg$q9$1@fred.mathworks.com... > I want to now how to put my own matlab function in to inbuilt function > list. > I know how to put a function in a .m file. What I want is to put that .m > f...

exporting a list of functions for use in a C function
I've composed a large list of functions in Mathematica that I'd like to have a c function evaluate. To my knowledge c and C++ reject the convention x^2 and prefer either x*x or pow(x,2). The functions are integer powers of a single variable. I'm using the command, Export["function_list.txt", Table[gflist[p], {p, 2, 5}], "CSV"] where "gflist[n]" generates the said set of functions for the case "n". The output file then looks like: [winesap:~] nmoore% cat function_list.txt 1/(8*d*l^3*Pi) 1/(8*l^3*Pi),-(-3 + d)/(16*d*l^3*...

Creation of a list of functions, multiplying functions and integrating them
Hi, I am trying to write a system of n nonlinear equations in Matlab. These functions are basically written as the integral of a product of exponentials. I tried doing this with a for-loop and integrating the whole thing thanks to 'trapz' but the 'fsolve' doesn't find the solutions, and I checked the values given by 'trapz' : they are not sufficiently precise. I want to use 'quad' or other methods to integrate, but the input argument has to be a function, so how can I create a list (or a matrix) of functions, for example function handles or splines...

Re: Sort a List, in a List of Lists of Lists
On 11/13/10 at 12:59 AM, leigh.pascoe@inserm.fr wrote: >I have a lsit of Lists of Lists: >{{{1,2},{2,1},{1,1}},{{1,1},{1,1},{1,2}},{{2,1},{2,2},{1,2}},{{2,2}, >{1,2},{2,2}},{{1,1},{2,1},{1,2}},{{1,2},{2, 2},{2,2}}} >I would like to sort the elements in the lowest level of brackets to >give >{{{1, 2}, {1, 2}, {1, 1}}, {{1, 1}, {1, 1}, {1, 2}}, {{1, 2}, {2, >2}, {1, 2}}, {{2, 2}, {1, 2}, {2, 2}}, {{1, 1}, {1, 2}, {1, 2}}, >{{1, 2}, {2, 2}, {2, 2}}} >i.e retaining the same structure with the paired elements in the >original order. I can't seem...

Plot[] will not plot functions when one of the functions in list
Hey, please confirm if anybody else has this different behaviour: 1.this plots all functions in version 8: Plot[{1, Null}, {y, 0, 1}] 2.the same code won't plots any functions in version 9: Plot[{1, Null}, {y, 0, 1}] Best Peter On 12/19/2012 3:55 AM, Peter =C4=8Cendula wrote: > Hey, please confirm if anybody else has this different behaviour: > > 1.this plots all functions in version 8: > Plot[{1, Null}, {y, 0, 1}] > > 2.the same code won't plots any functions in version 9: > Plot[{1, Null}, {y, 0, 1}] > > Best >...

How to use Thread when second argument to function is a list of lists?
Hello; I have a function which I want to call repeatedly for all rows of a matrix to find non-zero elements in each row. This function takes as input the row number and the matrix itself and returns a list that contain the non-zero elements in the that row. i.e. function is f[ list , matrix]:=Module[{},.....] I want to use Thread to call this function 'f' over all the rows of the matrix. Something like Thread[ f[{1,2,3}, matrix] ] But it is not working. I guess becuase matrix is a list of lists and it is of different dimension than the list of the row numbers...

Re: Applying a list of functions to a list of arguments #5
Murray, MapThread[#[a] &, {{f1, f2, f3}}] or {f1, f2, f3}[a] % // Through David Park djmp@earthlink.net http://home.earthlink.net/~djmp/ From: Murray Eisenberg [mailto:murray@math.umass.edu] This problem also reminds me of a simpler one: Given f = {f1, f2, f3}; a = (* some number *) what are nice ways of producing the following result? {f1[a], f2[a], f3[a]} -- Murray Eisenberg murray@math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachuset...

Re: exporting a list of functions for use in a C function
Hi, As recommended by others, you should use CForm. I've appended to this message a function that I use to make minor alterations in the output of CForm, such as Power -> pow, to yield a more standard form in C++. I hope it helps. Tom Burton On 11/5/03 6:17 AM, in article bob7qo$qu1$1@smc.vnet.net, "Nathan Moore" <nmoore@physics.umn.edu> wrote: > I've composed a large list of functions in Mathematica that I'd like to > have a c function evaluate. To my knowledge c and C++ reject the > convention x^2 and prefer either x*x or pow(x,2). ...

Tcl Newbie: Call tk_* functions from Tcl application
Hi, First, I am completely new to Tcl/Tk. I am learning Tcl in order to customize another application (Laker) on Solaris 2.8. Tcl is embedded in this application, which has many extensions to access the application database, but no support for Tk. Instead, it provides its own set of Tcl GUI functions. I would really like more flexibility than what the app provides, plus I would like to use some of the pre-built Tk dialogs for selecting files, for instance. I don't see why I should re-invent the wheel. I have downloaded and installed ActiveTcl and have been able to run the Tk functions I need from within Wish. So, my question is this: Is there some way to compile the ActiveTcl functions and call them from Laker's Tcl interface? Eg. 1) tk_chooseDirectory is compiled into a Tcl app called say 'getdir'. 2) Laker's interface calls app 'getdir' with exec and gets directory returned. I hope this makes sense! Thanks for any help you can offer. Andrew Wilford Hi, Thanks for your response. The version is 8.3.2 and the response from 'package require Tk' is 'can't find package Tk'. The app's R&D tech says they don't support Tk yet. I thought it was a part of Tcl, but I guess not. Can you elaborate when you say I can use wish? Will that allow me to return a string to a calling Tcl script from within the Laker application? Regards, Andrew Wilford According to Andrew Wilford <awilford@adelphi...

How can function A call function B with the same argument list?
I have function A, which need to call function B with the exact same argument list. What is the correct way to do this? I had function A: function A { B(arguments); } but it does not work. I had function A: function A { // code to copy the argument list to another array arr B(arr); } but that does not work neither. In both cases, it tell me that function B is expecting different number of arguments. What I am doing wrong? On Feb 13, 12:08 pm, "Khai Doan" <khaibri...@gmail.com> wrote: > I have function A, which need to call function B with the exact same &...

Fyi, Listing of Mathematica 7 functions (1869 functions)
I've update my Mathematica history table with a new listing of Mathematica 7 functions (not just the symbols). These are anything in Mathematica System context which has the form name[...] I want to thank John Fultz for his hint in another posting in this newsgroup to use the Usage message from ? and look for anything that starts with this pattern. I obtain 1869 functions. Since what I find is somewhat less what it is supposed to be (close to 2,500) according to WRI blog here http://blog.wolfram.com/2008/11/18/surprise-mathematica-70-released-today/ I could only sug...

Re: Re: Applying a list of functions to a list of arguments
Hi Jens, f = {f1, f2, f3}; a = {a1, a2, a3}; Apply @@@ Thread[{f, {#} & /@ a}] I guess that is supposed to be humorous, but I hope it is never the first example in a Functional Programming class! It depends a lot on bracket construction and even when I try to deconstruct it, it certainly doesn't appear as an obvious path to the solution. {#} & /@ a Thread[{f, %}] Apply @@@ % But, darn if it doesn't work! David Park djmp@earthlink.net http://home.earthlink.net/~djmp/ From: Jens-Peer Kuska [mailto:kuska@informatik.uni-leipzig.de] Hi, Apply @@@...

Web resources about - Notepad++ functions list - comp.lang.tcl

NotePad++ And Pale Moon Leave SourceForge Over Adware Practices
SourceForge’s reputation has been on the decline since it became apparent it was wrapping installers hosted on the site with rather unwelcome ...

Get around long documents with Notepad++
Popular, open-source text editor Notepad++ 6.0.0 is now available . This landmark release doesn’t contain many notably new, but is merely the ...

全功能开源编辑器Notepad++ 6.6.9下载 - Notepad++,开源编辑器 - IT之家
9月8日消息,热门开源编辑器Notepad++小幅更新至Notepad++ 6.6.9正式版,带来会话快照、定期备份功能,再也不用担心代码丢失问题,同时也提升稳定性修复和性能改进,推荐普通用户下载使用

Behind the App: The Story of Notepad++
... and people simply looking for a quick way to jot down notes. But there are much better options than notepad.exe ; one of our favorites is Notepad++ ...

NotePad++ offers portable notepad features for programmers
Notepad++ is a portable notepad that users like computer programmers will find enormously useful, because it offers something the regular Notepad ...

Notepad++ Site Hacked in Response to “Je suis Charlie” Edition
The official website of the popular source code editor Notepad++ was hacked and defaced on Monday by hacktivists protesting against the recently ...

Download of the day: Notepad++
The default text editor in Windows, Notepad, is great for simple tasks, but for anything else you'll want to get your hands on the free Notepad++ ...

Notepad++ Portable review
View and edit text files on PC

The NO Visual Studio movement: Compiling .net projects in Notepad++
... the NoVS movement, my favourite machine is a mini-laptop I use on the bus. It's a true 'No Visual Studio' machine where the only IDE is Notepad++ ...

左岸读书_blog - my_teaching
... For)。其中既有Windows和Mac下的免费软件,也有基于Web的网络应用,包括 Firefox , VLC , CCleaner , Dropbox , 7-Zip , OpenOffice.org , Google Chrome , μTorrent , Notepad++ ...

Resources last updated: 3/7/2016 9:42:06 PM