Git Product home page Git Product logo

emacsctl's Introduction

emacsctl - A simple CLI to manage and use multiple emacs commands and configurations

Features

  • managing available emacs commands (emacs binary and command line options)
  • managing available emacs configurations (emacs config directories)
  • managing available emacs environments (a combination of a command and a configuration)
  • managing the active environment context
  • opening files in the desired emacs environment

Requirements

  • emacs 29.1 or later
  • git (optional, required if you want to clone a configuration from a git repository URL)

Installation

go install github.com/mojochao/emacsctl@latest

Usage

Display help information on all commands and options with the help subcommand or the -h or --help global options:

$ emacsctl -h
NAME:
   emacsctl - Manage multiple emacs environments

USAGE:
   emacsctl [global options] command [command options] 

COMMANDS:
   state             Display application state
   environment, env  Manage emacs environments
   command, cmd      Manage emacs command lines
   config, cfg       Manage emacs configuration directories in application state
   context, ctx      Manage active environment context in application state
   open, edit        Open files in the desired emacs environment
   version           Print the version of the application
   help, h           Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --app-dir value  Specify application directory (default: "~/.config/emacsctl") [$EMACSCFG_DIR]
   --dry-run        Display the command that would be executed, but do not execute it (default: false)
   --verbose, -v    Display verbose output (default: false)
   --help, -h       show help

This can also be used to display help information for a specific subcommand:

$ emacsctl environment add -h

List all environments with the environment list subcommand:

$ emacsctl env list

There will be none initially, so let's add one.

Add a managed configuration with the add subcommand:

$ emacsctl add my-config /path/to/my/emacs-config

If you pass a URL as the configuration path, the add subcommand will clone the repository to the application repositories cache directory and set the configuration path to the location of the cloned repository.

$ emacsctl add my-de https://github.com/mojochao/myde.el

Remove a managed configuration with the remove subcommand:

$ emacsctl remove my-config

Get the active managed configuration context with the context subcommand:

$ emacsctl context

Set the active managed configuration context with a configuration name argument:

$ emacsctl context my-config

Get the path of the active managed configuration context with the path subcommand:

$ emacsctl path

Get the path of any managed configuration by adding the --context flag:

$ emacsctl path --context my-config

Open emacs with the active managed configuration with the open subcommand:

$ emacsctl open my-file-1 my-file-2

Edit files in emacs with any managed configuration by adding the --context flag:

$ emacsctl open --context my-config my-file-1 my-file-2

That's all folks!

emacsctl's People

Contributors

mojochao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.