- Subject: Re: [jed] minor patch for filelist.sl
- From: "G. Milde" <milde@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 Apr 2007 12:29:35 +0200
On 30.04.07, Lechee.Lai@xxxxxxxxxxxx wrote:
> There is minor patch for filelist.sl easy bind filelist_list_dir for
> file and directory
Thanks for your patch.
I am a uncertain whether it is wise to apply it to filelist.sl, though.
* filelist_open_directory() explicitely says the function asks on
directories.
* IMO, the problem of binding a key for opening a file or directory can
be solved better with the filelist_find_file_hook(), as proposed in the
INITIALIZATION block in filelist.sl. This hook let's all standard
file-opening functions call filelist_list_dir if the path is a
directory. Also, you can give a directory at the command line like
`jed ~` and it will open in filelist-mode.
* You can easily write a wrapper like e.g.
% open file or directory in a new buffer
public define open_path(path)
{
if (file_status(path) == 2) % directory
filelist_list_dir(path);
else
() = find_file(path);
}
(untested!). If there is common request for this, I could add such a
wrapper to filelist.sl.
Günter
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]