Erik Hetzner <e...@e6h.org> writes: >> Seems fine, but I wonder if it wouldn’t be better to check the exit code >> of say an annex command and relies on its checking. E.g. on my system >> >> (zerop (shell-command "cd ~/annex/doc.annex/ && git annex info --fast" >> nil)) => t >> (zerop (shell-command "cd ~/src/code/org-mode && git annex info --fast" >> nil )) => nil > > This would be great, but it returns t for my non-annex git repos. I’m not sure > why the behavior is different for you.
No idea. I have 6.20160114 and some recent version of Emacs-git (when xwidgets was just merged)... Weird. >> AFAIK annex will check if get should get anything. If that’s correct, I’d >> prefer to just rely on however git annex get checks files. > > That makes sense. I’ll change that code. The only disadvantage here is that it > is no longer clear to me how to tell if the content was fetched, if we want to > notify the user. I guess you could check the return code? And maybe output... You could just start by stating (message "getting $FILE..."); get it; (message "got $FILE"). It will instantaneous when the file is available. > This code is unchanged from org-attach.el. > http://git-annex.branchable.com/direct_mode/#index5h2 says: “you cannot git > commit or git pull” in direct mode - so I’m curious if direct mode would work > at > all with org-attach? Don’t know. I use org-attach. My dir is in a direct repo. It never complained. Maybe there’s something I haven’t configured. Maybe it’s cause I use the assistant. Don’t know... > I’m happy to make that change, but I feel it should be a separate patch. Indeed. Thanks for working on this. Rasmus -- Got mashed potatoes. Ain't got no T-Bone. No T-Bone