* Re: Open All FIles in a Directory: How can I tell emacs to do this?
2003-09-20 17:54 ` Joost Kremers
@ 2003-09-20 14:49 ` Dave Footitt
2003-09-20 18:23 ` Dan Anderson
[not found] ` <mailman.462.1064082275.21628.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: Dave Footitt @ 2003-09-20 14:49 UTC (permalink / raw)
You can do it in dired, if you mark all the files you'd like to open, then
use 'dired-do-find-marked-files'
You will need to (require 'dired-x) in your .emacs too.
Dave
^ permalink raw reply [flat|nested] 6+ messages in thread
* Open All FIles in a Directory: How can I tell emacs to do this?
@ 2003-09-20 17:45 Dan Anderson
0 siblings, 0 replies; 6+ messages in thread
From: Dan Anderson @ 2003-09-20 17:45 UTC (permalink / raw)
Often times when I'm coding I'll want to load all files in a particular
directory into a buffer. Right now I have to do:
emacs ./file1
Then for each other file
C-x C-f filename
Is there something I can put in my .emacs file to tell emacs that when I
type a directory name under open file that all files in that directory
should be loaded, or even better, a command or set of keys I can press
to automatically load all files in a directory?
Thanks in advance,
-Dan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Open All FIles in a Directory: How can I tell emacs to do this?
[not found] <mailman.461.1064080178.21628.help-gnu-emacs@gnu.org>
@ 2003-09-20 17:54 ` Joost Kremers
2003-09-20 14:49 ` Dave Footitt
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Joost Kremers @ 2003-09-20 17:54 UTC (permalink / raw)
Dan Anderson wrote:
> Often times when I'm coding I'll want to load all files in a particular
> directory into a buffer. Right now I have to do:
>
> emacs ./file1
>
> Then for each other file
> C-x C-f filename
doesn't 'emacs *' work? it should, but i don't want to shut down emacs in
order to test. ;-)
--
Joost Kremers
since when is vi an editor? a discussion on vi belongs in
comp.tools.unusable or something... ;-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Open All FIles in a Directory: How can I tell emacs to do this?
2003-09-20 17:54 ` Joost Kremers
2003-09-20 14:49 ` Dave Footitt
@ 2003-09-20 18:23 ` Dan Anderson
[not found] ` <mailman.462.1064082275.21628.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 6+ messages in thread
From: Dan Anderson @ 2003-09-20 18:23 UTC (permalink / raw)
Cc: help-gnu-emacs
> doesn't 'emacs *' work?
Perhaps I should be more specific. If I ran:
$emacs ./*
It would open up all files in the directory, but this would include
backup files (i.e. beginning with a # and ending with a # or ~).
Is it possible to tell emacs to ignore those files?
I was thinking of something like:
$emacs ./*.php
If for example I wanted to access all PHP scripts in a directory. But
then if there were any HTML pages they wouldn't be displayed. Plus this
involves exiting and restarting emacs. I was hoping there would be a
more elegant solution.
Thanks in advance,
Dan Anderson
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Open All FIles in a Directory: How can I tell emacs to do this?
[not found] ` <mailman.462.1064082275.21628.help-gnu-emacs@gnu.org>
@ 2003-09-22 16:08 ` Kevin Rodgers
2003-09-22 20:15 ` Pascal Bourguignon
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Rodgers @ 2003-09-22 16:08 UTC (permalink / raw)
Dan Anderson wrote:
> Perhaps I should be more specific. If I ran:
>
> $emacs ./*
>
> It would open up all files in the directory, but this would include
> backup files (i.e. beginning with a # and ending with a # or ~).
>
> Is it possible to tell emacs to ignore those files?
No, you have to tell your shell not to pass them to emacs. I don't
usually have autosave files lying around, so exclude backup files I
would run: emacs !(*~)
> I was thinking of something like:
>
> $emacs ./*.php
>
> If for example I wanted to access all PHP scripts in a directory. But
> then if there were any HTML pages they wouldn't be displayed.
emacs *.php *.html
> Plus this
> involves exiting and restarting emacs. I was hoping there would be a
> more elegant solution.
The elegant solution is to open the directory in dired, then go from there
(see Dave Footitt's response): emacs .
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Open All FIles in a Directory: How can I tell emacs to do this?
2003-09-22 16:08 ` Kevin Rodgers
@ 2003-09-22 20:15 ` Pascal Bourguignon
0 siblings, 0 replies; 6+ messages in thread
From: Pascal Bourguignon @ 2003-09-22 20:15 UTC (permalink / raw)
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> emacs *.php *.html
>
> > Plus this
> > involves exiting and restarting emacs. I was hoping there would be a
> > more elegant solution.
>
> The elegant solution is to open the directory in dired, then go from there
> (see Dave Footitt's response): emacs .
I don't use much dired; you could do too:
M-x server-start RET
M-x shell RET
cd $where_you_want
emacsclient -n [^#]*[^~] RET
or:
(require 'cl)
(dolist (f (delete-if
(lambda (path) (not (string-match ".*/[^#/][^/]*[^~/]$" path)))
(file-expand-wildcards "/where/you/want/*")))
(find-file f))
--
__Pascal_Bourguignon__
http://www.informatimago.com/
Do not adjust your mind, there is a fault in reality.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-09-22 20:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-20 17:45 Open All FIles in a Directory: How can I tell emacs to do this? Dan Anderson
[not found] <mailman.461.1064080178.21628.help-gnu-emacs@gnu.org>
2003-09-20 17:54 ` Joost Kremers
2003-09-20 14:49 ` Dave Footitt
2003-09-20 18:23 ` Dan Anderson
[not found] ` <mailman.462.1064082275.21628.help-gnu-emacs@gnu.org>
2003-09-22 16:08 ` Kevin Rodgers
2003-09-22 20:15 ` Pascal Bourguignon
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).