This patch adds a couple of new built-in subroutines to
the macro language of NEdit, which allow to manage tabbed
groups of documents. The patch also adds a "unique
document identifier" property to a document (to get rid of
addressing a document using path + filename). This
"document ID" allows to identify a document, even if the
file name of a document changes (e.g. after "Save as ..")
or if a document was opened by using a relative path (e.g.
../foo.c"). This unique document ID is assigned, when a
document is created.
Following built-in macro subroutines are added (for
details please refer to FEATURE.txt, which is part of the
Returns document ID(s) of current focused document,
all documents, current group of documents, all raised
documents or raised document of current focused tabbed
Get document info related to given document ID.
Returns "file_path", "file_name", "raised" info about
document specified by "documentId" within an array.
c.) open_document( [option1, option2, option3, ... ] )
Open an existing or new document & return document ID.
Options control, if the document is to be opened
within an own window or within a tabbed group (before
or after a dedicated document).
Relative path names are allowed. Related document can
be identified by returned document ID.
d.) order_documents( option1 [, option2, option3, ... ] )
Arrange document(s) according to given sequence of
document "foo1" has doc.ID "1",
document "foo2" has doc.ID "2",
document "foo3" has doc.ID "3",
"foo1", "foo2" & "foo3" are open in own window each
- "order_documents(1, 2, 3)" -> all documents are
grouped within one window with tab order = "foo1",
- "order_documents("after=3", 2, 1)" -> order document
"foo2" & "foo1" after document "foo3"; resulting
order = "foo3", "foo2", "foo1".
- "order_documents("before=3", 2, 1)" -> order
documents "foo2" & "foo1" before document "foo3";
resulting order = "foo2", "foo1", "foo3".
Inside the tar ball there is also a macro collection
available, which demonstrates the usage of the new
built-in macro subroutines: sort documents according to
its filename in ascending or descending alphabetical
order; group documents by language mode or restrict number
of documents per tabbed group by split into separate
The patch contains parts of "move tab by drag and drop"
patch "920929" (by courtesty of Tk Soh).
The patch was made against latest CVS Head snapshot
of NEdit (available at
I've tested the patch within following environment:
Built on: Solaris, Sparc, GNU C
With Motif: 1.2.6 [@(#)OSF/Motif Version 1.2.6]
Running Motif: 1.2 [@(#)OSF/Motif Version 1.2.6]
Server: Sun Microsystems, Inc. 6410
Built on: Linux, 386, GNU C (Red Hat 9)
With Motif: 2.1.30 [@(#)Motif Version 2.1.30]
Running Motif: 2.1 [unknown]
Server: The XFree86 Project, Inc 40300000
Log in to post a comment.