branch: master
commit 38244897e4178efca61431a1aac952d43a692d86
Author: Stefan Monnier
Commit: Stefan Monnier
* transcribe/transcribe.el: Cosmetic changes
(transcribe-analyze): Comment out unused code.
(transcribe-xml-tag-person, transcribe-xml-tag)
(transcribe-add-attribute, transcribe-add-attribute-function)
(transcribe-add-attribute-move, transcribe-xml-tag-l1)
(transcribe-xml-tag-l2, transcribe-xml-tag-break): Use define-skeleton.
---
packages/transcribe/transcribe.el | 123 ++
1 file changed, 57 insertions(+), 66 deletions(-)
diff --git a/packages/transcribe/transcribe.el
b/packages/transcribe/transcribe.el
index e7aa6f9..0609a5d 100644
--- a/packages/transcribe/transcribe.el
+++ b/packages/transcribe/transcribe.el
@@ -1,6 +1,6 @@
;;; transcribe.el --- Package for audio transcriptions
-;; Copyright 2014-2016 Free Software Foundation, Inc.
+;; Copyright 2014-2017 Free Software Foundation, Inc.
;; Author: David Gonzalez Gandara
;; Version: 1.5.2
@@ -22,7 +22,7 @@
;; REQUIRES:
;; -
-;; This module works without any requires, but in order to use the audio
+;; This module works without any requires, but in order to use the audio
;; functions, you need to install the Emacs package "emms", by Joe Drew,
;; and the external program "mpg321", by Jorgen Schafer and Ulrik Jensen,
;; both under GPL licenses.
@@ -89,9 +89,9 @@
(defvar emms-player-list)
(push 'emms-player-mpg321-remote emms-player-list)
-(if t (require 'emms-mode-line))
+(if t (require 'emms-mode-line));FIXME: isn't `emms-mode-line' autoloaded?
(emms-mode-line 1)
-(if t (require 'emms-playing-time))
+(if t (require 'emms-playing-time));FIXME: isn't `emms-playing-time'
autoloaded?
(emms-playing-time 1)
(defvar transcribe-function-list '("initiating" "responding" "control"
"expressive" "interpersonal"))
@@ -238,10 +238,10 @@
(when (string-match "@*" l1) (setq shifts (1+
shifts)))
(cl-pushnew l1 interventionsl1 :test #'equal)
(setq asunitsl1 (1+ asunitsl1)
- (reverse interventionsl2)
+ ;; (reverse interventionsl2)
;; (write-region (format "%s" interventionsl2) nil (format
"transcribe-output-%s-%s-l2.txt" episodenumber personid))
;; Write raw interventions to file will be supported by a different function
- (reverse interventionsl1)
+ ;; (reverse interventionsl1)
;; (write-region (format "%s" interventionsl1) nil (format
"transcribe-output-%s-%s-l1.txt" episodenumber personid))
;; (print interventionsl2) ;uncomment to display all the interventions on
screen
(let((asunitspersecondl2 (/ asunitsl2 (string-to-number duration)))
@@ -281,8 +281,8 @@
(let* ((xml (xml-parse-region (point-min) (point-max)))
(results (car xml))
(episodes (xml-get-children results 'episode)))
-
- (with-current-buffer "Statistics Output"
+
+(with-current-buffer "Statistics Output"
(erase-buffer)
(insert
"person,episode,duration,C-UNITS(L2),C-UNITS(L1),role,context,demand,QUAN-L2,QUAN-L1,QUAL-L2,initiating,responding,control,expressive,interpersonal,shifts,aux,level,subjects,yearofCLIL,month\n"))
(dolist (episode episodes)
@@ -297,64 +297,55 @@
(transcribe-analyze number participant))
-(defun transcribe-xml-tag-person (xmltag move)
- "This function allows the automatic insertion of a speaker xml tag and
places the cursor."
- (interactive (list(read-string "Person:")(completing-read "move:"
transcribe-move-list)))
- (end-of-line)
- (insert (format "\n<%s move=\"%s\">" xmltag move xmltag))
- (backward-char 3)
- (backward-char (string-width xmltag)))
-
-(defun transcribe-xml-tag (xmltag)
- "This function allows the automatic insetion of a custom xml tag and places
the cursor."
- (interactive "stag:")
- (insert (format "<%s>" xmltag xmltag))
- (backward-char 3)
- (backward-char (string-width xmltag)))
-
-(defun transcribe-region-xml-tag (xmltag)
- "This function encapsulates the marked region in the given tag."
- (interactive "stag:")
- (let ((beginning (region-beginning))
- (end (region-end)))
- (goto-char beginning)
- (insert (format "<%s>" xmltag))
- (goto-char (+ (+ end (string-width xmltag)) 2))
- (insert (format "" xmltag
-
-(defun transcribe-add-attribute (att val)
- "Adds a xml attribute at cursor with the name and value specified
(autocompletion possible)"
- (interactive (list(completing-read "attribute name:"
transcribe-attribute-list)(read-string "value:")))
- (insert (format "%s=\"%s\"" att val)))
-
-(defun transcribe-add-attribute-function (val)
- "Adds the xml attribute `function' at cursor with the name specified
(autocompletion possible)"
- (interactive (list(completing-read "function name:"
transcribe-function-list)))
- (insert (format "function=\"%s\"" val)))
-
-(defun transcribe-add-attribute-move (val)
- "Adds the xm