leoliu pushed a commit to branch master in repository elpa. commit 3d7f273ca1f01b3b252a3ed2e19f3500990c28f0 Author: Leo Liu <sdl....@gmail.com> Date: Sun Feb 23 12:24:56 2014 +0800
Teach ggtags-create-tags to retry if mkid is missing --- ggtags.el | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ggtags.el b/ggtags.el index df4cf00..1383817 100644 --- a/ggtags.el +++ b/ggtags.el @@ -444,8 +444,15 @@ properly update `ggtags-mode-map'." (setenv "GTAGSLABEL" "ctags")) (with-temp-message "`gtags' in progress..." (let ((default-directory (file-name-as-directory root))) - (apply #'ggtags-process-string - "gtags" (and ggtags-use-idutils '("--idutils")))))) + (condition-case err + (apply #'ggtags-process-string + "gtags" (and ggtags-use-idutils '("--idutils"))) + (error (if (and ggtags-use-idutils + (stringp (cadr err)) + (string-match-p "mkid not found" (cadr err))) + ;; Retry without mkid + (ggtags-process-string "gtags") + (signal (car err) (cdr err)))))))) (message "GTAGS generated in `%s'" root) root))