Skip to content
Browse files

added emacs files

  • Loading branch information...
1 parent 125a79e commit b7633b5fbcceec272589ed9bdb5f5dc3b9ef84c6 @abossard committed Jun 28, 2012
Showing with 17,232 additions and 0 deletions.
  1. +35 −0 .emacs
  2. 0 .emacs.d/auto-save-list/.saves-235-andre.local~
  3. +80 −0 .emacs.d/chrome_reload.py
  4. +8 −0 .emacs.d/chrome_reload.py~
  5. +938 −0 .emacs.d/dbgp.el
  6. BIN .emacs.d/dbgp.elc
  7. +158 −0 .emacs.d/elpa/ampc-readme.txt
  8. +28 −0 .emacs.d/elpa/android-mode-0.1/android-mode-autoloads.el
  9. +13 −0 .emacs.d/elpa/android-mode-0.1/android-mode-autoloads.el~
  10. +1 −0 .emacs.d/elpa/android-mode-0.1/android-mode-pkg.el
  11. BIN .emacs.d/elpa/android-mode-0.1/android-mode-pkg.elc
  12. +314 −0 .emacs.d/elpa/android-mode-0.1/android-mode.el
  13. BIN .emacs.d/elpa/android-mode-0.1/android-mode.elc
  14. +447 −0 .emacs.d/elpa/archives/elpa/archive-contents
  15. +447 −0 .emacs.d/elpa/archives/elpa/archive-contents~
  16. +137 −0 .emacs.d/elpa/archives/gnu/archive-contents
  17. +137 −0 .emacs.d/elpa/archives/gnu/archive-contents~
  18. +1 −0 .emacs.d/elpa/archives/marmalade/archive-contents
  19. +1 −0 .emacs.d/elpa/archives/marmalade/archive-contents~
  20. +18 −0 .emacs.d/elpa/furl-0.0.2/furl-autoloads.el
  21. +13 −0 .emacs.d/elpa/furl-0.0.2/furl-autoloads.el~
  22. +1 −0 .emacs.d/elpa/furl-0.0.2/furl-pkg.el
  23. BIN .emacs.d/elpa/furl-0.0.2/furl-pkg.elc
  24. +207 −0 .emacs.d/elpa/furl-0.0.2/furl.el
  25. BIN .emacs.d/elpa/furl-0.0.2/furl.elc
  26. +13 −0 .emacs.d/elpa/ioccur-readme.txt
  27. +13 −0 .emacs.d/elpa/ioccur-readme.txt~
  28. +18 −0 .emacs.d/elpa/jade-mode-0.1/jade-mode-autoloads.el
  29. +13 −0 .emacs.d/elpa/jade-mode-0.1/jade-mode-autoloads.el~
  30. +1 −0 .emacs.d/elpa/jade-mode-0.1/jade-mode-pkg.el
  31. BIN .emacs.d/elpa/jade-mode-0.1/jade-mode-pkg.elc
  32. +77 −0 .emacs.d/elpa/jade-mode-0.1/jade-mode.el
  33. BIN .emacs.d/elpa/jade-mode-0.1/jade-mode.elc
  34. +83 −0 .emacs.d/elpa/magit-1.1.1/magit-autoloads.el
  35. +13 −0 .emacs.d/elpa/magit-1.1.1/magit-autoloads.el~
  36. +196 −0 .emacs.d/elpa/magit-1.1.1/magit-bisect.el
  37. BIN .emacs.d/elpa/magit-1.1.1/magit-bisect.elc
  38. +508 −0 .emacs.d/elpa/magit-1.1.1/magit-key-mode.el
  39. BIN .emacs.d/elpa/magit-1.1.1/magit-key-mode.elc
  40. +1 −0 .emacs.d/elpa/magit-1.1.1/magit-pkg.el
  41. BIN .emacs.d/elpa/magit-1.1.1/magit-pkg.elc
  42. +288 −0 .emacs.d/elpa/magit-1.1.1/magit-stgit.el
  43. BIN .emacs.d/elpa/magit-1.1.1/magit-stgit.elc
  44. +240 −0 .emacs.d/elpa/magit-1.1.1/magit-svn.el
  45. BIN .emacs.d/elpa/magit-1.1.1/magit-svn.elc
  46. +191 −0 .emacs.d/elpa/magit-1.1.1/magit-topgit.el
  47. BIN .emacs.d/elpa/magit-1.1.1/magit-topgit.elc
  48. +5,445 −0 .emacs.d/elpa/magit-1.1.1/magit.el
  49. BIN .emacs.d/elpa/magit-1.1.1/magit.elc
  50. +1,331 −0 .emacs.d/elpa/magit-1.1.1/magit.info
  51. +26 −0 .emacs.d/elpa/magit-simple-keys-1.0.0/magit-simple-keys-autoloads.el
  52. +13 −0 .emacs.d/elpa/magit-simple-keys-1.0.0/magit-simple-keys-autoloads.el~
  53. +1 −0 .emacs.d/elpa/magit-simple-keys-1.0.0/magit-simple-keys-pkg.el
  54. +59 −0 .emacs.d/elpa/magit-simple-keys-1.0.0/magit-simple-keys.el
  55. +35 −0 .emacs.d/elpa/magithub-0.2/magithub-autoloads.el
  56. +13 −0 .emacs.d/elpa/magithub-0.2/magithub-autoloads.el~
  57. +1 −0 .emacs.d/elpa/magithub-0.2/magithub-pkg.el
  58. BIN .emacs.d/elpa/magithub-0.2/magithub-pkg.elc
  59. +1,165 −0 .emacs.d/elpa/magithub-0.2/magithub.el
  60. BIN .emacs.d/elpa/magithub-0.2/magithub.elc
  61. +28 −0 .emacs.d/elpa/markdown-mode-1.8.1/markdown-mode-autoloads.el
  62. +13 −0 .emacs.d/elpa/markdown-mode-1.8.1/markdown-mode-autoloads.el~
  63. +1 −0 .emacs.d/elpa/markdown-mode-1.8.1/markdown-mode-pkg.el
  64. BIN .emacs.d/elpa/markdown-mode-1.8.1/markdown-mode-pkg.elc
  65. +2,053 −0 .emacs.d/elpa/markdown-mode-1.8.1/markdown-mode.el
  66. BIN .emacs.d/elpa/markdown-mode-1.8.1/markdown-mode.elc
  67. +18 −0 .emacs.d/elpa/marmalade-0.0.4/marmalade-autoloads.el
  68. +13 −0 .emacs.d/elpa/marmalade-0.0.4/marmalade-autoloads.el~
  69. +1 −0 .emacs.d/elpa/marmalade-0.0.4/marmalade-pkg.el
  70. BIN .emacs.d/elpa/marmalade-0.0.4/marmalade-pkg.elc
  71. +191 −0 .emacs.d/elpa/marmalade-0.0.4/marmalade.el
  72. BIN .emacs.d/elpa/marmalade-0.0.4/marmalade.elc
  73. +99 −0 .emacs.d/elpa/mic-paren-3.8/mic-paren-autoloads.el
  74. +13 −0 .emacs.d/elpa/mic-paren-3.8/mic-paren-autoloads.el~
  75. +1 −0 .emacs.d/elpa/mic-paren-3.8/mic-paren-pkg.el
  76. BIN .emacs.d/elpa/mic-paren-3.8/mic-paren-pkg.elc
  77. +1,237 −0 .emacs.d/elpa/mic-paren-3.8/mic-paren.el
  78. BIN .emacs.d/elpa/mic-paren-3.8/mic-paren.elc
  79. +34 −0 .emacs.d/elpa/minimap-1.0/minimap-autoloads.el
  80. +13 −0 .emacs.d/elpa/minimap-1.0/minimap-autoloads.el~
  81. +1 −0 .emacs.d/elpa/minimap-1.0/minimap-pkg.el
  82. BIN .emacs.d/elpa/minimap-1.0/minimap-pkg.elc
  83. +627 −0 .emacs.d/elpa/minimap-1.0/minimap.el
  84. BIN .emacs.d/elpa/minimap-1.0/minimap.elc
  85. +26 −0 .emacs.d/elpa/pastels-on-dark-theme-0.3/pastels-on-dark-theme-autoloads.el
  86. +13 −0 .emacs.d/elpa/pastels-on-dark-theme-0.3/pastels-on-dark-theme-autoloads.el~
  87. +1 −0 .emacs.d/elpa/pastels-on-dark-theme-0.3/pastels-on-dark-theme-pkg.el
  88. BIN .emacs.d/elpa/pastels-on-dark-theme-0.3/pastels-on-dark-theme-pkg.elc
  89. +72 −0 .emacs.d/elpa/pastels-on-dark-theme-0.3/pastels-on-dark-theme.el
  90. +35 −0 .emacs.d/elpa/php-mode-1.5.0/php-mode-autoloads.el
  91. +13 −0 .emacs.d/elpa/php-mode-1.5.0/php-mode-autoloads.el~
  92. +1 −0 .emacs.d/elpa/php-mode-1.5.0/php-mode-pkg.el
  93. BIN .emacs.d/elpa/php-mode-1.5.0/php-mode-pkg.elc
