* Open many buffers
@ 2010-06-08 21:11 Andrea Crotti
2010-06-08 21:57 ` Drew Adams
2010-06-09 3:54 ` Kevin Rodgers
0 siblings, 2 replies; 5+ messages in thread
From: Andrea Crotti @ 2010-06-08 21:11 UTC (permalink / raw)
To: help-gnu-emacs
I don't see in the emacs functions anything like
"visit-all-the-buffers-matching-this-regexp".
It would be useful sometimes, now I use something like this in the git
projects
--8<---------------cut here---------------start------------->8---
(defun open-git-files ()
"Visit all the files in the current git project"
(interactive)
(dolist
(file (split-string (shell-command-to-string "git ls-files")))
(message "Opening %s" file)
(find-file file)))
--8<---------------cut here---------------end--------------->8---
But it opens too much often.
Something that
- ask for a regexp
- visit all the buffers
- automatically set up a guessed best way to place them on the frame (or
maybe creates a new elscreen for each one for example)
Is there anything like this somewhere?
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Open many buffers
2010-06-08 21:11 Open many buffers Andrea Crotti
@ 2010-06-08 21:57 ` Drew Adams
2010-06-09 13:49 ` Joel James Adamson
2010-06-09 3:54 ` Kevin Rodgers
1 sibling, 1 reply; 5+ messages in thread
From: Drew Adams @ 2010-06-08 21:57 UTC (permalink / raw)
To: 'Andrea Crotti', help-gnu-emacs
> I don't see in the emacs functions anything like
> "visit-all-the-buffers-matching-this-regexp".
> Is there anything like this somewhere?
Here are two possibilities:
1. Ibuffer: `% n rgx RET v' where rgx is your regexp.
`% n' marks regexp matches. `v' visits.
2. Icicles: `C-x b rgx S-TAB C-!' where rgx is your regexp.
`S-TAB' regexp-completes.
`C-!' acts on each of the completion candidates.
The action in this case is `C-x b': visit a buffer.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Open many buffers
2010-06-08 21:11 Open many buffers Andrea Crotti
2010-06-08 21:57 ` Drew Adams
@ 2010-06-09 3:54 ` Kevin Rodgers
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2010-06-09 3:54 UTC (permalink / raw)
To: help-gnu-emacs
Andrea Crotti wrote:
> I don't see in the emacs functions anything like
> "visit-all-the-buffers-matching-this-regexp".
>
> It would be useful sometimes, now I use something like this in the git
> projects
>
> --8<---------------cut here---------------start------------->8---
> (defun open-git-files ()
> "Visit all the files in the current git project"
> (interactive)
> (dolist
> (file (split-string (shell-command-to-string "git ls-files")))
> (message "Opening %s" file)
> (find-file file)))
> --8<---------------cut here---------------end--------------->8---
>
> But it opens too much often.
>
> Something that
> - ask for a regexp
> - visit all the buffers
> - automatically set up a guessed best way to place them on the frame (or
> maybe creates a new elscreen for each one for example)
>
> Is there anything like this somewhere?
Not a regexp, but wildcard patterns:
C-x C-f *.c RET
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Open many buffers
2010-06-08 21:57 ` Drew Adams
@ 2010-06-09 13:49 ` Joel James Adamson
2010-06-09 14:40 ` Drew Adams
0 siblings, 1 reply; 5+ messages in thread
From: Joel James Adamson @ 2010-06-09 13:49 UTC (permalink / raw)
To: Drew Adams; +Cc: help-gnu-emacs, 'Andrea Crotti'
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
On Tue, Jun 08, 2010 at 02:57:37PM -0700, Drew Adams wrote:
> > I don't see in the emacs functions anything like
> > "visit-all-the-buffers-matching-this-regexp".
> > Is there anything like this somewhere?
>
> Here are two possibilities:
>
> 1. Ibuffer: `% n rgx RET v' where rgx is your regexp.
>
> `% n' marks regexp matches. `v' visits.
>
> 2. Icicles: `C-x b rgx S-TAB C-!' where rgx is your regexp.
>
> `S-TAB' regexp-completes.
> `C-!' acts on each of the completion candidates.
>
> The action in this case is `C-x b': visit a buffer.
Here's a third possibility: using Dired, mark according to a regexp
% m regexp RET
then open (find) those marked files using `F'.
Joel
--
Joel J. Adamson
Servedio Lab
University of North Carolina at Chapel Hill
FSF Member #8164
http://www.unc.edu/~adamsonj
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Open many buffers
2010-06-09 13:49 ` Joel James Adamson
@ 2010-06-09 14:40 ` Drew Adams
0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2010-06-09 14:40 UTC (permalink / raw)
To: 'Joel James Adamson'; +Cc: help-gnu-emacs, 'Andrea Crotti'
> > > I don't see in the emacs functions anything like
> > > "visit-all-the-buffers-matching-this-regexp".
> > > Is there anything like this somewhere?
> >
> > Here are two possibilities:
> > 1. Ibuffer: `% n rgx RET v' where rgx is your regexp.
> > `% n' marks regexp matches. `v' visits.
> > 2. Icicles: `C-x b rgx S-TAB C-!' where rgx is your regexp.
> > `S-TAB' regexp-completes.
> > `C-!' acts on each of the completion candidates.
> > The action in this case is `C-x b': visit a buffer.
>
> Here's a third possibility: using Dired, mark according to a regexp
> % m regexp RET then open (find) those marked files using `F'.
That works only for files, not buffers unassociated with a file.
That's why I mentioned Ibuffer (though I don't use Ibuffer myself).
It is similar to the Dired approach, but for buffers, not files.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-09 14:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-08 21:11 Open many buffers Andrea Crotti
2010-06-08 21:57 ` Drew Adams
2010-06-09 13:49 ` Joel James Adamson
2010-06-09 14:40 ` Drew Adams
2010-06-09 3:54 ` Kevin Rodgers
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).