[Top][All Lists]

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

Re: [vile] Using filter-til to replace format-til

From: Jānis Rūcis
Subject: Re: [vile] Using filter-til to replace format-til
Date: Tue, 12 Aug 2008 21:31:23 +0300
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Aug 12, 2008 at 05:55:30AM -0400, Thomas Dickey wrote:
> I spent some time with valgrind, but wasn't able to see anything breaking.
> That may be the settings I was using (just the macro, no .vilerc).
> It might help to have a copy of your .vilerc

Hmm, I can't seem reproduce it anymore, neither with a fresh install
nor using my usual settings.  I'm trying to find a way to reproduce
the crash reliably; I will let you know when I've got something. 
Thanks for looking into this.

Meanwhile, trying to make Vile crash, I encountered another problem. 
Here's a trace to illustrate it:

    test:2 (0/0):write-message &gtmotion 'default'
    ** evaluate 'gtmotion' (0x441), 1 string args returning string
    ...arg[0] = 'default'
    running autocolor-hook HOOK with HighlightFilter, current test
    [HighlightFilter]:1 (0/0):~if &not $highlight
    ** evaluate 'not' (0x221), 1 boolean args returning boolean
    ...arg[0] = 'TRUE'
    -> FALSE
    [HighlightFilter]:2 (1/1):~return
    [HighlightFilter]:3 (1/1):~elseif &seq $majormode ''
    ** evaluate 'sequal' (0x242), 2 string args returning boolean
    ...arg[0] = ''
    ...arg[1] = ''
    -> TRUE
    [HighlightFilter]:4 (1/0):~return
    -> 'TRUEnext-line'
    test:3 (0/0):~trace off

Apparently $autocolor-hook is invoked during &gtmotion, and it ends up
trashing the return value of the function.  I obtained the trace by
editing a new buffer called "test", typing in these lines

    ~trace on
    write-message &gtmotion 'default'
    ~trace off

immediately, before the autocolor hook has had a chance to run,
executing the buffer with ":execute-buffer test", and then letting the
hook run before hitting j to make &gtmotion return.

There's probably an easier way to make this happen, but this should be
fairly reliable provided the autocolor mode is set to some relatively
large value.  (I have it set to 500 and I can successfully reproduce
this every time following the steps I described.)

reply via email to

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