mirror of https://github.com/Chizi123/.emacs.d.git

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
commit | author | age
5cb5f7 1 ;ELC
C 2 ;;; Compiled
3 ;;; in Emacs version 26.1
4 ;;; with all optimizations.
5
6 ;;; This file uses dynamic docstrings, first added in Emacs 19.29.
7
8 ;;; This file does not contain utf-8 non-ASCII characters,
9 ;;; and so can be loaded in Emacs versions earlier than 23.
10
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14
15 (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\307\310\311\312\313\302%\210\314\315\316\317\320DD\321\313\310\322\323&\210\314\324\316\317\325DD\326\313\310\322\327&\210\314\330\316\317\331DD\332\313\310\322\323&\210\314\333\316\317\334DD\335\322\327\313\310&\210\314\336\316\317\337DD\340\322\327\313\310&\210\341\342\343\"\210\344\342\343\345#\210\314\343\316\317\346DD\347\322\350\313\310&\210\314\351\316\317\352DD\353\322\327\313\310&\210\314\354\316\317\355DD\356\322\327\313\310&\210\314\357\316\317\360DD\361\322\327\313\310&\210\314\362\316\317\363DD\364\322\327\313\310&\210\314\365\316\317\366DD\367\322\327\313\310&\210\314\370\316\317\371DD\372\322\327\313\310&\210\314\373\316\317\374DD\375\322\327\313\310&\210\314\376\316\317\377DD\201@\322\327\313\310&\210\314\201A\316\317\201BDD\201C\313\310\322\201D&\210\314\201E\316\317\201FDD\201G\313\310\322\201H&\207" [require cl-lib helm helm-help url xml browse-url custom-declare-group helm-net nil "Net related applications and libraries for Helm." :group custom-declare-variable helm-google-suggest-default-browser-function funcall function #[0 "\300\207" [nil] 1] "The browse url function you prefer to use with google suggest.\nWhen nil, use the first browser function available\nSee `helm-browse-url-default-browser-alist'." :type symbol helm-home-url #[0 "\300\207" [#1="https://www.google.com"] 1 #1#] "Default url to use as home url." string helm-surfraw-default-browser-function #[0 "\300\207" [nil] 1] "The browse url function you prefer to use with surfraw.\nWhen nil, fallback to `browse-url-browser-function'." helm-google-suggest-url #[0 "\300\207" [#2="https://encrypted.google.com/complete/search?output=toolbar&q=%s"] 1 #2#] "URL used for looking up Google suggestions.\nThis is a format string, don't forget the `%s'." helm-google-suggest-search-url #[0 "\300\207" [#3="https://encrypted.google.com/search?ie=utf-8&oe=utf-8&q=%s"] 1 #3#] "URL used for Google searching.\nThis is a format string, don't forget the `%s'." defvaralias helm-google-suggest-use-curl-p helm-net-prefer-curl make-obsolete-variable "1.7.7" #[0 "\300\207" [nil] 1] "When non--nil use CURL external program to fetch data.\nOtherwise `url-retrieve-synchronously' is used." boolean helm-surfraw-duckduckgo-url #[0 "\300\207" [#4="https://duckduckgo.com/lite/?q=%s&kp=1"] 1 #4#] "The duckduckgo url.\nThis is a format string, don't forget the `%s'.\nIf you have personal settings saved on duckduckgo you should have\na personal url, see your settings on duckduckgo." helm-wikipedia-suggest-url #[0 "\300\207" [#5="https://en.wikipedia.org/w/api.php?action=opensearch&search=%s"] 1 #5#] "Url used for looking up Wikipedia suggestions.\nThis is a format string, don't forget the `%s'." helm-search-suggest-action-wikipedia-url #[0 "\300\207" [#6="https://en.wikipedia.org/wiki/Special:Search?search=%s"] 1 #6#] "The Wikipedia search url.\nThis is a format string, don't forget the `%s'." helm-wikipedia-summary-url #[0 "\300\207" [#7="https://en.wikipedia.org/w/api.php?action=parse&format=json&prop=text&section=0&page=%s"] 1 #7#] "URL for getting the summary of a Wikipedia topic.\nThis is a format string, don't forget the `%s'." helm-search-suggest-action-youtube-url #[0 "\300\207" [#8="https://www.youtube.com/results?aq=f&search_query=%s"] 1 #8#] "The Youtube search url.\nThis is a format string, don't forget the `%s'." helm-search-suggest-action-imdb-url #[0 "\300\207" [#9="http://www.imdb.com/find?s=all&q=%s"] 1 #9#] "The IMDb search url.\nThis is a format string, don't forget the `%s'." helm-search-suggest-action-google-maps-url #[0 "\300\207" [#10="https://maps.google.com/maps?f=q&source=s_q&q=%s"] 1 #10#] "The Google Maps search url.\nThis is a format string, don't forget the `%s'." helm-search-suggest-action-google-news-url #[0 "\300\207" [#11="https://www.google.com/search?safe=off&prmd=nvlifd&source=lnms&tbs=nws:1&q=%s"] 1 #11#] "The Google News search url.\nThis is a format string, don't forget the `%s'." helm-google-suggest-actions #[0 "\300\207" [(("Google Search" . helm-google-suggest-action) ("Wikipedia" lambda (candidate) (helm-search-suggest-perform-additional-action helm-search-suggest-action-wikipedia-url candidate)) ("Youtube" lambda (candidate) (helm-search-suggest-perform-additional-action helm-search-suggest-action-youtube-url candidate)) ("IMDb" lambda (candidate) (helm-search-suggest-perform-additional-action helm-search-suggest-action-imdb-url candidate)) ("Google Maps" lambda (candidate) (helm-search-suggest-perform-additional-action helm-search-suggest-action-google-maps-url candidate)) ("Google News" lambda (candidate) (helm-search-suggest-perform-additional-action helm-search-suggest-action-google-news-url candidate)))] 1] "List of actions for google suggest sources." (alist :key-type string :value-type function) helm-browse-url-firefox-new-window #[0 "\300\207" [#12="-new-tab"] 1 #12#] "Allow choosing to browse url in new window or new tab.\nCan be \"-new-tab\" (default) or \"-new-window\"." (radio (const :tag "New tab" "-new-tab") (const :tag "New window" "-new-window"))] 8)
16 #@66 Perform the search via URL using QUERY as input.
17
18 (fn URL QUERY)
19 (defalias 'helm-search-suggest-perform-additional-action #[514 "\300\301\302!\"!\207" [browse-url format url-hexify-string] 7 (#$ . 5572)])
20 #@23 
21
22 (fn REQUEST PARSER)
23 (defalias 'helm-net--url-retrieve-sync #[514 "\203$\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\312\313\314\315\314%\210 *\207r\316!q\210\211 )\207" [helm-net-prefer-curl generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 call-process "curl" nil t url-retrieve-synchronously] 9 (#$ . 5785)])
24 (defalias 'helm-google-suggest-parser #[0 "\300\301ed\"@\302\"\211\303\211:\203&@\262\304\236A@@AB\262A\262\202 \211\237\207" [xml-get-children xml-parse-region CompleteSuggestion nil suggestion] 6])
25 #@58 Fetch suggestions for INPUT from XML buffer.
26
27 (fn INPUT)
28 (defalias 'helm-google-suggest-fetch #[257 "\301\302!\"\303\304\"\207" [helm-google-suggest-url format url-hexify-string helm-net--url-retrieve-sync helm-google-suggest-parser] 5 (#$ . 6403)])
29 #@95 Set candidates with result and number of google results found.
30
31 (fn &optional REQUEST-PREFIX)
32 (defalias 'helm-google-suggest-set-candidates #[256 "\302\203\f\303Q\206 !\235\203\211\202\"\304\305\306    \"    BC\"\207" [helm-pattern helm-input helm-google-suggest-fetch " " append format "Search for '%s' on Google"] 7 (#$ . 6662)])
33 #@12 
34
35 (fn NUM)
36 (defalias 'helm-ggs-set-number-result #[257 "\211\203P\211\247\203\300!\262\301\302\303\304#!\305\306\305:\203C@\262\307C\"\262\310U\2038\307\311C\"\262\312\262A\262T\262\202\313\314\303\315\316\301!\303##\207\317\207" [number-to-string reverse split-string "" t nil 1 append 3 "," 0 replace-regexp-in-string "^," mapconcat identity "?"] 12 (#$ . 7006)])
37 #@73 Default action to jump to a google suggested candidate.
38
39 (fn CANDIDATE)
40 (defalias 'helm-google-suggest-action #[257 "\302\303!\"    \211\203\211!\202\304!\262\207" [helm-google-suggest-search-url helm-google-suggest-default-browser-function format url-hexify-string helm-browse-url] 5 (#$ . 7404)])
41 #@49 Default function to use in helm google suggest.
42 (defvar helm-google-suggest-default-function 'helm-google-suggest-set-candidates (#$ . 7715))
43 (defvar helm-source-google-suggest (helm-make-source "Google Suggest" 'helm-source-sync :candidates #[0 " \207" [helm-google-suggest-default-function] 1] :action 'helm-google-suggest-actions :volatile t :keymap helm-map :requires-pattern 3))
44 #@53 Try to emacs lisp complete with google suggestions.
45 (defalias 'helm-google-suggest-emacs-lisp #[0 "\300\301!\207" [helm-google-suggest-set-candidates "emacs lisp"] 2 (#$ . 8106)])
46 #@56 Fetch Wikipedia suggestions and return them as a list.
47 (defalias 'helm-wikipedia-suggest-fetch #[0 "\302\303!\210\304\305    !\"\306\307\"\207" [helm-wikipedia-suggest-url helm-pattern require json format url-hexify-string helm-net--url-retrieve-sync helm-wikipedia--parse-buffer] 4 (#$ . 8292)])
48 (defalias 'helm-wikipedia--parse-buffer #[0 "eb\210\301\302\303\304#\205>\305\306\307!!\310H\311\303\211T\211\262GW\203.H\262\211C\244\262\202\211\206<\312\313\314\"BC\"\266\204\207" [helm-pattern re-search-forward "^\\[.+\\[\\(.*\\)\\]\\]" nil t json-read-from-string match-string 0 1 -1 append format "Search for '%s' on wikipedia"] 9])
49 (defvar helm-wikipedia--summary-cache (make-hash-table :test 'equal))
50 #@61 Show Wikipedia summary for INPUT in new buffer.
51
52 (fn INPUT)
53 (defalias 'helm-wikipedia-show-summary #[257 "\300\301!\302!rq\210\303 \210\304 \210\211c\210\305p!\210eb)\207" [get-buffer-create "*helm wikipedia summary*" helm-wikipedia--get-summary visual-line-mode erase-buffer pop-to-buffer] 5 (#$ . 9019) nil])
54 #@18 
55
56 (fn CANDIDATE)
57 (defalias 'helm-wikipedia-persistent-action #[257 "\302\303\"\304\305\306\"\230?\2051\307\310!\210\311\312!\313!rq\210\314 \210\305\211c\210\315ed\"\210eb\210)\316!\266\202\207" [helm-pattern cursor-type format "Search for '%s' on wikipedia" helm-get-selection nil t message "Fetching summary from Wikipedia..." get-buffer-create "*helm wikipedia summary*" helm-wikipedia--get-summary erase-buffer fill-region display-buffer] 6 (#$ . 9338)])
58 #@155 Return Wikipedia summary for INPUT as string.
59 Follows any redirections from Wikipedia, and stores results in
60 `helm-wikipedia--summary-cache'.
61
62 (fn INPUT)
63 (defalias 'helm-wikipedia--get-summary #[257 "\301\302\"\206\303\304!#\262\211\203&\211<\203&\211A\262\305\306\"\210\202\211\204.\307\310!\210\211\207" [helm-wikipedia--summary-cache nil gethash puthash helm-wikipedia--fetch-summary message "Redirected to %s" error "Error when getting summary."] 6 (#$ . 9810)])
64 #@14 
65
66 (fn INPUT)
67 (defalias 'helm-wikipedia--fetch-summary #[257 "\301\302!\"\303\304\"\207" [helm-wikipedia-summary-url format url-hexify-string helm-net--url-retrieve-sync helm-wikipedia--parse-summary] 5 (#$ . 10298)])
68 (defalias 'helm-wikipedia--parse-summary #[0 "eb\210\300\301\302\303#\205W\304\305\306\307\310`Sd\"!\236\236\236A\211\205U\311\312\"\203-\313\314\315\"B\202U\311\316\"\204;\311\317\"\205U\320\321\322\320\323\322\320\324\322\320\325\322\320\326\327\330\225\302O#####\262\207" [search-forward "{" nil t * text parse json-read-from-string buffer-substring-no-properties string-match "<span class=\"redirectText\"><a href=[^>]+>\\([^<]+\\)" redirect match-string 1 "</table>\\(\n<div.*?</div>\\)?\n<p>" "<p>" replace-regexp-in-string "Cite error: .*" "" "&#160;" "\\[[^]]+\\]" "<[^>]*>" "</p>\n<p>" "\n\n" 0] 19])
69 #@38 Keymap for `helm-wikipedia-suggest'.
70 (defvar helm-wikipedia-map (byte-code "\301!\302\303\304#\210\211\207" [helm-map copy-keymap define-key [C-return] helm-wikipedia-show-summary-action] 5) (#$ . 11147))
71 (defvar helm-source-wikipedia-suggest (helm-make-source "Wikipedia Suggest" 'helm-source-sync :candidates 'helm-wikipedia-suggest-fetch :action '(("Wikipedia" lambda (candidate) (helm-search-suggest-perform-additional-action helm-search-suggest-action-wikipedia-url candidate)) ("Show summary in new buffer (C-RET)" . helm-wikipedia-show-summary)) :persistent-action 'helm-wikipedia-persistent-action :persistent-help "show summary" :volatile t :keymap helm-wikipedia-map :requires-pattern 3))
72 #@82 Exit Helm buffer and call `helm-wikipedia-show-summary' with selected candidate.
73 (defalias 'helm-wikipedia-show-summary-action #[0 "\203\301\302!\207\303\304!\207" [helm-alive-p helm-exit-and-execute-action helm-wikipedia-show-summary error "Running helm command outside of context"] 2 (#$ . 11854) nil])
74 (defvar helm-browse-url-chromium-program "chromium-browser")
75 (defvar helm-browse-url-uzbl-program "uzbl-browser")
76 (defvar helm-browse-url-conkeror-program "conkeror")
77 (defvar helm-browse-url-opera-program "opera")
78 #@74 *Alist of (executable . function) to try to find a suitable url browser.
79 (defvar helm-browse-url-default-browser-alist (byte-code "\306\300!\203\n\206 \307\310B    \311B\n\312B \313B\f\314B \315B\316B\317B\320B\321B\322B\323B\324B\325BBBBBBBBBBBBB\207" [w3m-command browse-url-firefox-program helm-browse-url-chromium-program helm-browse-url-conkeror-program helm-browse-url-opera-program helm-browse-url-uzbl-program boundp "/usr/bin/w3m" w3m-browse-url browse-url-firefox helm-browse-url-chromium helm-browse-url-conkeror helm-browse-url-opera helm-browse-url-uzbl browse-url-kde browse-url-gnome-moz browse-url-mozilla browse-url-galeon browse-url-netscape browse-url-mosaic browse-url-text-xterm (("emacs" . eww-browse-url)) browse-url-kde-program browse-url-gnome-moz-program browse-url-mozilla-program browse-url-galeon-program browse-url-netscape-program browse-url-mosaic-program browse-url-xterm-program] 14) (#$ . -12382))
80 #@61 Browse URL with NAME browser.
81
82 (fn URL CMD-NAME &rest ARGS)
83 (defalias 'helm-generic-browser #[642 "\300Q\301\302\"\210\303\304\305\306\nC\"%\210\307\310!\311\"\207" [" " message "Starting %s..." apply start-process nil append set-process-sentinel get-process #[514 "\211\300\230\205 \301\302#\207" ["finished\n" message "%s process %s"] 6 "\n\n(fn PROCESS EVENT)"]] 12 (#$ . 13335)])
84 #@249 Same as `browse-url-firefox' but detach from emacs.
85
86 So when you quit emacs you can keep your firefox session open
87 and not be prompted to kill firefox process.
88
89 NOTE: Probably not supported on some systems (e.g Windows).
90
91 (fn URL &optional IGNORE)
92 (defalias 'helm-browse-url-firefox #[513 "\303!\262\304 \305\306\307    \n\310!$!)\207" [process-environment browse-url-firefox-program helm-browse-url-firefox-new-window browse-url-encode-url browse-url-process-environment call-process-shell-command format "(%s %s %s &)" shell-quote-argument] 9 (#$ . 13739) (byte-code "\300\301\302 \"\303D\207" [read-string "URL: " browse-url-url-at-point nil] 3)])
93 #@246 Browse URL with opera browser and detach from emacs.
94
95 So when you quit emacs you can keep your opera session open
96 and not be prompted to kill opera process.
97
98 NOTE: Probably not supported on some systems (e.g Windows).
99
100 (fn URL &optional IGNORE)
101 (defalias 'helm-browse-url-opera #[513 "\302!\262\303 \304\305\306    \307!#!)\207" [process-environment helm-browse-url-opera-program browse-url-encode-url browse-url-process-environment call-process-shell-command format "(%s %s &)" shell-quote-argument] 8 (#$ . 14399) (byte-code "\300\301\302 \"\303D\207" [read-string "URL: " browse-url-url-at-point nil] 3)])
102 #@67 Browse URL with google chrome browser.
103
104 (fn URL &optional IGNORE)
105 (defalias 'helm-browse-url-chromium #[513 "\301\"\207" [helm-browse-url-chromium-program helm-generic-browser] 5 (#$ . 15016) "sURL: "])
106 #@58 Browse URL with uzbl browser.
107
108 (fn URL &optional IGNORE)
109 (defalias 'helm-browse-url-uzbl #[513 "\301\302#\207" [helm-browse-url-uzbl-program helm-generic-browser "-u"] 6 (#$ . 15227) "sURL: "])
110 #@62 Browse URL with conkeror browser.
111
112 (fn URL &optional IGNORE)
113 (defalias 'helm-browse-url-conkeror #[513 "\301\"\207" [helm-browse-url-conkeror-program helm-generic-browser] 5 (#$ . 15429) "sURL: "])
114 #@79 Find the first available browser and ask it to load URL.
115
116 (fn URL &rest ARGS)
117 (defalias 'helm-browse-url-default-browser #[385 "\301\211\302\301:\2038@\262\211A\262\242\262\205'\303!\205'\304!\205'\211\262?\211\262\2038A\262\202\266\204\211\203F\305#\202I\306\307!\207" [helm-browse-url-default-browser-alist nil t executable-find fboundp apply error "No usable browser found"] 9 (#$ . 15635)])
118 #@53 Default command to browse URL.
119
120 (fn URL &rest ARGS)
121 (defalias 'helm-browse-url #[385 "\203    \301\"\207\302\"\207" [browse-url-browser-function browse-url helm-browse-url-default-browser] 5 (#$ . 16063)])
122 (defvar helm-surfraw-engines-history nil)
123 (defvar helm-surfraw-input-history nil)
124 (defvar helm-surfraw--elvi-cache nil)
125 #@65 Return list of all engines and descriptions handled by surfraw.
126 (defalias 'helm-build-elvi-list #[0 "\206*\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\312\313\314\315\314\316%\210\317\320 \321\"*\262A\211\207" [helm-surfraw--elvi-cache generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 call-process "surfraw" nil t "-elvi" split-string buffer-string "\n"] 7 (#$ . 16398)])
127 #@81 Preconfigured `helm' to search PATTERN with search ENGINE.
128
129 (fn PATTERN ENGINE)
130 (defalias 'helm-surfraw #[514 "\305!@\211\306\230\203\307\310!\"\202B\311\312!r\211q\210\313\314\315\316\317!\320\"\321$\216\322\323\324\325\326\325\327\330D\305\f!\"&\210\331\332\333\334 #*\262    \206G\n\335\230\203T\336 !\202`\336!\210\337\f\"B\211)\207" [helm-surfraw-duckduckgo-url helm-surfraw-default-browser-function browse-url-browser-function helm-home-url helm-surfraw-engines-history split-string "duckduckgo" format url-hexify-string generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205    \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 apply call-process "surfraw" nil t append "-p" replace-regexp-in-string "\n" "" buffer-string "W" helm-browse-url delete] 14 (#$ . 16864) (byte-code "\301 \203\302\303 \304 \"\202\305\306!\211\203\307\310\"\202\311\312\313\314$\266\202\315\316\317 \320\321\322\323\324\313\325&\nD\207" [helm-surfraw-engines-history use-region-p buffer-substring-no-properties region-beginning region-end thing-at-point symbol format "SearchFor (default %s): " "SearchFor: " read-string nil helm-surfraw-input-history helm-comp-read "Engine: " helm-build-elvi-list :must-match t :name "Surfraw Search Engines" :del-input :history] 12)])
131 #@61 Preconfigured `helm' for google search with google suggest.
132 (defalias 'helm-google-suggest #[0 "\300\301\302\"\207" [helm-other-buffer helm-source-google-suggest "*helm google*"] 3 (#$ . 18168) nil])
133 #@67 Preconfigured `helm' for Wikipedia lookup with Wikipedia suggest.
134 (defalias 'helm-wikipedia-suggest #[0 "\300\301\302\303\304$\207" [helm :sources helm-source-wikipedia-suggest :buffer "*helm wikipedia*"] 5 (#$ . 18374) nil])
135 (provide 'helm-net)