Updated packages

This commit is contained in:
Gergely Polonkai 2016-08-18 22:01:20 +02:00
parent 314c219408
commit c22f73d23f
200 changed files with 3048 additions and 2019 deletions

View File

@ -1 +0,0 @@
(define-package "ag" "20160702.1128" "A front-end for ag ('the silver searcher'), the C ack replacement." '((dash "2.8.0") (s "1.9.0") (cl-lib "0.5")))

View File

@ -1,9 +1,9 @@
;;; ag-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "ag" "ag.el" (22404 60275 653932 131000))
;;;### (autoloads nil "ag" "ag.el" (22454 5337 972625 179000))
;;; Generated autoloads from ag.el
(autoload 'ag "ag" "\

View File

@ -0,0 +1,2 @@
;;; -*- no-byte-compile: t -*-
(define-package "ag" "20160731.1323" "A front-end for ag ('the silver searcher'), the C ack replacement." '((dash "2.8.0") (s "1.9.0") (cl-lib "0.5")))

View File

@ -5,7 +5,7 @@
;; Author: Wilfred Hughes <me@wilfred.me.uk>
;; Created: 11 January 2013
;; Version: 0.48
;; Package-Version: 20160702.1128
;; Package-Version: 20160731.1323
;; Package-Requires: ((dash "2.8.0") (s "1.9.0") (cl-lib "0.5"))
;;; Commentary:
@ -224,7 +224,7 @@ If REGEXP is non-nil, treat STRING as a regular expression."
(setq arguments (cons "--nogroup" arguments)))
(unless regexp
(setq arguments (cons "--literal" arguments)))
(when (eq system-type 'windows-nt)
(when (or (eq system-type 'windows-nt) (eq system-type 'cygwin))
;; Use --vimgrep to work around issue #97 on Windows.
(setq arguments (cons "--vimgrep" arguments)))
(when (char-or-string-p file-regex)

View File

@ -1 +0,0 @@
(define-package "coffee-mode" "20160520.146" "Major mode for CoffeeScript code" '((emacs "24.1") (cl-lib "0.5")) :url "http://github.com/defunkt/coffee-mode" :keywords '("coffeescript" "major" "mode"))

View File

@ -1,10 +1,10 @@
;;; coffee-mode-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "coffee-mode" "coffee-mode.el" (22387 29375
;;;;;; 378447 595000))
;;;### (autoloads nil "coffee-mode" "coffee-mode.el" (22454 5298
;;;;;; 807704 278000))
;;; Generated autoloads from coffee-mode.el
(autoload 'coffee-mode "coffee-mode" "\

View File

@ -0,0 +1,2 @@
;;; -*- no-byte-compile: t -*-
(define-package "coffee-mode" "20160808.1712" "Major mode for CoffeeScript code" '((emacs "24.1") (cl-lib "0.5")) :url "http://github.com/defunkt/coffee-mode" :keywords '("coffeescript" "major" "mode"))

View File

@ -3,7 +3,7 @@
;; Copyright (C) 2010 Chris Wanstrath
;; Version: 0.6.3
;; Package-Version: 20160520.146
;; Package-Version: 20160808.1712
;; Keywords: CoffeeScript major mode
;; Author: Chris Wanstrath <chris@ozmm.org>
;; URL: http://github.com/defunkt/coffee-mode
@ -113,6 +113,10 @@ with CoffeeScript."
"Indentation can insert tabs if this is t."
:type 'boolean)
(defcustom coffee-show-mode 'js-mode
"Major mode to used to show the compiled Javascript."
:type 'function)
(defcustom coffee-after-compile-hook nil
"Hook called after compile to Javascript"
:type 'hook)
@ -281,10 +285,10 @@ called `coffee-compiled-buffer-name'."
(coffee-parse-error-output compile-output)))
(let ((props (list :sourcemap (coffee--map-file-name file)
:line line :column column :source file)))
(let ((buffer-file-name "tmp.js"))
(setq buffer-read-only t)
(set-auto-mode)
(run-hook-with-args 'coffee-after-compile-hook props))))))))
(setq buffer-read-only t)
(when (fboundp coffee-show-mode)
(funcall coffee-show-mode))
(run-hook-with-args 'coffee-after-compile-hook props)))))))
(defun coffee-start-compile-process (curbuf line column)
(lambda (start end)

View File

@ -1,10 +1,9 @@
;;; company-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "company" "company.el" (22404 60273 313919
;;;;;; 883000))
;;;### (autoloads nil "company" "company.el" (22454 5294 352599 524000))
;;; Generated autoloads from company.el
(autoload 'company-mode "company" "\
@ -38,8 +37,9 @@ keymap during active completions (`company-active-map'):
\(fn &optional ARG)" t nil)
(defvar global-company-mode nil "\
Non-nil if Global-Company mode is enabled.
See the command `global-company-mode' for a description of this minor mode.
Non-nil if Global Company mode is enabled.
See the `global-company-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `global-company-mode'.")
@ -48,7 +48,7 @@ or call the function `global-company-mode'.")
(autoload 'global-company-mode "company" "\
Toggle Company mode in all buffers.
With prefix ARG, enable Global-Company mode if ARG is positive;
With prefix ARG, enable Global Company mode if ARG is positive;
otherwise, disable it. If called from Lisp, enable the mode if
ARG is omitted or nil.
@ -73,8 +73,8 @@ inserted.
;;;***
;;;### (autoloads nil "company-abbrev" "company-abbrev.el" (22404
;;;;;; 60273 385920 259000))
;;;### (autoloads nil "company-abbrev" "company-abbrev.el" (22454
;;;;;; 5294 949613 562000))
;;; Generated autoloads from company-abbrev.el
(autoload 'company-abbrev "company-abbrev" "\
@ -84,8 +84,8 @@ inserted.
;;;***
;;;### (autoloads nil "company-bbdb" "company-bbdb.el" (22404 60273
;;;;;; 369920 176000))
;;;### (autoloads nil "company-bbdb" "company-bbdb.el" (22454 5294
;;;;;; 768609 306000))
;;; Generated autoloads from company-bbdb.el
(autoload 'company-bbdb "company-bbdb" "\
@ -95,8 +95,8 @@ inserted.
;;;***
;;;### (autoloads nil "company-css" "company-css.el" (22404 60273
;;;;;; 305919 841000))
;;;### (autoloads nil "company-css" "company-css.el" (22454 5294
;;;;;; 307598 466000))
;;; Generated autoloads from company-css.el
(autoload 'company-css "company-css" "\
@ -106,8 +106,8 @@ inserted.
;;;***
;;;### (autoloads nil "company-dabbrev" "company-dabbrev.el" (22404
;;;;;; 60273 337920 9000))
;;;### (autoloads nil "company-dabbrev" "company-dabbrev.el" (22454
;;;;;; 5294 565604 532000))
;;; Generated autoloads from company-dabbrev.el
(autoload 'company-dabbrev "company-dabbrev" "\
@ -118,7 +118,7 @@ dabbrev-like `company-mode' completion backend.
;;;***
;;;### (autoloads nil "company-dabbrev-code" "company-dabbrev-code.el"
;;;;;; (22404 60273 329919 967000))
;;;;;; (22454 5294 475602 417000))
;;; Generated autoloads from company-dabbrev-code.el
(autoload 'company-dabbrev-code "company-dabbrev-code" "\
@ -130,8 +130,8 @@ comments or strings.
;;;***
;;;### (autoloads nil "company-elisp" "company-elisp.el" (22404 60273
;;;;;; 397920 322000))
;;;### (autoloads nil "company-elisp" "company-elisp.el" (22454 5295
;;;;;; 17615 161000))
;;; Generated autoloads from company-elisp.el
(autoload 'company-elisp "company-elisp" "\
@ -141,8 +141,8 @@ comments or strings.
;;;***
;;;### (autoloads nil "company-etags" "company-etags.el" (22404 60273
;;;;;; 321919 925000))
;;;### (autoloads nil "company-etags" "company-etags.el" (22454 5294
;;;;;; 396600 559000))
;;; Generated autoloads from company-etags.el
(autoload 'company-etags "company-etags" "\
@ -152,8 +152,8 @@ comments or strings.
;;;***
;;;### (autoloads nil "company-files" "company-files.el" (22404 60273
;;;;;; 341920 29000))
;;;### (autoloads nil "company-files" "company-files.el" (22454 5294
;;;;;; 611605 614000))
;;; Generated autoloads from company-files.el
(autoload 'company-files "company-files" "\
@ -165,8 +165,8 @@ File paths with spaces are only supported inside strings.
;;;***
;;;### (autoloads nil "company-gtags" "company-gtags.el" (22404 60273
;;;;;; 277919 694000))
;;;### (autoloads nil "company-gtags" "company-gtags.el" (22454 5294
;;;;;; 137594 469000))
;;; Generated autoloads from company-gtags.el
(autoload 'company-gtags "company-gtags" "\
@ -176,8 +176,8 @@ File paths with spaces are only supported inside strings.
;;;***
;;;### (autoloads nil "company-ispell" "company-ispell.el" (22404
;;;;;; 60273 393920 301000))
;;;### (autoloads nil "company-ispell" "company-ispell.el" (22454
;;;;;; 5294 983614 361000))
;;; Generated autoloads from company-ispell.el
(autoload 'company-ispell "company-ispell" "\
@ -187,8 +187,8 @@ File paths with spaces are only supported inside strings.
;;;***
;;;### (autoloads nil "company-keywords" "company-keywords.el" (22404
;;;;;; 60273 353920 92000))
;;;### (autoloads nil "company-keywords" "company-keywords.el" (22454
;;;;;; 5294 678607 190000))
;;; Generated autoloads from company-keywords.el
(autoload 'company-keywords "company-keywords" "\
@ -198,8 +198,8 @@ File paths with spaces are only supported inside strings.
;;;***
;;;### (autoloads nil "company-nxml" "company-nxml.el" (22404 60273
;;;;;; 373920 196000))
;;;### (autoloads nil "company-nxml" "company-nxml.el" (22454 5294
;;;;;; 802610 105000))
;;; Generated autoloads from company-nxml.el
(autoload 'company-nxml "company-nxml" "\
@ -209,8 +209,8 @@ File paths with spaces are only supported inside strings.
;;;***
;;;### (autoloads nil "company-oddmuse" "company-oddmuse.el" (22404
;;;;;; 60273 285919 736000))
;;;### (autoloads nil "company-oddmuse" "company-oddmuse.el" (22454
;;;;;; 5294 239596 867000))
;;; Generated autoloads from company-oddmuse.el
(autoload 'company-oddmuse "company-oddmuse" "\
@ -220,8 +220,8 @@ File paths with spaces are only supported inside strings.
;;;***
;;;### (autoloads nil "company-semantic" "company-semantic.el" (22404
;;;;;; 60273 277919 694000))
;;;### (autoloads nil "company-semantic" "company-semantic.el" (22454
;;;;;; 5294 171595 268000))
;;; Generated autoloads from company-semantic.el
(autoload 'company-semantic "company-semantic" "\
@ -231,8 +231,8 @@ File paths with spaces are only supported inside strings.
;;;***
;;;### (autoloads nil "company-tempo" "company-tempo.el" (22404 60273
;;;;;; 333919 988000))
;;;### (autoloads nil "company-tempo" "company-tempo.el" (22454 5294
;;;;;; 520603 474000))
;;; Generated autoloads from company-tempo.el
(autoload 'company-tempo "company-tempo" "\
@ -242,8 +242,8 @@ File paths with spaces are only supported inside strings.
;;;***
;;;### (autoloads nil "company-xcode" "company-xcode.el" (22404 60273
;;;;;; 381920 238000))
;;;### (autoloads nil "company-xcode" "company-xcode.el" (22454 5294
;;;;;; 871611 728000))
;;; Generated autoloads from company-xcode.el
(autoload 'company-xcode "company-xcode" "\
@ -254,7 +254,7 @@ File paths with spaces are only supported inside strings.
;;;***
;;;### (autoloads nil "company-yasnippet" "company-yasnippet.el"
;;;;;; (22404 60273 377920 217000))
;;;;;; (22454 5294 837610 928000))
;;; Generated autoloads from company-yasnippet.el
(autoload 'company-yasnippet "company-yasnippet" "\
@ -286,7 +286,7 @@ shadow backends that come after it. Recommended usages:
;;;### (autoloads nil nil ("company-capf.el" "company-clang.el" "company-cmake.el"
;;;;;; "company-eclim.el" "company-pkg.el" "company-template.el")
;;;;;; (22404 60273 409561 422000))
;;;;;; (22454 5294 726608 318000))
;;;***

View File

@ -96,7 +96,7 @@ comments or strings."
(`t (list major-mode))
(`code company-dabbrev-code-modes)
(`all `all))
t)))
(not company-dabbrev-code-everywhere))))
(ignore-case company-dabbrev-code-ignore-case)
(duplicates t)))

View File

