[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [elpa] master 9a3a508: Package transcribe added

From: Stefan Monnier
Subject: Re: [elpa] master 9a3a508: Package transcribe added
Date: Sun, 29 Nov 2015 17:41:10 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)


> +;;;transcribe.el --- package for audio transcriptions
The convention for ";;;" is to have a space between ";;;" and the rest.
If the package is only meant to be supported for Emacs>=24, I recommend
you add "-*- lexical-binding:t -*-".

> +;;Copyright 2014 David González Gándara

Oh and for ";;" as well.

> +(require 'emms-setup)

So your package only works with emms, in which case the pseudo-headers
should include

   ;; Package-Requires: ((emms "<version>")) 

or something like that.

> +;(require 'emms-player-mpd)
> +;(setq emms-player-mpd-server-name "localhost")
> +;(setq emms-player-mpd-server-port "6600")
> +
> +(emms-standard)
> +(emms-default-players)
> +(require 'emms-player-mpg321-remote)
> +(push 'emms-player-mpg321-remote emms-player-list)
> +
> +(require 'emms-mode-line)
> +(emms-mode-line 1)
> +(require 'emms-playing-time)
> +(emms-playing-time 1)
> +
> +(global-set-key (kbd "C-x C-p") 'emms-play-file)
> +
> +(global-set-key (kbd "<f5>") 'emms-pause)
> +
> +(global-set-key (kbd "C-x <down>") 'emms-stop)
> +
> +(global-set-key (kbd "C-x <right>") 'emms-seek-forward)
> +
> +(global-set-key (kbd "C-x <left>") 'emms-seek-backward)
> +
> +(global-set-key (kbd "<f8>") 'emms-seek)

I think those settings should be moved to a function: loading
transcribe.el should not make such global changes.  Instead they should
be made via a function.  Activating a mode/feature should never be made
with "require" or "load" but by calling a function (or setting a custom
var) which internally will load the file, if needed.

> +(defun analyze-episode (episode person)
> +  (interactive "sepisode: \nsperson:")

All definitions should use a package prefix, e.g. "transcribe-", so as
to avoid conflicts with other packages.

> +  (shell-command (concat (expand-file-name  "analyze_episodes2.py") " -e " 
> episode " -p " person " -i " buffer-file-name )))

If your file is called "hello; rm -rf ~/." the above command will not do
what you wanted.  You can fix that by quoting the various parts with
shell-quote-argument, but I recommend you just use `call-process'
instead of `shell-command', since you don't make use of any
functionality of the shell, so the use of shell here only introduces
overheads and bugs.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]