emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Introducing 'unrecognized and 'ignored


From: Dan Nicolaescu
Subject: Re: Introducing 'unrecognized and 'ignored
Date: Wed, 02 Jan 2008 09:31:23 -0800

"Eric S. Raymond" <address@hidden> writes:

  > Dan Nicolaescu <address@hidden>:
  > > vc-dired could instead use something based on ewocs. Looking at git.el,
  > > implementing the status display using ewocs looks simple enough.
  > 
  > Where is ewocs?  I don't find anything including that string in the name
  > in the CVS tree.

Because you looked for plural "ewocs" :-). See emacs-lisp/ewoc.el

In fact, here's a quick hack that shows how ewocs can be used.

To be minimally usable for vc-dired it would just need code to
mark/unmark files and to return the list of marked entries.


(require 'ewoc)

(defvar my-vc-status-cookie nil "")

(defun my-vc-status-insert-headers ()
  (insert "Repository : Blah Blah\n")
  (insert "Working dir: ~/WORKING DIR\n\n\n"))

(defun my-vc-status-printer (fileentry)
  (insert fileentry))

(defun my-vc-dir-state (dir)
  "The VC dir-state functions should return a list of file+states like this."
  '(("one" . up-to-date) 
    ("two" . added) 
    ("three" . unregistered)))

(defun my-vc-status ()
  "Prototype for a replacement for vc-dired."
  (interactive)
  (let (buffer-read-only)
    (erase-buffer)
    (set (make-local-variable 'my-vc-status-cookie)
         (ewoc-create #'my-vc-status-printer))
    (my-vc-status-insert-headers)
    (dolist (elem (my-vc-dir-state "ignored"))
      (ewoc-enter-last my-vc-status-cookie 
      (format "   %-20s %s" (cdr elem) (car elem)))))
  (goto-char (point-min))
  (setq buffer-read-only t))

  > > Sort term using dired is fine because it provide the much needed
  > > multiple file commit functionality. But medium term it should be nuked
  > > and replaced.
  > 
  > I'm not attached to retaining dired.  But there are other things that need
  > to happen first.  I still have more speed tuning to do.

Understood. Some of the speed tuning would not be needed if not using
dired though...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]