From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [elpa] master 9a3a508: Package transcribe added Date: Sun, 29 Nov 2015 17:41:10 -0500 Message-ID: References: <20151129123851.5369.35231@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1448836896 23680 80.91.229.3 (29 Nov 2015 22:41:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Nov 2015 22:41:36 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Gonzalez Gandara Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 29 23:41:25 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a3Aeq-0001vr-1R for ged-emacs-devel@m.gmane.org; Sun, 29 Nov 2015 23:41:24 +0100 Original-Received: from localhost ([::1]:38062 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Aeu-0002AH-3e for ged-emacs-devel@m.gmane.org; Sun, 29 Nov 2015 17:41:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Aeg-0002A1-OL for emacs-devel@gnu.org; Sun, 29 Nov 2015 17:41:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3Aed-0006QP-HT for emacs-devel@gnu.org; Sun, 29 Nov 2015 17:41:14 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:48042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Aed-0006QL-D1 for emacs-devel@gnu.org; Sun, 29 Nov 2015 17:41:11 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BKFgA731xV/yr292hcgxBUXoJQhVW9FoV1BAICgTw9EAEBAQEBAQGBCkEFg10BAQRWIxALNBIUGA0kiD/PIwEBCAEBAQEeizqEOhgzB4QtBYtEbIQEhm2CTQWFJJIUg1kjgWaCMCAxgkcBAQE X-IPAS-Result: A0BKFgA731xV/yr292hcgxBUXoJQhVW9FoV1BAICgTw9EAEBAQEBAQGBCkEFg10BAQRWIxALNBIUGA0kiD/PIwEBCAEBAQEeizqEOhgzB4QtBYtEbIQEhm2CTQWFJJIUg1kjgWaCMCAxgkcBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="179711716" Original-Received: from 104-247-246-42.cpe.teksavvy.com (HELO fmsmemgm.homelinux.net) ([104.247.246.42]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Nov 2015 17:41:10 -0500 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 5DF8FAE07A; Sun, 29 Nov 2015 17:41:10 -0500 (EST) In-Reply-To: (David Gonzalez Gandara's message of "Sun, 29 Nov 2015 12:38:51 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195583 Archived-At: 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>=3D24, I recommend you add "-*- lexical-binding:t -*-". > +;;Copyright 2014 David Gonz=E1lez G=E1ndara 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 ""))=20 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 "") 'emms-pause) > + > +(global-set-key (kbd "C-x ") 'emms-stop) > + > +(global-set-key (kbd "C-x ") 'emms-seek-forward) > + > +(global-set-key (kbd "C-x ") 'emms-seek-backward) > + > +(global-set-key (kbd "") '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