unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* hide/show in dired
@ 2004-06-20 20:21 Enila Nero
  2004-06-21 17:55 ` Mathias Dahl
  2004-06-30 15:38 ` Kai Grossjohann
  0 siblings, 2 replies; 6+ messages in thread
From: Enila Nero @ 2004-06-20 20:21 UTC (permalink / raw)


I have looked around for hide/show functionality in dired, but
couldn't find anything.  What I mean, is to be able to give a regexp
and dired would limit the display to matching files only.  Then, to be
able to redisplay all the files.

This behavior would analogous to gnus-summary-limit-to-* and
gnus-summary-pop-limit in gnus, where articles are hidden and then
popped. 

The closest functionality I found is the dired-omit-extensions in
dired-x.el and dired-wipe.el, but don't quite have the above
behavior. 

Any help will be appreciated.

Enila

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

* Re: hide/show in dired
  2004-06-20 20:21 hide/show in dired Enila Nero
@ 2004-06-21 17:55 ` Mathias Dahl
  2004-06-22 23:50   ` Enila Nero
  2004-06-30 15:38 ` Kai Grossjohann
  1 sibling, 1 reply; 6+ messages in thread
From: Mathias Dahl @ 2004-06-21 17:55 UTC (permalink / raw)


Enila Nero <geortal@yahoo.com> writes:

> I have looked around for hide/show functionality in dired, but
> couldn't find anything.  What I mean, is to be able to give a regexp
> and dired would limit the display to matching files only.  Then, to be
> able to redisplay all the files.
> 
> This behavior would analogous to gnus-summary-limit-to-* and
> gnus-summary-pop-limit in gnus, where articles are hidden and then
> popped. 
> 
> The closest functionality I found is the dired-omit-extensions in
> dired-x.el and dired-wipe.el, but don't quite have the above
> behavior. 

You might find the following links useful:

* http://www.gnu.org/software/emacs/manual/html_node/Dired-and-Find.html#Dired%20and%20Find
* http://www.gnu.org/software/emacs/manual/html_node/Dired-Updating.html#Dired%20Updating

/Mathias

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

* Re: hide/show in dired
  2004-06-21 17:55 ` Mathias Dahl
@ 2004-06-22 23:50   ` Enila Nero
  2004-06-23  6:04     ` Mathias Dahl
  0 siblings, 1 reply; 6+ messages in thread
From: Enila Nero @ 2004-06-22 23:50 UTC (permalink / raw)


Mathias Dahl <brakjoller@hotmail.com> writes:

> Enila Nero <geortal@yahoo.com> writes:
>
>> I have looked around for hide/show functionality in dired, but
>> couldn't find anything.  What I mean, is to be able to give a regexp
>> and dired would limit the display to matching files only.  Then, to be
>> able to redisplay all the files.
>> 
>> This behavior would analogous to gnus-summary-limit-to-* and
>> gnus-summary-pop-limit in gnus, where articles are hidden and then
>> popped. 
>> 
>> The closest functionality I found is the dired-omit-extensions in
>> dired-x.el and dired-wipe.el, but don't quite have the above
>> behavior. 
>
> You might find the following links useful:
>
> * http://www.gnu.org/software/emacs/manual/html_node/Dired-and-Find.html#Dired%20and%20Find
> * http://www.gnu.org/software/emacs/manual/html_node/Dired-Updating.html#Dired%20Updating
>
> /Mathias

Thank you for the useful links.  Certainly there is a lot of related
functionality there.  To do exactly what I asked:

% m regexp   (to mark all files matching a regular expression)

