all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [elpa] master 9a3a508: Package transcribe added
       [not found] ` <E1a31Fj-0001PD-Bq@vcs.savannah.gnu.org>
@ 2015-11-29 22:41   ` Stefan Monnier
  2015-11-29 23:37     ` Artur Malabarba
       [not found]   ` <E1a31Fj-0001PD-Bq-7jckXlaVFY8RVz71yTsr42D2FQJk+8+b@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2015-11-29 22:41 UTC (permalink / raw)
  To: David Gonzalez Gandara; +Cc: emacs-devel

Thanks

> +;;;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.


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [elpa] master 9a3a508: Package transcribe added
       [not found]   ` <E1a31Fj-0001PD-Bq-7jckXlaVFY8RVz71yTsr42D2FQJk+8+b@public.gmane.org>
@ 2015-11-29 23:35     ` Artur Malabarba
       [not found]       ` <CAAdUY-LCYa3f4Qd6uKpmgG6hDJi2RjJhcOR2+ZZEboHuG_8qQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Artur Malabarba @ 2015-11-29 23:35 UTC (permalink / raw)
  To: emacs-devel, David Gonzalez Gandara; +Cc: emacs-elpa-diffs-mXXj517/zsQ

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

On 29 Nov 2015 12:38 pm, "David Gonzalez Gandara" <dggandara-IGUgQLVVQiRCV4ILt04nZQ@public.gmane.org>
wrote:
>     Package transcribe added

Thanks for the package, David.

Besides the comments already made by Stefan, I just wanted to point out
that we now announce on emacs-devel before adding new packages to Elpa.
There's more information on the readme.
It's just a way of keeping everybody informed about new additions.

[-- Attachment #2: Type: text/html, Size: 588 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [elpa] master 9a3a508: Package transcribe added
  2015-11-29 22:41   ` Stefan Monnier
@ 2015-11-29 23:37     ` Artur Malabarba
  0 siblings, 0 replies; 6+ messages in thread
From: Artur Malabarba @ 2015-11-29 23:37 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: David Gonzalez Gandara, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

> > +
> > +(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:

Ideally to a minor-mode.

[-- Attachment #2: Type: text/html, Size: 712 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [elpa] master 9a3a508: Package transcribe added
       [not found]       ` <CAAdUY-LCYa3f4Qd6uKpmgG6hDJi2RjJhcOR2+ZZEboHuG_8qQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-11-30 10:19         ` Artur Malabarba
  2015-11-30 17:11           ` David González Gándara
  0 siblings, 1 reply; 6+ messages in thread
From: Artur Malabarba @ 2015-11-30 10:19 UTC (permalink / raw)
  To: emacs-devel; +Cc: David Gonzalez Gandara, emacs-elpa-diffs-mXXj517/zsQ

Artur Malabarba <bruce.connor.am-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> On 29 Nov 2015 12:38 pm, "David Gonzalez Gandara" <
> dggandara-IGUgQLVVQiRCV4ILt04nZQ@public.gmane.org> wrote:
>>     Package transcribe added
>
> I just wanted to point
> out that we now announce on emacs-devel before adding new packages to
> Elpa.

Oh wait. I see you did announce it. I kinda missed it because you wrote
Packed instead of Package. :-)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [elpa] master 9a3a508: Package transcribe added
  2015-11-30 10:19         ` Artur Malabarba
@ 2015-11-30 17:11           ` David González Gándara
  0 siblings, 0 replies; 6+ messages in thread
From: David González Gándara @ 2015-11-30 17:11 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: emacs-elpa-diffs, David Gonzalez Gandara, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

Thanks for your patience and your suggestions with newbies. I tried to
apply all your advice. I am still fighting with git, I hope I don't break
anything.

On 30 November 2015 at 11:19, Artur Malabarba <bruce.connor.am@gmail.com>
wrote:

> Artur Malabarba <bruce.connor.am@gmail.com> writes:
>
> > On 29 Nov 2015 12:38 pm, "David Gonzalez Gandara" <
> > dggandara@member.fsf.org> wrote:
> >>     Package transcribe added
> >
> > I just wanted to point
> > out that we now announce on emacs-devel before adding new packages to
> > Elpa.
>
> Oh wait. I see you did announce it. I kinda missed it because you wrote
> Packed instead of Package. :-)
>

[-- Attachment #2: Type: text/html, Size: 1176 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [elpa] master 9a3a508: Package transcribe added
@ 2015-11-30 17:59 David González Gándara
  0 siblings, 0 replies; 6+ messages in thread
From: David González Gándara @ 2015-11-30 17:59 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

Thanks for your patience and your suggestions with newbies. I tried to
apply all your advice. I am still fighting with git, I hope I don't break
anything.

[-- Attachment #2: Type: text/html, Size: 182 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-30 17:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-30 17:59 [elpa] master 9a3a508: Package transcribe added David González Gándara
     [not found] <20151129123851.5369.35231@vcs.savannah.gnu.org>
     [not found] ` <E1a31Fj-0001PD-Bq@vcs.savannah.gnu.org>
2015-11-29 22:41   ` Stefan Monnier
2015-11-29 23:37     ` Artur Malabarba
     [not found]   ` <E1a31Fj-0001PD-Bq-7jckXlaVFY8RVz71yTsr42D2FQJk+8+b@public.gmane.org>
2015-11-29 23:35     ` Artur Malabarba
     [not found]       ` <CAAdUY-LCYa3f4Qd6uKpmgG6hDJi2RjJhcOR2+ZZEboHuG_8qQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-30 10:19         ` Artur Malabarba
2015-11-30 17:11           ` David González Gándara

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.