unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6148: add ability to hide unregistered files in vc-dir
@ 2010-05-10  1:03 Glenn Morris
  2010-05-10 11:30 ` Magnus Henoch
  2012-04-11 14:45 ` Lars Magne Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Glenn Morris @ 2010-05-10  1:03 UTC (permalink / raw)
  To: 6148

Package: emacs
Severity: wishlist

I would find the ability to hide unregistered files in vc-dir useful;
but this might be something specific to my usage.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6148: add ability to hide unregistered files in vc-dir
  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
  2010-05-17 20:52   ` Glenn Morris
  2012-04-11 14:45 ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 4+ messages in thread
From: Magnus Henoch @ 2010-05-10 11:30 UTC (permalink / raw)
  To: 6148

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






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6148: add ability to hide unregistered files in vc-dir
  2010-05-10 11:30 ` Magnus Henoch
@ 2010-05-17 20:52   ` Glenn Morris
  0 siblings, 0 replies; 4+ messages in thread
From: Glenn Morris @ 2010-05-17 20:52 UTC (permalink / raw)
  To: Magnus Henoch; +Cc: 6148

Magnus Henoch wrote:

> This piece of code has been in my .emacs for a while:

Thanks. I'll use the interactive piece of that (minus cl pushnew) with
a version of vc-dir-hide-up-to-date that has an optional STATES
argument in place of a hard-coded 'up-to-date. That hides directories
when they are no longer relevant.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#6148: add ability to hide unregistered files in vc-dir
  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
@ 2012-04-11 14:45 ` Lars Magne Ingebrigtsen
  1 sibling, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-11 14:45 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 6148

Glenn Morris <rgm@gnu.org> writes:

> I would find the ability to hide unregistered files in vc-dir useful;
> but this might be something specific to my usage.

Yes, I'd love that.  I'd also like a "delete all unregistered files"
command, but that might be just me.  :-)

> Thanks. I'll use the interactive piece of that (minus cl pushnew) with
> a version of vc-dir-hide-up-to-date that has an optional STATES
> argument in place of a hard-coded 'up-to-date. That hides directories
> when they are no longer relevant.

This didn't make it into trunk, I guess?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-11 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2010-05-17 20:52   ` Glenn Morris
2012-04-11 14:45 ` Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).