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

2015-11-30 Thread Artur Malabarba
Artur Malabarba  writes:

> On 29 Nov 2015 12:38 pm, "David Gonzalez Gandara" <
> dggand...@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. :-)



[elpa] master ab66979: * admin/archive-contents.el: Make :core handling optional

2015-11-30 Thread Stefan Monnier
branch: master
commit ab66979132563b7acfa33f2e619cd31deb53715a
Author: Stefan Monnier 
Commit: Stefan Monnier 

* admin/archive-contents.el: Make :core handling optional

(archive--sync-emacs-repo): Drop support for $EMACS_CLONE_REFERENCE and
don't auto-use ../emacs/master if present.
(archive--insert-repolinks): Mark arg as unused.
(archive--metadata): Remove unused var `pv'.
---
 README|3 +-
 admin/archive-contents.el |   73 
 2 files changed, 35 insertions(+), 41 deletions(-)

diff --git a/README b/README
index b3e2b7b..7c5cd36 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Copyright (C) 2010-2011, 2014 Free Software Foundation, Inc.
+Copyright (C) 2010-2011, 2014, 2015 Free Software Foundation, Inc.
 See the end of the file for license conditions.
 
 
@@ -237,6 +237,7 @@ packages/ directory.  You can then add that directory, e.g. 
with:
 ** To deploy the package repository as a remotely-accessible archive:
 
git clone .../elpa
+   (cd elpa; git clone .../emacs)#If you want to generate :core packages.
mkdir build
cd build
(cd ../elpa; git log --format=%H | tail -n 1) >.changelog-witness
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 2181aba..ae46435 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -179,7 +179,6 @@ PKG is the name of the package and DIR is the directory 
where it is."
 (error "Can't parse first line of %s" mainfile)
   ;; Grab the other fields, which are not mandatory.
   (let* ((description (match-string 1))
- (pv )
  (version
   (or (lm-header "package-version")
   (lm-header "version")
@@ -421,7 +420,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
   (replace-regexp-in-string "<" "<"
 (replace-regexp-in-string "&" "&" txt)))
 
-(defun archive--insert-repolinks (name srcdir mainsrcfile url)
+(defun archive--insert-repolinks (name srcdir _mainsrcfile url)
   (when url
 (insert (format "Home page: %s\n"
 url (archive--quote url)))
@@ -563,31 +562,21 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
 (defconst archive--emacs-git-url "git://git.sv.gnu.org/emacs.git")
 
 (defun archive--sync-emacs-repo ()
-  "Clone and sync Emacs repository."
-  (let ((reference (expand-file-name
-(or (getenv "EMACS_CLONE_REFERENCE") "../emacs/master")))
-(emacs-repo-root (expand-file-name "emacs")))
-(when (and (file-exists-p emacs-repo-root)
-   (not (file-exists-p
- (expand-file-name "README" emacs-repo-root
-  (message "Cleaning stalled Emacs clone: %s" emacs-repo-root)
-  (delete-directory emacs-repo-root t))
-(cond ((file-exists-p emacs-repo-root)
-   (let ((default-directory emacs-repo-root))
- (message "Running git pull in %S" default-directory)
- (call-process "git" nil t nil "pull")))
-  ((file-exists-p reference)
-   (message "Emacs repository reference found: %s" reference)
-   (call-process
-"git" nil t nil
-"clone" archive--emacs-git-url
-"--reference" reference
-emacs-repo-root))
-  (t
-   (error
-(concat "Emacs repository not found at: %s\n"
-"Point EMACS_CLONE_REFERENCE environment variable to an "
-"existing checkout.") reference)
+  "Sync Emacs repository, if applicable.
+Return non-nil if there's an \"emacs\" repository present."
+  ;; Support for :core packages is important for elpa.gnu.org, but for other
+  ;; cases such as "in-place installation", it's rather secondary since
+  ;; those users can just as well use a development version of Emacs to get
+  ;; those packages.
+  ;; So make the handling of :core packages depend on whether or not the user
+  ;; has setup a clone of Emacs under the "emacs" subdirectory.
+  (let ((emacs-repo-root (expand-file-name "emacs")))
+(if (not (file-directory-p emacs-repo-root))
+(message "No \"emacs\" subdir: will skip :core packages")
+  (let ((default-directory emacs-repo-root))
+(message "Running git pull in %S" default-directory)
+(call-process "git" nil t nil "pull")
+t
 
 (defun archive--find-non-trivial-file (dir)
   (catch 'found-important-file
@@ -600,15 +589,17 @@ Rename DIR/ to PKG-VERS/, and return the descriptor."
 (throw 'found-important-file file)))
 nil))
 
-(defun archive--cleanup-packages (externals-list)
+(defun archive--cleanup-packages (externals-list with-core)
   "Remove subdirectories of `packages/' that do not correspond to known 