kill-all-unmarked-file-lines  (couldn't find such functionality)

g (to redisplay the directory)

Enila

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

* Re: hide/show in dired
  2004-06-22 23:50   ` Enila Nero
@ 2004-06-23  6:04     ` Mathias Dahl
  2004-06-24 23:37       ` Enila Nero
  0 siblings, 1 reply; 6+ messages in thread
From: Mathias Dahl @ 2004-06-23  6:04 UTC (permalink / raw)


Enila Nero <geortal@yahoo.com> writes:

> Mathias Dahl <brakjoller@hotmail.com> writes:
> 
> > Enila Nero <geortal@yahoo.com> writes:
> >
> >> I have looked around for hide/show functionality in dired, but
> >> couldn't find anything.  What I mean, is to be able to give a regexp
> >> and dired would limit the display to matching files only.  Then, to be
> >> able to redisplay all the files.
> >> 
> >> This behavior would analogous to gnus-summary-limit-to-* and
> >> gnus-summary-pop-limit in gnus, where articles are hidden and then
> >> popped. 
> >> 
> >> The closest functionality I found is the dired-omit-extensions in
> >> dired-x.el and dired-wipe.el, but don't quite have the above
> >> behavior. 
> >
> > You might find the following links useful:
> >
> > * http://www.gnu.org/software/emacs/manual/html_node/Dired-and-Find.html#Dired%20and%20Find
> > * http://www.gnu.org/software/emacs/manual/html_node/Dired-Updating.html#Dired%20Updating
> >
> > /Mathias
> 
> Thank you for the useful links.  Certainly there is a lot of related
> functionality there.  To do exactly what I asked:
> 
> % m regexp   (to mark all files matching a regular expression)
> 
> kill-all-unmarked-file-lines  (couldn't find such functionality)

Maybe you could use the toggle command (t) first which would
mark all unmarked lines, and then use the kill command?

/Mathias

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

* Re: hide/show in dired
  2004-06-23  6:04     ` Mathias Dahl
@ 2004-06-24 23:37       ` Enila Nero
  0 siblings, 0 replies; 6+ messages in thread
From: Enila Nero @ 2004-06-24 23:37 UTC (permalink / raw)


Mathias Dahl <brakjoller@hotmail.com> writes:

> Enila Nero <geortal@yahoo.com> writes:
>
>> Mathias Dahl <brakjoller@hotmail.com> writes:
>> 
>> > Enila Nero <geortal@yahoo.com> writes:
>> >
>> >> I have looked around for hide/show functionality in dired, but
>> >> couldn't find anything.  What I mean, is to be able to give a regexp
>> >> and dired would limit the display to matching files only.  Then, to be
>> >> able to redisplay all the files.
>> >> 
>> >> This behavior would analogous to gnus-summary-limit-to-* and
>> >> gnus-summary-pop-limit in gnus, where articles are hidden and then
>> >> popped. 
>> >> 
>> >> The closest functionality I found is the dired-omit-extensions in
>> >> dired-x.el and dired-wipe.el, but don't quite have the above
>> >> behavior. 
>> >
>> > You might find the following links useful:
>> >
>> > * http://www.gnu.org/software/emacs/manual/html_node/Dired-and-Find.html#Dired%20and%20Find
>> > * http://www.gnu.org/software/emacs/manual/html_node/Dired-Updating.html#Dired%20Updating
>> >
>> > /Mathias
>> 
>> Thank you for the useful links.  Certainly there is a lot of related
>> functionality there.  To do exactly what I asked:
>> 
>> % m regexp   (to mark all files matching a regular expression)
>> 
>> kill-all-unmarked-file-lines  (couldn't find such functionality)
>
> Maybe you could use the toggle command (t) first which would
> mark all unmarked lines, and then use the kill command?
>
> /Mathias

Yes. Thank you for the help.  I arrived at the following function which
seems to be doing what I wanted.  I am sure it can be made more robust
and be improved upon.  To redisplay the directory and one simply has
to do "g".

(defun en-dired-limit-regexp (regexp) 
  "Limit dired display to files matching a regular expression"
  (interactive
   (list (dired-read-regexp "Regexp: ")))
  (progn
    (dired-mark-files-regexp regexp)
    (dired-toggle-marks)
    (dired-do-kill-lines)
    ))


Enila

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

* Re: hide/show in dired
  2004-06-20 20:21 hide/show in dired Enila Nero
  2004-06-21 17:55 ` Mathias Dahl
@ 2004-06-30 15:38 ` Kai Grossjohann
  1 sibling, 0 replies; 6+ messages in thread
From: Kai Grossjohann @ 2004-06-30 15:38 UTC (permalink / raw)


Enila Nero <geortal@yahoo.com> writes:

> I have looked around for hide/show functionality in dired, but
> couldn't find anything.  What I mean, is to be able to give a regexp
> and dired would limit the display to matching files only.  Then, to be
> able to redisplay all the files.

I just do C-x d /some/directory/*.c RET to show the *.c files only.
Then I do C-x d /some/directory RET to show all files in the
directory.

This uses shell globs, though, not regexes.

Kai

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

end of thread, other threads:[~2004-06-30 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-20 20:21 hide/show in dired Enila Nero
2004-06-21 17:55 ` Mathias Dahl
2004-06-22 23:50   ` Enila Nero
2004-06-23  6:04     ` Mathias Dahl
2004-06-24 23:37       ` Enila Nero
2004-06-30 15:38 ` Kai Grossjohann

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).