[elpa] externals/xelb updated (a0861df -> 8116562)

2015-12-13 Thread Chris Feng
ch11ng pushed a change to branch externals/xelb.

  from  a0861df   Bump version to 0.4
   new  d52e6e8   Escape an open-parenthesis
   new  8116562   Improve the handling of modifier keys


Summary of changes:
 el_client.el   |   15 +++--
 xcb-keysyms.el |  184 ---
 2 files changed, 116 insertions(+), 83 deletions(-)



[elpa] externals/exwm 07921a3: Remove the MappingNotify event listener

2015-12-13 Thread Chris Feng
branch: externals/exwm
commit 07921a3731c3b951d7d5ecc35b808c40d1d15bd4
Author: Chris Feng 
Commit: Chris Feng 

Remove the MappingNotify event listener

* exwm-input.el (exwm-input--on-MappingNotify, exwm-input--init): Remove
the event listener for MappingNotify event (it should be handled in the
underling library instead).
---
 exwm-input.el |   19 ---
 1 files changed, 0 insertions(+), 19 deletions(-)

diff --git a/exwm-input.el b/exwm-input.el
index 98324b8..99a4b8f 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -152,23 +152,6 @@ It's updated in several occasions, and only used by 
`exwm-input--set-focus'.")
   (setq exwm-input--temp-line-mode nil)
   (exwm-input--release-keyboard
 
-(defun exwm-input--on-MappingNotify (data _synthetic)
-  "Handle MappingNotify event."
-  (let ((obj (make-instance 'xcb:MappingNotify)))
-(xcb:unmarshal obj data)
-(with-slots (request first-keycode count) obj
-  (cond
-   ((= request xcb:Mapping:Modifier)
-;; Modifier keys changed
-(exwm--log "Update modifier mapping")
-(xcb:keysyms:update-modifier-mapping exwm--connection))
-   ((= request xcb:Mapping:Keyboard)
-;; Only update changed keys
-(exwm--log "Update keyboard mapping: %d ~ %d"
-   first-keycode (+ first-keycode count))
-(xcb:keysyms:update-keyboard-mapping exwm--connection
- first-keycode count))
-
 (defun exwm-input--on-ButtonPress (data _synthetic)
   "Handle ButtonPress event."
   (let ((obj (make-instance 'xcb:ButtonPress))
@@ -494,8 +477,6 @@ SIMULATION-KEYS is a list of alist (key-sequence1 . 
key-sequence2)."
   exwm-input--resize-keysym (car resize-key)
   exwm-input--resize-mask (cadr resize-key)))
   ;; Attach event listeners
-  (xcb:+event exwm--connection 'xcb:MappingNotify
-  #'exwm-input--on-MappingNotify)
   (xcb:+event exwm--connection 'xcb:KeyPress #'exwm-input--on-KeyPress)
   (xcb:+event exwm--connection 'xcb:ButtonPress #'exwm-input--on-ButtonPress)
   (xcb:+event exwm--connection 'xcb:ButtonRelease



[elpa] externals/xelb 8116562 2/2: Improve the handling of modifier keys

2015-12-13 Thread Chris Feng
branch: externals/xelb
commit 8116562a2728b387cad6bb89bc551ad7dbdbb47c
Author: Chris Feng 
Commit: Chris Feng 

Improve the handling of modifier keys

* xcb-keysyms.el (xcb:keysyms:update-modifier-mapping): Find modifiers
according to x_find_modifier_meanings in xterm.c.

(xcb:keysyms:event->keysym, xcb:keysyms:keysym->event): Take x-alt-keysym,
x-meta-keysym, x-hyper-keysym and x-super-keysym into account when doing
X KEYSYM <-> Emacs event translation.
---
 xcb-keysyms.el |  184 ---
 1 files changed, 107 insertions(+), 77 deletions(-)

diff --git a/xcb-keysyms.el b/xcb-keysyms.el
index c4b2ea2..85d1dbf 100644
--- a/xcb-keysyms.el
+++ b/xcb-keysyms.el
@@ -88,72 +88,70 @@ This method must be called before using any other method in 
this module."
 (setf (slot-value obj 'extra-plist)
   (plist-put (slot-value obj 'extra-plist) 'keysyms result
 
+;; Reference: 'x_find_modifier_meanings' in 'xterm.c'.
 (cl-defmethod xcb:keysyms:update-modifier-mapping ((obj xcb:connection))
   "Differentiate xcb:ModMask:1 ~ xcb:ModMask:5."
-  ;; Determine MODE SWITCH and NUM LOCK
   (let* ((reply (xcb:+request-unchecked+reply obj
 (make-instance 'xcb:GetModifierMapping)))
  (keycodes-per-modifier (slot-value reply 'keycodes-per-modifier))
  (keycodes (slot-value reply 'keycodes))
- (mode-masks (list xcb:ModMask:Shift xcb:ModMask:Lock
-   xcb:ModMask:Control xcb:ModMask:1 xcb:ModMask:2
-   xcb:ModMask:3 xcb:ModMask:4 xcb:ModMask:5))
- events keycode keysym)
-(setq xcb:keysyms:mode-switch-mask nil
-  xcb:keysyms:num-lock-mask nil)
+ (mod-masks (vector xcb:ModMask:1 xcb:ModMask:2 xcb:ModMask:3
+xcb:ModMask:4 xcb:ModMask:5))
+ keycode keysym found-alt-or-meta)
+(setq xcb:keysyms:meta-mask nil
+  xcb:keysyms:hyper-mask nil
+  xcb:keysyms:super-mask nil
+  xcb:keysyms:alt-mask nil
+  xcb:keysyms:num-lock-mask nil
+  xcb:keysyms:mode-switch-mask nil)
 (cl-assert (= (length keycodes) (* 8 keycodes-per-modifier)))
-(dotimes (i 8)
-  (setq events nil)
-  (dotimes (_ keycodes-per-modifier)
-(when (and (/= (setq keycode (pop keycodes)) 0)
-   (setq keysym (xcb:keysyms:keycode->keysym obj keycode 0)))
-  (setq events
-(nconc events
-   (list (xcb:keysyms:keysym->event obj keysym nil t))
-  (cond ((memq 'mode-switch* events)
- (setq xcb:keysyms:mode-switch-mask (elt mode-masks i)))
-((memq 'kp-numlock events)
- (setq xcb:keysyms:num-lock-mask (elt mode-masks i))
-  ;; Determine remaining keys
-  (let* ((frame (unless (frame-parameter nil 'window-id)
-  (catch 'break
-(dolist (i (frame-list))
-  (when (frame-parameter i 'window-id)
-(throw 'break i))
- (id (string-to-number (frame-parameter frame 'window-id)))
- (root
-  (slot-value (car (slot-value (xcb:get-setup obj) 'roots)) 'root))
- (keycode (xcb:keysyms:keysym->keycode obj ?a))
- (fake-event (make-instance 'xcb:SendEvent
-:propagate 0 :destination id
-:event-mask xcb:EventMask:NoEvent
-:event nil))
- (key-press (make-instance 'xcb:KeyPress
-   :detail keycode :time xcb:Time:CurrentTime
-   :root root :event id :child 0
-   :root-x 0 :root-y 0 :event-x 0 :event-y 0
-   :state nil :same-screen 1))
- event)
-(dolist (i (list xcb:ModMask:1 xcb:ModMask:2 xcb:ModMask:3
- xcb:ModMask:4 xcb:ModMask:5))
-  (unless (or (equal i xcb:keysyms:mode-switch-mask) ;already determined
-  (equal i xcb:keysyms:num-lock-mask))
-(setf (slot-value key-press 'state) i
-  (slot-value fake-event 'event) (xcb:marshal key-press obj))
-(run-with-idle-timer 0 nil (lambda ()
- (xcb:+request obj fake-event)
- (xcb:flush obj)))
-(catch 'break
-  (with-timeout (1) ;FIXME
-(while t
-  (setq event (read-event))
-  (when (and (integerp event) (= ?a (event-basic-type event)))
-(pcase event
-  (?\M-a (setq xcb:keysyms:meta-mask i))
-  (?\A-a (setq xcb:keysyms:alt-mask i))
-  (?\s-a (setq xcb:keysyms:super-mask i))
-  (?\H-a (setq xcb:keysyms:hyper-mask i)))
-(throw 'break nil)
+;; Scan Mod1 ~ Mod5
+(setq keycodes (nth

[elpa] externals/xelb d52e6e8 1/2: Escape an open-parenthesis

2015-12-13 Thread Chris Feng
branch: externals/xelb
commit d52e6e8665df401b5c6c31826522e5b8afbb6d40
Author: Chris Feng 
Commit: Chris Feng 

Escape an open-parenthesis
---
 el_client.el |   15 +--
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/el_client.el b/el_client.el
index 87a83e0..640c819 100644
--- a/el_client.el
+++ b/el_client.el
@@ -153,12 +153,15 @@ an `xelb-auto-padding' attribute."
 
 ;;; Code:
 