packages.
 This is any subdirectory inside `packages/' that's not under
-version control nor listed in EXTERNALS-LIST."
+version control nor listed in EXTERNALS-LIST.

[elpa] master 07c53b5: * admin/archive-contents.el (archive--sync-emacs-repo): Fix thinko.

2015-11-30 Thread Stefan Monnier
branch: master
commit 07c53b50741b6684d3d3ef5177a92861fbaec14c
Author: Stefan Monnier 
Commit: Stefan Monnier 

* admin/archive-contents.el (archive--sync-emacs-repo): Fix thinko.
---
 admin/archive-contents.el |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index ae46435..b63f4cd 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -572,7 +572,8 @@ Return non-nil if there's an \"emacs\" repository present."
   ;; has setup a clone of Emacs under the "emacs" subdirectory.
   (let ((emacs-repo-root (expand-file-name "emacs")))
 (if (not (file-directory-p emacs-repo-root))
-(message "No \"emacs\" subdir: will skip :core packages")
+(progn (message "No \"emacs\" subdir: will skip :core packages")
+   nil)
   (let ((default-directory emacs-repo-root))
 (message "Running git pull in %S" default-directory)
 (call-process "git" nil t nil "pull")



[elpa] master 1f4cdd7: * packages/sm-c-mode: Add imenu/which-func/add-log support

2015-11-30 Thread Stefan Monnier
branch: master
commit 1f4cdd74ca21559bb318a262e11ba98d9f7822bc
Author: Stefan Monnier 
Commit: Stefan Monnier 

* packages/sm-c-mode: Add imenu/which-func/add-log support

(sm-c--comment-regexp): New var.
(sm-c--defun-regexp): New var, extracted from sm-c-font-lock-keywords.
Also recognize macro definitions.
(sm-c-font-lock-keywords): Use it.
(sm-c--def-regexp): New var.
(sm-c-mode): Use it for add-log and imenu.
---
 packages/sm-c-mode/sm-c-mode-test.c |4 +++
 packages/sm-c-mode/sm-c-mode.el |   45 ---
 2 files changed, 35 insertions(+), 14 deletions(-)

diff --git a/packages/sm-c-mode/sm-c-mode-test.c 
b/packages/sm-c-mode/sm-c-mode-test.c
index 4690105..4756064 100644
--- a/packages/sm-c-mode/sm-c-mode-test.c
+++ b/packages/sm-c-mode/sm-c-mode-test.c
@@ -22,6 +22,10 @@ struct foo {
   int field;
 };
 
+typedef struct bar {
+  int field;
+} *BarPtr;
+
 struct foo *getfoo (void)
 {
   return NULL;
diff --git a/packages/sm-c-mode/sm-c-mode.el b/packages/sm-c-mode/sm-c-mode.el
index 72cd75e..a643829 100644
--- a/packages/sm-c-mode/sm-c-mode.el
+++ b/packages/sm-c-mode/sm-c-mode.el
@@ -801,6 +801,27 @@ if INNER is non-nil, it stops at the innermost one."
 
 ;;; Font-lock support
 
+(defconst sm-c--comment-regexp
+  "/\\(?:/.*\n\\|\\*\\(?:[^*]+\\(?:\\*+[^/*]\\)*\\)*\\*/\\)")
+
+(defconst sm-c--defun-regexp
+  (let* ((spc0 (concat "\\(?:\n?[ \t]\\|" sm-c--comment-regexp "\\)*"))
+ (spc1 (concat "\n?[ \t]" spc0))
+ (id "\\(?:\\sw\\|\\s_\\)+"))
+(cl-flet ((repeat (repetition &rest res)
+  (concat "\\(?:" (apply #'concat res) "\\)"
+  (pcase repetition
+((pred symbolp) (symbol-name repetition))
+(1 "")
+  (concat
+   "^\\(?:"
+   (repeat '* "\\*" spc0)
+   (repeat '* id (repeat 1 spc1 "\\|" spc0 "\\*" spc0))
+   "\\(" id "\\)[ \t\n]*("
+   "\\|"
+   "[ \t]*#[ \t]*define[ \t]+\\(?1:" id "\\)("
+   "\\)"
+
 (defconst sm-c-font-lock-keywords
   `((,sm-c--cpp-regexp (1 font-lock-preprocessor-face))
 ("\\_<\\(?:true\\|false\\)\\_>" (0 font-lock-constant-face))
@@ -828,25 +849,19 @@ if INNER is non-nil, it stops at the innermost one."
  (delete "case" kws)))
 "\\_>"))
  (0 font-lock-keyword-face))
