[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] Vile saves twice
From: |
Thomas Dickey |
Subject: |
Re: [vile] Vile saves twice |
Date: |
Mon, 09 Mar 2009 15:54:01 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Mar 04, 2009 at 05:41:40PM +0100, Paul van Tilburg wrote:
> Hi,
(I was out of town last week, til this morning)
> I am using a LaTeX authoring system that employes inotify to compile
> the document when the right files change. This works all find and all,
> except that it seems that if I do ":w", or ":file-save", Vile seems
> to save twice (I get two MODIFY events) while this is not the case with
> other editors. Is there are reason for it, is it a bug, or a feature?
I just tried inotify, see this from one ":w" command:
foo MODIFY
foo OPEN
foo MODIFY
foo CLOSE_WRITE,CLOSE
vile's doing a stat() call before it opens the file.
I suspect that's where the extra MODIFY comes from (comparing with
the output from strace). It does that stat() call for the check-modtime
mode. (It may do more than one stat call, actually, to support other
options; it caches the last information to reuse in cases where that's
likely to be useful).
> Or is this related to my autosave setting?
I assume that could also - but autosave is not on by default.
(I seem to recall noticing the quirk of stat - which shouldn't modify
anything - a while back also on Solaris).
> Another small macro question: I have created a macro that calls
> find-next-error. If the error buffer contains no errors, ^X-^X will
> nicely show this on the prompt. However, when I use the keybinding
> attached to my own macro, I am moved to a buffer containing the macro
> code and the cursors positioned at the start of the find-next-error
> command _and_ the error on the prompt. How do I prevent this move or
> trap the error and just print something on the prompt?
something like this:
store-procedure oops
~force find-next-error
~if ¬ $status
write-message "No more errors..."
~endif
~endm
bind-key oops ^X-^X
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature