From: "Drew Adams" <drew.adams@oracle.com>
To: "'Damian'" <damian.only@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Working with different projects in Emacs
Date: Wed, 8 Apr 2009 11:44:08 -0700 [thread overview]
Message-ID: <005c01c9b87a$01a63340$c2b22382@us.oracle.com> (raw)
In-Reply-To: <47a330c50904081121y506d6105s649b49692991421e@mail.gmail.com>
> > If all of the files for a given project are in or under the
> > same directory, then moving (e.g. `cd') to that directory
> > should let you complete file names there.
> > IOW, `M-x cd', which sets `default-directory', which is the
> > directory, by default, for file-name completion.
> >
> > And you can easily write a command that takes you directly
> > to your project directory, so you don't have to enter it each time.
>
> The problem I have with this solution, is that if I open a file in
> some other directory, the working directory is changed again :(
Only for the buffer of that file. The `default-directory' for the other buffers
(including, e.g. a Dired buffer) would stay the same.
I don't quite see the problem - perhaps you could describe a usage scenario in a
little more detail.
> > If the files of a project are in multiple directories, then
> > you can use Dired, passing it the file list explicitly.
> > Then mark specific files in that Dired buffer and then act
> > on the marked files.
>
> And here it seems like one has to perform a lot of steps just to get
> the autocompletion of the files for a project. But probably I'm not
> getting it right
A Dired buffer can have files from multiple directories, and those file names
can be absolute. Example:
M-: (dired '("my project" "/path/to/file1.c" "/other/path/to/file2.c"))
You can then access those files directly in Dired, and you can mark them and
operate on the marked files.
You can also include subdirectories in a Dired listing (using `i').
But yes, the `default-directory' for the Dired buffer won't be appropriate for
completing all of the file names, if the files are from different directories.
No single `default-directory' is adequate to that task. ;-)
But once you're visiting file A, you can complete to other files in the same
directory as A - visiting A changes `default-directory' appropriately.
If you are already aware of these things, and they don't provide what you need,
then try describing the need in a little more detail.
next prev parent reply other threads:[~2009-04-08 18:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 12:50 Working with different projects in Emacs Damian
2009-04-08 15:59 ` Drew Adams
2009-04-08 18:21 ` Damian
2009-04-08 18:44 ` Drew Adams [this message]
2009-04-08 19:13 ` Damian
-- strict thread matches above, loose matches on Subject: below --
2009-04-08 18:10 grischka
[not found] <mailman.4901.1239203083.31690.help-gnu-emacs@gnu.org>
2009-04-08 18:56 ` Vagn Johansen
2009-04-09 13:44 ` rustom
2009-04-09 19:45 ` Vagn Johansen
2009-04-11 15:30 ` rustom
2009-04-11 15:51 ` rustom
2009-04-11 18:30 ` Vagn Johansen
2009-04-12 8:56 ` rustom
2009-04-12 16:26 ` Vagn Johansen
2009-04-14 15:00 ` rustom
2009-04-14 17:23 ` Vagn Johansen
2009-04-15 10:29 ` Stefan Kamphausen
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='005c01c9b87a$01a63340$c2b22382@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=damian.only@gmail.com \
--cc=help-gnu-emacs@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.