-(,(let* ((spc0 "\\(?:\n?[ \t]\\|/\\*.*?\\*/\\)*")
- (spc1 (concat "\n?[ \t]" spc0))
- (id "\\(?:\\sw\\|\\s_\\)+"))
-(cl-flet ((repeat (repetition &rest res)
-  (concat "\\(?:" (apply #'concat res) "\\)"
-  (pcase repetition
-((pred symbolp) (symbol-name repetition))
-(1 "")
-  (concat
-   "^"
-   (repeat '* "\\*" spc0)
-   (repeat '* id (repeat 1 spc1 "\\|" spc0 "\\*" spc0))
-   "\\(" id "\\)[ \t\n]*(")))
+(,sm-c--defun-regexp
  (1
   (prog1 font-lock-function-name-face
 (if (< (match-beginning 0) (line-beginning-position))
 (put-text-property (match-beginning 0) (match-end 0)
'font-lock-multiline t)))
 
+(defconst sm-c--def-regexp
+  (let ((spc0 (concat "\\(?:[ \t\n]\\|" sm-c--comment-regexp "\\)*"))
+(id "\\(?:\\sw\\|\\s_\\)+"))
+(concat sm-c--defun-regexp
+"\\|"
+"\\_<\\(?1:\\(?:struct\\|enum\\)[ \t]+" id "\\)" spc0 "{")))
 
 ;;;###autoload
 (define-derived-mode sm-c-mode prog-mode "smC"
@@ -872,7 +887,9 @@ if INNER is non-nil, it stops at the innermost one."
   (setq-local smie--hanging-eolp-function #'sm-c-smie-hanging-eolp)
   ;; Backslash auto-realign.
   (add-hook 'after-change-functions #'sm-c--bs-after-change nil t)
-  (add-hook 'post-command-hook #'sm-c--bs-realign nil t))
+  (add-hook 'post-command-hook #'sm-c--bs-realign nil t)
+  (setq-local add-log-current-defun-header-regexp sm-c--def-regexp)
+  (setq-local imenu-generic-expression `((nil ,sm-c--def-regexp 1
 
 (defun sm-c--cpp-is-not-really-a-comment (&rest args)
   ;; Without this, placing the region around a CPP directive and hitting



[elpa] master 5f6ee57: Added minor-mode function as suggested

2015-11-30 Thread David Gonzalez Gandara
branch: master
commit 5f6ee57fe1b17bee9e3992da4ad6841fd6fc2aa1
Author: David Gonzalez Gandara 
Commit: David Gonzalez Gandara 

Added minor-mode function as suggested
---
 packages/transcribe/transcribe.el |  108 +++--
 1 files changed, 55 insertions(+), 53 deletions(-)

diff --git a/packages/transcribe/transcribe.el 
b/packages/transcribe/transcribe.el
index 4ab00a3..2cf0494 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: 0.0.1
+;; version: 0.5.0
 
 ;; 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
@@ -20,23 +20,16 @@
 
 ;;; Commentary:
 
-;; INSTALLATION
-;;---
-;; If you don't use transcribe as a package, you can install manually:
-;;Copy this file to somewhere in your drive
-
-;; To load the file --> M-: (load "~/transcribe.el") --- change the route to 
where you copied the file
-
-;; DEPENDENCIES:
-;;-
+;; REQUIRES:
+;; -
 ;; In order to use the most important functions of transcribe, you need to 
install emms and mpg321.
 ;;
-;; DESCRIPTION
-;;-
+;; USAGE:
+;; -
 ;; Transcribe is a tool to make audio transcriptions easy. It allows the 
transcriber to control the audio easily while typing, as well as automate the 
insertion of xml tags, in case the transcription protocol include them.
 ;; 
 ;;  AUDIO COMMANDS
-;;--
+;; --
 ;; C-x C-p > Play audio file. You will be prompted for the name of 
the file. The recommended format is mp2.
 ;;  ---> Pause or play audio.
 ;; C-x  > seek audio 10 seconds forward.
@@ -44,14 +37,14 @@
 ;;  ---> seek interactively: positive seconds go forward and 
negative seconds go backward
 ;;
 ;;  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 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.
 ;;
 ;;
 ;;
 ;; SPECIFIC COMMANDS I USE, THAT YOU MAY FIND USEFUL
-;;
+;; 
 ;; C-x C-a --> This runs an external discourse analysis tool. It 
defaults to my own script analyze_episodes2.py, but you can customise the 
command to launch any other.
 ;;  > Customised tag 1. Edit the function to adapt to your 
needs.
 ;;  > Customised tag 2. Edit the function to adapt to your 
needs.
@@ -60,7 +53,7 @@
 
 ;;; Code:
 
-(if t (require 'emms-setup));Only require it at run-time.
+(if t (require 'emms-setup))
 ;(require 'emms-player-mpd)
 ;(setq emms-player-mpd-server-name "localhost")
 ;(setq emms-player-mpd-server-port "6600")
@@ -76,71 +69,80 @@
 (if t (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)
-
-(defun analyze-episode (episode person)
+(defun transcribe-analyze-episode (episode person)
   (interactive "sepisode: \nsperson:")
   (shell-command (concat (expand-file-name  "analyze_episodes2.py") " -e " 
episode " -p " person " -i " buffer-file-name )))
 
-(global-unset-key (kbd "C-x C-A"))
-(global-set-key (kbd "C-x C-A") 'analyze-episode)
-
-(defun draw-boxplot ()
-  (interactive)
-  (shell-command (concat (expand-file-name "/usr/bin/Rscript ") 
"boxplot_students.R " buffer-file-name)))
-
-(global-unset-key (kbd "C-x C-B"))
-(global-set-key (kbd "C-x C-B") 'draw-boxplot)
-
-(defun define-xml-tag (xmltag)
+(defun transcribe-define-xml-tag (xmltag)
   (interactive "stag:")
   (insert (format "<%s>" xmltag xmltag))
   (backward-char 3)
   (backward-char (string-width xmltag)))
 
-(defun xml-tag-l1 ()
+(defun transcribe-xml-tag-l1 ()
   (interactive)
   (insert "")
   (backward-char 3)
   (backward-char 2))
 
-(defun xml-tag-l2 ()
+(defun transcribe-xml-tag-l2 ()
   (interactive)
   (insert "")
   (backward-char 3)
   (backward-char 2))
 
-(fset 'xml-tag-l2-break "")
-(fset 'set-attributes "clauses=\"1\" errors=\"0\"")
+(fset 'transcribe-xml-tag-l2-break "")
+(fset 'transcribe-set-attributes "clauses=\"1\" errors=\"0\"")
 
-(defun display-audio-info ()
+(defun

Re: [elpa] master baa81b1: * externals-list: Add seq and python as :core packages

2015-11-30 Thread Artur Malabarba
Not sure if this is a good idea. The seq package on emacs core depends on
25.1, while the package on Elpa was 24 compatible.
In fact, nico has been developing them in parallel IIRC.


[elpa] master b84acaf: * packages/seq: Don't define it as a :core package

2015-11-30 Thread Stefan Monnier
branch: master
commit b84acafb79dfd74b42addaf6e43e11ded907aa9d
Author: Stefan Monnier 
Commit: Stefan Monnier 

* packages/seq: Don't define it as a :core package

Revert the removal of packages/seq/seq.el since it's different from
the one in lisp/emacs-lisp.
* .gitignore: Remove packages/seq.
* externals-list: Remove "seq" entry.
---
 .gitignore  |1 -
 externals-list  |1 -
 packages/seq/seq.el |  483 +++
 packages/seq/tests/seq-tests.el |  326 ++
 4 files changed, 809 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4c17086..238f211 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,7 +20,6 @@ packages/omn-mode/
 packages/pabbrev
 packages/python
 packages/rudel
-packages/seq
 packages/soap-client
 packages/w3
 packages/xelb
diff --git a/externals-list b/externals-list
index 446ed58..94151e4 100644
--- a/externals-list
+++ b/externals-list
@@ -68,7 +68,6 @@
  ;;FIXME:("org":external ??) ;; Need to introduce snapshots!!
  ("rich-minority" :subtree "https://github.com/Malabarba/rich-minority";)
  ("rudel"  :external nil) ;; Was 
bzr::bzr://rudel.bzr.sourceforge.net/bzrroot/rudel/trunk
- ("seq":core "lisp/emacs-lisp/seq.el")
  ("soap-client":core ("lisp/net/soap-client.el" 
"lisp/net/soap-inspect.el"))
  ("sotlisp" :subtree "https://github.com/Malabarba/speed-of-thought-lisp";)
  ("spinner" :subtree "https://github.com/Malabarba/spinner.el";)
diff --git a/packages/seq/seq.el b/packages/seq/seq.el
new file mode 100644
index 000..58f6903
--- /dev/null
+++ b/packages/seq/seq.el
@@ -0,0 +1,483 @@
+;;; seq.el --- Sequence manipulation functions  -*- lexical-binding: t -*-
+
+;; Copyright (C) 2014-2015 Free Software Foundation, Inc.
+
+;; Author: Nicolas Petton 
+;; Keywords: sequences
+;; Version: 1.11
+;; Package: seq
+
+;; Maintainer: emacs-de...@gnu.org
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+;;; Commentary:
+
+;; Sequence-manipulation functions that complement basic functions
+;; provided by subr.el.
+;;
+;; All functions are prefixed with "seq-".
+;;
+;; All provided functions work on lists, strings and vectors.
+;;
+;; Functions taking a predicate or iterating over a sequence using a
+;; function as argument take the function as their first argument and
+;; the sequence as their second argument.  All other functions take
+;; the sequence as their first argument.
+;;
+;; All functions are tested in test/automated/seq-tests.el
+
+;;; Code:
+
+(defmacro seq-doseq (spec &rest body)
+  "Loop over a sequence.
+Similar to `dolist' but can be applied to lists, strings, and vectors.
+
+Evaluate BODY with VAR bound to each element of SEQ, in turn.
+
+\(fn (VAR SEQ) BODY...)"
+  (declare (indent 1) (debug ((symbolp form &optional form) body)))
+  (let ((length (make-symbol "length"))
+(seq (make-symbol "seq"))
+(index (make-symbol "index")))
+`(let* ((,seq ,(cadr spec))
+(,length (if (listp ,seq) nil (seq-length ,seq)))
+(,index (if ,length 0 ,seq)))
+   (while (if ,length
+  (< ,index ,length)
+(consp ,index))
+ (let ((,(car spec) (if ,length
+(prog1 (seq-elt ,seq ,index)
+  (setq ,index (+ ,index 1)))
+  (pop ,index
+   ,@body)
+
+(if (fboundp 'pcase-defmacro)
+;; Implementation of `seq-let' based on a `pcase'
+;; pattern. Requires Emacs>=25.1.
+(progn
+  (pcase-defmacro seq (&rest args)
+"pcase pattern matching sequence elements.
+Matches if the object is a sequence (list, string or vector), and
+binds each element of ARGS to the corresponding element of the
+sequence."
+`(and (pred seq-p)
+  ,@(seq--make-pcase-bindings args)))
+
+  (defmacro seq-let (args seq &rest body)
+"Bind the variables in ARGS to the elements of SEQ then evaluate BODY.
+
+ARGS can also include the `&rest' marker followed by a variable
+name to be bound to the rest of SEQ."
+(declare (indent 2) (debug t))
+`(pcase-let ((,(seq--make-pcase-patterns args) ,seq))
+   ,@body)))
+
+  ;; Implementation of `seq-let

Re: [elpa] master baa81b1: * externals-list: Add seq and python as :core packages

2015-11-30 Thread Stefan Monnier
> Not sure if this is a good idea. The seq package on emacs core depends on
> 25.1, while the package on Elpa was 24 compatible.
> In fact, nico has been developing them in parallel IIRC.

Hmmm...oops!  didn't notice that the two versions had forked.
I just re-installed it, thanks for the heads up,


Stefan