{"thread":{"id":"7057","subject":"[PATCH 5/7] Try to do things in the right order","startedAt":"2007-03-03T10:19:52Z","lastAt":"2007-03-05T07:27:57Z","messageCount":3,"participants":["Xavier Maillard","Alexandre Julliard"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"36163","messageId":"15303.1172917192@localhost","threadId":"7057","inReplyTo":null,"subject":"[PATCH 5/7] Try to do things in the right order","fromName":"Xavier Maillard","fromEmail":"zedek@gnu.org","sentAt":"2007-03-03T10:19:52Z","receivedAt":"2007-03-03T10:19:52Z","isPatch":true,"sender":{"key":"zedek@gnu.org","avatar":null},"body":"\n* emacs/vc-git.el: Added an ugly hack to properly reload vc-git. Only\n  add GIT to vc-backends list after loading vc. Do not walk .git\n  directory (add it to the exclusion-list).\n\n  Changed installation instructions as discussed on Git mailing list\n\nSigned-off-by: Xavier Maillard <zedek@gnu.org>\n---\n contrib/emacs/vc-git.el |   17 ++++++++++++++---\n 1 files changed, 14 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/emacs/vc-git.el b/contrib/emacs/vc-git.el\nindex 748cb60..3f37e6d 100644\n--- a/contrib/emacs/vc-git.el\n+++ b/contrib/emacs/vc-git.el\n@@ -22,7 +22,8 @@\n ;; This file contains a VC backend for the git version control\n ;; system.\n ;;\n-;; To install: put this file on the load-path.\n+;; To install: put this file on the load-path then add this line into\n+;;   your .emacs: (require 'vc-git)\n ;;\n ;; TODO\n ;;  - changelog generation\n@@ -35,8 +36,14 @@\n   (require 'vc)\n   (require 'cl))\n \n-;; Add it automatically\n-(add-to-list 'vc-handled-backends 'GIT)\n+;; HACK: clear up the cache to force vc-call to check again and\n+;; discover new functions when we reload this file.\n+(put 'GIT 'vc-functions nil)\n+\n+;; Add it automatically when loading vc\n+;; FIXME: should be directly put into vc.el\n+(eval-after-load \"vc\"\n+  '(add-to-list 'vc-handled-backends 'GIT))\n \n (defgroup vc-git nil\n   \"*This is GIT backend for vc.\"\n@@ -188,4 +195,8 @@ COMMENT is the new comment.\"\n ;;;###autoload\n (add-to-list 'completion-ignored-extensions \".git/\")\n \n+(eval-after-load \"vc\" \n+    '(add-to-list 'vc-directory-exclusion-list \".git\" t))\n+\n (provide 'vc-git)\n+;;; vc-git.el ends here\n\\ No newline at end of file\n-- \n1.5.0\n"},{"id":"36166","messageId":"87ps7qty5l.fsf@wine.dyndns.org","threadId":"7057","inReplyTo":"15303.1172917192@localhost","subject":"Re: [PATCH 5/7] Try to do things in the right order","fromName":"Alexandre Julliard","fromEmail":"julliard@winehq.org","sentAt":"2007-03-03T10:32:54Z","receivedAt":"2007-03-03T10:32:54Z","isPatch":true,"sender":{"key":"julliard@winehq.org","avatar":null},"body":"Xavier Maillard <zedek@gnu.org> writes:\n\n> @@ -35,8 +36,14 @@\n>    (require 'vc)\n>    (require 'cl))\n>  \n> -;; Add it automatically\n> -(add-to-list 'vc-handled-backends 'GIT)\n> +;; HACK: clear up the cache to force vc-call to check again and\n> +;; discover new functions when we reload this file.\n> +(put 'GIT 'vc-functions nil)\n> +\n> +;; Add it automatically when loading vc\n> +;; FIXME: should be directly put into vc.el\n> +(eval-after-load \"vc\"\n> +  '(add-to-list 'vc-handled-backends 'GIT))\n\nThat's ugly. Simply recommending that users set vc-handled-backends in\ntheir .emacs is easier and cleaner, I still don't see why you want to\nchange it.\n\n-- \nAlexandre Julliard\njulliard@winehq.org\n"},{"id":"36284","messageId":"200703050727.l257Rv0k007635@localhost.localdomain","threadId":"7057","inReplyTo":"87ps7qty5l.fsf@wine.dyndns.org","subject":"Re: [PATCH 5/7] Try to do things in the right order","fromName":"Xavier Maillard","fromEmail":"zedek@gnu.org","sentAt":"2007-03-05T07:27:57Z","receivedAt":"2007-03-05T07:27:57Z","isPatch":true,"sender":{"key":"zedek@gnu.org","avatar":null},"body":"\n   From: Alexandre Julliard <julliard@winehq.org>\n\n   Xavier Maillard <zedek@gnu.org> writes:\n\n   > @@ -35,8 +36,14 @@\n   >    (require 'vc)\n   >    (require 'cl))\n   >  \n   > -;; Add it automatically\n   > -(add-to-list 'vc-handled-backends 'GIT)\n   > +;; HACK: clear up the cache to force vc-call to check again and\n   > +;; discover new functions when we reload this file.\n   > +(put 'GIT 'vc-functions nil)\n   > +\n   > +;; Add it automatically when loading vc\n   > +;; FIXME: should be directly put into vc.el\n   > +(eval-after-load \"vc\"\n   > +  '(add-to-list 'vc-handled-backends 'GIT))\n\n   That's ugly. Simply recommending that users set vc-handled-backends in\n   their .emacs is easier and cleaner, I still don't see why you want to\n   change it.\n\nI'd rather want to just require or load vc-git (and that should\nnot be the way to go too since it should be automatically handled\nby vc.el when vc-git will become part of GNU Emacs ).\n\nBy the way, do you plan to ask for inclusion into emacs ?\n\nThat's just a matter of taste, nothing more.\n\n-- \nXavier\n"}]}