Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-15 Thread Richard M. Stallman
Yes, indeed Unix v5 (fifth edition from 1974, that is _not_ SysV!), does allow root to make hard links on directories. But the seventh edition from 1978 already prohibits it. (sorry, at the moment I don't have a v6 at hand to test it there... ;-)) Thanks for looking this up. _

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-14 Thread Sascha Wilde
On Mon, Aug 08, 2005 at 08:27:40PM -0400, Richard M. Stallman wrote: > I'm not an expert on this, but I think it's impossible to create such > alternate names, since GNU Find uses this fact to detect directories > with no subdirectories. > > Linux seems to refuse to do this even if you

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-09 Thread Stefan Monnier
> There's no need to run any program just to know if a directory is > empty. Emacs has primitives which will tell that directly (e.g., > file-attributes) and do that faster. If directory-files blocks (on a failed NFS server), file-attributes is pretty likely to block just as well, in which case `

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-09 Thread Stefan Monnier
> Timer code normally turns off C-g so that you won't interrupt it > by accident. (After all, you can't predict when the timer code > will be running.) If ECB is going to do something potentially > slow from a timer, it should probably bind inhibit-quit to nil > around that code, after displaying

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-08 Thread Richard M. Stallman
A combination of file-attributes (looking at the number of links) and directory-files should do that, I think. But...it is using directory-files now, and that is what causes the problem. The question is how to avoid using using directory-files. I'm not an expert on this, but I think

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-08 Thread Johan Vromans
Johan Vromans <[EMAIL PROTECTED]> writes: > GNU Find also has a command line option to defeat this heuristic, > probably with reason. Sorry, I have to correct this. I got the information from the manual page for 'find' under the assumption that a GNU/Linux system would have GNU find. However, it

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-08 Thread Johan Vromans
Eli Zaretskii <[EMAIL PROTECTED]> writes: > I'm not an expert on this, but I think it's impossible to create such > alternate names, since GNU Find uses this fact to detect directories > with no subdirectories. GNU Find also has a command line option to defeat this heuristic, probably with reason

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-07 Thread Eli Zaretskii
> From: "Richard M. Stallman" <[EMAIL PROTECTED]> > CC: [EMAIL PROTECTED], emacs-devel@gnu.org > Date: Sun, 07 Aug 2005 13:15:29 -0400 > > There's no need to run any program just to know if a directory is > empty. Emacs has primitives which will tell that directly (e.g., > file-attrib

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-07 Thread Richard M. Stallman
There's no need to run any program just to know if a directory is empty. Emacs has primitives which will tell that directly (e.g., file-attributes) and do that faster. How do you determine that from file-attributes? It is not obvious. You might try to do it from the number of hard li

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-05 Thread Eli Zaretskii
> From: "Richard M. Stallman" <[EMAIL PROTECTED]> > Date: Fri, 05 Aug 2005 16:38:14 -0400 > Cc: emacs-devel@gnu.org > > Alternatively, it could use start-process to run ls asychronously > as a way to find out whether the directory is empty. There's no need to run any program just to know if a dir

Re: Can't interrupt directory_files_internal run from timer-event-handler

2005-08-05 Thread Richard M. Stallman
Timer code normally turns off C-g so that you won't interrupt it by accident. (After all, you can't predict when the timer code will be running.) If ECB is going to do something potentially slow from a timer, it should probably bind inhibit-quit to nil around that code, after displaying a message