From: Magnus Henoch <magnus.henoch@gmail.com>
To: 6148@debbugs.gnu.org
Subject: bug#6148: add ability to hide unregistered files in vc-dir
Date: Mon, 10 May 2010 12:30:26 +0100 [thread overview]
Message-ID: <84iq6wq9il.fsf@linux-b2a3.site> (raw)
In-Reply-To: <6p39y0o9ec.fsf@fencepost.gnu.org> (Glenn Morris's message of "Sun, 09 May 2010 21:03:39 -0400")
This piece of code has been in my .emacs for a while:
(defun my-vc-dir-hide-some (states)
"Hide files whose state is in STATES."
(interactive
(list
(progn
(unless vc-ewoc
(error "Not in a vc-dir buffer"))
(mapcar 'intern
(completing-read-multiple
"Hide files that are in state(s): "
(let (possible-states)
(ewoc-map (lambda (item)
(let ((state (vc-dir-fileinfo->state item)))
(when state
(pushnew state possible-states))
nil))
vc-ewoc)
(mapcar 'symbol-name possible-states))
nil t)))))
(let ((inhibit-read-only t))
(ewoc-filter vc-ewoc
(lambda (file)
(not (memq (vc-dir-fileinfo->state file) states))))))
(eval-after-load "vc-dir"
'(define-key vc-dir-mode-map "H" 'my-vc-dir-hide-some))
--
Magnus Henoch
next prev parent reply other threads:[~2010-05-10 11:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-10 1:03 bug#6148: add ability to hide unregistered files in vc-dir Glenn Morris
2010-05-10 11:30 ` Magnus Henoch [this message]
2010-05-17 20:52 ` Glenn Morris
2012-04-11 14:45 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84iq6wq9il.fsf@linux-b2a3.site \
--to=magnus.henoch@gmail.com \
--cc=6148@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.