should be more robust about unexpected files
Emacs tends to litter the directory with lockfiles if you don't turn it off (which is not recommended anyway, as you could end up editing the same file in different buffers.)
unfortunately this conflicts with arion: when i start arion with one of these files, I get this:
arion: app/.#SmokeMain.hs: canonicalizePath: does not exist (No such file or directory)
orb ➜ ~/projects/meanpath/smokesignal git:(master) ✗ ls -alrt app/.\#SmokeMain.hs
lrwxrwxrwx 1 mark mark 24 Apr 12 12:14 app/.#SmokeMain.hs -> [email protected]:1427791825
Instead of bombing out on these files, could we just ignore them (or issue a complaint but continue)?
I'll look at this. I am a vi user so I don't know much about lockfiles that emacs creates. Is there a pattern to those file names? May be once we find all the haskell files using filemanip's find function we can filter out the lockfiles before computing the canonicalized paths.
I think it might be more robust to just catch the exception on opening, have a bit of a whinge on stdout and continue.
On Mon, 13 Apr 2015 12:17 am Karun [email protected] wrote:
I'll look at this. I am a vi user so I don't know much about lockfiles that emacs creates. Is there a pattern to those file names? May be once we find all the haskell files using filemanip's find function we can filter out the lockfiles before computing the canonicalized paths.
— Reply to this email directly or view it on GitHub https://github.com/karun012/arion/issues/30#issuecomment-92088993.
Currently experiencing the same problem. Lock files seem to start with ".#". I tried the following but still had the same issues... Although the pattern seems to fit.
findHaskellFiles :: String -> IO [String]
findHaskellFiles = find always ((extension ==? ".hs" ||? extension ==? ".lhs") &&? predEmacsFiles)
predEmacsFiles :: FilterPredicate
predEmacsFiles = fileName /~? ".#?"
@marcelbuesing @mwotton May be this will fix it 2a2b88ce896cd9d6e648650eac9b61005389167f
@karun012 awesome, that seems to solve the problem!
hm. still getting this:
/home/mark/projects/meanpath/Perspective/src/Net/Perspective/.#Meanpath.hs changed /home/mark/projects/meanpath/Perspective/src/Net/Perspective/.#Meanpath.hs does not have any associated tests...
I'll take a look.
@mwotton ff8dacb2245427ff75ad58ac2ef17f8b5f08b67f - The event processor ignores emacs lock files now.
If this is good, can we close the issue?
Yes
On Wed, 24 Jun 2015 4:36 pm Karun [email protected] wrote:
If this is good, can we close the issue?
— Reply to this email directly or view it on GitHub https://github.com/karun012/arion/issues/30#issuecomment-115003688.