Skip to content

A major mode for emacs to edit .cha files from CLAN

License

Notifications You must be signed in to change notification settings

charles-threlkeld/clan-mode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  1. Installation
  2. Features
    1. Syntax highlighting
    2. Special Character Insertion
    3. Audio Playback
      1. Shortcuts
  3. More Information

Installation

Clone the git repo and add to following to your init.el:

(load-file "/path/to/clan-mode.el")
(add-to-list 'auto-mode-alist '("\\.cha" . clan-mode))

with your path.

The first line installs clan-mode. The second line auto-loads clan-mode when you open a *.cha file

Then, either eval-buffer your init.el or restart Emacs for the changes to take effect.

Features

Syntax highlighting

clan-mode supports header syntax highlighting for @Item headers. It highlights speakers of the form *Name: and it highlights the timestamps in •12345_67890•.

Special Character Insertion

clan-mode adds a menu option called "Clan-Mode" which has the major Jeffersonian transcription symbols. It also has CLAN-style keyboard shortcuts for these symbols. The keyboard shortcuts can be found in the Clan-Mode menu.

The "•" symbol is bound to C-o.

To ensure that these symbols load properly, you can use CAFont. To load CAFont into Emacs, add the following to your init.el:

(set-frame-font "CAFont 14")

where 14 is the size that you prefer. Alternatively, use M-x set-frame-font.

Audio Playback

clan-mode supports audio playback through ffplay, part of the ffmpeg package. Please ensure that ffplay is in your PATH in order to support audio playback.

The audio is linked to the file specified by the @Media tag in the clan file.

Shortcuts

  • C-c l Plays the section of the audio file between the timestamps of turn at the point.
  • C-c p Plays the audio file beginning at the start of the turn at the point.
  • C-c s Stops any audio playing.

More Information

The CLAN manual can be found here. A guide to CLAN can be found here. While clan-mode does not implement all of these features, they are the standard sources for the .cha schema.

About

A major mode for emacs to edit .cha files from CLAN

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%