The template-unique-file function goes into an infinite loop whenever
auto-numbering is enabled and the file-directory has more directories
inside. Here is the offending code:
(while list
(unless (:EMACS file-directory-p (car list))
(setq auto-num
(max (template-filename-number
(cddr (template-split-filename (car list) dir))
raw ext)
auto-num)
list (cdr list))))
Notice the list is only updated then the car is not a directory. The fix is
to move that setq outside the unless statement as follows:
(while list
(unless (:EMACS file-directory-p (car list))
(setq auto-num
(max (template-filename-number
(cddr (template-split-filename (car list) dir))
raw ext)
auto-num)))
(setq list (cdr list)))
Nobody/Anonymous
None
None
Public
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use