-(require 'xcb-types)
-
-" header (let ((extension-name (xelb-node-attr result 'extension-name)))
-   (if extension-name
-   (concat extension-name " extension")
- "core protocol"))
+\(require 'xcb-types)
+
+"
+ header
+ (let ((extension-name (xelb-node-attr result
+   'extension-name)))
+   (if extension-name
+   (concat extension-name " extension")
+ "core protocol"))
  (file-name-nondirectory file)))
   ;; Print extension info (if any)
   (let ((extension-xname (xelb-node-attr result 'extension-xname))



[elpa] master 555be7f: /transcribe/transcribe.el: edit comments, add new functions

2015-12-13 Thread David Gonzalez Gandara
branch: master
commit 555be7f544ecb45d31a3b29c656ebde3c800e09c
Author: David Gonzalez Gandara 
Commit: David Gonzalez Gandara 

/transcribe/transcribe.el: edit comments, add new functions
---
 packages/transcribe/transcribe.el |   49 +---
 1 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/packages/transcribe/transcribe.el 
b/packages/transcribe/transcribe.el
index e4a51bc..d092de8 100644
--- a/packages/transcribe/transcribe.el
+++ b/packages/transcribe/transcribe.el
@@ -3,7 +3,7 @@
 ;; Copyright 2014-2015  Free Software Foundation, Inc.
 
 ;; Author: David Gonzalez Gandara 
-;; Version: 1.0.1
+;; Version: 1.0.2
 
 ;; This program is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -22,8 +22,10 @@
 
 ;; REQUIRES:
 ;; -
-;; In order to use the audio functions of transcribe, you need to install 
-;; emms and mpg321.
+;; 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.
 ;;
 ;; USAGE:
 ;; -
@@ -33,11 +35,13 @@
 ;; include them.
 ;; The analyse function will search for a specific structure 
 ;; of episodes that can be automatically added with the macro NewEpisode. 
-;; The function expects the utterances to be transcribed inside a xml tag 
-;; with the identifier of the speaker, with the tags  or , depending 
+;; The function expects the speech acts to be transcribed inside a turn xml 
+;; tag with the identifier of the speaker with optional move attribute.
+;; Each speech act is spected inside a  or  tag, depending 
 ;; on the language used by the person. The attributes expected are the 
-;; number of clauses that form the utterance and the number of errors the 
-;; transcriber observes.
+;; number of clauses that form the utterance, the number of errors the 
+;; transcriber observes, and the function of the speech act. The parser will
+;; even if some attributes are missing.
 ;; 
 ;; 
 ;; AUDIO COMMANDS
@@ -55,6 +59,10 @@
 ;; C-x C-n --> Create new episode structure. This is useful in case your 
 ;; xml file structure requires it. You can customize the text 
 ;; inserted manipulating the realted function.
+;;  -> Interactively insert a function attribute in a speech act 
+;; (l1 or l2) tag.
+;;  -> Interactively insert a move attribute in a turn (person) tag
+;;  -> Interactively insert an attribute (any kind)
 ;;  -> Interactively insert new tag. You will be prompted for the 
 ;; content of the tag. The starting tag and the end tag will 
be 
 ;; inserted automatically and the cursor placed in the proper 
@@ -90,6 +98,11 @@
 (if t (require 'emms-playing-time))
 (emms-playing-time 1)
 
+(defvar transcribe-function-list '("initiating (inform, request, question, 
etc)" "responding" "control (reformulate, echo, etc.)" "expresive" 
"interpersonal (thank, bye, etc.)"))
+(defvar transcribe-move-list '("initiation" "response" "follow-up"))
+(defvar transcribe-attribute-list (append '("clauses" "errors") 
transcribe-function-list transcribe-move-list))
+;(append transcribe-attribute-list transcribe-function-list 
transcribe-move-list)
+
 (defun transcribe-analyze-episode (episode person)
   "This calls the external python package analyze_episodes2.py. The new 
function transcribe-analyze implements its role now."
@@ -174,6 +187,21 @@
   (backward-char 3)
   (backward-char (string-width 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 "attibute 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 xml attribute 'move' at cursor with the name specified 
(autocompletion possible"
+  (interactive (list(completing-read "move name:" transcribe-move-list))) 
+  (insert (format "move=\"%s\"" val)))
+
 (defun transcribe-xml-tag-l1 ()
   "Inserts a l1 tag and places the cursor"
   (interactive)
@@ -190,8 +218,6 @@
 
 (fset 'transcribe-xml-tag-l2-break "")
;inserts a break inside a l2 tag
-(fset 'transcribe-set-attributes "clauses=\"1\" errors=\"0\"")
-;inserts the attributes where they are missing
 
 (defun transcribe-display-audio-info ()
   (interactive)
@@ -213,11 +239,14 @@
 ([?\C-x down] . emms-stop)

[elpa] master a50a8dd: /transcribe/transcribe.el: Fix bug

2015-12-13 Thread David Gonzalez Gandara
branch: master
commit a50a8dda22a42ddc7860c515ffb3b8b1dfa3c531
Author: David Gonzalez Gandara 
Commit: David Gonzalez Gandara 

/transcribe/transcribe.el: Fix bug
---
 packages/transcribe/transcribe.el |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/packages/transcribe/transcribe.el 
b/packages/transcribe/transcribe.el
index d092de8..679727a 100644
--- a/packages/transcribe/transcribe.el
+++ b/packages/transcribe/transcribe.el
@@ -98,7 +98,7 @@
 (if t (require 'emms-playing-time))
 (emms-playing-time 1)
 
-(defvar transcribe-function-list '("initiating (inform, request, question, 
etc)" "responding" "control (reformulate, echo, etc.)" "expresive" 
"interpersonal (thank, bye, etc.)"))
+(defvar transcribe-function-list '("initiating" "responding" "control" 
"expresive" "interpersonal"))
 (defvar transcribe-move-list '("initiation" "response" "follow-up"))
 (defvar transcribe-attribute-list (append '("clauses" "errors") 
transcribe-function-list transcribe-move-list))
 ;(append transcribe-attribute-list transcribe-function-list 
transcribe-move-list)



[elpa] master 979b09b: /transcribe/transcribe.el: Add some functions, fix bugs

2015-12-13 Thread David Gonzalez Gandara
branch: master
commit 979b09b2dec589220689a9e29bfd57b4b1c6a04d
Author: David Gonzalez Gandara 
Commit: David Gonzalez Gandara 

/transcribe/transcribe.el: Add some functions, fix bugs
---
 packages/transcribe/transcribe.el |   82 +
 1 files changed, 47 insertions(+), 35 deletions(-)

diff --git a/packages/transcribe/transcribe.el 
b/packages/transcribe/transcribe.el
index 679727a..684e505 100644
--- a/packages/transcribe/transcribe.el
+++ b/packages/transcribe/transcribe.el
@@ -41,7 +41,7 @@
 ;; on the language used by the person. The attributes expected are the 
 ;; number of clauses that form the utterance, the number of errors the 
 ;; transcriber observes, and the function of the speech act. The parser will
-;; even if some attributes are missing.
+;; work even if some attributes are missing.
 ;; 
 ;; 
 ;; AUDIO COMMANDS
@@ -56,29 +56,22 @@
 ;;
 ;; XML TAGGING COMMANDS
 ;; --
-;; C-x C-n --> Create new episode structure. This is useful in case your 
-;; xml file structure requires it. You can customize the text 
-;; inserted manipulating the realted function.
-;;  -> Interactively insert a function attribute in a speech act 
+;; C-x C-n --> Create new episode structure. This is useful in case 
your 
+;; xml file structure requires it.
+;;  -> Interactively insert a function attribute in a speech 
act 
 ;; (l1 or l2) tag.
-;;  -> Interactively insert a move attribute in a turn (person) tag
-;;  -> Interactively insert an attribute (any kind)
-;;  -> Interactively insert new tag. You will be prompted for the 
-;; content of the tag. The starting tag and the end tag will 
be 
-;; inserted automatically and the cursor placed in the proper 
-;; place to type.
+;;  -> Interactively insert a move attribute in a turn 
(person) tag
+;;  -> Interactively insert an attribute (any kind)
+;;  -> Insert turn (person) tag. Inserts a move attribute.
+;;  > Insert a custom tag. Edit the function to adapt to your 
needs.
+;;  > Insert speech act tag in L1, with clauses, errors and 
function
+;; attributes.
+;;  > Insert speech act tag in L2, with clauses, errors and 
function
+;; attributes.
 ;;
-;;
-;;
-;; SPECIFIC COMMANDS I USE, THAT YOU MAY FIND USEFUL
-;; 
+;; AUTOMATIC PARSING
+;; -
 ;; C-x C-a --> Analyses the text for measurments of performance.
-;;  > Customised tag 1. Edit the function to adapt to your 
needs.
-;;  > Customised tag 2. Edit the function to adapt to your 
needs.
-;;  -> Break tag. This command "breaks" a tag in two, that is 
-;; it inserts an ending tag and then a starting tag.
-;;  -> Insert atributes. This function insert custom xml 
attributes. 
-;; Edit the function to suit you needs.
 
 ;;; Code:
 
@@ -100,7 +93,7 @@
 
 (defvar transcribe-function-list '("initiating" "responding" "control" 
"expresive" "interpersonal"))
 (defvar transcribe-move-list '("initiation" "response" "follow-up"))
-(defvar transcribe-attribute-list (append '("clauses" "errors") 
transcribe-function-list transcribe-move-list))
+(defvar transcribe-attribute-list '("clauses" "errors" "function" "move"))
 ;(append transcribe-attribute-list transcribe-function-list 
transcribe-move-list)
 
 (defun transcribe-analyze-episode (episode person)
@@ -180,13 +173,30 @@
 (princ (format "L2(Asunits/second): %s, L2(clauses/Asunit): %s, 
L1(Asunits/second): %s" 
   asunitspersecondl2 clausesperasunitl2 asunitspersecondl1)
 
-(defun transcribe-define-xml-tag (xmltag)
-  "This function allows the automatic insetion of a xml tag and places the 
cursor."
+(defun transcribe-xml-tag-person (xmltag)
+  "This function allows the automatic insetion of a speaker xml tag and places 
the cursor."
+  (interactive "stag:")
+  (insert (format "<%s move=\"\">" xmltag 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)
+  (insert (format "" xmltag
+
 (defun transcribe-add-attribute (att val)
   "Adds a xml attribute at c