@ -40,13 +40,15 @@ The values should use the same format as `completion-ignored-extensions'."
(defun company-files--directory-files (dir prefix)
;; Don't use directory-files. It produces directories without trailing /.
(let ((comp (sort (file-name-all-completions prefix dir)
(lambda (s1 s2) (string-lessp (downcase s1) (downcase s2))))))
(when company-files-exclusions
(setq comp (company-files--exclusions-filtered comp)))
(if (equal prefix "")
(delete "../" (delete "./" comp))
comp)))
(condition-case err
(let ((comp (sort (file-name-all-completions prefix dir)
(lambda (s1 s2) (string-lessp (downcase s1) (downcase s2))))))
(when company-files-exclusions
(setq comp (company-files--exclusions-filtered comp)))
(if (equal prefix "")
(delete "../" (delete "./" comp))
comp))
(file-error nil)))
(defun company-files--exclusions-filtered (completions)
(let* ((dir-exclusions (cl-delete-if-not #'company-files--trailing-slash-p

View File

@ -1,4 +1,4 @@
(define-package "company" "20160709.1536" "Modular text completion framework"
(define-package "company" "20160730.1516" "Modular text completion framework"
'((emacs "24.1")
(cl-lib "0.5"))
:url "http://company-mode.github.io/" :keywords

View File

@ -920,6 +920,9 @@ matches IDLE-BEGIN-AFTER-RE, return it wrapped in a cons."
(if (functionp company-backend)
(apply company-backend args)
(apply #'company--multi-backend-adapter company-backend args))
(user-error (user-error
"Company: backend %s user-error: %s"
company-backend (error-message-string err)))
(error (error "Company: backend %s error \"%s\" with args %s"
company-backend (error-message-string err) args))))

View File

@ -1 +0,0 @@
(define-package "dash" "20160619.611" "A modern list library for Emacs" 'nil :keywords '("lists"))

View File

@ -1,9 +1,9 @@
;;; dash-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil nil ("dash.el") (22387 29373 79163 715000))
;;;### (autoloads nil nil ("dash.el") (22454 5337 8602 510000))
;;;***

View File

@ -0,0 +1,2 @@
;;; -*- no-byte-compile: t -*-
(define-package "dash" "20160813.951" "A modern list library for Emacs" 'nil :keywords '("lists"))

View File

@ -1,10 +1,10 @@
;;; dash.el --- A modern list library for Emacs -*- lexical-binding: t -*-
;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
;; Copyright (C) 2012-2016 Free Software Foundation, Inc.
;; Author: Magnar Sveen <magnars@gmail.com>
;; Version: 2.12.1
;; Package-Version: 20160619.611
;; Version: 2.13.0
;; Package-Version: 20160813.951
;; Keywords: lists
;; This program is free software; you can redistribute it and/or modify

View File

@ -1,4 +0,0 @@
(define-package "erlang" "20160615.633" "Erlang major mode" 'nil)
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -1,9 +1,9 @@
;;; erlang-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "erlang" "erlang.el" (22387 29371 497412 949000))
;;;### (autoloads nil "erlang" "erlang.el" (22454 5334 245537 541000))
;;; Generated autoloads from erlang.el
(autoload 'erlang-mode "erlang" "\
@ -118,8 +118,8 @@ editing control characters:
;;;***
;;;### (autoloads nil "erlang-start" "erlang-start.el" (22387 29371
;;;;;; 473431 317000))
;;;### (autoloads nil "erlang-start" "erlang-start.el" (22454 5334
;;;;;; 87533 826000))
;;; Generated autoloads from erlang-start.el
(let ((a '("\\.erl\\'" . erlang-mode)) (b '("\\.hrl\\'" . erlang-mode))) (or (assoc (car a) auto-mode-alist) (setq auto-mode-alist (cons a auto-mode-alist))) (or (assoc (car b) auto-mode-alist) (setq auto-mode-alist (cons b auto-mode-alist))))
@ -132,7 +132,7 @@ editing control characters:
;;;### (autoloads nil nil ("erlang-eunit.el" "erlang-flymake.el"
;;;;;; "erlang-pkg.el" "erlang-skels-old.el" "erlang-skels.el" "erlang-test.el"
;;;;;; "erlang_appwiz.el") (22387 29371 532912 630000))
;;;;;; "erlang_appwiz.el") (22454 5334 358540 198000))
;;;***

View File

@ -0,0 +1,4 @@
(define-package "erlang" "20160719.535" "Erlang major mode" 'nil)
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -903,7 +903,7 @@ Please see the function `tempo-define-template'.")
"%% gen_statem:start_link/[3,4], this function is called by the new" n
"%% process to initialize." n
(erlang-skel-separator-end 2)
"-spec init(Args :: term()) -> " n>
"-spec init(Args :: term()) ->" n>
"{gen_statem:callback_mode()," n>
"State :: term(), Data :: term()} |" n>
"{gen_statem:callback_mode()," n>
@ -927,7 +927,7 @@ Please see the function `tempo-define-template'.")
"-spec state_name(" n>
"gen_statem:event_type(), Msg :: term()," n>
"Data :: term()) ->" n>
"gen_statem:state_function_result(). " n
"gen_statem:state_function_result()." n
"state_name({call,Caller}, _Msg, Data) ->" n>
"{next_state, state_name, Data, [{reply,Caller,ok}]}." n
n
@ -940,7 +940,7 @@ Please see the function `tempo-define-template'.")
"-spec handle_event(" n>
"gen_statem:event_type(), Msg :: term()," n>
"State :: term(), Data :: term()) ->" n>
"gen_statem:handle_event_result(). " n
"gen_statem:handle_event_result()." n
"handle_event({call,From}, _Msg, State, Data) ->" n>
"{next_state, State, Data, [{reply,From,ok}]}." n
n
@ -965,9 +965,11 @@ Please see the function `tempo-define-template'.")
"-spec code_change(" n>
"OldVsn :: term() | {down,term()}," n>
"State :: term(), Data :: term(), Extra :: term()) ->" n>
"{ok, NewState :: term(), NewData :: term()}." n
"{gen_statem:callback_mode()," n>
"NewState :: term(), NewData :: term()} |" n>
"(Reason :: term())." n
"code_change(_OldVsn, State, Data, _Extra) ->" n>
"{ok, State, Data}." n
"{state_functions, State, Data}." n
n
(erlang-skel-double-separator-start 3)
"%%% Internal functions" n

View File

@ -1,162 +0,0 @@
;;; gh-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
;;;### (autoloads nil "gh-api" "gh-api.el" (22387 29369 466970 131000))
;;; Generated autoloads from gh-api.el
(require 'eieio)
(eieio-defclass-autoload 'gh-api 'nil "gh-api" "Github API")
(eieio-defclass-autoload 'gh-api-v3 '(gh-api) "gh-api" "Github API v3")
;;;***
;;;### (autoloads nil "gh-auth" "gh-auth.el" (22387 29369 526924
;;;;;; 94000))
;;; Generated autoloads from gh-auth.el
(require 'eieio)
(eieio-defclass-autoload 'gh-authenticator 'nil "gh-auth" "Abstract authenticator")
(eieio-defclass-autoload 'gh-password-authenticator '(gh-authenticator) "gh-auth" "Password-based authenticator")
(eieio-defclass-autoload 'gh-oauth-authenticator '(gh-authenticator) "gh-auth" "Oauth-based authenticator")
;;;***
;;;### (autoloads nil "gh-cache" "gh-cache.el" (22387 29369 498945
;;;;;; 578000))
;;; Generated autoloads from gh-cache.el
(require 'eieio)
;;;***
;;;### (autoloads nil "gh-common" "gh-common.el" (22387 29369 478960
;;;;;; 924000))
;;; Generated autoloads from gh-common.el
(require 'eieio)
;;;***
;;;### (autoloads nil "gh-gist" "gh-gist.el" (22387 29369 442988
;;;;;; 546000))
;;; Generated autoloads from gh-gist.el
(require 'eieio)
(eieio-defclass-autoload 'gh-gist-api '(gh-api-v3) "gh-gist" "Gist API")
(eieio-defclass-autoload 'gh-gist-gist-stub '(gh-object) "gh-gist" "Class for user-created gist objects")
(eieio-defclass-autoload 'gh-gist-gist '(gh-gist-gist-stub) "gh-gist" "Gist object")
;;;***
;;;### (autoloads nil "gh-issue-comments" "gh-issue-comments.el"
;;;;;; (22387 29369 490951 716000))
;;; Generated autoloads from gh-issue-comments.el
(require 'eieio)
;;;***
;;;### (autoloads nil "gh-issues" "gh-issues.el" (22387 29369 502942
;;;;;; 509000))
;;; Generated autoloads from gh-issues.el
(require 'eieio)
;;;***
;;;### (autoloads nil "gh-oauth" "gh-oauth.el" (22387 29369 430997
;;;;;; 753000))
;;; Generated autoloads from gh-oauth.el
(require 'eieio)
(eieio-defclass-autoload 'gh-oauth-api '(gh-api-v3) "gh-oauth" "OAuth API")
;;;***
;;;### (autoloads nil "gh-orgs" "gh-orgs.el" (22387 29369 482957
;;;;;; 854000))
;;; Generated autoloads from gh-orgs.el
(require 'eieio)
(eieio-defclass-autoload 'gh-orgs-api '(gh-api-v3) "gh-orgs" "Orgs API")
(eieio-defclass-autoload 'gh-orgs-org-stub '(gh-object) "gh-orgs" nil)
;;;***
;;;### (autoloads nil "gh-pull-comments" "gh-pull-comments.el" (22387
;;;;;; 29369 518930 232000))
;;; Generated autoloads from gh-pull-comments.el
(require 'eieio)
;;;***
;;;### (autoloads nil "gh-pulls" "gh-pulls.el" (22387 29369 506939
;;;;;; 440000))
;;; Generated autoloads from gh-pulls.el
(require 'eieio)
(eieio-defclass-autoload 'gh-pulls-api '(gh-api-v3) "gh-pulls" "Git pull requests API")
(eieio-defclass-autoload 'gh-pulls-request '(gh-pulls-request-stub) "gh-pulls" "Git pull requests API")
;;;***
;;;### (autoloads nil "gh-repos" "gh-repos.el" (22387 29369 494948
;;;;;; 647000))
;;; Generated autoloads from gh-repos.el
(require 'eieio)
(eieio-defclass-autoload 'gh-repos-api '(gh-api-v3) "gh-repos" "Repos API")
(eieio-defclass-autoload 'gh-repos-repo-stub '(gh-object) "gh-repos" "Class for user-created repository objects")
(eieio-defclass-autoload 'gh-repos-repo '(gh-repos-repo-stub) "gh-repos" "Class for GitHub repositories")
;;;***
;;;### (autoloads nil "gh-url" "gh-url.el" (22387 29369 419006 961000))
;;; Generated autoloads from gh-url.el
(require 'eieio)
;;;***
;;;### (autoloads nil "gh-users" "gh-users.el" (22387 29369 474963
;;;;;; 993000))
;;; Generated autoloads from gh-users.el
(require 'eieio)
(eieio-defclass-autoload 'gh-users-api '(gh-api-v3) "gh-users" "Users API")
(eieio-defclass-autoload 'gh-users-user '(gh-user) "gh-users" nil)
;;;***
;;;### (autoloads nil nil ("gh-pkg.el" "gh-profile.el" "gh-search.el"
;;;;;; "gh.el") (22387 29369 541412 67000))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; gh-autoloads.el ends here

View File

@ -1,110 +0,0 @@
;;; gh-issue-comments.el --- issue comments api for github
;; Copyright (C) 2014 Travis Thieman
;; Author: Travis Thieman <travis.thieman@gmail.com>
;; Keywords:
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; TODOS:
;; * Support listing all comments in a repository
;; Basic usage:
;; (setf api (gh-issue-comments-api "api" :sync nil :cache nil :num-retries 1))
;; (setf comments (gh-issue-comments-list api "user" "repo" "issue id"))
;; (setq my-comment (make-instance 'gh-issue-comments-comment :body "This is great!"))
;; (gh-issue-comments-new api "user" "repo" "issue id" my-comment)
;;; Code:
(eval-when-compile
(require 'cl))
;;;###autoload
(require 'eieio)
(require 'gh-api)
(require 'gh-auth)
(require 'gh-common)
(require 'gh-issues)
(defclass gh-issue-comments-api (gh-api-v3)
((comment-cls :allocation :class :initform gh-issue-comments-comment))
"GitHub Issue Comments api")
(defclass gh-issue-comments-comment (gh-object)
((url :initarg :url)
(html-url :initarg :html-url)
(body :initarg :body)
(user :initarg :user :initform nil)
(created-at :initarg :created_at)
(updated-at :initarg :updated_at)
(user-cls :allocation :class :initform gh-user))
"issues comment")
(defmethod gh-object-read-into ((comment gh-issue-comments-comment) data)
(call-next-method)
(with-slots (url html-url body user created-at updated-at)
comment
(setq url (gh-read data 'url)
html-url (gh-read data 'html_url)
body (gh-read data 'body)
user (gh-object-read (or (oref comment :user)
(oref comment user-cls))
(gh-read data 'user))
created-at (gh-read data 'created_at)
updated-at (gh-read data 'updated_at))))
(defmethod gh-issue-comments-list ((api gh-issue-comments-api) user repo issue-id)
(gh-api-authenticated-request
api (gh-object-list-reader (oref api comment-cls)) "GET"
(format "/repos/%s/%s/issues/%s/comments" user repo issue-id)))
(defmethod gh-issue-comments-get ((api gh-issue-comments-api) user repo comment-id)
(gh-api-authenticated-request
api (gh-object-reader (oref api comment-cls)) "GET"
(format "/repos/%s/%s/issues/comments/%s" user repo comment-id)))
(defmethod gh-issue-comments-req-to-update ((req gh-issue-comments-comment))
`(("body" . ,(oref req body))))
(defmethod gh-issue-comments-update ((api gh-issue-comments-api) user repo comment-id comment)
(gh-api-authenticated-request
api (gh-object-reader (oref api comment-cls)) "PATCH"
(format "/repos/%s/%s/issues/comments/%s" user repo comment-id)
(gh-issue-comments-req-to-update comment)))
(defmethod gh-issue-comments-new ((api gh-issue-comments-api) user repo issue-id comment)
(gh-api-authenticated-request
api (gh-object-reader (oref api comment-cls)) "POST"
(format "/repos/%s/%s/issues/%s/comments" user repo issue-id)
(gh-issue-comments-req-to-update comment)))
(defmethod gh-issue-comments-delete ((api gh-issue-comments-api) user repo comment-id)
(gh-api-authenticated-request
api nil "DELETE"
(format "/repos/%s/%s/issues/comments/%s" user repo comment-id)))
(provide 'gh-issue-comments)
;;; gh-issue-comments.el ends here
;; Local Variables:
;; indent-tabs-mode: nil
;; End:

View File

@ -1,7 +0,0 @@
(define-package "gh" "20160626.1349" "A GitHub library for Emacs"
'((emacs "24.4")
(pcache "0.3.1")
(logito "0.1")))
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -1,139 +0,0 @@
;;; gh-pull-comments.el --- pull request comments api for github
;; Copyright (C) 2014 Toni Reina
;; Author: Toni Reina <areina0@gmail.com>
;; Keywords:
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; TODOS:
;; * Support listing all comments in a repository
;; Basic usage:
;; (setf api (gh-pull-comments-api "api" :sync nil :cache nil :num-retries 1))
;; (setf comments (gh-pull-comments-list api "user" "repo" "pull request id"))
;; (setq my-comment (make-instance 'gh-pull-comments-comment
;; :body "This is great!"
;; :path "README.md"
;; :position 2
;; :commit-id "commit sha"))
;; (gh-pull-comments-new api "user" "repo" "pull request id" my-comment)
;;; Code:
(eval-when-compile
(require 'cl))
;;;###autoload
(require 'eieio)
(require 'gh-api)
(require 'gh-auth)
(require 'gh-common)
(defclass gh-pull-comments-api (gh-api-v3)
((pull-comment-cls :allocation :class :initform gh-pull-comments-comment))
"GitHub Pull Request Comments API")
(defclass gh-pull-comments-comment (gh-object)
((url :initarg :url)
(html-url :initarg :html-url)
(id :initarg :id)
(body :initarg :body)
(user :initarg :user :initform nil)
(path :initarg :path)
(diff-hunk :initarg :diff-hunk)
(position :initarg :position)
(original-position :initarg :original-position)
(commit-id :initarg :commit-id)
(original-commit-id :initarg :original-commit-id)
(in-reply-to :initarg :in-reply-to :initform nil)
(created-at :initarg :created_at)
(updated-at :initarg :updated_at)
(user-cls :allocation :class :initform gh-user))
"Class for Pull Requests comments")
(defmethod gh-object-read-into ((comment gh-pull-comments-comment) data)
(call-next-method)
(with-slots (url html-url id body user path diff-hunk position
original-position commit-id original-commit-id in-reply-to
created-at updated-at)
comment
(setq url (gh-read data 'url)
html-url (gh-read data 'html_url)
id (gh-read data 'id)
body (gh-read data 'body)
user (gh-object-read (or (oref comment :user)
(oref comment user-cls))
(gh-read data 'user))
path (gh-read data 'path)
diff-hunk (gh-read data 'diff_hunk)
position (gh-read data 'position)
original-position (gh-read data 'original_position)
commit-id (gh-read data 'commit_id)
original-commit-id (gh-read data 'original_commit_id)
in-reply-to (gh-read data 'in_reply_to)
created-at (gh-read data 'created_at)
updated-at (gh-read data 'updated_at))))
(defmethod gh-pull-comments-list ((api gh-pull-comments-api) user repo pull-id)
(gh-api-authenticated-request
api (gh-object-list-reader (oref api pull-comment-cls)) "GET"
(format "/repos/%s/%s/pulls/%s/comments" user repo pull-id)))
(defmethod gh-pull-comments-get ((api gh-pull-comments-api) user repo pull-id)
(gh-api-authenticated-request
api (gh-object-reader (oref api pull-comment-cls)) "GET"
(format "/repos/%s/%s/pulls/comments/%s" user repo pull-id)))
(defmethod gh-pull-comments-req-to-create ((req gh-pull-comments-comment))
(let ((in-reply-to (oref req in-reply-to))
(to-update `(("body" . ,(oref req body)))))
(if in-reply-to
(nconc to-update `(("in_reply_to" . ,in-reply-to)))
(nconc to-update `(("commit_id" . ,(oref req commit-id))
("path" . ,(oref req path))
("position" . ,(oref req position)))))
to-update))
(defmethod gh-pull-comments-req-to-update ((req gh-pull-comments-comment))
`(("body" . ,(oref req body))))
(defmethod gh-pull-comments-update ((api gh-pull-comments-api) user repo comment-id comment)
(gh-api-authenticated-request
api (gh-object-reader (oref api pull-comment-cls)) "PATCH"
(format "/repos/%s/%s/pulls/comments/%s" user repo comment-id)
(gh-pull-comments-req-to-update comment)))
(defmethod gh-pull-comments-new ((api gh-pull-comments-api) user repo pull-id comment)
(gh-api-authenticated-request
api (gh-object-reader (oref api pull-comment-cls)) "POST"
(format "/repos/%s/%s/pulls/%s/comments" user repo pull-id)
(gh-pull-comments-req-to-create comment)))
(defmethod gh-pull-comments-delete ((api gh-pull-comments-api) user repo comment-id)
(gh-api-authenticated-request
api nil "DELETE"
(format "/repos/%s/%s/pulls/comments/%s" user repo comment-id)))
(provide 'gh-pull-comments)
;;; gh-pull-comments.el ends here
;; Local Variables:
;; indent-tabs-mode: nil
;; End:

View File

@ -80,10 +80,12 @@
(unless (or (null cache)
(and (eieio-object-p cache)
(object-of-class-p cache 'gh-cache)))
(oset api :cache (funcall (oref api cache-cls)
(format "gh/%s/%s"
classname
(gh-api-get-username api)))))))
(oset api :cache (make-instance
(oref api cache-cls)
:object-name
(format "gh/%s/%s"
classname
(gh-api-get-username api)))))))
(defmethod gh-api-expand-resource ((api gh-api)
resource)
@ -116,9 +118,11 @@
(or (oref api :auth)
(funcall gh-api-v3-authenticator "auth")))))
;;;###autoload
(defclass gh-api-request (gh-url-request)
((default-response-cls :allocation :class :initform gh-api-response)))
;;;###autoload
(defclass gh-api-response (gh-url-response)
())
@ -134,10 +138,12 @@
(defmethod gh-url-response-set-data ((resp gh-api-response) data)
(call-next-method resp (gh-api-json-decode data)))
;;;###autoload
(defclass gh-api-paged-request (gh-api-request)
((default-response-cls :allocation :class :initform gh-api-paged-response)
(page-limit :initarg :page-limit :initform -1)))
;;;###autoload
(defclass gh-api-paged-response (gh-api-response)
())
@ -235,6 +241,7 @@
(oref req default-response-cls)
:transform transformer))))))
;;;###autoload
(defclass gh-api-callback (gh-url-callback)
((cache :initarg :cache)
(key :initarg :key)

View File

@ -103,6 +103,7 @@
(defmethod gh-auth-modify-request ((auth gh-authenticator) req)
req)
;;;###autoload
(defclass gh-auth-2fa-callback (gh-url-callback)
((req :initarg :req :initform nil))
"2-factor callback")
@ -152,7 +153,7 @@
((token :initarg :token :protection :private :initform nil))
"Oauth-based authenticator")
(defmethod initialize-instance :static ((auth gh-oauth-authenticator) &rest args)
(defmethod initialize-instance ((auth gh-oauth-authenticator) &rest args)
(call-next-method)
(or (oref auth :token)
(oset auth :token (gh-auth-get-oauth-token))))

View File

@ -0,0 +1,255 @@
;;; gh-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "gh-api" "gh-api.el" (22454 5329 956436 690000))
;;; Generated autoloads from gh-api.el
(require 'eieio)
(eieio-defclass-autoload 'gh-api 'nil "gh-api" "Github API")
(eieio-defclass-autoload 'gh-api-v3 '(gh-api) "gh-api" "Github API v3")
(eieio-defclass-autoload 'gh-api-request '(gh-url-request) "gh-api" nil)
(eieio-defclass-autoload 'gh-api-response '(gh-url-response) "gh-api" nil)
(eieio-defclass-autoload 'gh-api-paged-request '(gh-api-request) "gh-api" nil)
(eieio-defclass-autoload 'gh-api-paged-response '(gh-api-response) "gh-api" nil)
(eieio-defclass-autoload 'gh-api-callback '(gh-url-callback) "gh-api" nil)
;;;***
;;;### (autoloads nil "gh-auth" "gh-auth.el" (22454 5330 384446 754000))
;;; Generated autoloads from gh-auth.el
(require 'eieio)
(eieio-defclass-autoload 'gh-authenticator 'nil "gh-auth" "Abstract authenticator")
(eieio-defclass-autoload 'gh-auth-2fa-callback '(gh-url-callback) "gh-auth" "2-factor callback")
(eieio-defclass-autoload 'gh-password-authenticator '(gh-authenticator) "gh-auth" "Password-based authenticator")
(eieio-defclass-autoload 'gh-oauth-authenticator '(gh-authenticator) "gh-auth" "Oauth-based authenticator")
;;;***
;;;### (autoloads nil "gh-cache" "gh-cache.el" (22454 5330 226443
;;;;;; 38000))
;;; Generated autoloads from gh-cache.el
(require 'eieio)
(eieio-defclass-autoload 'gh-cache '(pcache-repository) "gh-cache" nil)
(eieio-defclass-autoload 'gh-cache-entry '(pcache-entry) "gh-cache" nil)
;;;***
;;;### (autoloads nil "gh-comments" "gh-comments.el" (22454 5329
;;;;;; 753431 916000))
;;; Generated autoloads from gh-comments.el
(require 'eieio)
(eieio-defclass-autoload 'gh-comments-api-mixin 'nil "gh-comments" :abstract)
;;;***
;;;### (autoloads nil "gh-common" "gh-common.el" (22454 5330 91439
;;;;;; 864000))
;;; Generated autoloads from gh-common.el
(require 'eieio)
(autoload 'gh-marshal-default-spec "gh-common" "\
\(fn SLOT)" nil nil)
(autoload 'gh-defclass "gh-common" "\
\(fn NAME SUPERCLASS SLOTS &rest OPTIONS-AND-DOC)" nil t)
(gh-defclass gh-object nil nil)
(gh-defclass gh-ref-object (gh-object) ((id :initarg :id) (url :initarg :url) (html-url :initarg :html-url)))
(gh-defclass gh-user (gh-ref-object) ((login :initarg :login) (gravatar-url :initarg :gravatar-url)) "Github user object")
(gh-defclass gh-comment (gh-ref-object) ((body :initarg :body) (user :initarg :user :initform nil :marshal-type gh-user) (created-at :initarg :created_at) (updated-at :initarg :updated_at)) "Github comment object")
;;;***
;;;### (autoloads nil "gh-gist" "gh-gist.el" (22454 5329 821433 515000))
;;; Generated autoloads from gh-gist.el
(require 'eieio)
(eieio-defclass-autoload 'gh-gist-api '(gh-api-v3) "gh-gist" "Gist API")
(gh-defclass gh-gist-gist-stub (gh-object) ((files :initarg :files :type list :initform nil :marshal-type (list gh-gist-gist-file)) (public :initarg :public :marshal-type bool) (description :initarg :description)) "Class for user-created gist objects")
(gh-defclass gh-gist-history-change (gh-object) ((total :initarg :total) (additions :initarg :additions) (deletions :initarg :deletions)))
(gh-defclass gh-gist-history-entry (gh-object) ((user :initarg :user :initform nil :marshal-type gh-user) (version :initarg :version) (committed :initarg :committed :marshal ((alist . committed_at))) (change :initarg :change :marshal ((alist . change_status)) :marshal-type gh-gist-history-change) (url :initarg :url)))
(gh-defclass gh-gist-fork-entry (gh-ref-object) ((user :initarg :user :initform nil :marshal-type gh-user) (created :initarg :created :marshal ((alist . created_at))) (updated :initarg :updated :marshal ((alist . updated_at)))))
(gh-defclass gh-gist-gist (gh-ref-object gh-gist-gist-stub) ((date :initarg :date :marshal ((alist . created_at))) (update :initarg :update :marshal ((alist . updated_at))) (push-url :initarg :push-url :marshal ((alist . git_push_url))) (pull-url :initarg :pull-url :marshal ((alist . git_pull_url))) (comments :initarg :comments) (user :initarg :user :initform nil :marshal-type gh-user :marshal ((alist . owner))) (history :initarg :history :initform nil :type list :marshal-type (list gh-gist-history-entry)) (forks :initarg :forks :initform nil :type list :marshal-type (list gh-gist-fork-entry))) "Gist object")
(gh-defclass gh-gist-gist-file (gh-object) ((filename :initarg :filename) (size :initarg :size) (url :initarg :url :marshal ((alist . raw_url))) (content :initarg :content)))
;;;***
;;;### (autoloads nil "gh-issue-comments" "gh-issue-comments.el"
;;;;;; (22454 5330 158441 440000))
;;; Generated autoloads from gh-issue-comments.el
(require 'eieio)
;;;***
;;;### (autoloads nil "gh-issues" "gh-issues.el" (22454 5330 260443
;;;;;; 838000))
;;; Generated autoloads from gh-issues.el
(require 'eieio)
(eieio-defclass-autoload 'gh-issues-api '(gh-api-v3 gh-comments-api-mixin) "gh-issues" "Github Issues api")
(gh-defclass gh-issues-issue (gh-ref-object) ((number :initarg :number) (state :initarg :state) (title :initarg :title) (body :initarg :body) (user :initarg :user :initform nil :marshal-type gh-user) (labels :initarg :labels :initform nil :marshal-type (list gh-issues-label)) (assignee :initarg :assignee :initform nil :marshal-type gh-user) (milestone :initarg :milestone :initform nil :marshal-type gh-issues-milestone) (comments :initarg :comments :initform 0) (pull-request :initarg :pull-request :marshal-type gh-issues-pull-request) (closed-at :initarg :created-at) (created-at :initarg :created-at) (updated-at :initarg :updated-at)) "issues request")
(gh-defclass gh-issues-pull-request (gh-object) ((html-url :initarg :html-url) (diff-url :initarg :diff-url) (patch-url :initarg :patch-url)))
(gh-defclass gh-issues-label (gh-ref-object) ((name :initarg :name) (color :initarg :color)))
(gh-defclass gh-issues-milestone (gh-ref-object) ((number :initarg :number) (state :initarg :state) (title :initarg :title) (description :initarg :description) (creator :initarg :creator :initform nil :marshal-type gh-user) (open-issues :initarg :open-issues) (closed-issues :initarg :closed-issues) (created-at :initarg :created-at) (due-on :initarg :due-on)) "github milestone")
(gh-defclass gh-issues-comment (gh-comment) nil)
;;;***
;;;### (autoloads nil "gh-oauth" "gh-oauth.el" (22454 5329 791432
;;;;;; 810000))
;;; Generated autoloads from gh-oauth.el
(require 'eieio)
(eieio-defclass-autoload 'gh-oauth-api '(gh-api-v3) "gh-oauth" "OAuth API")
(eieio-defclass-autoload 'gh-oauth-password-authenticator '(gh-password-authenticator) "gh-oauth" nil)
(gh-defclass gh-oauth-authorization (gh-ref-object) ((scopes :initarg :scopes) (token :initarg :token) (app :initarg :app :initform nil :marshal-type gh-oauth-app) (updated-at :initarg :updated-at) (created-at :initarg :created-at)))
(gh-defclass gh-oauth-app (gh-object) ((url :initarg :url) (name :initarg :name)))
;;;***
;;;### (autoloads nil "gh-orgs" "gh-orgs.el" (22454 5330 124440 640000))
;;; Generated autoloads from gh-orgs.el
(require 'eieio)
(eieio-defclass-autoload 'gh-orgs-api '(gh-api-v3) "gh-orgs" "Orgs API")
(gh-defclass gh-orgs-org-stub (gh-ref-object) ((login :initarg :login) (avatar-url :initarg :avatar-url) (description :initarg :description)))
(gh-defclass gh-orgs-plan (gh-object) ((name :initarg :name) (space :initarg :space) (private-repos :initarg :private-repos)))
(gh-defclass gh-orgs-org (gh-orgs-org-stub) ((name :initarg :name) (company :initarg :company) (blog :initarg :blog) (location :initarg :location) (email :initarg :email) (public-repos :initarg :public-repos) (public-gists :initarg :public-gists) (followers :initarg :followers) (following :initarg :following) (created-at :initarg :created-at) (type :initarg :type) (total-private-repos :initarg :total-private-repos) (owned-private-repos :initarg :owned-private-repos) (private-gists :initarg :private-gists) (disk-usage :initarg :disk-usage) (collaborators :initarg :collaborators) (billing-email :initarg :billing-email) (plan :initarg :plan :initform nil :marshal-type gh-orgs-plan)) "Class for GitHub organizations")
;;;***
;;;### (autoloads nil "gh-pull-comments" "gh-pull-comments.el" (22454
;;;;;; 5330 339445 696000))
;;; Generated autoloads from gh-pull-comments.el
(require 'eieio)
;;;***
;;;### (autoloads nil "gh-pulls" "gh-pulls.el" (22454 5330 294444
;;;;;; 637000))
;;; Generated autoloads from gh-pulls.el
(require 'eieio)
(eieio-defclass-autoload 'gh-pulls-cache '(gh-cache) "gh-pulls" nil)
(eieio-defclass-autoload 'gh-pulls-api '(gh-api-v3 gh-comments-api-mixin) "gh-pulls" "Git pull requests API")
(gh-defclass gh-pulls-comment (gh-comment) ((path :initarg :path) (diff-hunk :initarg :diff-hunk) (position :initarg :position) (original-position :initarg :original-position) (commit-id :initarg :commit-id) (original-commit-id :initarg :original-commit-id) (in-reply-to :initarg :in-reply-to :initform nil)))
(gh-defclass gh-pulls-request-stub (gh-ref-object) ((diff-url :initarg :diff-url) (patch-url :initarg :patch-url) (issue-url :initarg :issue-url) (number :initarg :number) (state :initarg :state) (title :initarg :title) (body :initarg :body) (created-at :initarg :created-at) (updated-at :initarg :updated-at) (closed-at :initarg :closed-at) (merged-at :initarg :merged-at) (head :initarg :head :initform nil :marshal-type gh-repos-ref) (base :initarg :base :initform nil :marshal-type gh-repos-ref)))
(gh-defclass gh-pulls-request (gh-pulls-request-stub) ((merged :initarg :merged) (mergeable :initarg :mergeable) (merged-by :initarg :merged-by) (comments :initarg :comments) (user :initarg :user :initform nil :marshal-type gh-user) (commits :initarg :commits) (additions :initarg :additions) (deletions :initarg :deletions) (changed-files :initarg :changed-files)) "Git pull requests API")
;;;***
;;;### (autoloads nil "gh-repos" "gh-repos.el" (22454 5330 192442
;;;;;; 239000))
;;; Generated autoloads from gh-repos.el
(require 'eieio)
(eieio-defclass-autoload 'gh-repos-api '(gh-api-v3) "gh-repos" "Repos API")
(gh-defclass gh-repos-repo-stub (gh-object) ((name :initarg :name) (description :initarg :description) (homepage :initarg :homepage) (private :initarg :private)) "Class for user-created repository objects")
(gh-defclass gh-repos-repo (gh-ref-object gh-repos-repo-stub) ((clone-url :initarg :clone-url) (git-url :initarg :git-url) (ssh-url :initarg :ssh-url) (svn-url :initarg :svn-url) (mirror-url :initarg :mirror-url) (owner :initarg :owner :initform nil :marshal-type gh-user) (full-name :initarg :full-name) (language :initarg :language) (fork :initarg :fork) (forks :initarg :forks) (forks-count :initarg :forks-count) (watchers :initarg :watchers) (watchers-count :initarg :watchers-count) (stargazers-count :initarg :stargazers-count) (size :initarg :size) (master-branch :initarg :master-branch) (open-issues :initarg :open-issues) (pushed-at :initarg :pushed-at) (created-at :initarg :created-at) (updated-at :initarg :updated-at) (organisation :initarg :organisation :initform nil :marshal-type gh-user) (parent :initarg :parent :marshal-type gh-repos-repo) (source :initarg :source :marshal-type gh-repos-repo) (has-issues :initarg :has-issues) (has-wiki :initarg :has-wiki) (has-downloads :initarg :has-downloads)) "Class for GitHub repositories")
(gh-defclass gh-repos-ref (gh-object) ((label :initarg :label) (ref :initarg :ref :initform nil) (sha :initarg :sha :initform nil) (user :initarg :user :initform nil :marshal-type gh-user) (repo :initarg :repo :initform nil :marshal-type gh-repos-repo)))
;;;***
;;;### (autoloads nil "gh-search" "gh-search.el" (22454 5329 866434
;;;;;; 573000))
;;; Generated autoloads from gh-search.el
(eieio-defclass-autoload 'gh-search-api '(gh-api-v3) "gh-search" nil)
;;;***
;;;### (autoloads nil "gh-url" "gh-url.el" (22454 5329 685430 317000))
;;; Generated autoloads from gh-url.el
(require 'eieio)
(eieio-defclass-autoload 'gh-url-request 'nil "gh-url" nil)
(eieio-defclass-autoload 'gh-url-response 'nil "gh-url" nil)
(eieio-defclass-autoload 'gh-url-callback 'nil "gh-url" nil)
;;;***
;;;### (autoloads nil "gh-users" "gh-users.el" (22454 5330 46438
;;;;;; 806000))
;;; Generated autoloads from gh-users.el
(require 'eieio)
(eieio-defclass-autoload 'gh-users-api '(gh-api-v3) "gh-users" "Users API")
(gh-defclass gh-users-user (gh-user) ((gravatar-id :initarg :gravatar-id) (html-url :initarg :html-url) (followers-url :initarg :followers-url) (following-url :initarg :following-url) (gists-url :initarg :gists-url) (starred-url :initarg :starred-url) (subscriptions-url :initarg :subscriptions-url) (organizations-url :initarg :organizations-url) (repos-url :initarg :repos-url) (events-url :initarg :events-url) (received-events-url :initarg :received-events-url) (type :initarg :type) (site-admin :initarg :site-admin) (name :initarg :name) (company :initarg :company) (blog :initarg :blog) (location :initarg :location) (email :initarg :email) (hireable :initarg :hireable) (bio :initarg :bio) (public-repos :initarg :public-repos) (public-gists :initarg :public-gists) (followers :initarg :followers) (following :initarg :following) (created-at :initarg :created-at) (update-at :initarg :update-at)))
;;;***
;;;### (autoloads nil nil ("gh-pkg.el" "gh-profile.el" "gh.el") (22454
;;;;;; 5330 1437 747000))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; gh-autoloads.el ends here

View File

@ -36,11 +36,12 @@
(defconst gh-cache-outdated-expiration-delay (* 60 60 24))
(defconst gh-cache-internal-version-constant 3)
(defconst gh-cache-internal-version-constant 4)
(defconst gh-cache-version-constant
(format "%s/gh-%s" pcache-version-constant gh-cache-internal-version-constant))
;;;###autoload
(defclass gh-cache (pcache-repository)
((version-constant :allocation :class)
(entries :initarg :entries :initform (make-hash-table :test 'equal))
@ -51,6 +52,7 @@
(oset-default 'gh-cache version-constant gh-cache-version-constant)
;;;###autoload
(defclass gh-cache-entry (pcache-entry)
((etag :initarg :etag :initform nil)
(outdated :initarg :outdated :initform nil)

View File

@ -0,0 +1,71 @@
;;; gh-comments.el --- support for comment-enabled APIs
;; Copyright (C) 2014-2015 Yann Hodique
;; Author: Yann Hodique <hodiquey@vmware.com>
;; Keywords:
;; This file 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 file 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., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;;
;;; Code:
(eval-when-compile
(require 'cl))
;;;###autoload
(require 'eieio)
(require 'gh-common)
(require 'gh-api)
;;;###autoload
(defclass gh-comments-api-mixin ()
((comment-cls :allocation :class :initform gh-comment))
:abstract t)
(defmethod gh-comments-list ((api gh-comments-api-mixin) base)
(gh-api-authenticated-request
api (gh-object-list-reader (oref api comment-cls)) "GET"
(format "%s/comments" (gh-ref-object-base base))))
(defmethod gh-comments-get ((api gh-comments-api-mixin) base comment-id)
(gh-api-authenticated-request
api (gh-object-reader (oref api comment-cls)) "GET"
(format "%s/comments/%s" (gh-ref-object-base base) comment-id)))
(defmethod gh-comments-update ((api gh-comments-api-mixin) base comment-id comment)
(gh-api-authenticated-request
api (gh-object-reader (oref api comment-cls)) "PATCH"
(format "%s/comments/%s" (gh-ref-object-base base) comment-id)
(gh-comment-req-to-update comment)))
(defmethod gh-comments-new ((api gh-comments-api-mixin) base comment)
(gh-api-authenticated-request
api (gh-object-reader (oref api comment-cls)) "POST"
(format "%s/comments" (gh-ref-object-base base))
(gh-comment-req-to-update comment)))
(defmethod gh-comments-delete ((api gh-comments-api-mixin) base comment-id)
(gh-api-authenticated-request
api nil "DELETE"
(format "%s/comments/%s" (gh-ref-object-base base) comment-id)))
(provide 'gh-comments)
;;; gh-comments.el ends here

View File

@ -32,54 +32,16 @@
;;;###autoload
(require 'eieio)
(require 'dash)
(require 'marshal)
(require 's)
(require 'gh-profile)
(defgroup gh nil
"Github API client libraries."
:group 'applications)
(defclass gh-object ()
())
(defmethod gh-object-read :static ((obj gh-object) data)
(let ((target (if (object-p obj) obj
(make-instance obj))))
(when data
(gh-object-read-into target data))
target))
(defmethod gh-object-reader :static ((obj gh-object))
(apply-partially 'gh-object-read obj))
(defmethod gh-object-list-read :static ((obj gh-object) data)
(mapcar (gh-object-reader obj) data))
(defmethod gh-object-list-reader :static ((obj gh-object))
(apply-partially 'gh-object-list-read obj))
(defmethod gh-object-read-into ((obj gh-object) data))
(defmethod slot-unbound ((obj gh-object) cls slot-name fn)
(if (eq fn 'oref) nil
(call-next-method)))
(defclass gh-user (gh-object)
((login :initarg :login)
(id :initarg :id)
(avatar-url :initarg :avatar-url)
(gravatar-url :initarg :gravatar-url)
(url :initarg :url))
"Github user object")
(defmethod gh-object-read-into ((user gh-user) data)
(call-next-method)
(with-slots (login id avatar-url gravatar-url url)
user
(setq login (gh-read data 'login)
id (gh-read data 'id)
avatar-url (gh-read data 'avatar_url)
gravatar-url (gh-read data 'gravatar_url)
url (gh-read data 'url))))
;;; Helper functions
(defun gh-read (obj field)
(cdr (assoc field obj)))
@ -108,6 +70,80 @@
(with-output-to-string
(apply 'process-file git nil standard-output nil args))))
;;; Base classes for common objects
;;;###autoload
(defun gh-marshal-default-spec (slot)
(let ((slot-name (symbol-name slot)))
(list (cons 'alist
(intern (s-replace "-" "_" slot-name))))))
;;;###autoload
(defmacro gh-defclass (name superclass slots &rest options-and-doc)
`(marshal-defclass ,name ,superclass ,slots ,@options-and-doc
:marshal-default-spec gh-marshal-default-spec))
;;;###autoload
(gh-defclass gh-object ()
())
(defmethod gh-object-read :static ((obj gh-object) data)
(let ((target (if (object-p obj) obj
(make-instance obj))))
(when data
(gh-object-read-into target data))
target))
(defmethod gh-object-reader :static ((obj gh-object))
(apply-partially 'gh-object-read obj))
(defmethod gh-object-list-read :static ((obj gh-object) data)
(mapcar (gh-object-reader obj) data))
(defmethod gh-object-list-reader :static ((obj gh-object))
(apply-partially 'gh-object-list-read obj))
(defmethod gh-object-read-into ((obj gh-object) data)
(unmarshal obj data 'alist))
(defmethod slot-unbound ((obj gh-object) cls slot-name fn)
(if (eq fn 'oref) nil
(call-next-method)))
;;;###autoload
(gh-defclass gh-ref-object (gh-object)
((id :initarg :id)
(url :initarg :url)
(html-url :initarg :html-url)))
(defmethod gh-ref-object-base ((obj gh-ref-object))
(let ((url (oref obj :url)))
(--> (s-split "/" url t)
(-slice it 2)
(s-join "/" it)
(concat "/" it))))
(defmethod gh-ref-object-base (obj)
(if (stringp obj) obj
(error "illegal input for `gh-ref-object-base'")))
;;;###autoload
(gh-defclass gh-user (gh-ref-object)
((login :initarg :login)
(gravatar-url :initarg :gravatar-url))
"Github user object")
;;;###autoload
(gh-defclass gh-comment (gh-ref-object)
((body :initarg :body)
(user :initarg :user :initform nil :marshal-type gh-user)
(created-at :initarg :created_at)
(updated-at :initarg :updated_at))
"Github comment object")
(defmethod gh-comment-req-to-update ((req gh-comment))
`(("body" . ,(oref req :body))))
(provide 'gh-common)
;;; gh-common.el ends here

View File

@ -42,85 +42,70 @@
"Gist API")
;;;###autoload
(defclass gh-gist-gist-stub (gh-object)
((files :initarg :files :type list :initform nil)
(public :initarg :public)
(description :initarg :description)
(file-cls :allocation :class :initform gh-gist-gist-file))
(gh-defclass gh-gist-gist-stub (gh-object)
((files :initarg :files :type list :initform nil :marshal-type (list gh-gist-gist-file))
(public :initarg :public :marshal-type bool)
(description :initarg :description))
"Class for user-created gist objects")
(defmethod gh-object-read-into ((stub gh-gist-gist-stub) data)
(call-next-method)
(with-slots (files public description)
stub
(setq files (gh-object-list-read (oref stub file-cls)
(gh-read data 'files))
public (gh-read data 'public)
description (gh-read data 'description))))
;;;###autoload
(gh-defclass gh-gist-history-change (gh-object)
((total :initarg :total)
(additions :initarg :additions)
(deletions :initarg :deletions)))
;;;###autoload
(defclass gh-gist-gist (gh-gist-gist-stub)
((date :initarg :date)
(update :initarg :update)
(push-url :initarg :push-url)
(pull-url :initarg :pull-url)
(html-url :initarg :html-url)
(comments :initarg :comments)
(user :initarg :user :initform nil)
(id :initarg :id :type string)
(url :initarg :url :type string)
(forks :initarg :forks :initform nil)
(gh-defclass gh-gist-history-entry (gh-object)
((user :initarg :user :initform nil :marshal-type gh-user)
(version :initarg :version)
(committed :initarg :committed :marshal ((alist . committed_at)))
(change :initarg :change :marshal ((alist . change_status))
:marshal-type gh-gist-history-change)
(url :initarg :url)))
(user-cls :allocation :class :initform gh-user))
;;;###autoload
(gh-defclass gh-gist-fork-entry (gh-ref-object)
((user :initarg :user :initform nil :marshal-type gh-user)
(created :initarg :created :marshal ((alist . created_at)))
(updated :initarg :updated :marshal ((alist . updated_at)))))
;;;###autoload
(gh-defclass gh-gist-gist (gh-ref-object gh-gist-gist-stub)
((date :initarg :date :marshal ((alist . created_at)))
(update :initarg :update :marshal ((alist . updated_at)))
(push-url :initarg :push-url :marshal ((alist . git_push_url)))
(pull-url :initarg :pull-url :marshal ((alist . git_pull_url)))
(comments :initarg :comments)
(user :initarg :user :initform nil :marshal-type gh-user :marshal ((alist . owner)))
(history :initarg :history :initform nil :type list :marshal-type (list gh-gist-history-entry))
(forks :initarg :forks :initform nil :type list :marshal-type (list gh-gist-fork-entry)))
"Gist object")
(defmethod gh-object-read-into ((gist gh-gist-gist) data)
(call-next-method)
(with-slots (date update push-url pull-url html-url comments user
id url forks)
gist
(setq date (gh-read data 'created_at)
update (gh-read data 'updated_at)
push-url (gh-read data 'git_push_url)
pull-url (gh-read data 'git_pull_url)
html-url (gh-read data 'html_url)
comments (gh-read data 'comments)
user (gh-object-read (or (oref gist :user)
(oref gist user-cls))
(gh-read data 'user))
id (gh-read data 'id)
url (gh-read data 'url)
forks (gh-read data 'forks))))
(defclass gh-gist-gist-file (gh-object)
;;;###autoload
(gh-defclass gh-gist-gist-file (gh-object)
((filename :initarg :filename)
(size :initarg :size)
(url :initarg :url)
(url :initarg :url :marshal ((alist . raw_url)))
(content :initarg :content)))
(defmethod gh-object-read-into ((file gh-gist-gist-file) data)
(call-next-method)
(with-slots (filename size url content)
file
(setq
filename (gh-read data 'filename)
size (gh-read data 'size)
url (gh-read data 'raw_url)
content (gh-read data 'content))))
(defmethod gh-gist-gist-to-obj ((gist gh-gist-gist-stub))
`(("description" . ,(oref gist :description))
("public" . ,(oref gist :public))
("files" . ,(mapcar 'gh-gist-gist-file-to-obj (oref gist :files)))))
(let ((files (mapcar #'gh-gist-gist-file-to-obj (oref gist :files))))
`(("description" . ,(oref gist :description))
("public" . ,(oref gist :public))
,@(and files (list (cons "files" files))))))
(defmethod gh-gist-gist-has-files ((gist gh-gist-gist-stub))
(not (memq nil (mapcar (lambda (f)
(oref f :content)) (oref gist :files)))))
(defmethod gh-gist-gist-file-to-obj ((file gh-gist-gist-file))
`(,(oref file :filename) . (("filename" . ,(oref file :filename))
("content" . ,(oref file :content)))))
(let* ((filename (oref file :filename))
(content (oref file :content))
(file (if content
`(("filename" . ,filename)
("content" . ,content))
nil)))
(cons filename file)))
(defmethod gh-gist-list ((api gh-gist-api) &optional username)
(gh-api-authenticated-request

View File

@ -0,0 +1,72 @@
;;; gh-issue-comments.el --- issue comments api for github
;; Copyright (C) 2014 Travis Thieman
;; Author: Travis Thieman <travis.thieman@gmail.com>
;; Keywords:
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; TODOS:
;; * Support listing all comments in a repository
;; Basic usage:
;; (setf api (gh-issue-comments-api "api" :sync nil :cache nil :num-retries 1))
;; (setf comments (gh-issue-comments-list api "user" "repo" "issue id"))
;; (setq my-comment (make-instance 'gh-issue-comments-comment :body "This is great!"))
;; (gh-issue-comments-new api "user" "repo" "issue id" my-comment)
;;; Code:
(eval-when-compile
(require 'cl))
;;;###autoload
(require 'eieio)
(require 'gh-api)
(require 'gh-auth)
(require 'gh-common)
(require 'gh-issues)
(let ((ver "1.0.0"))
(define-obsolete-function-alias
'gh-issue-comments-api 'gh-issues-api ver)
(define-obsolete-function-alias
'gh-issue-comments-comment 'gh-issues-comment ver)
(define-obsolete-function-alias
'gh-issue-comments-req-to-update 'gh-comment-req-to-update ver)
(define-obsolete-function-alias
'gh-issue-comments-list 'gh-issues-comments-list ver)
(define-obsolete-function-alias
'gh-issue-comments-get 'gh-issues-comments-get ver)
(define-obsolete-function-alias
'gh-issue-comments-update 'gh-issues-comments-update ver)
(define-obsolete-function-alias
'gh-issue-comments-new 'gh-issues-comments-new ver)
(define-obsolete-function-alias
'gh-issue-comments-delete 'gh-issues-comments-delete ver))
(provide 'gh-issue-comments)
;;; gh-issue-comments.el ends here
;; Local Variables:
;; indent-tabs-mode: nil
;; End:

View File

@ -1,5 +1,7 @@
;;; gh-issues.el --- issues api for github
;; Copyright (C) 2014-2015 Yann Hodique
;; Copyright (C) 2014 Travis Thieman
;; Copyright (C) 2012 Raimon Grau
;; Author: Raimon Grau <raimonster@gmail.com>
@ -27,6 +29,9 @@
;; (last (oref issues data)) ; get one issue
;; (setq mi (make-instance 'gh-issues-issue :body "issue body" :title "issue title"))
;; (gh-issues-issue-new api "user" "repo" mi)
;; (setf comments (gh-issues-comments-list api "user" "repo" "issue id"))
;; (setq my-comment (make-instance 'gh-issues-comment :body "This is great!"))
;; (gh-issues-comments-new api "user" "repo" "issue id" my-comment)
;;; Code:
@ -38,103 +43,67 @@
(require 'gh-api)
(require 'gh-auth)
(require 'gh-comments)
(require 'gh-common)
(require 'gh-repos)
(defclass gh-issues-api (gh-api-v3)
;;;###autoload
(defclass gh-issues-api (gh-api-v3 gh-comments-api-mixin)
((issue-cls :allocation :class :initform gh-issues-issue)
(milestone-cls :allocation :class :initform gh-issues-milestone)
(label-cls :allocation :class :initform gh-issues-label))
(label-cls :allocation :class :initform gh-issues-label)
(comment-cls :allocation :class :initform gh-issues-comment))
"Github Issues api")
(defclass gh-issues-issue (gh-object)
((url :initarg :url)
(html-url :initarg :html-url)
(number :initarg :number)
;;;###autoload
(gh-defclass gh-issues-issue (gh-ref-object)
((number :initarg :number)
(state :initarg :state)
(title :initarg :title)
(body :initarg :body)
(user :initarg :user :initform nil)
(labels :initarg :labels :initform nil)
(assignee :initarg :assignee :initform nil)
(milestone :initarg :milestone :initform nil)
(open_issues :initarg :open_issues)
(closed_issues :initarg :closed_issues)
(created_at :initarg :created_at)
(due_on :initarg :due_on)
(user-cls :allocation :class :initform gh-user)
(milestone-cls :allocation :class :initform gh-issues-milestone))
(user :initarg :user :initform nil :marshal-type gh-user)
(labels :initarg :labels :initform nil :marshal-type (list gh-issues-label))
(assignee :initarg :assignee :initform nil :marshal-type gh-user)
(milestone :initarg :milestone :initform nil :marshal-type gh-issues-milestone)
(comments :initarg :comments :initform 0)
(pull-request :initarg :pull-request :marshal-type gh-issues-pull-request)
(closed-at :initarg :created-at)
(created-at :initarg :created-at)
(updated-at :initarg :updated-at))
"issues request")
(defclass gh-issues-label (gh-object)
((url :initarg :url)
(name :initarg :name)
;;;###autoload
(gh-defclass gh-issues-pull-request (gh-object)
((html-url :initarg :html-url)
(diff-url :initarg :diff-url)
(patch-url :initarg :patch-url)))
;;;###autoload
(gh-defclass gh-issues-label (gh-ref-object)
((name :initarg :name)
(color :initarg :color)))
(defclass gh-issues-milestone (gh-object)
((url :initarg :url)
(number :initarg :number)
(defmethod gh-issues-label-req-to-update ((label gh-issues-label))
`(("name" . ,(oref label :name))
("color" . ,(oref label :color))))
;;;###autoload
(gh-defclass gh-issues-milestone (gh-ref-object)
((number :initarg :number)
(state :initarg :state)
(title :initarg :title)
(description :initarg :description)
(creator :initarg :creator :initform nil)
(open_issues :initarg :open_issues)
(closed_issues :initarg :closed_issues)
(created_at :initarg :created_at)
(due_on :initarg :due_on)
(user-cls :allocation :class :initform gh-user))
(creator :initarg :creator :initform nil :marshal-type gh-user)
(open-issues :initarg :open-issues )
(closed-issues :initarg :closed-issues)
(created-at :initarg :created-at)
(due-on :initarg :due-on))
"github milestone")
(defmethod gh-object-read-into ((issue gh-issues-issue) data)
(call-next-method)
(with-slots (url html-url number state title body
user labels assignee milestone open_issues
closed_issues created_at due_on)
issue
(setq url (gh-read data 'url)
html-url (gh-read data 'html_url)
number (gh-read data 'number)
state (gh-read data 'state)
title (gh-read data 'title)
body (gh-read data 'body)
user (gh-object-read (or (oref issue :user)
(oref issue user-cls))
(gh-read data 'user))
labels (gh-read data 'labels)
assignee (gh-object-read (or (oref issue :assignee)
(oref issue user-cls))
(gh-read data 'assignee))
milestone (gh-object-read (or (oref issue :milestone)
(oref issue milestone-cls))
(gh-read data 'milestone))
open_issues (gh-read data 'open_issues)
closed_issues (gh-read data 'closed_issues)
created_at (gh-read data 'created_at)
due_on (gh-read data 'due_on))))
(defmethod gh-object-read-into ((milestone gh-issues-milestone) data)
(call-next-method)
(with-slots (url number state title description creator
open_issues closed_issues
created_at due_on)
milestone
(setq url (gh-read data 'url)
number (gh-read data 'number)
state (gh-read data 'state)
title (gh-read data 'title)
description (gh-read data 'description)
creator (gh-object-read (or (oref milestone :creator)
(oref milestone user-cls))
(gh-read data 'creator))
open_issues (gh-read data 'open_issues)
closed_issues (gh-read data 'closed_issues)
created_at (gh-read data 'created_at)
due_on (gh-read data 'due_on))))
;;;###autoload
(gh-defclass gh-issues-comment (gh-comment)
())
(defmethod gh-issues-issue-list ((api gh-issues-api) user repo)
(gh-api-authenticated-request
@ -206,23 +175,7 @@
(format "/repos/%s/%s/issues" user repo)
(gh-issues-issue-req-to-update issue)))
;;; labels
(defclass gh-issues-label (gh-object)
((url :initarg :url)
(name :initarg :name)
(color :initarg :color)))
(defmethod gh-object-read-into ((label gh-issues-label) data)
(call-next-method)
(with-slots (url name color)
label
(setq url (gh-read data 'url)
name (gh-read data 'name)
color (gh-read data 'color))))
(defmethod gh-issues-label-req-to-update ((label gh-issues-label))
`(("name" . ,(oref label name))
("color" . ,(oref label color))))
;;; Labels
(defmethod gh-issues-label-get ((api gh-issues-api) user repo name)
(gh-api-authenticated-request
@ -281,6 +234,26 @@
api (gh-object-list-reader (oref api label-cls)) "GET"
(format "/repos/%s/%s/milestones/%s/labels" user repo milestone-id))))
;;; Comments
(defmethod gh-issues-comments-list ((api gh-issues-api) user repo issue-id)
(gh-comments-list api (format "/repos/%s/%s/issues/%s" user repo issue-id)))
(defmethod gh-issues-comments-get ((api gh-issues-api) user repo comment-id)
(gh-comments-get api (format "/repos/%s/%s/issues" user repo) comment-id))
(defmethod gh-issues-comments-update ((api gh-issues-api)
user repo comment-id comment)
(gh-comments-update api (format "/repos/%s/%s/issues" user repo)
comment-id (gh-comment-req-to-update comment)))
(defmethod gh-issues-comments-new ((api gh-issues-api)
user repo issue-id comment)
(gh-comments-new api (format "/repos/%s/%s/issues/%s" user repo issue-id)
(gh-comment-req-to-update comment)))
(defmethod gh-issues-comments-delete ((api gh-issues-api) user repo comment-id)
(gh-comments-delete api (format "/repos/%s/%s/issues" user repo) comment-id))
;;; helpers

View File

@ -41,6 +41,7 @@
((auth-cls :allocation :class :initform gh-oauth-authorization))
"OAuth API")
;;;###autoload
(defclass gh-oauth-password-authenticator (gh-password-authenticator)
((remember :allocation :class :initform nil)))
@ -49,42 +50,19 @@
(let ((gh-api-v3-authenticator 'gh-oauth-password-authenticator))
(call-next-method)))
(defclass gh-oauth-authorization (gh-object)
((id :initarg :id)
(url :initarg :url)
(scopes :initarg :scopes)
;;;###autoload
(gh-defclass gh-oauth-authorization (gh-ref-object)
((scopes :initarg :scopes)
(token :initarg :token)
(app :initarg :app :initform nil)
(app :initarg :app :initform nil :marshal-type gh-oauth-app)
(updated-at :initarg :updated-at)
(created-at :initarg :created-at)
(created-at :initarg :created-at)))
(app-cls :allocation :class :initform gh-oauth-app)))
(defmethod gh-object-read-into ((auth gh-oauth-authorization) data)
(call-next-method)
(with-slots (id url scopes token app updated-at created-at)
auth
(setq id (gh-read data 'id)
url (gh-read data 'url)
scopes (gh-read data 'scopes)
token (gh-read data 'token)
app (gh-object-read (or (oref auth :app)
(oref auth app-cls))
(gh-read data 'app))
updated-at (gh-read data 'updated_at)
created-at (gh-read data 'created_at))))
(defclass gh-oauth-app (gh-object)
;;;###autoload
(gh-defclass gh-oauth-app (gh-object)
((url :initarg :url)
(name :initarg :name)))
(defmethod gh-object-read-into ((app gh-oauth-app) data)
(call-next-method)
(with-slots (url name)
app
(setq url (gh-read data 'url)
name (gh-read data 'name))))
(defmethod gh-oauth-auth-list ((api gh-oauth-api))
(gh-api-authenticated-request
api (gh-object-list-reader (oref api auth-cls)) "GET"

View File

@ -42,35 +42,19 @@
"Orgs API")
;;;###autoload
(defclass gh-orgs-org-stub (gh-object)
(gh-defclass gh-orgs-org-stub (gh-ref-object)
((login :initarg :login)
(id :initarg :id)
(url :initarg :url)
(avatar-url :initarg :avatar-url)))
(avatar-url :initarg :avatar-url)
(description :initarg :description)))
(defmethod gh-object-read-into ((stub gh-orgs-org-stub) data)
(call-next-method)
(with-slots (login id url avatar-url)
stub
(setq login (gh-read data 'login)
id (gh-read data 'id)
url (gh-read data 'url)
avatar-url (gh-read data 'avatar_url))))
(defclass gh-orgs-plan (gh-object)
;;;###autoload
(gh-defclass gh-orgs-plan (gh-object)
((name :initarg :name)
(space :initarg :space)
(private-repos :initarg :private-repos)))
(defmethod gh-object-read-into ((plan gh-orgs-plan) data)
(call-next-method)
(with-slots (name space private-repos)
plan
(setq name (gh-read data 'name)
space (gh-read data 'space)
private-repos (gh-read data 'private_repos))))
(defclass gh-orgs-org (gh-orgs-org-stub)
;;;###autoload
(gh-defclass gh-orgs-org (gh-orgs-org-stub)
((name :initarg :name)
(company :initarg :company)
(blog :initarg :blog)
@ -80,7 +64,6 @@
(public-gists :initarg :public-gists)
(followers :initarg :followers)
(following :initarg :following)
(html-url :initarg :html-url)
(created-at :initarg :created-at)
(type :initarg :type)
(total-private-repos :initarg :total-private-repos)
@ -89,42 +72,9 @@
(disk-usage :initarg :disk-usage)
(collaborators :initarg :collaborators)
(billing-email :initarg :billing-email)
(plan :initarg :plan :initform nil)
(plan-cls :allocation :class :initform gh-orgs-plan))
(plan :initarg :plan :initform nil :marshal-type gh-orgs-plan))
"Class for GitHub organizations")
(defmethod gh-object-read-into ((org gh-orgs-org) data)
(call-next-method)
(with-slots (name company blog location email
public-repos public-gists followers following
html-url created-at type
total-private-repos owned-private-repos
private-gists disk-usage collaborators
billing-email plan)
org
(setq name (gh-read data 'name)
company (gh-read data 'company)
blog (gh-read data 'blog)
location (gh-read data 'location)
email (gh-read data 'email)
public-repos (gh-read data 'public_repos)
public-gists (gh-read data 'public_gists)
followers (gh-read data 'followers)
following (gh-read data 'following)
html-url (gh-read data 'html_url)
created-at (gh-read data 'created_at)
type (gh-read data 'type)
total-private-repos (gh-read data 'total_private_repos)
owned-private-repos (gh-read data 'owned_private_repos)
private-gists (gh-read data 'private_gists)
disk-usage (gh-read data 'disk_usage)
collaborators (gh-read data 'collaborators)
billing-email (gh-read data 'billing_email)
plan (gh-object-read (or (oref org :plan)
(oref org plan-cls))
(gh-read data 'plan)))))
(defmethod gh-orgs-org-to-obj ((org gh-orgs-org))
`(,@(when (slot-boundp org :billing-email)
(list (cons "billing_email" (oref org :billing-email))))

View File

@ -0,0 +1,10 @@
(define-package "gh" "20160728.1525" "A GitHub library for Emacs"
'((emacs "24.3")
(s "1.9.0")
(dash "2.9.0")
(pcache "0.4.1")
(logito "0.1")
(marshal "0.6.3")))
;; Local Variables:
;; no-byte-compile: t
;; End:

View File

@ -0,0 +1,78 @@
;;; gh-pull-comments.el --- pull request comments api for github
;; Copyright (C) 2014 Toni Reina
;; Author: Toni Reina <areina0@gmail.com>
;; Keywords:
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; TODOS:
;; * Support listing all comments in a repository
;; Basic usage:
;; (setf api (gh-pull-comments-api "api" :sync nil :cache nil :num-retries 1))
;; (setf comments (gh-pull-comments-list api "user" "repo" "pull request id"))
;; (setq my-comment (make-instance 'gh-pull-comments-comment
;; :body "This is great!"
;; :path "README.md"
;; :position 2
;; :commit-id "commit sha"))
;; (gh-pull-comments-new api "user" "repo" "pull request id" my-comment)
;;; Code:
(eval-when-compile
(require 'cl))
;;;###autoload
(require 'eieio)
(require 'gh-api)
(require 'gh-auth)
(require 'gh-common)
(require 'gh-pulls)
(let ((ver "1.0.0"))
(define-obsolete-function-alias
'gh-pull-comments-api 'gh-pulls-api ver)
(define-obsolete-function-alias
'gh-pull-comments-comment 'gh-pulls-comment ver)
(define-obsolete-function-alias
'gh-pull-comments-req-to-update 'gh-comment-req-to-update ver)
(define-obsolete-function-alias
'gh-pull-comments-req-to-create 'gh-pulls-comment-req-to-create)
(define-obsolete-function-alias
'gh-pull-comments-list 'gh-pulls-comments-list ver)
(define-obsolete-function-alias
'gh-pull-comments-get 'gh-pulls-comments-get ver)
(define-obsolete-function-alias
'gh-pull-comments-update 'gh-pulls-comments-update ver)
(define-obsolete-function-alias
'gh-pull-comments-new 'gh-pulls-comments-new ver)
(define-obsolete-function-alias
'gh-pull-comments-delete 'gh-pulls-comments-delete ver))
(provide 'gh-pull-comments)
;;; gh-pull-comments.el ends here
;; Local Variables:
;; indent-tabs-mode: nil
;; End:

View File

@ -34,26 +34,48 @@
(require 'gh-api)
(require 'gh-auth)
(require 'gh-comments)
(require 'gh-common)
(require 'gh-repos)
;;;###autoload
(defclass gh-pulls-cache (gh-cache)
((invalidation-chain :allocation :class
:initform '(("^/repos/.*/.*/pulls$" . "\0")
("^/repos/.*/.*/pulls/.*$" . "\0")))))
;;;###autoload
(defclass gh-pulls-api (gh-api-v3)
(defclass gh-pulls-api (gh-api-v3 gh-comments-api-mixin)
((cache-cls :allocation :class :initform gh-pulls-cache)
(req-cls :allocation :class :initform gh-pulls-request))
(req-cls :allocation :class :initform gh-pulls-request)
(comment-cls :allocation :class :initform gh-pulls-comment))
"Git pull requests API")
(defclass gh-pulls-request-stub (gh-object)
((url :initarg :url)
(html-url :initarg :html-url)
(diff-url :initarg :diff-url)
;;;###autoload
(gh-defclass gh-pulls-comment (gh-comment)
((path :initarg :path)
(diff-hunk :initarg :diff-hunk)
(position :initarg :position)
(original-position :initarg :original-position)
(commit-id :initarg :commit-id)
(original-commit-id :initarg :original-commit-id)
(in-reply-to :initarg :in-reply-to :initform nil)))
(defmethod gh-pulls-comment-req-to-create ((req gh-pulls-comment))
(let ((in-reply-to (oref req in-reply-to))
(to-update `(("body" . ,(oref req body)))))
(if in-reply-to
(nconc to-update `(("in_reply_to" . ,in-reply-to)))
(nconc to-update `(("commit_id" . ,(oref req commit-id))
("path" . ,(oref req path))
("position" . ,(oref req position)))))
to-update))
;;;###autoload
(gh-defclass gh-pulls-request-stub (gh-ref-object)
((diff-url :initarg :diff-url)
(patch-url :initarg :patch-url)
(issue-url :initarg :issue-url)
(number :initarg :number)
@ -64,71 +86,22 @@
(updated-at :initarg :updated-at)
(closed-at :initarg :closed-at)
(merged-at :initarg :merged-at)
(head :initarg :head :initform nil)
(base :initarg :base :initform nil)
(ref-cls :allocation :class :initform gh-repos-ref)))
(defmethod gh-object-read-into ((stub gh-pulls-request-stub) data)
(call-next-method)
(with-slots (url html-url diff-url patch-url issue-url number
state title body created-at updated-at
closed-at merged-at head base)
stub
(setq url (gh-read data 'url)
html-url (gh-read data 'html_url)
diff-url (gh-read data 'diff_url)
patch-url (gh-read data 'patch_url)
issue-url (gh-read data 'issue_url)
number (gh-read data 'number)
state (gh-read data 'state)
title (gh-read data 'title)
body (gh-read data 'body)
created-at (gh-read data 'created_at)
updated-at (gh-read data 'updated_at)
closed-at (gh-read data 'closed_at)
merged-at (gh-read data 'merged_at)
head (gh-object-read (or (oref stub :head)
(oref stub ref-cls))
(gh-read data 'head))
base (gh-object-read (or (oref stub :base)
(oref stub ref-cls))
(gh-read data 'base)))))
(head :initarg :head :initform nil :marshal-type gh-repos-ref)
(base :initarg :base :initform nil :marshal-type gh-repos-ref)))
;;;###autoload
(defclass gh-pulls-request (gh-pulls-request-stub)
(gh-defclass gh-pulls-request (gh-pulls-request-stub)
((merged :initarg :merged)
(mergeable :initarg :mergeable)
(merged-by :initarg :merged-by)
(comments :initarg :comments)
(user :initarg :user :initform nil)
(user :initarg :user :initform nil :marshal-type gh-user)
(commits :initarg :commits)
(additions :initarg :additions)
(deletions :initarg :deletions)
(changed-files :initarg :changed-files)
(ref-cls :allocation :class :initform gh-repos-ref)
(user-cls :allocation :class :initform gh-user))
(changed-files :initarg :changed-files))
"Git pull requests API")
(defmethod gh-object-read-into ((req gh-pulls-request) data)
(call-next-method)
(with-slots (merged mergeable
merged-by comments user commits additions
deletions changed-files)
req
(setq merged (gh-read data 'merged)
mergeable (gh-read data 'mergeable)
merged-by (gh-read data 'merged_by)
comments (gh-read data 'comments)
user (gh-object-read (or (oref req :user)
(oref req user-cls))
(gh-read data 'user))
commits (gh-read data 'commits)
additions (gh-read data 'additions)
deletions (gh-read data 'deletions)
changed-files (gh-read data 'changed_files))))
(defmethod gh-pulls-req-to-new ((req gh-pulls-request))
(let ((head (oref req :head))
(base (oref req :base)))
@ -164,6 +137,27 @@
(format "/repos/%s/%s/pulls/%s" user repo id)
(gh-pulls-req-to-update req)))
;;; Comments
(defmethod gh-pulls-comments-list ((api gh-pulls-api) user repo pull-id)
(gh-comments-list api (format "/repos/%s/%s/pulls/%s" user repo pull-id)))
(defmethod gh-pulls-comments-get ((api gh-pulls-api) user repo comment-id)
(gh-comments-get api (format "/repos/%s/%s/pulls" user repo) comment-id))
(defmethod gh-pulls-comments-update ((api gh-pulls-api)
user repo comment-id comment)
(gh-comments-update api (format "/repos/%s/%s/pulls" user repo)
comment-id (gh-comment-req-to-update comment)))
(defmethod gh-pulls-comments-new ((api gh-pulls-api)
user repo pull-id comment)
(gh-comments-new api (format "/repos/%s/%s/pulls/%s" user repo pull-id)
(gh-pulls-comment-req-to-create comment)))
(defmethod gh-pulls-comments-delete ((api gh-pulls-api) user repo comment-id)
(gh-comments-delete api (format "/repos/%s/%s/pulls" user repo) comment-id))
(provide 'gh-pulls)
;;; gh-pulls.el ends here

View File

@ -43,33 +43,21 @@
"Repos API")
;;;###autoload
(defclass gh-repos-repo-stub (gh-object)
(gh-defclass gh-repos-repo-stub (gh-object)
((name :initarg :name)
(description :initarg :description)
(homepage :initarg :homepage)
(private :initarg :private))
"Class for user-created repository objects")
(defmethod gh-object-read-into ((stub gh-repos-repo-stub) data)
(call-next-method)
(with-slots (name description homepage private)
stub
(setq name (gh-read data 'name)
description (gh-read data 'description)
homepage (gh-read data 'homepage)
private (gh-read data 'private))))
;;;###autoload
(defclass gh-repos-repo (gh-repos-repo-stub)
((url :initarg :url)
(html-url :initarg :html-url)
(clone-url :initarg :clone-url)
(gh-defclass gh-repos-repo (gh-ref-object gh-repos-repo-stub)
((clone-url :initarg :clone-url)
(git-url :initarg :git-url)
(ssh-url :initarg :ssh-url)
(svn-url :initarg :svn-url)
(mirror-url :initarg :mirror-url)
(owner :initarg :owner :initform nil)
(id :initarg :id)
(owner :initarg :owner :initform nil :marshal-type gh-user)
(full-name :initarg :full-name)
(language :initarg :language)
(fork :initarg :fork)
@ -84,84 +72,21 @@
(pushed-at :initarg :pushed-at)
(created-at :initarg :created-at)
(updated-at :initarg :updated-at)
(organisation :initarg :organisation :initform nil)
(parent :initarg :parent)
(source :initarg :source)
(organisation :initarg :organisation :initform nil :marshal-type gh-user)
(parent :initarg :parent :marshal-type gh-repos-repo)
(source :initarg :source :marshal-type gh-repos-repo)
(has-issues :initarg :has-issues)
(has-wiki :initarg :has-wiki)
(has-downloads :initarg :has-downloads)
(owner-cls :allocation :class :initform gh-user)
(organisation-cls :allocation :class :initform gh-user)
(parent-cls :allocation :class :initform gh-repos-repo)
(source-cls :allocation :class :initform gh-repos-repo))
(has-downloads :initarg :has-downloads))
"Class for GitHub repositories")
(defmethod gh-object-read-into ((repo gh-repos-repo) data)
(call-next-method)
(with-slots (url html-url clone-url git-url ssh-url svn-url mirror-url
id owner full-name language fork forks forks-count
watchers watchers-count size master-branch open-issues
pushed-at created-at organisation parent source
has-issues has-wiki has-downloads)
repo
(setq url (gh-read data 'url)
html-url (gh-read data 'html_url)
clone-url (gh-read data 'clone_url)
git-url (gh-read data 'git_url)
ssh-url (gh-read data 'ssh_url)
svn-url (gh-read data 'svn_url)
mirror-url (gh-read data 'mirror_url)
id (gh-read data 'id)
owner (gh-object-read (or (oref repo :owner)
(oref repo owner-cls))
(gh-read data 'owner))
full-name (gh-read data 'full_name)
language (gh-read data 'language)
fork (gh-read data 'fork)
forks (gh-read data 'forks)
forks-count (gh-read data 'forks_count)
watchers (gh-read data 'watchers)
watchers-count (gh-read data 'watchers_count)
size (gh-read data 'size)
master-branch (gh-read data 'master_branch)
open-issues (gh-read data 'open_issues)
pushed-at (gh-read data 'pushed_at)
created-at (gh-read data 'created_at)
organisation (gh-object-read (or (oref repo :organisation)
(oref repo organisation-cls))
(gh-read data 'organisation))
parent (gh-object-read (oref repo parent-cls)
(gh-read data 'parent))
source (gh-object-read (oref repo source-cls)
(gh-read data 'source))
has-issues (gh-read data 'has_issues)
has-wiki (gh-read data 'has_wiki)
has-downloads (gh-read data 'has_downloads))))
(defclass gh-repos-ref (gh-object)
;;;###autoload
(gh-defclass gh-repos-ref (gh-object)
((label :initarg :label)
(ref :initarg :ref :initform nil)
(sha :initarg :sha :initform nil)
(user :initarg :user :initform nil)
(repo :initarg :repo :initform nil)
(user-cls :allocation :class :initform gh-user)
(repo-cls :allocation :class :initform gh-repos-repo)))
(defmethod gh-object-read-into ((r gh-repos-ref) data)
(call-next-method)
(with-slots (label ref sha user repo)
r
(setq label (gh-read data 'label)
ref (gh-read data 'ref)
sha (gh-read data 'sha)
user (gh-object-read (or (oref r :user)
(oref r user-cls))
(gh-read data 'user))
repo (gh-object-read (or (oref r :repo)
(oref r repo-cls))
(gh-read data 'repo)))))
(user :initarg :user :initform nil :marshal-type gh-user)
(repo :initarg :repo :initform nil :marshal-type gh-repos-repo)))
(defmethod gh-repos-user-list ((api gh-repos-api) &optional username)
(gh-api-authenticated-request

View File

@ -25,6 +25,7 @@
(require 'gh-users)
(require 'gh-repos)
;;;###autoload
(defclass gh-search-api (gh-api-v3)
((repo-cls :allocation :class :initform gh-repos-repo)
(user-cls :allocation :class :initform gh-users-user)))

View File

@ -34,6 +34,7 @@
(require 'url-http)
;;;###autoload
(defclass gh-url-request ()
((method :initarg :method :type string)
(url :initarg :url :type string)
@ -46,6 +47,7 @@
(default-response-cls :allocation :class :initform gh-url-response)))
;;;###autoload
(defclass gh-url-response ()
((data-received :initarg :data-received :initform nil)
(data :initarg :data :initform nil)
@ -63,6 +65,7 @@
data))
(oset resp :data-received t)))
;;;###autoload
(defclass gh-url-callback ()
nil)
@ -140,14 +143,14 @@
(defun gh-url-set-response (status req-resp)
(set-buffer-multibyte t)
(destructuring-bind (req resp) req-resp
(condition-case err
(let ((responses-req (clone req)))
(oset resp :-req responses-req)
(gh-url-response-init resp (current-buffer)))
(error
(let ((num (oref req :num-retries)))
(if (or (null num) (zerop num))
(signal (car err) (cdr err))
(let ((responses-req (clone req))
(num (oref req :num-retries)))
(oset resp :-req responses-req)
(if (or (null num) (zerop num))
(gh-url-response-init resp (current-buffer))
(condition-case err
(gh-url-response-init resp (current-buffer))
(error
(oset req :num-retries (1- num))
(gh-url-run-request req resp)))))))

View File

@ -42,7 +42,7 @@
"Users API")
;;;###autoload
(defclass gh-users-user (gh-user)
(gh-defclass gh-users-user (gh-user)
((gravatar-id :initarg :gravatar-id)
(html-url :initarg :html-url)
(followers-url :initarg :followers-url)
@ -70,40 +70,6 @@
(created-at :initarg :created-at)
(update-at :initarg :update-at)))
(defmethod gh-object-read-into ((user gh-users-user) data)
(call-next-method)
(with-slots (gravatar-id html-url followers-url following-url
gists-url starred-url subscriptions-url organizations-url
repos-url events-url received-events-url type site-admin name
company blog location email hireable bio public-repos
public-gists followers following created-at update-at)
user
(setq gravatar-id (gh-read data 'gravatar_id)
html-url (gh-read data 'html_url)
following-url (gh-read data 'following_url)
gists-url (gh-read data 'gists_url)
starred-url (gh-read data 'starred_url)
subscriptions-url (gh-read data 'subscriptions_url)
organizations-url (gh-read data 'organizations_url)
repos-url (gh-read data 'repos_url)
events-url (gh-read data 'events_url)
received-events-url (gh-read data 'received_events_url)
type (gh-read data 'type)
site-admin (gh-read data 'site_admin)
name (gh-read data 'name)
company (gh-read data 'company)
blog (gh-read data 'blog)
location (gh-read data 'location)
email (gh-read data 'email)
hireable (gh-read data 'hireable)
bio (gh-read data 'bio)
public-repos (gh-read data 'public_repos)
public-gists (gh-read data 'public_gists)
followers (gh-read data 'followers)
following (gh-read data 'following)
created-at (gh-read data 'created_at)
update-at (gh-read data 'update_at))))
(defmethod gh-users-get ((api gh-users-api) &optional username)
(gh-api-authenticated-request
api (gh-object-reader (oref api users-cls)) "GET"

View File

@ -3,8 +3,7 @@
;;; Code:
;;;### (autoloads nil "go-mode" "go-mode.el" (22387 29367 888183
;;;;;; 643000))
;;;### (autoloads nil "go-mode" "go-mode.el" (22454 5326 453354 320000))
;;; Generated autoloads from go-mode.el
(autoload 'go-mode "go-mode" "\
@ -96,8 +95,7 @@ Tries to look for a URL at point.
;;;***
;;;### (autoloads nil nil ("go-mode-pkg.el") (22387 29367 902180
;;;;;; 904000))
;;;### (autoloads nil nil ("go-mode-pkg.el") (22454 5326 404353 168000))
;;;***

View File

@ -1,4 +1,4 @@
(define-package "go-mode" "20160512.110" "Major mode for the Go programming language" 'nil :url "https://github.com/dominikh/go-mode.el" :keywords
(define-package "go-mode" "20160715.205" "Major mode for the Go programming language" 'nil :url "https://github.com/dominikh/go-mode.el" :keywords
'("languages" "go"))
;; Local Variables:
;; no-byte-compile: t

View File

@ -199,7 +199,7 @@ point to the wrapper script."
(defcustom gofmt-command "gofmt"
"The 'gofmt' command.
Some users may replace this with 'goimports'
from https://github.com/bradfitz/goimports."
from https://golang.org/x/tools/cmd/goimports."
:type 'string
:group 'go)

View File

@ -1 +0,0 @@
(define-package "grizzl" "20160130.2351" "Fast fuzzy search index for Emacs." '((cl-lib "0.5") (emacs "24.3")) :url "https://github.com/grizzl/grizzl" :keywords '("convenience" "usability"))

View File

@ -1,9 +1,9 @@
;;; grizzl-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "grizzl" "grizzl.el" (22297 19824 853945 777000))
;;;### (autoloads nil "grizzl" "grizzl.el" (22454 5325 478331 394000))
;;; Generated autoloads from grizzl.el
(autoload 'grizzl-make-index "grizzl" "\

View File

@ -0,0 +1,2 @@
;;; -*- no-byte-compile: t -*-
(define-package "grizzl" "20160818.37" "Fast fuzzy search index for Emacs." '((cl-lib "0.5") (emacs "24.3")) :url "https://github.com/grizzl/grizzl" :keywords '("convenience" "usability"))

View File

@ -6,7 +6,7 @@
;; Author: Chris Corbyn <chris@w3style.co.uk>
;; Maintainer: Bozhidar Batsov <bozhidar@batsov.com>
;; URL: https://github.com/grizzl/grizzl
;; Package-Version: 20160130.2351
;; Package-Version: 20160818.37
;; Version: 0.1.2
;; Keywords: convenience, usability
;; Package-Requires: ((cl-lib "0.5") (emacs "24.3"))
@ -268,6 +268,10 @@ If the :END option is specified, up to :END results are returned."
"Face for selected result."
:group 'grizzl-mode)
(defface grizzl-prompt-face
`((t :inherit 'mode-line-inactive))
"Face used for grizzl prompt."
:group 'grizzl-mode)
;;; --- Minor Mode Definition
@ -380,12 +384,13 @@ if this is the current selection."
(let* ((count (grizzl-result-count *grizzl-current-result*))
(match-info (format " (%d candidate%s) ---- *-"
count (if (= count 1) "" "s"))))
(concat (propertize (format "-*%s *-" prompt) 'face 'modeline-inactive)
(concat (propertize (format "-*%s *-" prompt) 'face 'grizzl-prompt-face)
(propertize " "
'face 'modeline-inactive
'face 'grizzl-prompt-face
'display `(space :align-to (- right
,(1+ (length match-info)))))
(propertize match-info 'face 'modeline-inactive))))
(propertize match-info 'face 'grizzl-prompt-face))))
(defun grizzl-current-selection ()
"Get the currently selected index in `grizzl-completing-read'."

View File

@ -1,108 +0,0 @@
;;; helm-plugin.el --- Helm plugins -*- lexical-binding: t -*-
;; Copyright (C) 2012 ~ 2016 Thierry Volpiatto <thierry.volpiatto@gmail.com>
;; 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 this program. If not, see <http://www.gnu.org/licenses/>.
;;; Code:
(require 'cl-lib)
(require 'helm)
(require 'helm-utils)
;;; Plug-in: `info-index'
;;
;;
(defun helm-make-info-source (source file)
`(,@source
(name . ,(concat "Info Index: " file))
(info-file . ,file)
(init . helm-info-init)
(display-to-real . helm-info-display-to-real)
(get-line . buffer-substring)
(candidates-in-buffer)
(action ("Goto node" . helm-info-goto))))
(defun helm-compile-source--info-index (source)
(helm-aif (helm-interpret-value (assoc-default 'info-index source))
(helm-make-info-source source it)
source))
(add-to-list 'helm-compile-source-functions 'helm-compile-source--info-index)
;;; Plug-in: `candidates-file'
;;
;; List all lines in a file.
(defun helm-compile-source--candidates-file (source)
(if (assoc-default 'candidates-file source)
`((init helm-p-candidates-file-init
,@(let ((orig-init (assoc-default 'init source)))
(cond ((null orig-init) nil)
((functionp orig-init) (list orig-init))
(t orig-init))))
(candidates-in-buffer)
,@source)
source))
(add-to-list 'helm-compile-source-functions 'helm-compile-source--candidates-file)
(defun helm-p-candidates-file-init ()
(cl-destructuring-bind (file &optional updating)
(helm-mklist (helm-attr 'candidates-file))
(setq file (helm-interpret-value file))
(with-current-buffer (helm-candidate-buffer 'global)
(insert-file-contents file)
(when updating
(buffer-disable-undo)
(font-lock-mode -1)
(auto-revert-mode 1)))))
;;; Plug-in: `persistent-help'
;;
;; Add help about persistent action in `helm-buffer' header.
(defun helm-compile-source--persistent-help (source)
(if (assoc 'header-line source)
source
(append source '((header-line . helm-persistent-help-string)))))
(add-to-list 'helm-compile-source-functions 'helm-compile-source--persistent-help)
(defun helm-persistent-help-string ()
(substitute-command-keys
(concat "\\<helm-map>\\[helm-execute-persistent-action]: "
(or (helm-interpret-value (helm-attr 'persistent-help))
(helm-aif (or (assoc-default
'persistent-action
(helm-get-current-source))
(assoc-default
'action (helm-get-current-source)))
(cond ((symbolp it)
(symbol-name it))
((listp it)
(or (ignore-errors (caar it)) ""))))
"")
" (keeping session)")))
(provide 'helm-plugin)
;; Local Variables:
;; byte-compile-warnings: (not cl-functions obsolete)
;; coding: utf-8
;; indent-tabs-mode: nil
;; End:
;;; helm-plugin ends here

View File

@ -1,15 +1,16 @@
;;; helm-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (or (file-name-directory #$) (car load-path)))
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "helm-adaptive" "helm-adaptive.el" (22404 60264
;;;;;; 321872 842000))
;;;### (autoloads nil "helm-adaptive" "helm-adaptive.el" (22454 5322
;;;;;; 428259 677000))
;;; Generated autoloads from helm-adaptive.el
(defvar helm-adaptive-mode nil "\
Non-nil if Helm-Adaptive mode is enabled.
See the command `helm-adaptive-mode' for a description of this minor mode.
See the `helm-adaptive-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `helm-adaptive-mode'.")
@ -29,8 +30,8 @@ Useful when you have a old or corrupted `helm-adaptive-history-file'.
;;;***
;;;### (autoloads nil "helm-apt" "helm-apt.el" (22404 60264 293872
;;;;;; 696000))
;;;### (autoloads nil "helm-apt" "helm-apt.el" (22454 5322 190254
;;;;;; 80000))
;;; Generated autoloads from helm-apt.el
(autoload 'helm-apt "helm-apt" "\
@ -41,8 +42,8 @@ With a prefix arg reload cache.
;;;***
;;;### (autoloads nil "helm-bookmark" "helm-bookmark.el" (22404 60264
;;;;;; 389873 198000))
;;;### (autoloads nil "helm-bookmark" "helm-bookmark.el" (22454 5322
;;;;;; 866269 976000))
;;; Generated autoloads from helm-bookmark.el
(autoload 'helm-bookmarks "helm-bookmark" "\
@ -59,8 +60,8 @@ only if external library addressbook-bookmark.el is available.
;;;***
;;;### (autoloads nil "helm-buffers" "helm-buffers.el" (22404 60264
;;;;;; 281872 633000))
;;;### (autoloads nil "helm-buffers" "helm-buffers.el" (22454 5322
;;;;;; 122252 481000))
;;; Generated autoloads from helm-buffers.el
(autoload 'helm-buffers-list "helm-buffers" "\
@ -75,8 +76,8 @@ Preconfigured `helm' lightweight version (buffer -> recentf).
;;;***
;;;### (autoloads nil "helm-color" "helm-color.el" (22404 60264 373873
;;;;;; 114000))
;;;### (autoloads nil "helm-color" "helm-color.el" (22454 5322 731266
;;;;;; 803000))
;;; Generated autoloads from helm-color.el
(autoload 'helm-colors "helm-color" "\
@ -86,8 +87,8 @@ Preconfigured `helm' for color.
;;;***
;;;### (autoloads nil "helm-command" "helm-command.el" (22404 60264
;;;;;; 229872 361000))
;;;### (autoloads nil "helm-command" "helm-command.el" (22454 5321
;;;;;; 795244 793000))
;;; Generated autoloads from helm-command.el
(autoload 'helm-M-x "helm-command" "\
@ -105,8 +106,8 @@ You can get help on each command by persistent action.
;;;***
;;;### (autoloads nil "helm-config" "helm-config.el" (22404 60264
;;;;;; 385873 177000))
;;;### (autoloads nil "helm-config" "helm-config.el" (22454 5322
;;;;;; 821268 918000))
;;; Generated autoloads from helm-config.el
(autoload 'helm-configuration "helm-config" "\
@ -116,8 +117,8 @@ Customize `helm'.
;;;***
;;;### (autoloads nil "helm-dabbrev" "helm-dabbrev.el" (22404 60264
;;;;;; 301872 738000))
;;;### (autoloads nil "helm-dabbrev" "helm-dabbrev.el" (22454 5322
;;;;;; 257255 656000))
;;; Generated autoloads from helm-dabbrev.el
(autoload 'helm-dabbrev "helm-dabbrev" "\
@ -127,8 +128,8 @@ Preconfigured helm for dynamic abbreviations.
;;;***
;;;### (autoloads nil "helm-elisp" "helm-elisp.el" (22404 60264 381873
;;;;;; 156000))
;;;### (autoloads nil "helm-elisp" "helm-elisp.el" (22454 5322 777267
;;;;;; 884000))
;;; Generated autoloads from helm-elisp.el
(autoload 'helm-lisp-completion-at-point "helm-elisp" "\
@ -182,7 +183,7 @@ Preconfigured helm for complex command history.
;;;***
;;;### (autoloads nil "helm-elisp-package" "helm-elisp-package.el"
;;;;;; (22404 60264 237872 403000))
;;;;;; (22454 5321 829245 592000))
;;; Generated autoloads from helm-elisp-package.el
(autoload 'helm-list-elisp-packages "helm-elisp-package" "\
@ -198,8 +199,8 @@ Same as `helm-list-elisp-packages' but don't fetch packages on remote.
;;;***
;;;### (autoloads nil "helm-elscreen" "helm-elscreen.el" (22404 60264
;;;;;; 217872 298000))
;;;### (autoloads nil "helm-elscreen" "helm-elscreen.el" (22454 5321
;;;;;; 728243 218000))
;;; Generated autoloads from helm-elscreen.el
(autoload 'helm-elscreen "helm-elscreen" "\
@ -214,8 +215,8 @@ Preconfigured helm to list elscreen in history order.
;;;***
;;;### (autoloads nil "helm-eshell" "helm-eshell.el" (22404 60264
;;;;;; 249872 465000))
;;;### (autoloads nil "helm-eshell" "helm-eshell.el" (22454 5321
;;;;;; 942248 250000))
;;; Generated autoloads from helm-eshell.el
(autoload 'helm-esh-pcomplete "helm-eshell" "\
@ -230,8 +231,8 @@ Preconfigured helm for eshell history.
;;;***
;;;### (autoloads nil "helm-eval" "helm-eval.el" (22404 60264 345872
;;;;;; 967000))
;;;### (autoloads nil "helm-eval" "helm-eval.el" (22454 5322 518261
;;;;;; 793000))
;;; Generated autoloads from helm-eval.el
(autoload 'helm-eval-expression "helm-eval" "\
@ -251,8 +252,8 @@ Preconfigured helm for `helm-source-calculation-result'.
;;;***
;;;### (autoloads nil "helm-external" "helm-external.el" (22404 60264
;;;;;; 197872 194000))
;;;### (autoloads nil "helm-external" "helm-external.el" (22454 5321
;;;;;; 638241 101000))
;;; Generated autoloads from helm-external.el
(autoload 'helm-run-external-command "helm-external" "\
@ -265,10 +266,15 @@ You can set your own list of commands with
;;;***
;;;### (autoloads nil "helm-files" "helm-files.el" (22404 60264 305872
;;;;;; 759000))
;;;### (autoloads nil "helm-files" "helm-files.el" (22454 5322 291256
;;;;;; 455000))
;;; Generated autoloads from helm-files.el
(autoload 'helm-projects-history "helm-files" "\
\(fn)" t nil)
(autoload 'helm-browse-project "helm-files" "\
Preconfigured helm to browse projects.
Browse files and see status of project with its vcs.
@ -339,8 +345,8 @@ Preconfigured `helm' for `recentf'.
;;;***
;;;### (autoloads nil "helm-font" "helm-font.el" (22404 60264 257872
;;;;;; 507000))
;;;### (autoloads nil "helm-font" "helm-font.el" (22454 5321 987249
;;;;;; 307000))
;;; Generated autoloads from helm-font.el
(autoload 'helm-select-xfont "helm-font" "\
@ -355,8 +361,8 @@ Preconfigured helm for `ucs-names' math symbols.
;;;***
;;;### (autoloads nil "helm-grep" "helm-grep.el" (22404 60264 397873
;;;;;; 239000))
;;;### (autoloads nil "helm-grep" "helm-grep.el" (22454 5322 912271
;;;;;; 58000))
;;; Generated autoloads from helm-grep.el
(autoload 'helm-goto-precedent-file "helm-grep" "\
@ -383,8 +389,8 @@ With a prefix arg ARG git-grep the whole repository.
;;;***
;;;### (autoloads nil "helm-help" "helm-help.el" (22404 60264 193872
;;;;;; 173000))
;;;### (autoloads nil "helm-help" "helm-help.el" (22454 5321 593240
;;;;;; 43000))
;;; Generated autoloads from helm-help.el
(autoload 'helm-documentation "helm-help" "\
@ -404,8 +410,8 @@ String displayed in mode-line in `helm-source-find-files'.")
;;;***
;;;### (autoloads nil "helm-id-utils" "helm-id-utils.el" (22404 60264
;;;;;; 285872 654000))
;;;### (autoloads nil "helm-id-utils" "helm-id-utils.el" (22454 5322
;;;;;; 156253 281000))
;;; Generated autoloads from helm-id-utils.el
(autoload 'helm-gid "helm-id-utils" "\
@ -419,8 +425,8 @@ See <https://www.gnu.org/software/idutils/>.
;;;***
;;;### (autoloads nil "helm-imenu" "helm-imenu.el" (22404 60264 273872
;;;;;; 591000))
;;;### (autoloads nil "helm-imenu" "helm-imenu.el" (22454 5322 54250
;;;;;; 883000))
;;; Generated autoloads from helm-imenu.el
(autoload 'helm-imenu "helm-imenu" "\
@ -437,8 +443,8 @@ or it have an association in `helm-imenu-all-buffer-assoc'.
;;;***
;;;### (autoloads nil "helm-info" "helm-info.el" (22404 60264 261872
;;;;;; 528000))
;;;### (autoloads nil "helm-info" "helm-info.el" (22454 5322 20250
;;;;;; 83000))
;;; Generated autoloads from helm-info.el
(autoload 'helm-info "helm-info" "\
@ -454,8 +460,8 @@ With a prefix-arg insert symbol at point.
;;;***
;;;### (autoloads nil "helm-locate" "helm-locate.el" (22404 60264
;;;;;; 209872 256000))
;;;### (autoloads nil "helm-locate" "helm-locate.el" (22454 5321
;;;;;; 683242 159000))
;;; Generated autoloads from helm-locate.el
(autoload 'helm-projects-find-files "helm-locate" "\
@ -482,8 +488,8 @@ Where db_path is a filename matched by
;;;***
;;;### (autoloads nil "helm-man" "helm-man.el" (22404 60264 349872
;;;;;; 988000))
;;;### (autoloads nil "helm-man" "helm-man.el" (22454 5322 563262
;;;;;; 851000))
;;; Generated autoloads from helm-man.el
(autoload 'helm-man-woman "helm-man" "\
@ -494,8 +500,8 @@ With a prefix arg reinitialize the cache.
;;;***
;;;### (autoloads nil "helm-misc" "helm-misc.el" (22404 60264 317872
;;;;;; 821000))
;;;### (autoloads nil "helm-misc" "helm-misc.el" (22454 5322 383258
;;;;;; 619000))
;;; Generated autoloads from helm-misc.el
(autoload 'helm-browse-menubar "helm-misc" "\
@ -536,8 +542,8 @@ Preconfigured `helm' that provide completion of `comint' history.
;;;***
;;;### (autoloads nil "helm-mode" "helm-mode.el" (22404 60264 185872
;;;;;; 131000))
;;;### (autoloads nil "helm-mode" "helm-mode.el" (22454 5321 482237
;;;;;; 433000))
;;; Generated autoloads from helm-mode.el
(autoload 'helm-comp-read "helm-mode" "\
@ -625,13 +631,16 @@ Keys description:
`helm-source-in-buffer' which is much faster.
Argument VOLATILE have no effect when CANDIDATES-IN-BUFFER is non--nil.
- MATCH-PART: Allow matching only one part of candidate.
See match-part documentation in `helm-source'.
Any prefix args passed during `helm-comp-read' invocation will be recorded
in `helm-current-prefix-arg', otherwise if prefix args were given before
`helm-comp-read' invocation, the value of `current-prefix-arg' will be used.
That's mean you can pass prefix args before or after calling a command
that use `helm-comp-read' See `helm-M-x' for example.
\(fn PROMPT COLLECTION &key TEST INITIAL-INPUT DEFAULT PRESELECT (buffer \"*Helm Completions*\") MUST-MATCH FUZZY REVERSE-HISTORY (requires-pattern 0) HISTORY INPUT-HISTORY (case-fold helm-comp-read-case-fold-search) (del-input t) (persistent-action nil) (persistent-help \"DoNothing\") (mode-line helm-comp-read-mode-line) HELP-MESSAGE (keymap helm-comp-read-map) (name \"Helm Completions\") CANDIDATES-IN-BUFFER EXEC-WHEN-ONLY-ONE QUIT-WHEN-NO-CAND (volatile t) SORT (fc-transformer (quote helm-cr-default-transformer)) HIST-FC-TRANSFORMER MARKED-CANDIDATES NOMARK (alistp t) (candidate-number-limit helm-candidate-number-limit))" nil nil)
\(fn PROMPT COLLECTION &key TEST INITIAL-INPUT DEFAULT PRESELECT (BUFFER \"*Helm Completions*\") MUST-MATCH FUZZY REVERSE-HISTORY (REQUIRES-PATTERN 0) HISTORY INPUT-HISTORY (CASE-FOLD helm-comp-read-case-fold-search) (DEL-INPUT t) (PERSISTENT-ACTION nil) (PERSISTENT-HELP \"DoNothing\") (MODE-LINE helm-comp-read-mode-line) HELP-MESSAGE (KEYMAP helm-comp-read-map) (NAME \"Helm Completions\") CANDIDATES-IN-BUFFER MATCH-PART EXEC-WHEN-ONLY-ONE QUIT-WHEN-NO-CAND (VOLATILE t) SORT (FC-TRANSFORMER \\='helm-cr-default-transformer) HIST-FC-TRANSFORMER MARKED-CANDIDATES NOMARK (ALISTP t) (CANDIDATE-NUMBER-LIMIT helm-candidate-number-limit))" nil nil)
(autoload 'helm-read-file-name "helm-mode" "\
Read a file name with helm completion.
@ -669,11 +678,12 @@ Keys description:
- MODE-LINE: A mode line message, default is `helm-read-file-name-mode-line-string'.
\(fn PROMPT &key (name \"Read File Name\") (initial-input default-directory) (buffer \"*Helm file completions*\") TEST (case-fold helm-file-name-case-fold-search) PRESELECT HISTORY MUST-MATCH DEFAULT MARKED-CANDIDATES (candidate-number-limit helm-ff-candidate-number-limit) NOMARK (alistp t) (persistent-action (quote helm-find-files-persistent-action)) (persistent-help \"Hit1 Expand Candidate, Hit2 or (C-u) Find file\") (mode-line helm-read-file-name-mode-line-string))" nil nil)
\(fn PROMPT &key (NAME \"Read File Name\") (INITIAL-INPUT default-directory) (BUFFER \"*Helm file completions*\") TEST (CASE-FOLD helm-file-name-case-fold-search) PRESELECT HISTORY MUST-MATCH DEFAULT MARKED-CANDIDATES (CANDIDATE-NUMBER-LIMIT helm-ff-candidate-number-limit) NOMARK (ALISTP t) (PERSISTENT-ACTION \\='helm-find-files-persistent-action) (PERSISTENT-HELP \"Hit1 Expand Candidate, Hit2 or (C-u) Find file\") (MODE-LINE helm-read-file-name-mode-line-string))" nil nil)
(defvar helm-mode nil "\
Non-nil if Helm mode is enabled.
See the command `helm-mode' for a description of this minor mode.
See the `helm-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `helm-mode'.")
@ -704,8 +714,8 @@ Note: This mode is incompatible with Emacs23.
;;;***
;;;### (autoloads nil "helm-net" "helm-net.el" (22404 60264 369873
;;;;;; 93000))
;;;### (autoloads nil "helm-net" "helm-net.el" (22454 5322 686265
;;;;;; 744000))
;;; Generated autoloads from helm-net.el
(autoload 'helm-surfraw "helm-net" "\
@ -725,8 +735,8 @@ Preconfigured `helm' for Wikipedia lookup with Wikipedia suggest.
;;;***
;;;### (autoloads nil "helm-org" "helm-org.el" (22404 60264 401873
;;;;;; 260000))
;;;### (autoloads nil "helm-org" "helm-org.el" (22454 5322 957272
;;;;;; 116000))
;;; Generated autoloads from helm-org.el
(autoload 'helm-org-agenda-files-headings "helm-org" "\
@ -757,8 +767,8 @@ Preconfigured helm for org templates.
;;;***
;;;### (autoloads nil "helm-regexp" "helm-regexp.el" (22404 60264
;;;;;; 361873 51000))
;;;### (autoloads nil "helm-regexp" "helm-regexp.el" (22454 5322
;;;;;; 642264 709000))
;;; Generated autoloads from helm-regexp.el
(autoload 'helm-moccur-mode "helm-regexp" "\
@ -797,13 +807,14 @@ The prefix arg can be set before calling
;;;***
;;;### (autoloads nil "helm-ring" "helm-ring.el" (22404 60264 189872
;;;;;; 152000))
;;;### (autoloads nil "helm-ring" "helm-ring.el" (22454 5321 548238
;;;;;; 985000))
;;; Generated autoloads from helm-ring.el
(defvar helm-push-mark-mode nil "\
Non-nil if Helm-Push-Mark mode is enabled.
See the command `helm-push-mark-mode' for a description of this minor mode.
See the `helm-push-mark-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `helm-push-mark-mode'.")
@ -855,8 +866,8 @@ This command is useful when used with persistent action.
;;;***
;;;### (autoloads nil "helm-semantic" "helm-semantic.el" (22404 60264
;;;;;; 277872 612000))
;;;### (autoloads nil "helm-semantic" "helm-semantic.el" (22454 5322
;;;;;; 88251 682000))
;;; Generated autoloads from helm-semantic.el
(autoload 'helm-semantic "helm-semantic" "\
@ -878,13 +889,14 @@ Fill in the symbol at point by default.
;;;***
;;;### (autoloads nil "helm-sys" "helm-sys.el" (22404 60264 297872
;;;;;; 717000))
;;;### (autoloads nil "helm-sys" "helm-sys.el" (22454 5322 223254
;;;;;; 856000))
;;; Generated autoloads from helm-sys.el
(defvar helm-top-poll-mode nil "\
Non-nil if Helm-Top-Poll mode is enabled.
See the command `helm-top-poll-mode' for a description of this minor mode.
See the `helm-top-poll-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `helm-top-poll-mode'.")
@ -913,8 +925,8 @@ Preconfigured helm for xrandr.
;;;***
;;;### (autoloads nil "helm-tags" "helm-tags.el" (22404 60264 245872
;;;;;; 444000))
;;;### (autoloads nil "helm-tags" "helm-tags.el" (22454 5321 897247
;;;;;; 191000))
;;; Generated autoloads from helm-tags.el
(autoload 'helm-etags-select "helm-tags" "\
@ -933,13 +945,14 @@ This function aggregates three sources of tag files:
;;;***
;;;### (autoloads nil "helm-utils" "helm-utils.el" (22404 60264 221872
;;;;;; 319000))
;;;### (autoloads nil "helm-utils" "helm-utils.el" (22454 5321 761243
;;;;;; 994000))
;;; Generated autoloads from helm-utils.el
(defvar helm-popup-tip-mode nil "\
Non-nil if Helm-Popup-Tip mode is enabled.
See the command `helm-popup-tip-mode' for a description of this minor mode.
See the `helm-popup-tip-mode' command
for a description of this minor mode.
Setting this variable directly does not take effect;
either customize it (see the info node `Easy Customization')
or call the function `helm-popup-tip-mode'.")
@ -954,8 +967,7 @@ Show help-echo informations in a popup tip at end of line.
;;;***
;;;### (autoloads nil nil ("helm-easymenu.el" "helm-multi-match.el"
;;;;;; "helm-pkg.el" "helm-plugin.el" "helm-types.el") (22404 60264
;;;;;; 421892 158000))
;;;;;; "helm-pkg.el" "helm-types.el") (22454 5323 1273 151000))
;;;***

View File

@ -480,6 +480,7 @@ than `w3m-browse-url' use it."
(defclass helm-bookmark-overwrite-inheritor (helm-source) ())
(defmethod helm--setup-source ((source helm-bookmark-overwrite-inheritor))
(call-next-method)
(setf (slot-value source 'action)
(helm-append-at-nth
(remove '("Jump to BM other window" . helm-bookmark-jump-other-window)

View File

@ -23,7 +23,6 @@
(require 'helm-utils)
(require 'helm-elscreen)
(require 'helm-grep)
(require 'helm-plugin)
(require 'helm-regexp)
(require 'helm-help)
@ -213,7 +212,7 @@ Only buffer names are fuzzy matched when this is enabled,
" A function with no arguments to create buffer list.")
(init :initform 'helm-buffers-list--init)
(candidates :initform helm-buffers-list-cache)
(matchplugin :initform nil)
(multimatch :initform nil)
(match :initform 'helm-buffers-match-function)
(persistent-action :initform 'helm-buffers-list-persistent-action)
(resume :initform (lambda ()
@ -224,6 +223,7 @@ Only buffer names are fuzzy matched when this is enabled,
(keymap :initform helm-buffer-map)
(migemo :initform 'nomultimatch)
(volatile :initform t)
(resume :initform (lambda () (setq helm-buffers-in-project-p nil)))
(help-message :initform 'helm-buffer-help-message)
(persistent-help
:initform
@ -660,9 +660,10 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
(defun helm-kill-marked-buffers (_ignore)
(let* ((bufs (helm-marked-candidates))
(killed-bufs (cl-count-if 'kill-buffer bufs)))
(with-helm-buffer
(setq helm-marked-candidates nil
helm-visible-mark-overlays nil))
(when (buffer-live-p helm-buffer)
(with-helm-buffer
(setq helm-marked-candidates nil
helm-visible-mark-overlays nil)))
(message "Killed %s buffer(s)" killed-bufs)))
(defun helm-buffer-run-kill-buffers ()
@ -735,17 +736,21 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
(helm-exit-and-execute-action 'helm-ediff-marked-buffers-merge)))
(put 'helm-buffer-run-ediff-merge 'helm-only t)
(defun helm-buffers-persistent-kill-1 (buffer)
(defun helm-buffers-persistent-kill-1 (buffer-or-name)
"Persistent action to kill buffer."
(if (eql (get-buffer buffer) (get-buffer helm-current-buffer))
(progn
(message "Can't kill `helm-current-buffer' without quitting session")
(sit-for 1))
(with-current-buffer (get-buffer buffer)
(kill-buffer buffer))
(helm-delete-current-selection)
(with-helm-temp-hook 'helm-after-persistent-action-hook
(helm-force-update (regexp-quote (helm-get-selection nil t))))))
(let ((buf (get-buffer buffer-or-name)) helm-buf-or-cur)
(if (or (and (eql buf (get-buffer helm-current-buffer))
(setq helm-buf-or-cur "helm-current-buffer"))
(and (eql buf (get-buffer helm-buffer))
(setq helm-buf-or-cur "helm-buffer")))
(progn
(message "Can't kill `%s' without quitting session" helm-buf-or-cur)
(sit-for 1))
(with-current-buffer buf
(kill-buffer buffer-or-name))
(helm-delete-current-selection)
(with-helm-temp-hook 'helm-after-persistent-action-hook
(helm-force-update (regexp-quote (helm-get-selection nil t)))))))
(defun helm-buffers--quote-truncated-buffer (buffer)
(let ((bufname (and (bufferp buffer)
@ -765,9 +770,11 @@ If REGEXP-FLAG is given use `query-replace-regexp'."
do (progn (helm-preselect
(format "^%s"
(helm-buffers--quote-truncated-buffer b)))
(when (y-or-n-p (format "kill buffer (%s)? " b))
(helm-buffers-persistent-kill-1 b))
(message nil)))
(save-selected-window
(when (y-or-n-p (format "kill buffer (%s)? " b))
(helm-buffers-persistent-kill-1 b)))
(message nil)
(helm--remove-marked-and-update-mode-line b)))
(with-helm-buffer
(setq helm-marked-candidates nil
helm-visible-mark-overlays nil))
@ -836,12 +843,12 @@ Can be used by any source that list buffers."
(cons 'helm-skip-boring-buffers
(remove 'helm-shadow-boring-buffers
filter-attrs))
helm-source-buffers-list t)
helm-source-buffers-list)
(helm-attrset 'filtered-candidate-transformer
(cons 'helm-shadow-boring-buffers
(remove 'helm-skip-boring-buffers
filter-attrs))
helm-source-buffers-list t))
helm-source-buffers-list))
(helm-force-update))))
(put 'helm-buffers-toggle-show-hidden-buffers 'helm-only t)

View File

@ -240,6 +240,7 @@ than the default which is OBARRAY."
:help-message 'helm-M-x-help-message
:keymap helm-M-x-map
:must-match t
:match-part (lambda (c) (car (split-string c)))
:fuzzy helm-M-x-fuzzy-match
:nomark t
:candidates-in-buffer t

View File

@ -59,6 +59,7 @@
;; properly (empty buffer) when called from lisp
;; with 'no-fetch (emacs-25 WA).
(package-show-package-list)
(when helm--force-updating-p (message "Refreshing packages list..."))
(list-packages helm-el-package--initialized-p))
(setq helm-el-package--initialized-p t)
(message nil))
@ -68,7 +69,7 @@
(setq helm-el-package--tabulated-list tabulated-list-entries)
(buffer-string)))
(setq helm-el-package--upgrades (helm-el-package-menu--find-upgrades))
(if helm-force-updating-p
(if helm--force-updating-p
(if helm-el-package--upgrades
(message "%d package(s) can be upgraded, Refreshing packages list done"
(length helm-el-package--upgrades))
@ -256,7 +257,11 @@
for name = (if (fboundp 'package-desc-name)
(and id (package-desc-name id))
(car id))
for installed-p = (assq name package-alist)
for desc = (package-desc-status id)
for built-in-p = (and (package-built-in-p name)
(not (member desc '("available" "new"
"installed" "dependency"))))
for installed-p = (member desc '("installed" "dependency"))
for upgrade-p = (assq name helm-el-package--upgrades)
for user-installed-p = (and (boundp 'package-selected-packages)
(memq name package-selected-packages))
@ -267,15 +272,25 @@
2 (+ (length (symbol-name name)) 2)
'face 'font-lock-variable-name-face c))
for cand = (cons c (car (split-string c)))
when (or (and upgrade-p
when (or (and built-in-p
(eq helm-el-package--show-only 'built-in))
(and upgrade-p
(eq helm-el-package--show-only 'upgrade))
(and installed-p
(eq helm-el-package--show-only 'installed))
(and (not installed-p)
(eq helm-el-package--show-only 'uninstalled))
(not built-in-p)
(eq helm-el-package--show-only 'uninstalled))
(eq helm-el-package--show-only 'all))
collect cand))
(defun helm-el-package-show-built-in ()
(interactive)
(with-helm-alive-p
(setq helm-el-package--show-only 'built-in)
(helm-update)))
(put 'helm-el-package-show-built-in 'helm-only t)
(defun helm-el-package-show-upgrade ()
(interactive)
(with-helm-alive-p
@ -310,6 +325,7 @@
(define-key map (kbd "M-I") 'helm-el-package-show-installed)
(define-key map (kbd "M-O") 'helm-el-package-show-uninstalled)
(define-key map (kbd "M-U") 'helm-el-package-show-upgrade)
(define-key map (kbd "M-B") 'helm-el-package-show-built-in)
(define-key map (kbd "M-A") 'helm-el-package-show-all)
(define-key map (kbd "C-c i") 'helm-el-run-package-install)
(define-key map (kbd "C-c r") 'helm-el-run-package-reinstall)
@ -333,14 +349,18 @@
("Visit homepage" . helm-el-package-visit-homepage)))))
(defun helm-el-package--action-transformer (actions candidate)
(let* ((pkg-desc (get-text-property
0 'tabulated-list-id candidate))
(let* ((pkg-desc (get-text-property 0 'tabulated-list-id candidate))
(status (package-desc-status pkg-desc))
(pkg-name (package-desc-name pkg-desc))
(built-in (and (package-built-in-p pkg-name)
(not (member status '("available" "new"
"installed" "dependency")))))
(acts (if helm-el-package--upgrades
(append actions '(("Upgrade all packages"
. helm-el-package-upgrade-all-action)))
actions)))
(cond ((and (package-installed-p pkg-name)
(cond (built-in '(("Describe package" . helm-el-package-describe)))
((and (package-installed-p pkg-name)
(cdr (assq pkg-name helm-el-package--upgrades)))
(append '(("Upgrade package(s)" . helm-el-package-upgrade)
("Uninstall package(s)" . helm-el-package-uninstall)) acts))

View File

@ -304,6 +304,7 @@ Return a cons \(beg . end\)."
:data helm-lisp-completion--cache
:persistent-action 'helm-lisp-completion-persistent-action
:nomark t
:match-part (lambda (c) (car (split-string c)))
:fuzzy-match helm-lisp-fuzzy-completion
:persistent-help (helm-lisp-completion-persistent-help)
:filtered-candidate-transformer
@ -673,13 +674,13 @@ i.e the `symbol-name' of any existing symbol."
;;
;;
(defvar helm-source-advice
'((name . "Function Advice")
(candidates . helm-advice-candidates)
(action ("Toggle Enable/Disable" . helm-advice-toggle))
(persistent-action . helm-advice-persistent-action)
(nomark)
(multiline)
(persistent-help . "Describe function / C-u C-j: Toggle advice")))
(helm-build-sync-source "Function Advice"
:candidates 'helm-advice-candidates
:action (helm-make-actions "Toggle Enable/Disable" 'helm-advice-toggle)
:persistent-action 'helm-advice-persistent-action
:nomark t
:multiline t
:persistent-help "Describe function / C-u C-j: Toggle advice"))
(defun helm-advice-candidates ()
(cl-loop for (fname) in ad-advised-functions

View File

@ -260,6 +260,14 @@ see `helm-ff-guess-ffap-filenames' for this."
:group 'helm-files
:type 'boolean)
(defcustom helm-find-file-ignore-thing-at-point nil
"Use only `default-directory' as default input in `helm-find-files'.
I.e text under cursor in `current-buffer' is ignored.
Note that when non-nil you will be unable to complete filename at point
in `current-buffer'."
:group 'helm-files
:type 'boolean)
(defcustom helm-substitute-in-filename-stay-on-remote nil
"Don't switch back to local filesystem when expanding pattern with / or ~/."
:group 'helm-files
@ -2061,7 +2069,8 @@ Note that only existing directories are saved here."
(helm-delete-file
c helm-ff-signal-error-on-dot-files 'synchro)
(helm-delete-current-selection)
(message nil)))))
(message nil)
(helm--remove-marked-and-update-mode-line c)))))
(with-helm-buffer
(setq helm-marked-candidates nil
helm-visible-mark-overlays nil))
@ -3216,6 +3225,19 @@ Set `recentf-max-saved-items' to a bigger value if default is too small.")
:ff-transformer-show-only-basename nil
:buffer "*helm browse project*"))
(defvar helm-browse-project-history nil)
;;;###autoload
(defun helm-projects-history ()
(interactive)
(helm :sources
(helm-build-sync-source "Project history"
:candidates helm-browse-project-history
:action (lambda (candidate)
(with-helm-default-directory candidate
(helm-browse-project nil))))
:buffer "*helm browse project history*"))
;;;###autoload
(defun helm-browse-project (arg)
"Preconfigured helm to browse projects.
@ -3241,24 +3263,31 @@ and
helm-type-buffer-actions)
helm-type-buffer-actions))
(helm-buffers-in-project-p t))
(cond ((and (require 'helm-ls-git nil t)
(fboundp 'helm-ls-git-root-dir)
(helm-ls-git-root-dir))
(helm-ls-git-ls))
((and (require 'helm-ls-hg nil t)
(fboundp 'helm-hg-root)
(helm-hg-root))
(helm-hg-find-files-in-project))
((and (require 'helm-ls-svn nil t)
(fboundp 'helm-ls-svn-root-dir)
(helm-ls-svn-root-dir))
(helm-ls-svn-ls))
(t (let ((cur-dir (helm-browse-project-get--root-dir
(helm-current-directory))))
(if (or arg (gethash cur-dir helm--browse-project-cache))
(helm-browse-project-find-files cur-dir (equal arg '(16)))
(helm :sources (helm-browse-project-build-buffers-source cur-dir)
:buffer "*helm browse project*")))))))
(cl-flet ((push-to-hist (root)
(setq helm-browse-project-history
(cons root (delete root helm-browse-project-history)))))
(helm-acond ((and (require 'helm-ls-git nil t)
(fboundp 'helm-ls-git-root-dir)
(helm-ls-git-root-dir))
(push-to-hist it)
(helm-ls-git-ls))
((and (require 'helm-ls-hg nil t)
(fboundp 'helm-hg-root)
(helm-hg-root))
(push-to-hist it)
(helm-hg-find-files-in-project))
((and (require 'helm-ls-svn nil t)
(fboundp 'helm-ls-svn-root-dir)
(helm-ls-svn-root-dir))
(push-to-hist it)
(helm-ls-svn-ls))
((helm-browse-project-get--root-dir (helm-current-directory))
(if (or arg (gethash it helm--browse-project-cache))
(progn
(push-to-hist it)
(helm-browse-project-find-files it (equal arg '(16))))
(helm :sources (helm-browse-project-build-buffers-source it)
:buffer "*helm browse project*")))))))
(defun helm-browse-project-get--root-dir (directory)
(cl-loop with dname = (file-name-as-directory directory)
@ -3576,22 +3605,25 @@ Don't call it from programs, use `helm-find-files-1' instead.
This is the starting point for nearly all actions you can do on files."
(interactive "P")
(let* ((hist (and arg helm-ff-history (helm-find-files-history)))
(default-input (or hist (helm-find-files-initial-input)))
(input (cond ((and (eq major-mode 'org-agenda-mode)
(smart-input (or hist (helm-find-files-initial-input)))
(default-input (expand-file-name (helm-current-directory)))
(input (cond (helm-find-file-ignore-thing-at-point
default-input)
((and (eq major-mode 'org-agenda-mode)
org-directory
(not default-input))
(not smart-input))
(expand-file-name org-directory))
((and (eq major-mode 'dired-mode) default-input)
(file-name-directory default-input))
((and (not (string= default-input ""))
default-input))
(t (expand-file-name (helm-current-directory)))))
((and (eq major-mode 'dired-mode) smart-input)
(file-name-directory smart-input))
((and (not (string= smart-input ""))
smart-input))
(t default-input)))
(input-as-presel (null (nth 0 (file-attributes input))))
(presel (helm-aif (or hist
(and input-as-presel input)
(buffer-file-name (current-buffer))
(and (eq major-mode 'dired-mode)
default-input))
smart-input))
(if helm-ff-transformer-show-only-basename
(helm-basename it) it))))
(set-text-properties 0 (length input) nil input)

Some files were not shown because too many files have changed in this diff Show More