jed-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Fixes to "recent" and "tree" modes


On Sat, Jan 31, 2004 at 12:26:31PM +0100, Paul Boekholt wrote:
> Unfortunately tree.sl is no longer maintained by Fransesc, and Günter
> and I use filelist.sl (tree.sl is nice, but slow).

Tree.sl mentions an unpublished version of an external tree program -
this must be Steve Baker's tree, at least Fransesc is mentioned in the
manpage as having added HTML output.

Apparently it's still unpublished, tree.sl passes some arguments that
my tree doesn't have. So here's the patch to get tree working with a
published version of tree. To use with the tree program, make a
treerc.sl in your library path with the line:

Tree->USE_TREE = 1;

My tree version:

tree v1.3 (c) 1996 - 1999 by Steve Baker, Thomas Moore

--- tree.sl.orig	Sun Jan 14 09:49:37 2001
+++ tree.sl	Sun Feb  1 12:45:36 2004
@@ -117,7 +117,7 @@
    CASE_SENSITIVE  = 1,
    DEPTH           = 3,
    DEPTH_LIMIT     = 1,
-   DFA_SYNTAX      = 0,
+   DFA_SYNTAX      = 1,
    GROUP_FILES     = 0,
    INDENT          = 3,
    INSTALL_MENU    = 1,
@@ -126,10 +126,14 @@
    PATTERN_FOLD    = "",  % fold nodes matching this pattern
    PATTERN_MATCH   = "",  % show files matching this wild-card
    SHOW_FILES      = 1,
-   SHOW_HIDDEN     = 0;
+   SHOW_HIDDEN     = 0,
+   USE_TREE        = 0;   % use external 'tree'
+
+$1 = expand_jedlib_file("treerc.sl");
+if ($1 != "")
+  () = evalfile ($1);
 
 private variable
-   USE_TREE          = 0,   % use external 'tree' (USELESS, DON'T CHANGE)
    tree_cwd          = "",  % current working directory (root)
    tree_indent       = "",  % indentation string
    tree_depth,              % depth of the current tree
@@ -349,12 +353,12 @@
 {
    $0 = "tree";
    create_syntax_table ($0);
-   define_highlight_rule(" [^\\|`]* \\-\\> .*$", "Qcomment", $0);
-   define_highlight_rule(" [^\\|`]* \\~\\> .*$", "Qerror", $0);
-   define_highlight_rule(" [^\\|`]*/$", "Qkeyword", $0);
-   define_highlight_rule(" [^\\|`]*\\*$", "Qkeyword1", $0);
-   define_highlight_rule("^[^ ].*$", "Qstring", $0);
-   build_highlight_table ($0);
+   dfa_define_highlight_rule(" [^\\|`]* \\-\\> .*$", "Qcomment", $0);
+   dfa_define_highlight_rule(" [^\\|`]* \\~\\> .*$", "Qerror", $0);
+   dfa_define_highlight_rule(" [^\\|`]*/$", "Qkeyword", $0);
+   dfa_define_highlight_rule(" [^\\|`]*\\*$", "Qkeyword1", $0);
+   dfa_define_highlight_rule("^[^ ].*$", "Qstring", $0);
+   dfa_build_highlight_table ($0);
    use_syntax_table ("tree");
 }
 #endif
@@ -2111,14 +2115,16 @@
    % WARNING: THIS IS VERY EXPERIMENTAL AND ONLY WORKS WITH AN UNRELEASED
    % VERSION OF TREE FOR LINUX.
    %
+   % my tree program does not do padding and does not have a 'j' option
+   PADDING=0;
    variable cmd = "tree ";
-   variable cmd_switches = "-jFn ";
+   variable cmd_switches = "-Fn ";
    variable total = "";
    variable tree_depth_switch = "";
 
    % Some parameters for tree
-   if (INDENT)
-      cmd_switches += "-V \"" + tree_indent + "\" ";
+%   if (INDENT)
+ %     cmd_switches += "-V \"" + tree_indent + "\" ";
    !if (SHOW_FILES)
       cmd_switches += "-d ";
    if (SHOW_HIDDEN)

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]