Coder Social home page Coder Social logo

emacsmirror / choice-program Goto Github PK

View Code? Open in Web Editor NEW

This project forked from plandes/choice-program

0.0 3.0 0.0 86 KB

Parameter based program

Home Page: https://github.com/plandes/choice-program

License: GNU General Public License v2.0

Emacs Lisp 97.72% Makefile 0.75% Shell 1.54%

choice-program's Introduction

Invoke Programs With Choice Options

MELPA badge MELPA stable badge Build Status

This is an Emacs module that invokes a command line program that requires an a string of enumerations as input. An example is the mnemonic option of the synconf program. The enumeration of choices offered by the command line program are then read as a completing user input in Emacs.

Usage

You must create an instance of the choice-program class and specify the program with options. For the synconf program you'd add the following to your ~/.emacs init file:

(defvar synconf-the-instance
  (choice-program nil
                  :program "synconf"
                  :interpreter "perl"
                  :buffer-name "*Synchronized Output*"
                  :choice-prompt "Mnemonic"
                  :choice-switch-name "-m"
                  :selection-args '("-a" "listmnemonics")
                  :documentation
"Run a synchronize command.  The command is issued with the `synconf'
perl script.")
  "The synconf object instance.")

(choice-program-create-exec-function 'synconf-the-instance)

If you'd like add the configuration in another config file you can use add the following:

;;;###autoload
(defun synconf (&optional rest) (interactive))
(choice-program-create-exec-function 'synconf-the-instance)

This adds the configuration file to autoloads (pattern matching on the interactive function synconf). Then the subsequent call to choice-program-create-exec-function clobbers the empty interactive definition with that which invokes the command line program.

Changelog

An extensive changelog is available here.

License

Copyright © 2017 Paul Landes

GNU Lesser General Public License, Version 2.0

choice-program's People

Contributors

plandes avatar syohex avatar

Watchers

Jonas Bernoulli avatar James Cloos 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.