vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] Odd vileserv error


From: Brendan O'Dea
Subject: Re: [vile] Odd vileserv error
Date: Sat, 18 Apr 2015 07:47:43 +1000

On 18 April 2015 at 01:41, Chris Green <address@hidden> wrote:
> On Sat, Apr 11, 2015 at 08:48:51PM +1000, Brendan O'Dea wrote:
>> You may have a vileinit.pl floating about the place which is requiring
>> Vileserv, because what you have there won't work as-is.

Oh, [following up to myself] I completely forgot that register
configured auto-loading of the last argument...  and I *wrote* that
feature.

I still think that there is something missing though, since register
needs to be loaded somehow...

>> So either locate where it is being installed, or you can manually
>> register the hook in your .vilerc in the same way that you are doing
>> with "startserv" and "stopserv".
>>
> Could you expand on that a bit please, I assume I need to to something
> similar to this bit of the above:-
>
>          perl "Vile::register 'startserv', 'Vileserv::start', \
>             'Start Edit Server', 'Vileserv.pm'"
>
>
> So:-
>
>          perl "Vile::register 'vileserv-writehook', '<but what do I put 
> here?>', \
>             'Vileserve writehook function', 'Vileserv.pm'"
>
> ... but as it says, what replaces Vileserv::start?

"Vileserv::writehook", although I'd be more inclined to just remove
much of what you have there and just let the module do it.  You should
be able to replace the configuration you included in an earlier
message with the following:

~if &seq $progname "xvile"
    perl "Vile::register 'dir', 'dir', 'Dir Browser', 'dir.pl'"

    ; Add vile edit server
    ~if &not &rd "$HOME/.vilesock"
        perl "use Vileserv" ; starts automatically, stops on exit
    ~endif
~endif

Which should be much the same as what you had before, although it
should only run the server if there is not another running (cribbed
from /usr/share/vile/vileperl.rc).

You may also want to replace the "dir.pl" line with:

  ; Add directory browser
  perl "use directory"

--bod



reply via email to

[Prev in Thread] Current Thread [Next in Thread]