<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,3 @@
 *.elc
 *~
+.#*</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -27,6 +27,7 @@
 (require 'cl)
 (require 'electric)
 (require 'ediff)
+(require 'ffap)
 
 (defgroup egg nil
   &quot;Controlling Git from Emacs.&quot;
@@ -389,6 +390,9 @@ Different versions of git have different names for this subdir.&quot;
 		     prop))
     `(propertize ,text ,@prop)))
 
+(defalias 'egg-string-at-point 'ffap-string-at-point)
+(defalias 'egg-find-file-at-point 'find-file-at-point)
+
 (defsubst egg-prepend (str prefix &amp;rest other-properties)
   &quot;Make STR appear to have prefix PREFIX.
 If OTHER-PROPERTIES was non-nil, apply it to STR.&quot;
@@ -2181,17 +2185,50 @@ rebase session.&quot;
       (egg-delimit-section :help 'help help-beg (point) help-inv-beg map 
 			 'egg-compute-navigation))))
 
+(defun egg-ignore-pattern-from-string-at-point ()
+  (interactive)
+  (let ((string (egg-string-at-point))
+	(file (ffap-file-at-point))
+	dir pattern gitignore)
+    (setq pattern (read-string &quot;ignore pattern: &quot;
+			       (if (string-match &quot;\\.[^.]+\\'&quot; string)
+				   (match-string-no-properties 0 string)
+				 string)))
+    (when (equal pattern &quot;&quot;)
+      (error &quot;Can't ignore empty string!&quot;))
+    (setq dir (if (stringp file)
+		  (file-name-directory (expand-file-name file))
+		default-directory))
+    (setq gitignore 
+	  (read-file-name (format &quot;add pattern `%s' to: &quot; pattern)
+			  dir nil nil &quot;.gitignore&quot;))
+    (save-excursion
+      (with-current-buffer (find-file-noselect gitignore t t)
+	(goto-char (point-max))
+	(insert pattern &quot;\n&quot;)
+	(save-buffer)
+	(kill-buffer (current-buffer))))
+    (egg-buffer-cmd-refresh)))
+
+(defconst egg-untracked-file-map
+  (let ((map (make-sparse-keymap &quot;Egg:UntrackedFile&quot;)))
+    (define-key map (kbd &quot;RET&quot;) 'egg-find-file-at-point)
+    (define-key map (kbd &quot;DEL&quot;) 'egg-ignore-pattern-from-string-at-point)
+    map))
+
 (defun egg-sb-insert-untracked-section ()
   &quot;Insert the untracked files section into the status buffer.&quot;
-  (let ((beg (point)) inv-beg)
+  (let ((beg (point)) inv-beg end)
     (insert (egg-prepend &quot;Untracked Files:&quot; &quot;\n\n&quot; 
 			 'face 'egg-section-title)
 	    &quot;\n&quot;)
     (setq inv-beg (1- (point)))
-    (call-process &quot;git&quot; nil t nil &quot;ls-files&quot; &quot;--others&quot; 
+    (call-process &quot;git&quot; nil t nil &quot;ls-files&quot; &quot;--others&quot;  
 		  &quot;--exclude-standard&quot;)
-    (egg-delimit-section :section 'untracked beg (point)
-			  inv-beg egg-section-map 'untracked)))
+    (setq end (point))
+    (egg-delimit-section :section 'untracked beg end 
+			  inv-beg egg-section-map 'untracked)
+    (put-text-property beg end 'keymap egg-untracked-file-map)))
 
 (defun egg-sb-insert-unstaged-section (title &amp;rest extra-diff-options)
   &quot;Insert the unstaged changes section into the status buffer.&quot;
@@ -4861,7 +4898,7 @@ current file contains unstaged changes.&quot;
 
 (defun egg-file-log-pickaxe (string)
   (interactive (list (read-string &quot;search history for: &quot;
-				  (symbol-name (symbol-at-point)))))
+				  (egg-string-at-point))))
   (egg-search-changes string))
 
 (let ((map egg-file-cmd-map))</diff>
      <filename>egg.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2cf32ca7719b246b6b4260305172272f6873cec5</id>
    </parent>
  </parents>
  <author>
    <name>Bogolisk</name>
    <email>bogolisk@gmail.com</email>
  </author>
  <url>http://github.com/bogolisk/egg/commit/912c20a8f3a57dca0e5e7a056fbb5ea4baf84f39</url>
  <id>912c20a8f3a57dca0e5e7a056fbb5ea4baf84f39</id>
  <committed-date>2008-09-25T18:39:06-07:00</committed-date>
  <authored-date>2008-09-25T18:39:06-07:00</authored-date>
  <message>ingore and untracked

command to visit untracked file
command to add ignore pattern base on untracked file name</message>
  <tree>5df4b38653c6e3e31e555d312cadf5c175ddf344</tree>
  <committer>
    <name>Bogolisk</name>
    <email>bogolisk@gmail.com</email>
  </committer>
</commit>
