Use rhq with Emacs!
Rhq is local repository manager like ghq.
You can clone or create any repositories with rhq
command, and manage them with rhq
.
By default, each repository is put in ~/rhq/
, even though repository in other directory can be managed
by using rhq add
.
- Install rhq
- Run
M-x rhq-install-executable
or directly install by the command:
cargo install rhq
- Run
- Create
~/.config/rhq/config.toml
(needed, even allowed to be empty)mkdir ~/.config/rhq -p touch ~/.config/rhq/config.toml
- Clone project by
M-x rhq-clone
or create new project byM-x rhq-new
. The argument like “username/repo” meansgit clone https://github.com/username/repo
. - Browse projects by
rhq-find-file
orrhq-open-project
.rhq-find-file
: Find project and find file in it.rhq-open-project
: Find project and open the directory.
- Enjoy!
rhq
management. It takes one argument URL
(and two optional arguments, ROOT
and VCS
).
URL
can be:
- URL like
https://github.com/username/repo
- Abbreviated URL like
username/repo
(default host can be set inconfig.toml
)
On interactive usage, ROOT
and VCS
can be passed only with prefix argument.
ROOT
is directory where the project placed. Note that ROOT
is NOT the name of project directory,
but name of directory in which rhq-managed projects is placed.
By default, ~/rhq/
is used.
VCS
is name of version control system which manage the project.
By default, git
is used.
Create new repository and put it into rhq
management. This function is same as rhq-clone
except first argument can be invalid URL (because this command does NOT clone any repository,
but just create new repository locally). See also #rhq-clone.
Add local existing project into rhq management.
For example, adding ./emacs.d
and other config file is useful.
Refresh rhq cache. Rhq has cache of project list to keep performance of rhq list
.
So you should refresh when delete your project, rename project, and so on.
Import root of projects. In the other words, use the directory as root directory like ~/rhq/
.
All project in it is managed by rhq.
Find project and open the directory.
Same as rhq-open-project
except that clone repository if it is not found.
Find project and find file in the directory.
You can turn on rhq-projectile-mode
to integrate rhq and projectile.
It reloads project list from rhq before projectile retrive known project list.
You can use rhq-consult-source-project-directory
as source of consult.
For example:
(add-to-list 'consult-buffer-sources #'rhq-consult-source-project-directory)
Return list of projects managed by rhq. Absolute path is returned by default.
If optional argument ROOT
is non-nil, it should be directory.
Then, this function return relative path when the path is rooted by ROOT
.
Note that the path is not rooted by ROOT
, it remains absolute path.
This package is licensed by GPLv3. See LICENSE.