[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [emacs-humanities] Emacs "Projects" management?

From: Protesilaos Stavrou
Subject: Re: [emacs-humanities] Emacs "Projects" management?
Date: Tue, 05 Oct 2021 13:00:01 +0300
User-agent: Notmuch/0.33.2 (https://notmuchmail.org) Emacs/29.0.50 (x86_64-pc-linux-gnu)

On 2021-10-04, 18:24 -0700, Alan Davis <alan3davis@gmail.com> wrote:

> I am using Emacs for almost everything, as I have done for decades.  I use
> Org-Mode, though I do not take advantage of too many bells and whistles.
> Various tools offer to help organize "Projects;" but here's the problem for
> me: they seem to cater to the programmer, for programming projects.
> The very word "Project" is fuzzy, imprecise in usage: I have seen it used
> in the sense of a writing project, or without boundaries; yet in the
> tutorials and guides for, for example, "projectile" project manager
> package, it seems to focus on programming projects.
> I would like to ask about how others, in the "emacs-humanities" community,
> use such project managers for various kinds of projects (in the loose
> sense), and whether such as "projectile" have been useful, and what
> modifications were useful.
> I am not a programmer, and my attention span is declining.  I do not wish
> to embark on a large scale "project" of coding and configuring in elisp to
> get somewhere with this.

Hello Alan,

In addition to projectile, there exists the built-in library project.el,
whose commands are nested under the 'C-x p' prefix (starting with Emacs
27 and onwards---I think).  I will be using that one for this example.

You can think of a "project" as a directory/folder or directory tree
whose contents are closely related to each other.  For example, you may
have something like this structure:

    |-- personal/
    |   |-- 2021-09-30-note1.org
    |   `-- 2021-10-05-note2.org
    `-- work/
        |-- 2021-08-29-other-note1.org
        `-- 2021-09-08-other-note2.org

Your "~/Documents/notes" directory shall be the root of your "project",
the basis from where all commands will start from.

For the time being, a directory/directory-tree can be registered as a
"project" if it is backed by a version control (VC) system, such as Git.
You may also want to keep track of Emacs bug#41572 which is about
recording projects by adding an empty ".emacs-project" to their root
directory.  Until that gets merged, you need to use a version control
system.  Are you familiar with those?  I believe that merely using
something like 'git init' on the command line in the desired directory
should suffice.

To register a project, invoke 'project-switch-project' (C-x p p) and
select the option "... (choose a dir)".  Once you pick a VC-backed
directory, it will get recorded in your list of projects.  So next time
you do C-x p p that project will appear in the list of completion

While inside the project, whether visiting a file or a Dired buffer, you
can invoke commands such as 'project-find-file' (C-x p f) for a
project-wide file name search, 'project-find-regexp' (C-x p g) for a
project-wide search of file contents, and so on.  Do C-x p C-h to get a
Help buffer with all available commands.

If you are not in a project and invoke any of those commands, they will
first prompt you for a project and then perform their actions.
Project-related commands can also be invoked right after the initial
interaction with the C-x p p interface.  Once you select a project, it
creates a menu in the echo area with quick access keys where, for
example, 'f' calls 'project-find-file'.  These basically are two ways of
carrying out the same operations.

I use this kind of setup for my notes' directory, which has nothing to
do with programming.  Though I also use project.el for code-related

For further reading, evaluate this form (and don't be intimidated by the
references to programming-related tasks):

    (info "(emacs) Projects")

All the best,
Protesilaos (or simply "Prot")

Protesilaos Stavrou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]