Sorry, we could not display the entire diff because it was too big.
View
35 .emacs
@@ -0,0 +1,35 @@
+(add-to-list 'load-path "~/.emacs.d/")
+(autoload 'geben "geben" "PHP Debugger on Emacs" t)
+(server-start)
+;(setq server-socket-dir (format "/tmp/emacs%d" (user-uid)))
+(require 'package)
+;; Add the original Emacs Lisp Package Archive
+(add-to-list 'package-archives
+ '("elpa" . "http://tromey.com/elpa/"))
+;; Add the user-contributed repository
+(add-to-list 'package-archives
+ '("marmalade" . "http://marmalade-repo.org/packages/"))
+(package-initialize)
+
+(custom-set-variables
+ ;; custom-set-variables was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ '(backup-directory-alist (quote ((".*" . "~/.emacs/backups"))))
+ '(custom-safe-themes (quote ("30fe7e72186c728bd7c3e1b8d67bc10b846119c45a0f35c972ed427c45bacc19" default)))
+ '(dired-auto-revert-buffer (quote dired-directory-changed-p))
+ '(ns-pop-up-frames nil))
+(custom-set-faces
+ ;; custom-set-faces was added by Custom.
+ ;; If you edit it by hand, you could mess it up, so be careful.
+ ;; Your init file should contain only one such instance.
+ ;; If there is more than one, they won't work right.
+ )
+(load-theme 'pastels-on-dark t)
+(if (boundp 'osx-key-mode-map)
+(setq hah-key-map osx-key-mode-map)
+(setq hah-key-map global-map))(define-key hah-key-map [home] 'beginning-of-line)
+(define-key hah-key-map [end] 'end-of-line)
+(define-key hah-key-map [C-home] 'beginning-of-buffer)
+(define-key hah-key-map [C-end] 'end-of-buffer)
View
0 .emacs.d/auto-save-list/.saves-235-andre.local~
No changes.
View
80 .emacs.d/chrome_reload.py
@@ -0,0 +1,80 @@
+#!/usr/bin/env python
+#
+#
+# Reload Chrome on port 9222
+# Code forked and modified by Strzelewicz Alexandre
+#
+# Thanks to :
+# http://pypi.python.org/pypi/chrome_remote_shell/
+# http://www.emacswiki.org/emacs/SaveAndReloadBrowser
+#
+
+try:
+ import json
+except ImportError:
+ import simplejson as json
+import socket
+
+import sys
+
+HANDSHAKE = 'ChromeDevToolsHandshake\r\n'
+RESPONSELESS_COMMANDS = ['evaluate_javascript']
+
+class Shell(object):
+ """A remote debugging connection to Google Chrome."""
+
+ def __init__(self, host='localhost', port=9222):
+ self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.socket.connect((host, port))
+ self.socket.send(HANDSHAKE)
+ assert self.socket.recv(len(HANDSHAKE)) == HANDSHAKE
+
+ def request(self, tool, destination=None, **kw):
+ """Send a command to a tool supported by Google Chrome.
+
+ `tool` - 'DevToolsService' or 'V8Debugger'
+ other arguments - Combined to form the JSON request object
+
+ """
+ j = json.dumps(kw)
+ request = 'Content-Length:%d\r\nTool:%s\r\n' % (len(j), tool)
+ if destination:
+ request += 'Destination:%s\r\n' % (destination,)
+ request += '\r\n%s\r\n' % (j,)
+ self.socket.send(request)
+ if kw.get('command', '') not in RESPONSELESS_COMMANDS:
+ response = self.socket.recv(30000) # ugh
+ j = response.split('\r\n\r\n', 1)[1]
+ return json.loads(j)
+
+ def open_url(self, url):
+ """Open a URL in a new tab."""
+ response = self.request('DevToolsService', command='list_tabs')
+ tabs = response['data']
+ first_tab = tabs[0]
+ tab_id = first_tab[0]
+ javascript = "window.open(%r, '_blank');" % (url,)
+ self.request('V8Debugger', destination=tab_id,
+ command='evaluate_javascript', data=javascript)
+
+
+if len(sys.argv) < 2:
+ url = 'localhost'
+else:
+ url = sys.argv[1]
+
+shell = Shell('localhost', 9222)
+response = shell.request('DevToolsService', command='list_tabs')
+tabs_with_url = []
+
+for el in response['data']:
+ if el[1].find(url) > -1:
+ tabs_with_url.append(el[0])
+
+for tab in tabs_with_url:
+ shell.request('V8Debugger',
+ destination=tab,
+ command='evaluate_javascript',
+ data="window.location = window.location;")
+
+print "Succesfully refreshed ==> " + str(len(tabs_with_url)) + " <== Chrome tabs containing the url = " + url
View
8 .emacs.d/chrome_reload.py~
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+import chrome_remote_shell
+shell = chrome_remote_shell.open(port=9222)
+response = shell.request('DevToolsService', command='list_tabs')
+tabs = response['data']
+first_tab = tabs[0]
+tab_id = first_tab[0]
+shell.request('V8Debugger', destination=tab_id, command='evaluate_javascript', data="window.location = window.location;")
View
938 .emacs.d/dbgp.el
@@ -0,0 +1,938 @@
+;;; dbgp.el --- DBGp protocol interface
+;; $Id: dbgp.el 119 2010-03-30 10:43:59Z fujinaka.tohru $
+;;
+;; Filename: dbgp.el
+;; Author: reedom <fujinaka.tohru@gmail.com>
+;; Maintainer: reedom <fujinaka.tohru@gmail.com>
+;; Version: 0.26
+;; URL: http://code.google.com/p/geben-on-emacs/
+;; Keywords: DBGp, debugger, PHP, Xdebug, Perl, Python, Ruby, Tcl, Komodo
+;; Compatibility: Emacs 22.1
+;;
+;; This file is not part of GNU Emacs
+;;
+;; 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 the Free Software Foundation; either version 2, or
+;; (at your option) any later version.
+;;
+;; This program 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 this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+;; Floor, Boston, MA 02110-1301, USA.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Commentary:
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Code:
+
+(eval-when-compile
+ (when (or (not (boundp 'emacs-version))
+ (string< emacs-version "22.1"))
+ (error (concat "geben.el: This package requires Emacs 22.1 or later."))))
+
+(eval-and-compile
+ (require 'cl)
+ (require 'xml))
+
+(require 'comint)
+
+;;--------------------------------------------------------------
+;; customization
+;;--------------------------------------------------------------
+
+;; For compatibility between versions of custom
+(eval-and-compile
+ (condition-case ()
+ (require 'custom)
+ (error nil))
+ (if (and (featurep 'custom) (fboundp 'custom-declare-variable)
+ ;; Some XEmacsen w/ custom don't have :set keyword.
+ ;; This protects them against custom.
+ (fboundp 'custom-initialize-set))
+ nil ;; We've got what we needed
+ ;; We have the old custom-library, hack around it!
+ (if (boundp 'defgroup)
+ nil
+ (defmacro defgroup (&rest args)
+ nil))
+ (if (boundp 'defcustom)
+ nil
+ (defmacro defcustom (var value doc &rest args)
+ `(defvar (,var) (,value) (,doc))))))
+
+;; customize group
+
+(defgroup dbgp nil
+ "DBGp protocol interface."
+ :group 'debug)
+
+(defgroup dbgp-highlighting-faces nil
+ "Faces for DBGp process buffer."
+ :group 'dbgp
+ :group 'font-lock-highlighting-faces)
+
+(defcustom dbgp-default-port 9000
+ "DBGp listener's default port number."
+ :type 'integer
+ :group 'dbgp)
+
+(defcustom dbgp-local-address "127.0.0.1"
+ "Local host address. It is used for DBGp proxy.
+This value is passed to DBGp proxy at connection negotiation.
+When the proxy receive a new debugging session, the proxy tries
+to connect to DBGp listener of this address."
+ :type 'string
+ :group 'dbgp)
+
+(defface dbgp-response-face
+ '((((class color))
+ :foreground "brightblue"))
+ "Face for displaying DBGp protocol response message."
+ :group 'dbgp-highlighting-faces)
+
+(defface dbgp-decoded-string-face
+ '((((class color))
+ :inherit 'font-lock-string-face))
+ "Face for displaying decoded string."
+ :group 'dbgp-highlighting-faces)
+;;--------------------------------------------------------------
+;; utilities
+;;--------------------------------------------------------------
+
+(defsubst dbgp-plist-get (proc prop)
+ (plist-get (process-plist proc) prop))
+
+(defsubst dbgp-plist-put (proc prop val)
+ (let ((plist (process-plist proc)))
+ (if plist
+ (plist-put plist prop val)
+ (set-process-plist proc (list prop val)))))
+
+(defsubst dbgp-xml-get-error-node (xml)
+ (car
+ (xml-get-children xml 'error)))
+
+(defsubst dbgp-xml-get-error-message (xml)
+ (let ((err (dbgp-xml-get-error-node xml)))
+ (if (stringp (car err))
+ (car err)
+ (car (xml-node-children
+ (car (xml-get-children err 'message)))))))
+
+(defsubst dbgp-make-listner-name (port)
+ (format "DBGp listener<%d>" port))
+
+(defsubst dbgp-process-kill (proc)
+ "Kill DBGp process PROC."
+ (if (memq (process-status proc) '(listen open))
+ (delete-process proc))
+ ;; (ignore-errors
+ ;; (with-temp-buffer
+ ;; (set-process-buffer proc (current-buffer)))))
+ )
+
+(defsubst dbgp-ip-get (proc)
+ (first (process-contact proc)))
+
+(defsubst dbgp-port-get (proc)
+ (second (process-contact proc)))
+
+(defsubst dbgp-proxy-p (proc)
+ (and (dbgp-plist-get proc :proxy)
+ t))
+
+(defsubst dbgp-proxy-get (proc)
+ (dbgp-plist-get proc :proxy))
+
+(defsubst dbgp-listener-get (proc)
+ (dbgp-plist-get proc :listener))
+
+;;--------------------------------------------------------------
+;; DBGp
+;;--------------------------------------------------------------
+
+(defcustom dbgp-command-prompt "(cmd) "
+ "DBGp client process buffer's command line prompt to display."
+ :type 'string
+ :group 'dbgp)
+
+;;--------------------------------------------------------------
+;; DBGp listener process
+;;--------------------------------------------------------------
+
+;; -- What is DBGp listener process --
+;;
+;; DBGp listener process is a network connection, as an entry point
+;; for DBGp protocol connection.
+;; The process listens at a specific network address to a specific
+;; port for a new session connection(from debugger engine) coming.
+;; When a new connection has accepted, the DBGp listener creates
+;; a new DBGp session process. Then the new process takes over
+;; the connection and the DBGp listener process starts listening
+;; for another connection.
+;;
+;; -- DBGp listener custom properties --
+;;
+;; :session-init default function for a new DBGp session
+;; process to initialize a new session.
+;; :session-filter default function for a new DBGp session
+;; process to filter protocol messages.
+;; :session-sentinel default function for a new DBGp session
+;; called when the session is disconnected.
+
+(defvar dbgp-listeners nil
+ "List of DBGp listener processes.
+
+DBGp listener process is a network connection, as an entry point
+for DBGp protocol connection.
+The process listens at a specific network address to a specific
+port for a new session connection(from debugger engine) coming.
+When a new connection has accepted, the DBGp listener creates
+a new DBGp session process. Then the new process takes over
+the connection and the DBGp listener process starts listening
+for another connection.
+
+-- DBGp listener process custom properties --
+
+:session-accept function to determine to accept a new
+ DBGp session.
+:session-init function to initialize a new session.
+:session-filter function to filter protocol messages.
+:session-sentinel function called when the session is
+ disconnected.
+:proxy if the listener is created for a proxy
+ connection, this value has a plist of
+ (:addr :port :idekey :multi-session).
+ Otherwise the value is nil.
+")
+
+(defvar dbgp-sessions nil
+ "List of DBGp session processes.
+
+DBGp session process is a network connection, talks with a DBGp
+debugger engine.
+
+A DBGp session process is created by a DBGp listener process
+after a DBGp session connection from a DBGp debugger engine
+is accepted.
+The session process is alive until the session is disconnected.
+
+-- DBGp session process custom properties --
+
+:listener The listener process which creates this
+ session process.
+")
+
+(defvar dbgp-listener-port-history nil)
+(defvar dbgp-proxy-address-history nil)
+(defvar dbgp-proxy-port-history nil)
+(defvar dbgp-proxy-idekey-history nil)
+(defvar dbgp-proxy-session-port-history nil)
+
+;;--------------------------------------------------------------
+;; interactive read functions
+;;--------------------------------------------------------------
+
+(defun dbgp-read-string (prompt &optional initial-input history default-value)
+ "Read a string from the terminal, not allowing blanks.
+Prompt with PROMPT. Whitespace terminates the input.
+If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
+ This argument has been superseded by DEFAULT-VALUE and should normally
+ be nil in new code. It behaves as in `read-from-minibuffer'. See the
+ documentation string of that function for details.
+The third arg HISTORY, if non-nil, specifies a history list
+ and optionally the initial position in the list.
+See `read-from-minibuffer' for details of HISTORY argument.
+Fourth arg DEFAULT-VALUE is the default value. If non-nil, it is used
+ for history commands, and as the value to return if the user enters
+ the empty string.
+"
+ (let (str
+ (temp-history (and history
+ (copy-list (symbol-value history)))))
+ (while
+ (progn
+ (setq str (read-string prompt initial-input 'temp-history default-value))
+ (if (zerop (length str))
+ (setq str (or default-value ""))
+ (setq str (replace-regexp-in-string "^[ \t\r\n]+" "" str))
+ (setq str (replace-regexp-in-string "[ \t\r\n]+$" "" str)))
+ (zerop (length str))))
+ (and history
+ (set history (cons str (remove str (symbol-value history)))))
+ str))
+
+(defun dbgp-read-integer (prompt &optional default history)
+ "Read a numeric value in the minibuffer, prompting with PROMPT.
+DEFAULT specifies a default value to return if the user just types RET.
+The third arg HISTORY, if non-nil, specifies a history list
+ and optionally the initial position in the list.
+See `read-from-minibuffer' for details of HISTORY argument."
+ (let (n
+ (temp-history (and history
+ (mapcar 'number-to-string
+ (symbol-value history)))))
+ (while
+ (let ((str (read-string prompt nil 'temp-history (if (numberp default)
+ (number-to-string default)
+ ""))))
+ (ignore-errors
+ (setq n (cond
+ ((numberp str) str)
+ ((zerop (length str)) default)
+ ((stringp str) (read str)))))
+ (unless (integerp n)
+ (message "Please enter a number.")
+ (sit-for 1)
+ t)))
+ (and history
+ (set history (cons n (remq n (symbol-value history)))))
+ n))
+
+;;--------------------------------------------------------------
+;; DBGp listener start/stop
+;;--------------------------------------------------------------
+
+(defsubst dbgp-listener-find (port)
+ (find-if (lambda (listener)
+ (eq port (second (process-contact listener))))
+ dbgp-listeners))
+
+;;;###autoload
+(defun dbgp-start (port)
+ "Start a new DBGp listener listening to PORT."
+ (interactive (let (;;(addrs (mapcar (lambda (intf)
+ ;; (format-network-address (cdar (network-interface-list)) t))
+ ;; (network-interface-list)))
+ ;;(addr-default (or (car dbgp-listener-address-history)
+ ;; (and (member "127.0.0.1" addrs)
+ ;; "127.0.0.1")
+ ;; (car addrs)))
+ (port-default (or (car dbgp-listener-port-history)
+ 9000)))
+ ;; (or addrs
+ ;; (error "This machine has no network interface to bind."))
+ (list
+ ;; (completing-read (format "Listener address to bind(default %s): " default)
+ ;; addrs nil t
+ ;; 'dbgp-listener-address-history default)
+ (dbgp-read-integer (format "Listen port(default %s): " port-default)
+ port-default 'dbgp-listener-port-history))))
+ (let ((result (dbgp-exec port
+ :session-accept 'dbgp-default-session-accept-p
+ :session-init 'dbgp-default-session-init
+ :session-filter 'dbgp-default-session-filter
+ :session-sentinel 'dbgp-default-session-sentinel)))
+ (when (interactive-p)
+ (message (cdr result)))
+ result))
+
+;;;###autoload
+(defun dbgp-exec (port &rest session-params)
+ "Start a new DBGp listener listening to PORT."
+ (if (dbgp-listener-alive-p port)
+ (cons (dbgp-listener-find port)
+ (format "The DBGp listener for %d has already been started." port))
+ (let ((listener (make-network-process :name (dbgp-make-listner-name port)
+ :server 1
+ :service port
+ :family 'ipv4
+ :nowait t
+ :noquery t
+ :filter 'dbgp-comint-setup
+ :sentinel 'dbgp-listener-sentinel
+ :log 'dbgp-listener-log)))
+ (unless listener
+ (error "Failed to create DBGp listener for port %d" port))
+ (dbgp-plist-put listener :listener listener)
+ (and session-params
+ (nconc (process-plist listener) session-params))
+ (setq dbgp-listeners (cons listener
+ (remq (dbgp-listener-find port) dbgp-listeners)))
+ (cons listener
+ (format "The DBGp listener for %d is started." port)))))
+
+(defun dbgp-stop (port &optional include-proxy)
+ "Stop the DBGp listener listening to PORT."
+ (interactive
+ (let ((ports (remq nil
+ (mapcar (lambda (listener)
+ (and (or current-prefix-arg
+ (not (dbgp-proxy-p listener)))
+ (number-to-string (second (process-contact listener)))))
+ dbgp-listeners))))
+ (list
+ ;; ask user for the target idekey.
+ (read (completing-read "Listener port: " ports nil t
+ (and (eq 1 (length ports))
+ (car ports))))
+ current-prefix-arg)))
+ (let ((listener (dbgp-listener-find port)))
+ (dbgp-listener-kill port)
+ (and (interactive-p)
+ (message (if listener
+ "The DBGp listener for port %d is terminated."
+ "DBGp listener for port %d does not exist.")
+ port))
+ (and listener t)))
+
+(defun dbgp-listener-kill (port)
+ (let ((listener (dbgp-listener-find port)))
+ (when listener
+ (delete-process listener))))
+
+;;--------------------------------------------------------------
+;; DBGp proxy listener register/unregister
+;;--------------------------------------------------------------
+
+;;;###autoload
+(defun dbgp-proxy-register (proxy-ip-or-addr proxy-port idekey multi-session-p &optional session-port)
+ "Register a new DBGp listener to an external DBGp proxy.
+The proxy should be found at PROXY-IP-OR-ADDR / PROXY-PORT.
+This creates a new DBGp listener and register it to the proxy
+associating with the IDEKEY."
+ (interactive (list
+ (let ((default (or (car dbgp-proxy-address-history) "localhost")))
+ (dbgp-read-string (format "Proxy address (default %s): " default)
+ nil 'dbgp-proxy-address-history default))
+ (let ((default (or (car dbgp-proxy-port-history) 9001)))
+ (dbgp-read-integer (format "Proxy port (default %d): " default)
+ default 'dbgp-proxy-port-history))
+ (dbgp-read-string "IDE key: " nil 'dbgp-proxy-idekey-history)
+ (not (memq (read-char "Multi session(Y/n): ") '(?N ?n)))
+ (let ((default (or (car dbgp-proxy-session-port-history) t)))
+ (unless (numberp default)
+ (setq default 0))
+ (dbgp-read-integer (format "Port for debug session (%s): "
+ (if (< 0 default)
+ (format "default %d, 0 to use any free port" default)
+ (format "leave empty to use any free port")))
+ default 'dbgp-proxy-session-port-history))))
+ (let ((result (dbgp-proxy-register-exec proxy-ip-or-addr proxy-port idekey multi-session-p
+ (if (integerp session-port) session-port t)
+ :session-accept 'dbgp-default-session-accept-p
+ :session-init 'dbgp-default-session-init
+ :session-filter 'dbgp-default-session-filter
+ :session-sentinel 'dbgp-default-session-sentinel)))
+ (and (interactive-p)
+ (consp result)
+ (message (cdr result)))
+ result))
+
+;;;###autoload
+(defun dbgp-proxy-register-exec (ip-or-addr port idekey multi-session-p session-port &rest session-params)
+ "Register a new DBGp listener to an external DBGp proxy.
+The proxy should be found at IP-OR-ADDR / PORT.
+This create a new DBGp listener and register it to the proxy
+associating with the IDEKEY."
+ (block dbgp-proxy-register-exec
+ ;; check whether the proxy listener already exists
+ (let ((listener (find-if (lambda (listener)
+ (let ((proxy (dbgp-proxy-get listener)))
+ (and proxy
+ (equal ip-or-addr (plist-get proxy :addr))
+ (eq port (plist-get proxy :port))
+ (equal idekey (plist-get proxy :idekey)))))
+ dbgp-listeners)))
+ (if listener
+ (return-from dbgp-proxy-register-exec
+ (cons listener
+ (format "The DBGp proxy listener has already been started. idekey: %s" idekey)))))
+
+ ;; send commands to the external proxy instance
+ (let* ((listener-proc (make-network-process :name "DBGp proxy listener"
+ :server t
+ :service (if (and (numberp session-port) (< 0 session-port))
+ session-port
+ t)
+ :family 'ipv4
+ :noquery t
+ :filter 'dbgp-comint-setup
+ :sentinel 'dbgp-listener-sentinel))
+ (listener-port (second (process-contact listener-proc)))
+ (result (dbgp-proxy-send-command ip-or-addr port
+ (format "proxyinit -a %s:%s -k %s -m %d"
+ dbgp-local-address listener-port idekey
+ (if multi-session-p 1 0)))))
+ (if (and (consp result)
+ (not (equal "1" (xml-get-attribute result 'success))))
+ ;; successfully connected to the proxy, but respond an error.
+ ;; try to send another command.
+ (setq result (dbgp-proxy-send-command ip-or-addr port
+ (format "proxyinit -p %s -k %s -m %d"
+ listener-port idekey
+ (if multi-session-p 1 0)))))
+ (when (not (and (consp result)
+ (equal "1" (xml-get-attribute result 'success))))
+ ;; connection failed or the proxy respond an error.
+ ;; give up.
+ (dbgp-process-kill listener-proc)
+ (return-from dbgp-proxy-register-exec
+ (if (not (consp result))
+ (cons result
+ (cond
+ ((eq :proxy-not-found result)
+ (format "Cannot connect to DBGp proxy \"%s:%s\"." ip-or-addr port))
+ ((eq :no-response result)
+ "DBGp proxy responds no message.")
+ ((eq :invalid-xml result)
+ "DBGp proxy responds with invalid XML.")
+ (t (symbol-name result))))
+ (cons :error-response
+ (format "DBGp proxy returns an error: %s"
+ (dbgp-xml-get-error-message result))))))
+
+ ;; well done.
+ (dbgp-plist-put listener-proc :proxy (list :addr ip-or-addr
+ :port port
+ :idekey idekey
+ :multi-session multi-session-p))
+ (dbgp-plist-put listener-proc :listener listener-proc)
+ (and session-params
+ (nconc (process-plist listener-proc) session-params))
+ (setq dbgp-listeners (cons listener-proc dbgp-listeners))
+ (cons listener-proc
+ (format "New DBGp proxy listener is registered. idekey: `%s'" idekey)))))
+
+;;;###autoload
+(defun dbgp-proxy-unregister (idekey &optional proxy-ip-or-addr proxy-port)
+ "Unregister the DBGp listener associated with IDEKEY from a DBGp proxy.
+After unregistration, it kills the listener instance."
+ (interactive
+ (let (proxies idekeys idekey)
+ ;; collect idekeys.
+ (mapc (lambda (listener)
+ (let ((proxy (dbgp-proxy-get listener)))
+ (and proxy
+ (setq proxies (cons listener proxies))
+ (add-to-list 'idekeys (plist-get proxy :idekey)))))
+ dbgp-listeners)
+ (or proxies
+ (error "No DBGp proxy listener exists."))
+ ;; ask user for the target idekey.
+ (setq idekey (completing-read "IDE key: " idekeys nil t
+ (and (eq 1 (length idekeys))
+ (car idekeys))))
+ ;; filter proxies and leave ones having the selected ideky.
+ (setq proxies (remove-if (lambda (proxy)
+ (not (equal idekey (plist-get (dbgp-proxy-get proxy) :idekey))))
+ proxies))
+ (let ((proxy (if (= 1 (length proxies))
+ ;; solo proxy.
+ (car proxies)
+ ;; two or more proxies has the same ideky.
+ ;; ask user to select a proxy unregister from.
+ (let* ((addrs (mapcar (lambda (proxy)
+ (let ((prop (dbgp-proxy-get proxy)))
+ (format "%s:%s" (plist-get prop :addr) (plist-get prop :port))))
+ proxies))
+ (addr (completing-read "Proxy candidates: " addrs nil t (car addrs)))
+ (pos (position addr addrs)))
+ (and pos
+ (nth pos proxies))))))
+ (list idekey
+ (plist-get (dbgp-proxy-get proxy) :addr)
+ (plist-get (dbgp-proxy-get proxy) :port)))))
+
+ (let* ((proxies
+ (remq nil
+ (mapcar (lambda (listener)
+ (let ((prop (dbgp-proxy-get listener)))
+ (and prop
+ (equal idekey (plist-get prop :idekey))
+ (or (not proxy-ip-or-addr)
+ (equal proxy-ip-or-addr (plist-get prop :addr)))
+ (or (not proxy-port)
+ (equal proxy-port (plist-get prop :port)))
+ listener)))
+ dbgp-listeners)))
+ (proxy (if (< 1 (length proxies))
+ (error "Multiple proxies are found. Needs more parameters to determine for unregistration.")
+ (car proxies)))
+ (result (and proxy
+ (dbgp-proxy-unregister-exec proxy)))
+ (status (cons result
+ (cond
+ ((processp result)
+ (format "The DBGp proxy listener of `%s' is unregistered." idekey))
+ ((null result)
+ (format "DBGp proxy listener of `%s' is not registered." idekey))
+ ((stringp result)
+ (format "DBGp proxy returns an error: %s" result))
+ ((eq :proxy-not-found result)
+ (format "Cannot connect to DBGp proxy \"%s:%s\"." proxy-ip-or-addr proxy-port))
+ ((eq :no-response result)
+ "DBGp proxy responds no message.")
+ ((eq :invalid-xml result)
+ "DBGp proxy responds with invalid XML.")))))
+ (and (interactive-p)
+ (cdr status)
+ (message (cdr status)))
+ status))
+
+;;;###autoload
+(defun dbgp-proxy-unregister-exec (proxy)
+ "Unregister PROXY from a DBGp proxy.
+After unregistration, it kills the listener instance."
+ (with-temp-buffer
+ (let* ((prop (dbgp-proxy-get proxy))
+ (result (dbgp-proxy-send-command (plist-get prop :addr)
+ (plist-get prop :port)
+ (format "proxystop -k %s" (plist-get prop :idekey)))))
+ ;; no matter of the result, remove proxy listener from the dbgp-listeners list.
+ (dbgp-process-kill proxy)
+ (if (consp result)
+ (or (equal "1" (xml-get-attribute result 'success))
+ (dbgp-xml-get-error-message result))
+ result))))
+
+(defun dbgp-sessions-kill-all ()
+ (interactive)
+ (mapc 'delete-process dbgp-sessions)
+ (setq dbgp-sessions nil))
+
+;;--------------------------------------------------------------
+;; DBGp listener functions
+;;--------------------------------------------------------------
+
+(defun dbgp-proxy-send-command (addr port string)
+ "Send DBGp proxy command string to an external DBGp proxy.
+ADDR and PORT is the address of the target proxy.
+This function returns an xml list if the command succeeds,
+or a symbol: `:proxy-not-found', `:no-response', or `:invalid-xml'."
+ (with-temp-buffer
+ (let ((proc (ignore-errors
+ (make-network-process :name "DBGp proxy negotiator"
+ :buffer (current-buffer)
+ :host addr
+ :service port
+ :sentinel (lambda (proc string) ""))))
+ xml)
+ (if (null proc)
+ :proxy-not-found
+ (process-send-string proc string)
+ (dotimes (x 50)
+ (if (= (point-min) (point-max))
+ (sit-for 0.1 t)))
+ (if (= (point-min) (point-max))
+ :no-response
+ (or (ignore-errors
+ (setq xml (car (xml-parse-region (point-min) (point-max)))))
+ :invalid-xml))))))
+
+(defun dbgp-listener-alive-p (port)
+ "Return t if any listener for POST is alive."
+ (let ((listener (dbgp-listener-find port)))
+ (and listener
+ (eq 'listen (process-status listener)))))
+
+;;--------------------------------------------------------------
+;; DBGp listener process log and sentinel
+;;--------------------------------------------------------------
+
+(defun dbgp-listener-sentinel (proc string)
+ (with-current-buffer (get-buffer-create "*DBGp Listener*")
+ (insert (format "[SNT] %S %s\n" proc string)))
+ (setq dbgp-listeners (remq proc dbgp-listeners)))
+
+(defun dbgp-listener-log (&rest arg)
+ (with-current-buffer (get-buffer-create "*DBGp Listener*")
+ (insert (format "[LOG] %S\n" arg))))
+
+;;--------------------------------------------------------------
+;; DBGp session process filter and sentinel
+;;--------------------------------------------------------------
+
+(defvar dbgp-filter-defer-flag nil
+ "Non-nil means don't process anything from the debugger right now.
+It is saved for when this flag is not set.")
+(defvar dbgp-filter-defer-faced nil
+ "Non-nil means this is text that has been saved for later in `gud-filter'.")
+(defvar dbgp-filter-pending-text nil
+ "Non-nil means this is text that has been saved for later in `gud-filter'.")
+(defvar dbgp-delete-prompt-marker nil)
+(defvar dbgp-filter-input-list nil)
+
+(defvar dbgp-buffer-process nil
+ "")
+(put 'dbgp-buffer-process 'permanent-local t)
+
+(defadvice open-network-stream (around debugclient-pass-process-to-comint)
+ "[comint hack] Pass the spawned DBGp client process to comint."
+ (let* ((buffer (ad-get-arg 1))
+ (proc (buffer-local-value 'dbgp-buffer-process buffer)))
+ (set-process-buffer proc buffer)
+ (setq ad-return-value proc)))
+
+(defun dbgp-comint-setup (proc string)
+ "Setup a new comint buffer for a newly created session process PROC.
+This is the first filter function for a new session process created by a
+listener process. After the setup is done, `dbgp-session-filter' function
+takes over the filter."
+ (if (not (dbgp-session-accept-p proc))
+ ;; multi session is disabled
+ (when (memq (process-status proc) '(run connect open))
+ ;; refuse this session
+ (set-process-filter proc nil)
+ (set-process-sentinel proc nil)
+ (process-send-string proc "run -i 1\0")
+ (dotimes (i 50)
+ (and (eq 'open (process-status proc))
+ (sleep-for 0 1)))
+ (dbgp-process-kill proc))
+ ;; accept
+ (setq dbgp-sessions (cons proc dbgp-sessions))
+ ;; initialize sub process
+ (set-process-query-on-exit-flag proc nil)
+
+ (let* ((listener (dbgp-listener-get proc))
+ (buffer-name (format "DBGp <%s:%s>"
+ (first (process-contact proc))
+ (second (process-contact listener))))
+ (buf (or (find-if (lambda (buf)
+ ;; find reusable buffer
+ (let ((proc (get-buffer-process buf)))
+ (and (buffer-local-value 'dbgp-buffer-process buf)
+ (not (and proc
+ (eq 'open (process-status proc)))))))
+ (buffer-list))
+ (get-buffer-create buffer-name))))
+ (with-current-buffer buf
+ (rename-buffer buffer-name)
+ ;; store PROC to `dbgp-buffer-process'.
+ ;; later the adviced `open-network-stream' will pass it
+ ;; comint.
+ (set (make-local-variable 'dbgp-buffer-process) proc)
+ (set (make-local-variable 'dbgp-filter-defer-flag) nil)
+ (set (make-local-variable 'dbgp-filter-defer-faced) nil)
+ (set (make-local-variable 'dbgp-filter-input-list) nil)
+ (set (make-local-variable 'dbgp-filter-pending-text) nil))
+ ;; setup comint buffer
+ (ad-activate 'open-network-stream)
+ (unwind-protect
+ (make-comint-in-buffer "DBGp-Client" buf (cons t t))
+ (ad-deactivate 'open-network-stream))
+ ;; update PROC properties
+ (set-process-filter proc #'dbgp-session-filter)
+ (set-process-sentinel proc #'dbgp-session-sentinel)
+ (with-current-buffer buf
+ (set (make-local-variable 'dbgp-delete-prompt-marker)
+ (make-marker))
+ ;;(set (make-local-variable 'comint-use-prompt-regexp) t)
+ ;;(setq comint-prompt-regexp (concat "^" dbgp-command-prompt))
+ (setq comint-input-sender 'dbgp-session-send-string)
+ ;; call initializer function
+ (funcall (or (dbgp-plist-get listener :session-init)
+ 'null)
+ proc))
+ (dbgp-session-filter proc string))))
+
+(defun dbgp-session-accept-p (proc)
+ "Determine whether PROC should be accepted to be a new session."
+ (let ((accept-p (dbgp-plist-get proc :session-accept)))
+ (or (not accept-p)
+ (funcall accept-p proc))))
+
+(defun dbgp-session-send-string (proc string &optional echo-p)
+ "Send a DBGp protocol STRING to PROC."
+ (if echo-p
+ (dbgp-session-echo-input proc string))
+ (comint-send-string proc (concat string "\0")))
+
+(defun dbgp-session-echo-input (proc string)
+ (with-current-buffer (process-buffer proc)
+ (if dbgp-filter-defer-flag
+ (setq dbgp-filter-input-list
+ (append dbgp-filter-input-list (list string)))
+ (let ((eobp (eobp))
+ (process-window (get-buffer-window (current-buffer))))
+ (save-excursion
+ (save-restriction
+ (widen)
+ (goto-char (process-mark proc))
+ (insert (propertize
+ (concat string "\n")
+ 'front-sticky t
+ 'font-lock-face 'comint-highlight-input))
+ (set-marker (process-mark proc) (point))))
+ (when eobp
+ (if process-window
+ (with-selected-window process-window
+ (goto-char (point-max)))
+ (goto-char (point-max))))))))
+
+(defun dbgp-session-filter (proc string)
+ ;; Here's where the actual buffer insertion is done
+ (let ((buf (process-buffer proc))
+ (listener (dbgp-listener-get proc))
+ (session-filter (dbgp-plist-get proc :session-filter))
+ output process-window chunks)
+ (block dbgp-session-filter
+ (unless (buffer-live-p buf)
+ (return-from dbgp-session-filter))
+
+ (with-current-buffer buf
+ (when dbgp-filter-defer-flag
+ ;; If we can't process any text now,
+ ;; save it for later.
+ (setq dbgp-filter-defer-faced t
+ dbgp-filter-pending-text (if dbgp-filter-pending-text
+ (concat dbgp-filter-pending-text string)
+ string))
+ (return-from dbgp-session-filter))
+
+ ;; If we have to ask a question during the processing,
+ ;; defer any additional text that comes from the debugger
+ ;; during that time.
+ (setq dbgp-filter-defer-flag t)
+ (setq dbgp-filter-defer-faced nil)
+
+ (ignore-errors
+ ;; Process now any text we previously saved up.
+ (setq dbgp-filter-pending-text (if dbgp-filter-pending-text
+ (concat dbgp-filter-pending-text string)
+ string))
+ (setq chunks (dbgp-session-response-to-chunk))
+
+ ;; If we have been so requested, delete the debugger prompt.
+ (if (marker-buffer dbgp-delete-prompt-marker)
+ (save-restriction
+ (widen)
+ (let ((inhibit-read-only t))
+ (delete-region (process-mark proc)
+ dbgp-delete-prompt-marker)
+ (comint-update-fence)
+ (set-marker dbgp-delete-prompt-marker nil))))
+
+ ;; Save the process output, checking for source file markers.
+ (and chunks
+ (setq output
+ (concat
+ (mapconcat (if (functionp session-filter)
+ (lambda (chunk) (funcall session-filter proc chunk))
+ #'quote)
+ chunks
+ "\n")
+ "\n"))
+ (setq output
+ (concat output
+ (if dbgp-filter-input-list
+ (mapconcat (lambda (input)
+ (concat
+ (propertize dbgp-command-prompt
+ 'font-lock-face 'comint-highlight-prompt)
+ (propertize (concat input "\n")
+ 'font-lock-face 'comint-highlight-input)))
+ dbgp-filter-input-list
+ "")
+ dbgp-command-prompt)))
+ (setq dbgp-filter-input-list nil))))
+ ;; Let the comint filter do the actual insertion.
+ ;; That lets us inherit various comint features.
+ (and output
+ (ignore-errors
+ (comint-output-filter proc output))))
+ (if (with-current-buffer buf
+ (setq dbgp-filter-defer-flag nil)
+ dbgp-filter-defer-faced)
+ (dbgp-session-filter proc ""))))
+
+(defun dbgp-session-response-to-chunk ()
+ (let* ((string dbgp-filter-pending-text)
+ (send (length string)) ; string end
+ (lbeg 0) ; line begin
+ tbeg ; text begin
+ tlen ; text length
+ (i 0) ; running pointer
+ chunks)
+ (while (< i send)
+ (if (< 0 (elt string i))
+ (incf i)
+ (setq tlen (string-to-number (substring string lbeg i)))
+ (setq tbeg (1+ i))
+ (setq i (+ tbeg tlen))
+ (when (< i send)
+ (setq chunks (cons (substring string tbeg i) chunks))
+ (incf i)
+ (setq lbeg i))))
+ ;; Remove chunk from `dbgp-filter-pending-text'.
+ (setq dbgp-filter-pending-text
+ (and (< lbeg i)
+ (substring dbgp-filter-pending-text lbeg)))
+ (nreverse chunks)))
+
+(defun dbgp-session-sentinel (proc string)
+ (let ((sentinel (dbgp-plist-get proc :session-sentinel)))
+ (ignore-errors
+ (and (functionp sentinel)
+ (funcall sentinel proc string))))
+ (setq dbgp-sessions (remq proc dbgp-sessions)))
+
+;;--------------------------------------------------------------
+;; default session initializer, filter and sentinel
+;;--------------------------------------------------------------
+
+(defun dbgp-default-session-accept-p (proc)
+ "Determine whether PROC should be accepted to be a new session."
+ (or (not dbgp-sessions)
+ (if (dbgp-proxy-p proc)
+ (plist-get (dbgp-proxy-get proc) :multi-session)
+ (dbgp-plist-get proc :multi-session))))
+
+(defun dbgp-default-session-init (proc)
+ (with-current-buffer (process-buffer proc)
+ (pop-to-buffer (current-buffer))))
+
+(defun dbgp-default-session-filter (proc string)
+ (with-temp-buffer
+ ;; parse xml
+ (insert (replace-regexp-in-string "\n" "" string))
+ (let ((xml (car (xml-parse-region (point-min) (point-max))))
+ text)
+ ;; if the xml has a child node encoded with base64, decode it.
+ (when (equal "base64" (xml-get-attribute xml 'encoding))
+ ;; remain decoded string
+ (setq text (with-current-buffer (process-buffer proc)
+ (decode-coding-string
+ (base64-decode-string (car (xml-node-children xml)))
+ buffer-file-coding-system)))
+ ;; decoded string may have invalid characters for xml,
+ ;; so replace the child node with a placeholder
+ (setcar (xml-node-children xml) "\0"))
+
+ ;; create formatted xml string
+ (erase-buffer)
+ (when (string-match "^.*?\\?>" string)
+ (insert (match-string 0 string))
+ (insert "\n"))
+ (xml-print (list xml))
+ (add-text-properties (point-min)
+ (point-max)
+ (list 'front-sticky t
+ 'font-lock-face 'dbgp-response-face))
+ (when text
+ ;; restore decoded string into a right place
+ (goto-char (point-min))
+ (and (search-forward "\0" nil t)
+ (replace-match (propertize (concat "\n" text)
+ 'front-sticky t
+ 'font-lock-face 'dbgp-decoded-string-face)
+ nil t)))
+ ;; return a formatted xml string
+ (buffer-string))))
+
+(defun dbgp-default-session-sentinel (proc string)
+ (let ((output "\nDisconnected.\n\n"))
+ (when (buffer-live-p (process-buffer proc))
+ (dbgp-session-echo-input proc output))))
+
+(provide 'dbgp)
View
BIN .emacs.d/dbgp.elc
Binary file not shown.
View
158 .emacs.d/elpa/ampc-readme.txt
@@ -0,0 +1,158 @@
+* description
+ampc is a controller for the Music Player Daemon (http://mpd.wikia.com/).
+
+** installation
+If you use GNU ELPA, install ampc via M-x package-list-packages RET or
+(package-install 'ampc). Otherwise, grab this file and put it somewhere in
+your load-path or add the directory the file is in to it, e.g.:
+
+(add-to-list 'load-path "~/.emacs.d/ampc")
+
+Then add one autoload definition:
+
+(autoload 'ampc "ampc" nil t)
+
+Optionally bind a key to this function, e.g.:
+
+(global-set-key (kbd "<f9>") 'ampc)
+
+Byte-compile ampc (M-x byte-compile-file RET /path/to/ampc.el RET) to improve
+its performance!
+
+** usage
+To invoke ampc, call the command `ampc', e.g. via M-x ampc RET. Once ampc is
+connected to the daemon, it creates its window configuration in the selected
+window. To make ampc use the full frame rather than the selected window,
+customise `ampc-use-full-frame'.
+
+ampc offers three independent views which expose different parts of the user
+interface. The current playlist view, the default view at startup, may be
+accessed using the `J' (that is `S-j') key. The playlist view may be
+accessed using the `K' key. The outputs view may be accessed using the `L'
+key.
+
+*** current playlist view
+The playlist view should look like this
+
+.........................
+. 1 . 3 . 4 . 5 .
+.......... . . .
+. 2 . . . .
+. . . . .
+. . . . .
+. ................
+. . 6 .
+. . .
+.........................
+
+Window one exposes basic information about the daemon, such as the current
+state (stop/play/pause), the song currently playing, or the volume.
+
+All windows, except the status window, contain a tabular list of items. Each
+item may be selected/marked. There may be multiple selections.
+
+To mark an entry, move the point to the entry and press `m' (ampc-mark). To
+unmark an entry, press `u' (ampc-unmark). To unmark all entries, press `U'
+(ampc-unmark-all). To toggle marks, press `t' (ampc-toggle-marks). To
+navigate to the next entry, press `n' (ampc-next-line). Analogous, pressing
+`p' (ampc-previous-line) moves the point to the previous entry.
+
+Window two shows the current playlist. The song that is currently played by
+the daemon, if any, is highlighted. To delete the selected songs from the
+playlist, press `d' (ampc-delete). To move the selected songs up, press
+`<up>' (ampc-up). Analogous, press `<down>' (ampc-down) to move the selected
+songs down.
+
+Windows three to five are tag browsers. You use them to narrow the song
+database to certain songs. Think of tag browsers as filters, analogous to
+piping `grep' outputs through additional `grep' filters. The property of the
+songs that is filtered is displayed in the header line of the window.
+
+Window six shows the songs that match the filters defined by windows three to
+five. To add the selected song to the playlist, press `a' (ampc-add). This
+key binding works in tag browsers as well. Calling ampc-add in a tag browser
+adds all songs filtered up to the selected browser to the playlist.
+
+The tag browsers of the (default) current playlist view (accessed via `J')
+are `Genre' (window 3), `Artist' (window 4) and `Album' (window 5). The key
+`M' may be used to fire up a slightly modified current playlist view. There
+is no difference to the default current playlist view other than that the tag
+browsers filter to `Genre' (window 3), `Album' (window 4) and `Artist'
+(window 5). Metaphorically speaking, the order of the `grep' filters defined
+by the tag browsers is different.
+
+*** playlist view
+The playlist view resembles the current playlist view. The window, which
+exposes the playlist content, is split, though. The bottom half shows a list
+of stored playlists. The upper half does not expose the current playlist
+anymore. Instead, the content of the selected (stored) playlist is shown.
+All commands that used to work in the current playlist view and modify the
+current playlist now modify the selected (stored) playlist. The list of
+stored playlists is the only view in ampc that may have only one marked
+entry.
+
+Again, the key `<' may be used to setup a playlist view with a different
+order of tag browsers.
+
+*** outputs view
+The outputs view contains a single list which shows the configured outputs of
+mpd. To toggle the enabled property of the selected outputs, press `a'
+(ampc-toggle-output-enabled).
+
+*** global keys
+Aside from `J', `M', `K', `<' and `L', which may be used to select different
+views, ampc defines the following global keys, which may be used in every
+window associated with ampc:
+
+`k' (ampc-toggle-play): Toggle play state. If mpd does not play a song
+already, start playing the song at point if the current buffer is the
+playlist buffer, otherwise start at the beginning of the playlist. With
+prefix argument 4, stop player rather than pause if applicable.
+
+`l' (ampc-next): Play next song.
+`j' (ampc-previous): Play previous song
+
+`c' (ampc-clear): Clear playlist.
+`s' (ampc-shuffle): Shuffle playlist.
+
+`S' (ampc-store): Store playlist.
+`O' (ampc-load): Load selected playlist in the current playlist.
+`R' (ampc-rename-playlist): Rename selected playlist.
+`D' (ampc-delete-playlist): Delete selected playlist.
+
+`y' (ampc-increase-volume): Increase volume.
+`M-y' (ampc-decrease-volume): Decrease volume.
+`h' (ampc-increase-crossfade): Increase crossfade.
+`M-h' (ampc-decrease-crossfade): Decrease crossfade.
+
+`e' (ampc-toggle-repeat): Toggle repeat state.
+`r' (ampc-toggle-random): Toggle random state.
+`f' (ampc-toggle-consume): Toggle consume state.
+
+`P' (ampc-goto-current-song): Select the current playlist window and move
+point to the current song.
+
+`T' (ampc-trigger-update): Trigger a database update.
+`Z' (ampc-suspend): Suspend ampc.
+`q' (ampc-quit): Quit ampc.
+
+The keymap of ampc is designed to fit the QWERTY United States keyboard
+layout. If you use another keyboard layout, feel free to modify
+ampc-mode-map. For example, I use a regular QWERTZ German keyboard (layout),
+so I modify `ampc-mode-map' in my init.el like this:
+
+(eval-after-load 'ampc
+ '(flet ((substitute-ampc-key
+ (from to)
+ (define-key ampc-mode-map to (lookup-key ampc-mode-map from))
+ (define-key ampc-mode-map from nil)))
+ (substitute-ampc-key (kbd "z") (kbd "Z"))
+ (substitute-ampc-key (kbd "y") (kbd "z"))
+ (substitute-ampc-key (kbd "M-y") (kbd "M-z"))
+ (substitute-ampc-key (kbd "<") (kbd ";"))))
+
+If ampc is suspended, you can still use every interactive command that does
+not directly operate on or with the user interace of ampc. For example it is
+perfectly fine to call `ampc-increase-volume' or `ampc-toggle-play' via M-x
+RET. To display the information that is displayed by the status window of
+ampc, call `ampc-status'.
View
28 .emacs.d/elpa/android-mode-0.1/android-mode-autoloads.el
@@ -0,0 +1,28 @@
+;;; android-mode-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+
+
+;;;### (autoloads (android-mode) "android-mode" "android-mode.el"
+;;;;;; (20429 45600))
+;;; Generated autoloads from android-mode.el
+
+(autoload 'android-mode "android-mode" "\
+Android application development minor mode.
+
+\(fn &optional ARG)" t nil)
+
+;;;***
+
+;;;### (autoloads nil nil ("android-mode-pkg.el") (20429 45600 426831))
+
+;;;***
+
+(provide 'android-mode-autoloads)
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; android-mode-autoloads.el ends here
View
13 .emacs.d/elpa/android-mode-0.1/android-mode-autoloads.el~
@@ -0,0 +1,13 @@
+;;; android-mode-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+
+
+(provide 'android-mode-autoloads)
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; android-mode-autoloads.el ends here
View
1 .emacs.d/elpa/android-mode-0.1/android-mode-pkg.el
@@ -0,0 +1 @@
+(define-package "android-mode" "0.1" "Minor mode for Android application development" (quote nil))
View
BIN .emacs.d/elpa/android-mode-0.1/android-mode-pkg.elc
Binary file not shown.
View
314 .emacs.d/elpa/android-mode-0.1/android-mode.el
@@ -0,0 +1,314 @@
+;;; android-mode.el --- Minor mode for Android application development
+
+;; Copyright (C) 2009, 2010, 2011 R.W van 't Veer
+
+;; Author: R.W. van 't Veer
+;; Created: 20 Feb 2009
+;; Keywords: tools processes
+;; Version: 0.1
+;; URL: https://github.com/remvee/android-mode
+
+;; 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 the Free Software Foundation; either version 3
+;; of the License, or (at your option) any later version.
+;;
+;; This program 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; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; Provides support for running Android SDK subprocesses like the
+;; emulator, logcat, ddms and ant. When loaded `dired-mode' and
+;; `find-file' hooks are added to automatically enable `android-mode'
+;; when opening a file or directory in an android project.
+
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+
+(defgroup android-mode nil
+ "A minor mode for Android application development"
+ :prefix "android-mode-"
+ :group 'applications)
+
+(defcustom android-mode-sdk-dir "~/Android/sdk"
+ "Set to the directory containing the Android SDK."
+ :type 'string
+ :group 'android-mode)
+
+(defcustom android-mode-sdk-tool-subdirs '("tools" "platform-tools")
+ "List of subdirectors in the SDK containing commandline tools."
+ :type '(repeat string)
+ :group 'android-mode)
+
+(defcustom android-mode-sdk-tool-extensions '("" ".bat" ".exe")
+ "List of possible extensions for commandline tools."
+ :type '(repeat string)
+ :group 'android-mode)
+
+(defcustom android-mode-key-prefix "\C-c \C-c"
+ "Minor mode keys prefix."
+ :type 'string
+ :group 'android-mode)
+
+(defcustom android-mode-avd ""
+ "Default AVD to use."
+ :type 'string
+ :group 'android-mode)
+
+(defun android-root ()
+ "Look for AndroidManifest.xml file to find project root of android application."
+ (locate-dominating-file default-directory "AndroidManifest.xml"))
+
+(defmacro android-in-root (body)
+ `(let ((default-directory (android-root)))
+ ,body))
+
+(defun android-local-sdk-dir ()
+ "Try to find android sdk directory through the local.properties
+file in the android project base directory. If local.properties
+doesn't exist, it does not contain the sdk-dir property or the
+referred directory does not exist, return `android-mode-sdk-dir'
+variable."
+ (or
+ (android-in-root
+ (let ((local-properties "local.properties")
+ (buffer "*android-mode*/local.properties"))
+ (and (file-exists-p local-properties)
+ (let ((buffer (get-buffer-create buffer)))
+ (with-current-buffer buffer
+ (erase-buffer)
+ (insert-file-contents local-properties)
+ (goto-char (point-min))
+ (and (re-search-forward "^sdk\.dir=\\(.*\\)" nil t)
+ (let ((sdk-dir (match-string 1)))
+ (kill-buffer buffer)
+ (and (file-exists-p sdk-dir) sdk-dir))))))))
+ android-mode-sdk-dir))
+
+(defun android-tool-path (name)
+ "Find path to SDK tool. Calls `android-local-sdk-dir' to try to find locally
+defined sdk directory. Defaults to `android-mode-sdk-dir'."
+ (or (find-if #'file-exists-p
+ (apply #'append
+ (mapcar (lambda (path)
+ (mapcar (lambda (ext)
+ (mapconcat 'identity
+ `(,(android-local-sdk-dir)
+ ,path ,(concat name ext))
+ "/"))
+ android-mode-sdk-tool-extensions))
+ android-mode-sdk-tool-subdirs)))
+ (error "can't find SDK tool: %s" name)))
+
+(defvar android-exclusive-processes ())
+(defun android-start-exclusive-command (name command &rest args)
+ (and (not (find (intern name) android-exclusive-processes))
+ (set-process-sentinel (apply 'start-process-shell-command name name command args)
+ (lambda (proc msg)
+ (when (memq (process-status proc) '(exit signal))
+ (setq android-exclusive-processes
+ (delete (intern (process-name proc))
+ android-exclusive-processes)))))
+ (setq android-exclusive-processes (cons (intern name)
+ android-exclusive-processes))))
+
+
+ ; emulator
+
+(defun android-list-avd ()
+ "List of Android Virtual Devices installed on local machine."
+ (let* ((command (concat (android-tool-path "android") " list avd"))
+ (output (shell-command-to-string command))
+ (result nil)
+ (offset 0))
+ (while (string-match "Name: \\(.*\\)" output offset)
+ (setq result (cons (match-string 1 output) result))
+ (setq offset (match-end 0)))
+ (if result
+ (reverse result)
+ (error "no Android Virtual Devices found"))))
+
+(defun android-start-emulator ()
+ "Launch Android emulator."
+ (interactive)
+ (let ((avd (or (and (not (string= android-mode-avd "")) android-mode-avd)
+ (completing-read "Android Virtual Device: " (android-list-avd)))))
+ (unless (android-start-exclusive-command (concat "*android-emulator-" avd "*")
+ (concat (android-tool-path "emulator") " -avd " avd))
+ (message (concat "emulator " avd " already running")))))
+
+
+ ; ddms
+
+(defun android-start-ddms ()
+ "Launch Dalvik Debug Monitor Service tool."
+ (interactive)
+ (unless (android-start-exclusive-command "*android-ddms*" (android-tool-path "ddms"))
+ (message "ddms already running")))
+
+
+ ; logcat
+
+(defcustom android-logcat-buffer "*android-logcat*"
+ "Name for the buffer where logcat output goes."
+ :type 'string
+ :group 'android-mode)
+
+(defun android-logcat-find-file ()
+ (interactive)
+ (let ((filename (get-text-property (point) 'filename))
+ (linenr (get-text-property (point) 'linenr)))
+ (when filename
+ (find-file (concat (android-root) "/src/" filename))
+ (goto-line linenr))))
+
+(defun android-logcat-find-file-mouse (event)
+ (interactive "e")
+ (let (window pos file)
+ (save-excursion
+ (setq window (posn-window (event-end event))
+ pos (posn-point (event-end event)))
+ (set-buffer (window-buffer window))
+ (goto-char pos)
+ (android-logcat-find-file))))
+
+(defvar android-logcat-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "RET") 'android-logcat-find-file)
+ (define-key map [mouse-2] 'android-logcat-find-file-mouse)
+ map))
+
+(defun android-logcat-prepare-msg (msg)
+ (if (string-match "\\bat \\(.+\\)\\.\\([^.]+\\)\\.\\([^.]+\\)(\\(.+\\):\\([0-9]+\\))" msg)
+ (let* ((package (match-string 1 msg))
+ (class (match-string 2 msg))
+ (method (match-string 3 msg))
+ (filename (concat (replace-regexp-in-string "\\." "/" package) "/" (match-string 4 msg)))
+ (linenr (match-string 5 msg)))
+ (if (file-exists-p (concat (android-root) "/src/" filename))
+ (propertize msg
+ 'face 'underline
+ 'mouse-face 'highlight
+ 'filename filename
+ 'linenr (string-to-number linenr)
+ 'follow-link t)
+ msg))
+ msg))
+
+(defvar android-logcat-pending-output "")
+
+(defun android-logcat-process-filter (process output)
+ "Process filter for displaying logcat output."
+ (with-current-buffer android-logcat-buffer
+ (let ((following (= (point-max) (point)))
+ (buffer-read-only nil)
+ (pos 0)
+ (output (concat android-logcat-pending-output
+ (replace-regexp-in-string "
+" "" output))))
+ (save-excursion
+ (while (string-match "\n" output pos)
+ (let ((line (substring output pos (match-beginning 0))))
+ (setq pos (match-end 0))
+ (goto-char (point-max))
+ (if (string-match "^\\(.\\)/\\(.*\\)( *\\([0-9]+\\)): \\(.*\\)$" line)
+ (let ((level (match-string 1 line))
+ (tag (replace-regexp-in-string " *$" "" (match-string 2 line)))
+ (pid (match-string 3 line))
+ (msg (match-string 4 line)))
+ (insert (propertize level
+ 'font-lock-face 'font-lock-comment-face))
+ (tab-to-tab-stop)
+ (insert (propertize tag
+ 'font-lock-face 'font-lock-function-name-face))
+ (insert (propertize (concat "(" pid ")")
+ 'font-lock-face 'font-lock-constant-face))
+ (tab-to-tab-stop)
+ (insert (android-logcat-prepare-msg msg)))
+ (insert (propertize line
+ 'font-lock-face 'font-lock-warning-face)))
+ (insert "\n")))
+ (setq android-logcat-pending-output (substring output pos)))
+ (when following (goto-char (point-max))))))
+
+(defun android-logcat ()
+ "Switch to ADB logcat buffer, create it when it doesn't exists yet."
+ (interactive)
+ (when (android-start-exclusive-command android-logcat-buffer
+ (android-tool-path "adb")
+ "logcat")
+ (set-process-filter (get-buffer-process android-logcat-buffer)
+ #'android-logcat-process-filter)
+ (with-current-buffer android-logcat-buffer
+ (setq buffer-read-only t)
+ (set (make-local-variable 'tab-stop-list) '(2 30))
+ (use-local-map android-logcat-map)
+ (font-lock-mode t)
+ (android-mode t)))
+ (switch-to-buffer android-logcat-buffer)
+ (goto-char (point-max)))
+
+
+ ; ant
+
+(defun android-ant (task)
+ "Run ant TASK in the project root directory."
+ (interactive "sTask: ")
+ (android-in-root
+ (compile (concat "ant " task))))
+
+(defmacro android-defun-ant-task (task)
+ `(defun ,(intern (concat "android-ant-" task)) ()
+ ,(concat "Run 'ant " task "' in the project root directory.")
+ (interactive)
+ (android-ant ,task)))
+
+(android-defun-ant-task "clean")
+(android-defun-ant-task "compile")
+(android-defun-ant-task "install")
+(android-defun-ant-task "uninstall")
+
+
+ ; mode
+
+(defconst android-mode-keys
+ '(("d" . android-start-ddms)
+ ("e" . android-start-emulator)
+ ("l" . android-logcat)
+ ("C" . android-ant-clean)
+ ("c" . android-ant-compile)
+ ("i" . android-ant-install)
+ ("r" . android-ant-reinstall)
+ ("u" . android-ant-uninstall)))
+
+(defvar android-mode-map (make-sparse-keymap))
+(add-hook 'android-mode-hook
+ (lambda ()
+ (dolist (spec android-mode-keys)
+ (define-key
+ android-mode-map
+ (read-kbd-macro (concat android-mode-key-prefix " " (car spec)))
+ (cdr spec)))))
+
+;;;###autoload
+(define-minor-mode android-mode
+ "Android application development minor mode."
+ nil
+ " Android"
+ android-mode-map)
+
+(add-hook 'dired-mode-hook (lambda () (when (android-root) (android-mode t))))
+(add-hook 'find-file-hook (lambda () (when (android-root) (android-mode t))))
+
+(provide 'android-mode)
+
View
BIN .emacs.d/elpa/android-mode-0.1/android-mode.elc
Binary file not shown.
View
447 .emacs.d/elpa/archives/elpa/archive-contents
@@ -0,0 +1,447 @@
+(1
+ (load-relative .
+ [(0 1)
+ nil "relative file load (within a multi-file Emacs package)" single])
+ (test-unit .
+ [(0 1)
+ nil "Unit Test Framework for Emacs Lisp " single])
+ (zenburn .
+ [(1 8)
+ nil "just some alien fruit salad to keep you in the zone" single])
+ (multi-project .
+ [(0 0 1)
+ nil "Work with multiple projects" single])
+ (hungry-delete .
+ [(1 0)
+ nil "hungry delete minor mode" single])
+ (Save-visited-files .
+ [(1 2)
+ nil "save opened files across sessions" single])
+ (c-eldoc .
+ [(0 6)
+ nil "helpful description of the arguments to C functions" single])
+ (mv-shell .
+ [(1 0)
+ nil "keep buffers in sync with filename throughout 'mv'commands in shell-mode." single])
+ (diff-git .
+ [(0 1 1)
+ nil "Git integration with diff-mode" single])
+ (html-script-src .
+ [(0 0 2)
+ nil "Insert <script src=\"..\"> for popular JavaScript libraries" single])
+ (rvm .
+ [(1 1)
+ nil "Emacs integration for rvm" single])
+ (elisp-depend .
+ [(0 4 1)
+ nil "Parse depend libraries of elisp file." single])
+ (perspective .
+ [(1 3)
+ nil "switch between named \"perspectives\" of the editor" single])
+ (ruby-electric .
+ [(1 1)
+ nil "electric editing commands for ruby files" single])
+ (yari .
+ [(0 3)
+ nil "Yet Another RI interface for Emacs" single])
+ (smex .
+ [(1 1 1)
+ nil "M-x interface with Ido-style fuzzy matching." single])
+ (drag-stuff .
+ [(0 0 3)
+ nil "Drag stuff (lines, words, region, etc...) around" single])
+ (ruby-test-mode .
+ [(1 0)
+ nil "Minor mode for Behaviour and Test Driven" single])
+ (applescript-mode .
+ [(20090321)
+ nil "major mode for editing AppleScript source" single])
+ (mediawiki .
+ [(1 1)
+ nil "mediawiki frontend" single])
+ (wrap-region .
+ [(0 1 3)
+ nil "Wrap text with punctation or tag" single])
+ (twitter .
+ [(20090422)
+ nil "Simple Emacs-based client for Twitter" single])
+ (pastie .
+ [(20091230)
+ nil "Emacs integration for pastie.org" single])
+ (textmate .
+ [(1)
+ nil "TextMate minor mode for Emacs" single])
+ (yaml-mode .
+ [(0 0 5)
+ nil "Major mode for editing YAML files" single])
+ (rspec-mode .
+ [(0 2)
+ ((ruby-mode
+ (1 1)))
+ "Enhance ruby-mode for RSpec" single])
+ (htmlize .
+ [(1 37)
+ nil "Convert buffer text and decorations to HTML." single])
+ (swank-clojure .
+ [(1 1 0)
+ ((slime-repl
+ (20091016))
+ (clojure-mode
+ (1 6)))
+ "slime adapter for clojure" single])
+ (slime-repl .
+ [(20100404)
+ ((slime
+ (20100404)))
+ "Read-Eval-Print Loop written in Emacs Lisp" single])
+ (slime .
+ [(20100404)
+ nil "Superior Lisp Interaction Mode for Emacs" single])
+ (nterm .
+ [(0 1)
+ nil "New TERMinal emulator" single])
+ (sass-mode .
+ [(3 0 14)
+ ((haml-mode
+ (3 0 14)))
+ "Major mode for editing Sass files" single])
+ (haml-mode .
+ [(3 0 14)
+ nil "Major mode for editing Haml files" single])
+ (smart-tab .
+ [(0 3)
+ nil "Intelligent tab completion and indentation." single])
+ (cssh .
+ [(0 7)
+ nil "clusterssh implementation for emacs" single])
+ (relax .
+ [(0 2)
+ ((json
+ (1 2))
+ (javascript
+ (1 99 8)))
+ "For browsing and interacting with CouchDB" single])
+ (shellfm .
+ [(0 1)
+ nil "Emacs Shell.FM interface" single])
+ (texdrive .
+ [(0 3 1)
+ nil "minor mode for creating png images from TeX formulae " single])
+ (paredit .
+ [(20)
+ nil "Parenthesis-Editing Minor Mode" single])
+ (rotate-text .
+ [(0 1)
+ nil "cycle through words, symbols and patterns" single])
+ (full-ack .
+ [(0 2 1)
+ nil "a front-end for ack" single])
+ (recent-addresses .
+ [(0 1)
+ nil "store and recall recently used email addresses" single])
+ (test-case-mode .
+ [(0 1)
+ ((fringe-helper
+ (0 1 1)))
+ "unit test front-end" single])
+ (nav .
+ [(35)
+ nil "Emacs mode for IDE-like navigation of directories" single])
+ (company .
+ [(0 5)
+ nil "extensible inline text completion mechanism" tar])
+ (guess-style .
+ [(0 1)
+ nil "automatic setting of code style variables" single])
+ (clojure-test-mode .
+ [(1 4)
+ ((slime
+ (20091016))
+ (clojure-mode
+ (1 7)))
+ "Minor mode for Clojure tests" single])
+ (clojure-mode .
+ [(1 7 1)
+ nil "Major mode for Clojure code" single])
+ (magit .
+ [(0 8 1)
+ nil "control Git from Emacs." single])
+ (w3 .
+ [(4 0 46)
+ nil "A web browser written entirely in Emacs Lisp" tar])
+ (yasnippet-bundle .
+ [(0 6 1)
+ nil "Yet another snippet extension (Auto compiled bundle)" single])
+ (rinari .
+ [(2 1)
+ ((ruby-mode
+ (1 1))
+ (inf-ruby
+ (2 1))
+ (ruby-compilation
+ (0 7))
+ (jump
+ (2 0)))
+ "Rinari Is Not A Rails IDE" single])
+ (jump .
+ [(2 0)
+ ((findr
+ (0 7))
+ (inflections
+ (1 0)))
+ "build functions which contextually jump between files" single])
+ (inflections .
+ [(1 0)
+ nil "convert english words between singular and plural" single])
+ (tumble .
+ [(1 1)
+ ((http-post-simple
+ (1 0)))
+ "an Emacs mode for Tumblr" single])
+ (http-post-simple .
+ [(1 0)
+ nil "HTTP POST requests using the url library" single])
+ (findr .
+ [(0 7)
+ nil "Breadth-first file-finding facility for (X)Emacs" single])
+ (ruby-compilation .
+ [(0 7)
+ ((ruby-mode
+ (1 1))
+ (inf-ruby
+ (2 1)))
+ "run a ruby process in a compilation buffer" single])
+ (gist .
+ [(0 5)
+ nil "Emacs integration for gist.github.com" single])
+ (confluence .
+ [(1 4)
+ ((xml-rpc
+ (1 6 4)))
+ "Emacs mode for interacting with confluence wikis" single])
+ (epresent .
+ [(0 1)
+ nil "Simple presentation mode for Emacs" single])
+ (inf-ruby .
+ [(2 1)
+ ((ruby-mode
+ (1 1)))
+ "Run a ruby process in a buffer" single])
+ (ruby-mode .
+ [(1 1)
+ nil "Major mode for editing Ruby files" single])
+ (idle-highlight .
+ [(1 0)
+ nil "highlight the word the point is on" single])
+ (find-file-in-project .
+ [(2 0)
+ ((project-local-variables
+ (0 2)))
+ "Find files in a project quickly." single])
+ (project-local-variables .
+ [(0 2)
+ nil "set project-local variables from a file" single])
+ (lusty-explorer .
+ [(2 4)
+ nil "Dynamic filesystem explorer and buffer switcher" single])
+ (tempo-snippets .
+ [(0 1 5)
+ nil "visual insertion of tempo templates" single])
+ (highlight-80+ .
+ [(1 0)
+ nil "highlight characters beyond column 80" single])
+ (echo-pick .
+ [(0 1)
+ nil "filter for echo area status messages" single])
+ (fringe-helper .
+ [(0 1 1)
+ nil "helper functions for fringe bitmaps" single])
+ (elk-test .
+ [(0 3 2)
+ ((fringe-helper
+ (0 1 1)))
+ "Emacs Lisp testing framework" single])
+ (compile-bookmarks .
+ [(0 2)
+ nil "bookmarks for compilation commands" single])
+ (pov-mode .
+ [(3 2)
+ nil "Major mode for editing POV-Ray scene files." tar])
+ (js2-mode .
+ [(20090723)
+ nil "an improved JavaScript editing mode" single])
+ (ert .
+ [(0 1)
+ nil "Emacs Lisp Regression Testing" single])
+ (jtags .
+ [(0 96)
+ nil "enhanced tags functionality for Java development" single])
+ (eproject .
+ [(0 4)
+ nil "project workspaces for emacs" tar])
+ (log4j-mode .
+ [(1 3)
+ nil "major mode for viewing log files" single])
+ (nxml-mode .
+ [(20041004)
+ nil "Major mode for editing XML documents." tar])
+ (columnify .
+ [(1 0)
+ nil "arrange lines into columns" single])
+ (gdb-mi .
+ [(0 6 1 0)
+ nil "User Interface for running GDB" single])
+ (asciidoc .
+ [(0 1)
+ nil "asciidoc text file development support" single])
+ (shell-current-directory .
+ [(0 1)
+ nil "create new shell based on buffer directory" single])
+ (facebook .
+ [(0 0 1)
+ ((json
+ (0)))
+ "Access the Facebook API from emacs" single])
+ (json .
+ [(1 2)
+ nil "JavaScript Object Notation parser / generator" single])
+ (pick-backup .
+ [(0 8)
+ nil "easy access to versioned backup files" single])
+ (idle-require .
+ [(1 0)
+ nil "load elisp libraries while Emacs is idle" single])
+ (highlight-symbol .
+ [(1 1)
+ nil "automatic and manual symbol highlighting" single])
+ (auto-dictionary .
+ [(1 0 1)
+ nil "automatic dictionary switcher for flyspell" single])
+ (dictionary .
+ [(1 8 7)
+ nil "an interface to an RFC 2229 dictionary server" tar])
+ (muse .
+ [(3 20)
+ nil "Authoring and publishing tool" tar])
+ (jimb-patch .
+ [(1 5)
+ nil "clean a patch for submission via email" single])
+ (lisppaste .
+ [(1 8)
+ ((xml-rpc
+ (1 6 7)))
+ "Interact with the lisppaste pastebot via XML-RPC." single])
+ (weblogger .
+ [(1 4 3)
+ ((xml-rpc
+ (1 6 5)))
+ "Weblog maintenance via XML-RPC APIs" single])
+ (xml-rpc .
+ [(1 6 7)
+ nil "An elisp implementation of clientside XML-RPC" single])
+ (iresize .
+ [(0 2)
+ nil "Interactively resize a window" single])
+ (sgftree .
+ [(0 1)
+ nil "Read an sgf file and represent it as a tree" single])
+ (chess .
+ [(1 96)
+ nil "Play chess in Emacs" tar])
+ (etags-select .
+ [(1 11)
+ nil "Select from multiple tags" single])
+ (less .
+ [(0 2)
+ nil "less style view mode" single])
+ (smart-operator .
+ [(0 9)
+ nil "Insert operators packed with whitespaces smartly" single])
+ (dired-isearch .
+ [(0 3)
+ nil "isearch in Dired" single])
+ (cal-china-x .
+ [(0 6)
+ nil "Chinese calendar extras" single])
+ (wajig .
+ [(0 53)
+ nil "an interface for wajig" single])
+ (erc .
+ [(5 3)
+ nil "An Emacs Internet Relay Chat client" tar])
+ (emms .
+ [(3 0)
+ nil "The Emacs Multimedia System" tar])
+ (archive-downloader .
+ [(1 1)
+ nil "Download files from archive.org" single])
+ (package .
+ [(0 9)
+ nil "Simple package system for Emacs" single])
+ (highlight-parentheses .
+ [(1 0 1)
+ nil "highlight surrounding parentheses" single])
+ (kill-ring-search .
+ [(1 1)
+ nil "incremental search for the kill ring" single])
+ (tex-math-preview .
+ [(8)
+ nil "preview TeX math expressions." single])
+ (gtk-look .
+ [(19)
+ nil "lookup Gtk and Gnome documentation." single])
+ (xtide .
+ [(16)
+ nil "XTide display in Emacs" single])
+ (compilation-recenter-end .
+ [(4)
+ nil "compilation-mode window recentre" single])
+ (gdb-shell .
+ [(0 4)
+ nil "minor mode to add gdb features to shell" single])
+ (highline .
+ [(4 2)
+ nil "minor mode to highlight current line in buffer" single])
+ (lua-mode .
+ [(20100617)
+ nil "a major-mode for editing Lua scripts" single])
+ (css-mode .
+ [(1 0)
+ nil "Major mode for editing Cascading Style Sheets" single])
+ (javascript .
+ [(2 2 1)
+ nil "Major mode for editing JavaScript source text" single])
+ (light-symbol .
+ [(0 1)
+ nil "Minor mode to highlight symbol under point" single])
+ (worklog .
+ [(2 4 2)
+ nil "time tracking mode" single])
+ (abacus .
+ [(1 0 2)
+ nil "Abacus Calculator" single])
+ (sudoku .
+ [(0 3)
+ nil "Simple sudoku game, can download puzzles from the web." single])
+ (caps-mode .
+ [(1 0)
+ nil "(minor mode) letters are inserted capitalized" single])
+ (lambdacalc .
+ [(1 0)
+ nil "Interpret lambda calculus expressions" single])
+ (wtf .
+ [(2 0)
+ nil "Look up conversational and computing acronyms" single])
+ (blank-mode .
+ [(6 6)
+ nil "Minor mode to visualize blanks" single])
+ (bubbles .
+ [(0 5)
+ nil "Puzzle game for Emacs." single])
+ (newsticker .
+ [(1 10)
+ nil "Headline news ticker" tar])
+ (changelog-url .
+ [(0 1)
+ nil "ChangeLog bugzilla buttonizer" tar]))
+
View
447 .emacs.d/elpa/archives/elpa/archive-contents~
@@ -0,0 +1,447 @@
+(1
+ (load-relative .
+ [(0 1)
+ nil "relative file load (within a multi-file Emacs package)" single])
+ (test-unit .
+ [(0 1)
+ nil "Unit Test Framework for Emacs Lisp " single])
+ (zenburn .
+ [(1 8)
+ nil "just some alien fruit salad to keep you in the zone" single])
+ (multi-project .
+ [(0 0 1)
+ nil "Work with multiple projects" single])
+ (hungry-delete .
+ [(1 0)
+ nil "hungry delete minor mode" single])
+ (Save-visited-files .
+ [(1 2)
+ nil "save opened files across sessions" single])
+ (c-eldoc .
+ [(0 6)
+ nil "helpful description of the arguments to C functions" single])
+ (mv-shell .
+ [(1 0)
+ nil "keep buffers in sync with filename throughout 'mv'commands in shell-mode." single])
+ (diff-git .
+ [(0 1 1)
+ nil "Git integration with diff-mode" single])
+ (html-script-src .
+ [(0 0 2)
+ nil "Insert <script src=\"..\"> for popular JavaScript libraries" single])
+ (rvm .
+ [(1 1)
+ nil "Emacs integration for rvm" single])
+ (elisp-depend .
+ [(0 4 1)
+ nil "Parse depend libraries of elisp file." single])
+ (perspective .
+ [(1 3)
+ nil "switch between named \"perspectives\" of the editor" single])
+ (ruby-electric .
+ [(1 1)
+ nil "electric editing commands for ruby files" single])
+ (yari .
+ [(0 3)
+ nil "Yet Another RI interface for Emacs" single])
+ (smex .
+ [(1 1 1)
+ nil "M-x interface with Ido-style fuzzy matching." single])
+ (drag-stuff .
+ [(0 0 3)
+ nil "Drag stuff (lines, words, region, etc...) around" single])
+ (ruby-test-mode .
+ [(1 0)
+ nil "Minor mode for Behaviour and Test Driven" single])
+ (applescript-mode .
+ [(20090321)
+ nil "major mode for editing AppleScript source" single])
+ (mediawiki .
+ [(1 1)
+ nil "mediawiki frontend" single])
+ (wrap-region .
+ [(0 1 3)
+ nil "Wrap text with punctation or tag" single])
+ (twitter .
+ [(20090422)
+ nil "Simple Emacs-based client for Twitter" single])
+ (pastie .
+ [(20091230)
+ nil "Emacs integration for pastie.org" single])
+ (textmate .
+ [(1)
+ nil "TextMate minor mode for Emacs" single])
+ (yaml-mode .
+ [(0 0 5)
+ nil "Major mode for editing YAML files" single])
+ (rspec-mode .
+ [(0 2)
+ ((ruby-mode
+ (1 1)))
+ "Enhance ruby-mode for RSpec" single])
+ (htmlize .
+ [(1 37)
+ nil "Convert buffer text and decorations to HTML." single])
+ (swank-clojure .
+ [(1 1 0)
+ ((slime-repl
+ (20091016))
+ (clojure-mode
+ (1 6)))
+ "slime adapter for clojure" single])
+ (slime-repl .
+ [(20100404)
+ ((slime
+ (20100404)))
+ "Read-Eval-Print Loop written in Emacs Lisp" single])
+ (slime .
+ [(20100404)
+ nil "Superior Lisp Interaction Mode for Emacs" single])
+ (nterm .
+ [(0 1)
+ nil "New TERMinal emulator" single])
+ (sass-mode .
+ [(3 0 14)
+ ((haml-mode
+ (3 0 14)))
+ "Major mode for editing Sass files" single])
+ (haml-mode .
+ [(3 0 14)
+ nil "Major mode for editing Haml files" single])
+ (smart-tab .
+ [(0 3)
+ nil "Intelligent tab completion and indentation." single])
+ (cssh .
+ [(0 7)
+ nil "clusterssh implementation for emacs" single])
+ (relax .
+ [(0 2)
+ ((json
+ (1 2))
+ (javascript
+ (1 99 8)))
+ "For browsing and interacting with CouchDB" single])
+ (shellfm .
+ [(0 1)
+ nil "Emacs Shell.FM interface" single])
+ (texdrive .
+ [(0 3 1)
+ nil "minor mode for creating png images from TeX formulae " single])
+ (paredit .
+ [(20)
+ nil "Parenthesis-Editing Minor Mode" single])
+ (rotate-text .
+ [(0 1)
+ nil "cycle through words, symbols and patterns" single])
+ (full-ack .
+ [(0 2 1)
+ nil "a front-end for ack" single])
+ (recent-addresses .
+ [(0 1)
+ nil "store and recall recently used email addresses" single])
+ (test-case-mode .
+ [(0 1)
+ ((fringe-helper
+ (0 1 1)))
+ "unit test front-end" single])
+ (nav .
+ [(35)
+ nil "Emacs mode for IDE-like navigation of directories" single])
+ (company .
+ [(0 5)
+ nil "extensible inline text completion mechanism" tar])
+ (guess-style .
+ [(0 1)
+ nil "automatic setting of code style variables" single])
+ (clojure-test-mode .
+ [(1 4)
+ ((slime
+ (20091016))
+ (clojure-mode
+ (1 7)))
+ "Minor mode for Clojure tests" single])
+ (clojure-mode .
+ [(1 7 1)
+ nil "Major mode for Clojure code" single])
+ (magit .
+ [(0 8 1)
+ nil "control Git from Emacs." single])
+ (w3 .
+ [(4 0 46)
+ nil "A web browser written entirely in Emacs Lisp" tar])
+ (yasnippet-bundle .
+ [(0 6 1)
+ nil "Yet another snippet extension (Auto compiled bundle)" single])
+ (rinari .
+ [(2 1)
+ ((ruby-mode
+ (1 1))
+ (inf-ruby
+ (2 1))
+ (ruby-compilation
+ (0 7))
+ (jump
+ (2 0)))
+ "Rinari Is Not A Rails IDE" single])
+ (jump .
+ [(2 0)
+ ((findr
+ (0 7))
+ (inflections
+ (1 0)))
+ "build functions which contextually jump between files" single])
+ (inflections .
+ [(1 0)
+ nil "convert english words between singular and plural" single])
+ (tumble .
+ [(1 1)
+ ((http-post-simple
+ (1 0)))
+ "an Emacs mode for Tumblr" single])
+ (http-post-simple .
+ [(1 0)
+ nil "HTTP POST requests using the url library" single])
+ (findr .
+ [(0 7)
+ nil "Breadth-first file-finding facility for (X)Emacs" single])
+ (ruby-compilation .
+ [(0 7)
+ ((ruby-mode
+ (1 1))
+ (inf-ruby
+ (2 1)))
+ "run a ruby process in a compilation buffer" single])
+ (gist .
+ [(0 5)
+ nil "Emacs integration for gist.github.com" single])
+ (confluence .
+ [(1 4)
+ ((xml-rpc
+ (1 6 4)))
+ "Emacs mode for interacting with confluence wikis" single])
+ (epresent .
+ [(0 1)
+ nil "Simple presentation mode for Emacs" single])
+ (inf-ruby .
+ [(2 1)
+ ((ruby-mode
+ (1 1)))
+ "Run a ruby process in a buffer" single])
+ (ruby-mode .
+ [(1 1)
+ nil "Major mode for editing Ruby files" single])
+ (idle-highlight .
+ [(1 0)
+ nil "highlight the word the point is on" single])
+ (find-file-in-project .
+ [(2 0)
+ ((project-local-variables
+ (0 2)))
+ "Find files in a project quickly." single])
+ (project-local-variables .
+ [(0 2)
+ nil "set project-local variables from a file" single])
+ (lusty-explorer .
+ [(2 4)
+ nil "Dynamic filesystem explorer and buffer switcher" single])
+ (tempo-snippets .
+ [(0 1 5)
+ nil "visual insertion of tempo templates" single])
+ (highlight-80+ .
+ [(1 0)
+ nil "highlight characters beyond column 80" single])
+ (echo-pick .
+ [(0 1)
+ nil "filter for echo area status messages" single])
+ (fringe-helper .
+ [(0 1 1)
+ nil "helper functions for fringe bitmaps" single])
+ (elk-test .
+ [(0 3 2)
+ ((fringe-helper
+ (0 1 1)))
+ "Emacs Lisp testing framework" single])
+ (compile-bookmarks .
+ [(0 2)
+ nil "bookmarks for compilation commands" single])
+ (pov-mode .
+ [(3 2)
+ nil "Major mode for editing POV-Ray scene files." tar])
+ (js2-mode .
+ [(20090723)
+ nil "an improved JavaScript editing mode" single])
+ (ert .
+ [(0 1)
+ nil "Emacs Lisp Regression Testing" single])
+ (jtags .
+ [(0 96)
+ nil "enhanced tags functionality for Java development" single])
+ (eproject .
+ [(0 4)
+ nil "project workspaces for emacs" tar])
+ (log4j-mode .
+ [(1 3)
+ nil "major mode for viewing log files" single])
+ (nxml-mode .
+ [(20041004)
+ nil "Major mode for editing XML documents." tar])
+ (columnify .
+ [(1 0)
+ nil "arrange lines into columns" single])
+ (gdb-mi .
+ [(0 6 1 0)
+ nil "User Interface for running GDB" single])
+ (asciidoc .
+ [(0 1)
+ nil "asciidoc text file development support" single])
+ (shell-current-directory .
+ [(0 1)
+ nil "create new shell based on buffer directory" single])
+ (facebook .
+ [(0 0 1)
+ ((json
+ (0)))
+ "Access the Facebook API from emacs" single])
+ (json .
+ [(1 2)
+ nil "JavaScript Object Notation parser / generator" single])
+ (pick-backup .
+ [(0 8)
+ nil "easy access to versioned backup files" single])
+ (idle-require .
+ [(1 0)
+ nil "load elisp libraries while Emacs is idle" single])
+ (highlight-symbol .
+ [(1 1)
+ nil "automatic and manual symbol highlighting" single])
+ (auto-dictionary .
+ [(1 0 1)
+ nil "automatic dictionary switcher for flyspell" single])
+ (dictionary .
+ [(1 8 7)
+ nil "an interface to an RFC 2229 dictionary server" tar])
+ (muse .
+ [(3 20)
+ nil "Authoring and publishing tool" tar])
+ (jimb-patch .
+ [(1 5)
+ nil "clean a patch for submission via email" single])
+ (lisppaste .
+ [(1 8)
+ ((xml-rpc
+ (1 6 7)))
+ "Interact with the lisppaste pastebot via XML-RPC." single])
+ (weblogger .
+ [(1 4 3)
+ ((xml-rpc
+ (1 6 5)))
+ "Weblog maintenance via XML-RPC APIs" single])
+ (xml-rpc .
+ [(1 6 7)
+ nil "An elisp implementation of clientside XML-RPC" single])
+ (iresize .
+ [(0 2)
+ nil "Interactively resize a window" single])
+ (sgftree .
+ [(0 1)
+ nil "Read an sgf file and represent it as a tree" single])
+ (chess .
+ [(1 96)
+ nil "Play chess in Emacs" tar])
+ (etags-select .
+ [(1 11)
+ nil "Select from multiple tags" single])
+ (less .
+ [(0 2)