Add new packages installed

This commit is contained in:
Mateus Pinto Rodrigues
2018-03-27 20:52:59 -03:00
parent e684741609
commit 2362e805bd
1493 changed files with 172412 additions and 4636 deletions

View File

@@ -0,0 +1,121 @@
;;; colir.el --- Color blending library -*- lexical-binding: t -*-
;; Copyright (C) 2015-2017 Free Software Foundation, Inc.
;; Author: Oleh Krehel <ohwoeowho@gmail.com>
;; This file is part of GNU Emacs.
;; 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 3, 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.
;; For a full copy of the GNU General Public License
;; see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; This package solves the problem of adding a face with a background
;; to text which may already have a background. In all conflicting
;; areas, instead of choosing either the original or the new
;; background face, their blended sum is used.
;;
;; The blend mode functions are taken from http://en.wikipedia.org/wiki/Blend_modes.
;;; Code:
(require 'color)
(defcustom colir-compose-method #'colir-compose-alpha
"Select a method to compose two color channels."
:group 'ivy
:type '(radio (function-item colir-compose-alpha)
(function-item colir-compose-overlay)
(function-item colir-compose-soft-light)))
(defun colir-compose-soft-light (a b)
"Compose A and B channels."
(if (< b 0.5)
(+ (* 2 a b) (* a a (- 1 b b)))
(+ (* 2 a (- 1 b)) (* (sqrt a) (- (* 2 b) 1)))))
(defun colir-compose-overlay (a b)
"Compose A and B channels."
(if (< a 0.5)
(* 2 a b)
(- 1 (* 2 (- 1 a) (- 1 b)))))
(defun colir-compose-alpha (a b &optional alpha gamma)
"Compose A and B channels.
Optional argument ALPHA is a number between 0.0 and 1.0 which corresponds
to the influence of A on the result. Default value is 0.5.
Optional argument GAMMA is used for gamma correction. Default value is 2.2."
(setq alpha (or alpha 0.5))
(setq gamma (or gamma 2.2))
(+ (* (expt a gamma) alpha) (* (expt b gamma) (- 1 alpha))))
(defun colir-blend (c1 c2)
"Blend the two colors C1 and C2 using `colir-compose-method'.
C1 and C2 are triples of floats in [0.0 1.0] range."
(apply #'color-rgb-to-hex
(cl-mapcar
(if (eq (frame-parameter nil 'background-mode) 'dark)
;; this method works nicely for dark themes
'colir-compose-soft-light
colir-compose-method)
c1 c2)))
(defun colir-color-parse (color)
"Convert string COLOR to triple of floats in [0.0 1.0]."
(if (string-match "#\\([[:xdigit:]]\\{2\\}\\)\\([[:xdigit:]]\\{2\\}\\)\\([[:xdigit:]]\\{2\\}\\)" color)
(mapcar (lambda (v) (/ (string-to-number v 16) 255.0))
(list (match-string 1 color) (match-string 2 color) (match-string 3 color)))
;; does not work properly in terminal (maps color to nearest color
;; from available color palette).
(color-name-to-rgb color)))
(defun colir--blend-background (start next prevn face object)
(let ((background-prev (face-background prevn)))
(progn
(put-text-property
start next 'face
(if background-prev
(cons `(background-color
. ,(colir-blend
(colir-color-parse background-prev)
(colir-color-parse (face-background face nil t))))
prevn)
(list face prevn))
object))))
(defun colir-blend-face-background (start end face &optional object)
"Append to the face property of the text from START to END the face FACE.
When the text already has a face with a non-plain background,
blend it with the background of FACE.
Optional argument OBJECT is the string or buffer containing the text.
See also `font-lock-append-text-property'."
(let (next prev prevn)
(while (/= start end)
(setq next (next-single-property-change start 'face object end))
(setq prev (get-text-property start 'face object))
(setq prevn (if (listp prev)
(cl-find-if #'atom prev)
prev))
(cond
((or (keywordp (car-safe prev)) (consp (car-safe prev)))
(put-text-property start next 'face (cons face prev) object))
((facep prevn)
(colir--blend-background start next prevn face object))
(t
(put-text-property start next 'face face object)))
(setq start next))))
(provide 'colir)
;;; colir.el ends here

Binary file not shown.

View File

@@ -0,0 +1,18 @@
This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.

File: dir, Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
Typing "q" exits, "?" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs manual, etc.
In Emacs, you can click mouse button 2 on a menu item or cross reference
to select it.
* Menu:
Emacs
* Ivy: (ivy). Using Ivy for completion.

View File

@@ -0,0 +1,135 @@
;;; ivy-autoloads.el --- automatically extracted autoloads
;;
;;; Code:
(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path))))
;;;### (autoloads nil "ivy" "ivy.el" (23199 55714 252260 538000))
;;; Generated autoloads from ivy.el
(autoload 'ivy-resume "ivy" "\
Resume the last completion session.
\(fn)" t nil)
(autoload 'ivy-read "ivy" "\
Read a string in the minibuffer, with completion.
PROMPT is a format string, normally ending in a colon and a
space; %d anywhere in the string is replaced by the current
number of matching candidates. For the literal % character,
escape it with %%. See also `ivy-count-format'.
COLLECTION is either a list of strings, a function, an alist, or
a hash table.
PREDICATE is applied to filter out the COLLECTION immediately.
This argument is for `completing-read' compat.
When REQUIRE-MATCH is non-nil, only members of COLLECTION can be
selected, i.e. custom text.
If INITIAL-INPUT is not nil, then insert that input in the
minibuffer initially.
HISTORY is a name of a variable to hold the completion session
history.
KEYMAP is composed with `ivy-minibuffer-map'.
If PRESELECT is not nil, then select the corresponding candidate
out of the ones that match the INITIAL-INPUT.
DEF is for compatibility with `completing-read'.
UPDATE-FN is called each time the current candidate(s) is changed.
When SORT is t, use `ivy-sort-functions-alist' for sorting.
ACTION is a lambda function to call after selecting a result. It
takes a single string argument.
UNWIND is a lambda function to call before exiting.
RE-BUILDER is a lambda function to call to transform text into a
regex pattern.
MATCHER is to override matching.
DYNAMIC-COLLECTION is a boolean to specify if the list of
candidates is updated after each input by calling COLLECTION.
CALLER is a symbol to uniquely identify the caller to `ivy-read'.
It is used, along with COLLECTION, to determine which
customizations apply to the current completion session.
\(fn PROMPT COLLECTION &key PREDICATE REQUIRE-MATCH INITIAL-INPUT HISTORY PRESELECT DEF KEYMAP UPDATE-FN SORT ACTION UNWIND RE-BUILDER MATCHER DYNAMIC-COLLECTION CALLER)" nil nil)
(autoload 'ivy-completing-read "ivy" "\
Read a string in the minibuffer, with completion.
This interface conforms to `completing-read' and can be used for
`completing-read-function'.
PROMPT is a string that normally ends in a colon and a space.
COLLECTION is either a list of strings, an alist, an obarray, or a hash table.
PREDICATE limits completion to a subset of COLLECTION.
REQUIRE-MATCH is a boolean value. See `completing-read'.
INITIAL-INPUT is a string inserted into the minibuffer initially.
HISTORY is a list of previously selected inputs.
DEF is the default value.
INHERIT-INPUT-METHOD is currently ignored.
\(fn PROMPT COLLECTION &optional PREDICATE REQUIRE-MATCH INITIAL-INPUT HISTORY DEF INHERIT-INPUT-METHOD)" nil nil)
(defvar ivy-mode nil "\
Non-nil if Ivy mode is enabled.
See the `ivy-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 `ivy-mode'.")
(custom-autoload 'ivy-mode "ivy" nil)
(autoload 'ivy-mode "ivy" "\
Toggle Ivy mode on or off.
Turn Ivy mode on if ARG is positive, off otherwise.
Turning on Ivy mode sets `completing-read-function' to
`ivy-completing-read'.
Global bindings:
\\{ivy-mode-map}
Minibuffer bindings:
\\{ivy-minibuffer-map}
\(fn &optional ARG)" t nil)
(autoload 'ivy-switch-buffer "ivy" "\
Switch to another buffer.
\(fn)" t nil)
(autoload 'ivy-switch-view "ivy" "\
Switch to one of the window views stored by `ivy-push-view'.
\(fn)" t nil)
(autoload 'ivy-switch-buffer-other-window "ivy" "\
Switch to another buffer in another window.
\(fn)" t nil)
;;;***
;;;### (autoloads nil nil ("colir.el" "ivy-overlay.el" "ivy-pkg.el")
;;;;;; (23199 55714 232260 504000))
;;;***
;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; End:
;;; ivy-autoloads.el ends here

View File

@@ -0,0 +1,138 @@
* Ivy Generic Help
=ivy= is an Emacs incremental completion framework.
- Narrow the list by typing some pattern,
- Multiple patterns are allowed by separating with a space,
- Select with ~C-n~ and ~C-p~, choose with ~RET~.
** Help
- ~C-h m~ :: Pop to this generic help buffer.
** Basic Operations
*** Key bindings for navigation
- ~C-n~ (=ivy-next-line=) :: next candidate.
- ~C-p~ (=ivy-previous-line=) :: previous candidate.
- ~C-v~ (=ivy-scroll-up-command=) :: next page.
- ~M-v~ (=ivy-scroll-down-command=) :: previous page.
- ~M-<~ (=ivy-beginning-of-buffer=) :: first candidate.
- ~M->~ (=ivy-end-of-buffer=) :: last candidate.
*** Key bindings for single selection
When selecting a candidate, an action is called on it. You can think
of an action as a function that takes the selected candidate as an
argument and does something with it.
Ivy can offer several actions from which to choose. This can be
independently composed with whether you want to end completion when
the action is called. Depending on this, the short term is either
"calling an action" or "exiting with action".
~C-m~ or ~RET~ (=ivy-done=) - exit with the current action.
~M-o~ (=ivy-dispatching-done=) - select an action and exit with it.
~C-j~ (=ivy-alt-done=) - when the candidate is a directory, enter
it. Otherwise, exit with the current action.
~TAB~ (=ivy-partial-or-done=) - attempt partial completion, extending
the current input as much as possible. ~TAB TAB~ is the same as ~C-j~.
~C-M-j~ (=ivy-immediate-done=) - exit with the current action, calling
it on the /current input/ instead of the current candidate. This is
useful especially when creating new files or directories - often the
input will match an existing file, which you don't want to select.
~C-'~ (=ivy-avy=) - select a candidate from the current page with avy
and exit with the current action.
** Advanced Operations
*** Key bindings for multiple selection
For repeatedly applying multiple actions or acting on multiple
candidates, Ivy does not close the minibuffer between commands. It
keeps the minibuffer open for applying subsequent actions.
Adding an extra meta key to the normal key chord invokes the special
version of the regular commands that enables applying multiple
actions.
~C-M-m~ (=ivy-call=) is the non-exiting version of ~C-m~ (=ivy-done=).
~C-M-n~ (=ivy-next-line-and-call=) combines ~C-n~ and ~C-M-m~.
~C-M-p~ (=ivy-previous-line-and-call=) combines ~C-p~ and ~C-M-m~.
~C-M-o~ (=ivy-dispatching-call=) is a non-exiting version of ~M-o~
(=ivy-dispatching-done=).
*** Key bindings that alter the minibuffer input
~M-n~ (=ivy-next-history-element=) select the next history element or
symbol/URL at point.
~M-p~ (=ivy-previous-history-element=) select the previous history
element.
~C-r~ (=ivy-reverse-i-search=) start a recursive completion session to
select a history element.
~M-i~ (=ivy-insert-current=) insert the current candidate into the
minibuffer. Useful for copying and renaming files, for example: ~M-i~
to insert the original file name string, edit it, and then ~C-m~ to
complete the renaming.
~M-j~ (=ivy-yank-word=) insert the sub-word at point into the
minibuffer.
~S-SPC~ (=ivy-restrict-to-matches=) deletes the current input, and
resets the candidates list to the currently restricted matches. This
is how Ivy provides narrowing in successive tiers.
*** Other key bindings
~M-w~ (=ivy-kill-ring-save=) copies the selected candidates to the
kill ring; when the region is active, copies the active region.
*** Saving the current completion session to a buffer
~C-c C-o~ (=ivy-occur=) saves the current candidates to a new buffer;
the list is active in the new buffer.
~RET~ or ~mouse-1~ in the new buffer calls the appropriate action on
the selected candidate.
Ivy has no limit on the number of active buffers like these.
Ivy takes care of making these buffer names unique. It applies
descriptive names, for example: =*ivy-occur counsel-describe-variable
"function$*=.
*** Global key bindings
=ivy-resume= recalls the state of the completion session just before
its last exit. Useful after an accidental ~C-m~ (=ivy-done=).
Recommended global binding: ~C-c C-r~.
*** Hydra in the minibuffer
~C-o~ (=hydra-ivy/body=) invokes Hydra menus with key shortcuts.
When in Hydra, ~C-o~ or ~i~ resumes editing.
Hydra reduces key strokes, for example: ~C-n C-n C-n C-n~ is ~C-o
jjjj~ in Hydra. Besides certain shorter keys, Hydra shows useful info
such as case folding and the current action.
Additionally, here are the keys that are otherwise not bound:
- ~<~ and ~>~ adjust the height of the minibuffer.
- ~c~ (=ivy-toggle-calling=) - toggle calling the current action each
time a different candidate is selected.
- ~m~ (=ivy-rotate-preferred-builders=) - rotate regex matcher.
- ~w~ and ~s~ scroll the actions list.
Minibuffer editing is disabled when Hydra is active.

View File

@@ -0,0 +1,132 @@
;;; ivy-overlay.el --- Overlay display functions for Ivy -*- lexical-binding: t -*-
;; Copyright (C) 2016-2017 Free Software Foundation, Inc.
;; Author: Oleh Krehel <ohwoeowho@gmail.com>
;; Keywords: convenience
;; 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:
;;
;; This package allows to setup Ivy's completion at point to actually
;; show the candidates and the input at point, instead of in the
;; minibuffer.
;;; Code:
(defface ivy-cursor
'((t (:background "black"
:foreground "white")))
"Cursor face for inline completion."
:group 'ivy-faces)
(defvar ivy--old-cursor-type t)
(defvar ivy-overlay-at nil
"Overlay variable for `ivy-display-function-overlay'.")
(declare-function ivy--truncate-string "ivy")
(defun ivy-left-pad (str width)
"Return STR, but with each line indented by WIDTH spaces.
Lines are truncated to the window width."
(let ((padding (make-string width ?\s)))
(mapconcat (lambda (x)
(ivy--truncate-string (concat padding x) (1- (window-width))))
(split-string str "\n")
"\n")))
(defun ivy-overlay-cleanup ()
"Clean up after `ivy-display-function-overlay'."
(when (overlayp ivy-overlay-at)
(delete-overlay ivy-overlay-at)
(setq ivy-overlay-at nil))
(unless cursor-type
(setq cursor-type ivy--old-cursor-type))
(when (fboundp 'company-abort)
(company-abort)))
(defun ivy-overlay-show-after (str)
"Display STR in an overlay at point.
First, fill each line of STR with spaces to the current column.
Then attach the overlay the character before point."
(if ivy-overlay-at
(progn
(move-overlay ivy-overlay-at (1- (point)) (line-end-position))
(overlay-put ivy-overlay-at 'invisible nil))
(setq ivy-overlay-at (make-overlay (1- (point)) (line-end-position)))
(overlay-put ivy-overlay-at 'priority 9999))
(overlay-put ivy-overlay-at 'display str)
(overlay-put ivy-overlay-at 'after-string ""))
(declare-function org-current-level "org")
(defvar org-indent-indentation-per-level)
(defvar ivy-height)
(defvar ivy-last)
(defvar ivy-text)
(defvar ivy-completion-beg)
(declare-function ivy--get-window "ivy")
(declare-function ivy-state-current "ivy")
(declare-function ivy-state-window "ivy")
(defun ivy-overlay-impossible-p ()
(or
(< (- (window-width) (current-column))
(length (ivy-state-current ivy-last)))
(<= (window-height) (+ ivy-height 3))
(= (point) (point-min))))
(defun ivy-display-function-overlay (str)
"Called from the minibuffer, display STR in an overlay in Ivy window.
Hide the minibuffer contents and cursor."
(if (save-selected-window
(select-window (ivy-state-window ivy-last))
(ivy-overlay-impossible-p))
(let ((buffer-undo-list t))
(save-excursion
(forward-line 1)
(insert str)))
(add-face-text-property (minibuffer-prompt-end) (point-max)
'(:foreground "white"))
(let ((cursor-pos (1+ (- (point) (minibuffer-prompt-end))))
(ivy-window (ivy--get-window ivy-last)))
(setq cursor-type nil)
(with-selected-window ivy-window
(when cursor-type
(setq ivy--old-cursor-type cursor-type))
(setq cursor-type nil)
(let ((overlay-str
(concat
(buffer-substring (max 1 (1- (point))) (point))
ivy-text
(if (eolp)
" "
"")
(buffer-substring (point) (line-end-position))
(ivy-left-pad
str
(+ (if (and (eq major-mode 'org-mode)
(bound-and-true-p org-indent-mode))
(* org-indent-indentation-per-level (org-current-level))
0)
(save-excursion
(goto-char ivy-completion-beg)
(current-column)))))))
(add-face-text-property cursor-pos (1+ cursor-pos)
'ivy-cursor t overlay-str)
(ivy-overlay-show-after overlay-str))))))
(provide 'ivy-overlay)
;;; ivy-overlay.el ends here

Binary file not shown.

View File

@@ -0,0 +1,7 @@
(define-package "ivy" "20180305.1340" "Incremental Vertical completYon"
'((emacs "24.1"))
:url "https://github.com/abo-abo/swiper" :keywords
'("matching"))
;; Local Variables:
;; no-byte-compile: t
;; End:

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff