Skip to content

emacsmirror/faustine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Faustine

Edit, visualize, build and run Faust code


License GPLv3 Codeship Status for yphil/faustine MELPA MELPA

Faustine allows the edition of Faust (http://faust.grame.fr) code.

Features

  • Faust code syntax hightlighting and indentation
  • Project-based (inter-linked Faust files)
  • Build/compile with output window
  • Graphic diagrams generation and vizualisation in the (default) browser
  • Browse generated C++ code inside Emacs
  • Inter-linked files/buffers :
    • From "component" to Faust file
    • From "include" to Faust library file
  • From error to file:line number
  • From function name to online documentation
  • Fully configurable (build type/target/architecture/toolkit, keyboard shortcuts, etc.)
  • Automatic keyword completion (if Auto-Complete is installed)
  • Automatic objets (functions, operators, etc.) template insertion with default sensible values (if Yasnippet is installed)
  • Modeline indicator of the state of the code

Installation

Easy

Hard

  • Copy/clone this repository in load-path
  • Copy/clone Faust-mode in load-path
  • Add
(require 'faust-mode)
(require 'faustine)

to your init file

Faust

Oh, and of course install the latest Faust and ensure it's in the PATH.

Recommended packages

Those package are not required, but Faustine makes good use of them, and they will make your life better anyway ; They are all available in MELPA, snapshot and stable.

Usage

Enter the mode

Use faustine-mode ; Optionally, add something like this to your init file:

(add-to-list 'auto-mode-alist
             '("\\.dsp\\'" . faustine-mode))

to put any new Faust file in the mode.

Commands

Every interactive command is documented in the README file.

Major modes

Faustine introduces 2 major modes, detailed below.

faustine-mode

A mode to allow the edition of Faust code.

Syntax highlighting of all the Faust commands and operators, as well as indentation rules, using faust-mode.

Every referenced ("component") file is linked, and can be opened by clicking on it or by pressing ‘RET’ over it ; Imported library files are linked too.

The code is checked at each save ; The state of the last check is displayed in the modeline as a green bug icon when it compiles without error or warning, and a red bug when it doesn’t. This icon is also the main Faustine menu.

An "output buffer" is provided to display information about the Faust command output, you can toggle its visibility with ‘faustine-toggle-output-buffer’ ; see ‘faustine-output-mode’ documentation for details about interaction in said buffer.

Several commands allow the editing of Faust code, they are all available in the menu or as a key binding, and described below.

faustine-mode Keys

Key Binding
C-c C-b faustine-build
C-c C-c faustine-syntax-check
C-c C-d faustine-diagram
C-c C-h faustine-online-doc
C-c RET faustine-mdoc
C-c C-o faustine-toggle-output-buffer
C-c C-s faustine-source-code
C-c r faustine-run
C-c C-S-b faustine-build-all
C-c C-S-d faustine-diagram-all
C-M-q prog-indent-sexp

faustine-mode Commands

faustine-build is an interactive Lisp function in ‘faustine.el’.
(faustine-build &optional BUILD-ALL)

Build the current buffer/file executable(s). If BUILD-ALL is set, build all Faust files referenced by this one.

faustine-syntax-check is an interactive Lisp function in

‘faustine.el’.

(faustine-syntax-check)

Check if Faust code buffer compiles. Run at load and save time.

faustine-diagram is an interactive Lisp function in ‘faustine.el’.
(faustine-diagram &optional BUILD-ALL)

Generate the Faust diagram of the current file. If BUILD-ALL is set, build all Faust files referenced by this one.

faustine-online-doc is an interactive Lisp function in ‘faustine.el’.
(faustine-online-doc START END)

View online documentation for the selected (or under point) string on faust.grame.fr. Build a button/link from START to END.

faustine-mdoc is an interactive Lisp function in ‘faustine.el’.
(faustine-mdoc &optional BUILD-ALL)

Generate Mdoc of the current file, display it in a buffer. If BUILD-ALL is set, build all Faust files referenced by this one.

faustine-toggle-output-buffer is an interactive Lisp function in

‘faustine.el’.

(faustine-toggle-output-buffer)

Show/hide the Faust output buffer.

faustine-source-code is an interactive Lisp function in ‘faustine.el’.
(faustine-source-code)

Generate the Faust C++ code of the current faust file and display it in a buffer.

faustine-run is an interactive Lisp function in ‘faustine.el’.
(faustine-run &optional BUTTON)

Run the executable generated by the current Faust code buffer or passed by from the output buffer BUTTON click.

faustine-build-all is an interactive Lisp function in ‘faustine.el’.
(faustine-build-all)

Build executable of all the files referenced by his one using the ‘faustine-build-backend’.

faustine-diagram-all is an interactive Lisp function in ‘faustine.el’.
(faustine-diagram-all)

Build diagram of all the files referenced by his one. Construct a minimal HTML page and display it in the default browser.

prog-indent-sexp is an interactive compiled Lisp function.
(prog-indent-sexp &optional DEFUN)

Indent the expression after point. When interactively called with prefix, indent the enclosing defun instead.


faustine-output-mode

The Faust output buffer mode. The output buffer displays the result of the commands with their time stamps and status.

  • A click on an error opens the buffer at the error line
  • A click on an executable name runs it.

faustine-output-mode Keys

Key Binding
q delete-window

faustine-output-mode Commands

delete-window is an interactive compiled Lisp function.

It is bound to C-x 0.

(delete-window &optional WINDOW)

Delete WINDOW. WINDOW must be a valid window and defaults to the selected one. Return nil.

If the variable ‘ignore-window-parameters’ is non-nil or the ‘delete-window’ parameter of WINDOW equals t, do not process any parameters of WINDOW. Otherwise, if the ‘delete-window’ parameter of WINDOW specifies a function, call that function with WINDOW as its sole argument and return the value returned by that function.

Otherwise, if WINDOW is part of an atomic window, call ‘delete-window’ with the root of the atomic window as its argument. Signal an error if WINDOW is either the only window on its frame, the last non-side window, or part of an atomic window that is its frame’s root window.


README.md made on 2017-11-22 at 12:02:18 with doc-a-mode