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

Chizi123
2018-11-18 76bbd07de7add0f9d13c6914f158d19630fe2f62
commit | author | age
76bbd0 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\302\303\304\305\306\307\310\311&\207" [require org custom-declare-group org-ctags nil "Options concerning use of ctags within org mode." :tag "Org-Ctags" :group org-link] 8)
16 #@37 Activate ctags support in org mode?
17 (defvar org-ctags-enabled-p t (#$ . 609))
18 #@193 Regexp expression used by ctags external program.
19 The regexp matches tag destinations in Org files.
20 Format is: /REGEXP/TAGNAME/FLAGS,TAGTYPE/
21 See the ctags documentation for more information.
22 (defvar org-ctags-tag-regexp "/<<([^>]+)>>/\\1/d,definition/" (#$ . 694))
23 (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313&    \210\300\314\302\303\315DD\316\306\307\310\311\312\317\320\321& \207" [custom-declare-variable org-ctags-path-to-ctags funcall function #[0 "\300\301!\203\301\207\302\207" [executable-find "ctags-exuberant" "ctags"] 2] "Name of the ctags executable file." :group org-ctags :version "24.1" :type file org-ctags-open-link-functions #[0 "\300\207" [(org-ctags-find-tag org-ctags-ask-rebuild-tags-file-then-find-tag org-ctags-ask-append-topic)] 1] "List of functions to be prepended to ORG-OPEN-LINK-FUNCTIONS when ORG-CTAGS is active." hook :options (org-ctags-find-tag org-ctags-ask-rebuild-tags-file-then-find-tag org-ctags-rebuild-tags-file-then-find-tag org-ctags-ask-append-topic org-ctags-append-topic org-ctags-ask-visit-buffer-or-file org-ctags-visit-buffer-or-file org-ctags-fail-silently)] 12)
24 #@87 List of all tags in the active TAGS file.
25 Created as a local variable in each buffer.
26 (defvar org-ctags-tag-list nil (#$ . 1833))
27 (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313&    \210\314\315\316\"\210\317\320\321\322\323$\210\324\320\325\"\207" [custom-declare-variable org-ctags-new-topic-template funcall function #[0 "\300\207" [#1="* <<%t>>\n\n\n\n\n\n"] 1 #1#] "Text to insert when creating a new org file via opening a hyperlink.\nThe following patterns are replaced in the string:\n    `%t' - replaced with the capitalized title of the hyperlink" :group org-ctags :version "24.1" :type string add-hook org-mode-hook #[0 "\205\301 \205\302\303\301 !\304P!\305!\205\306!\262\207" [org-ctags-enabled-p buffer-file-name expand-file-name file-name-directory "/TAGS" file-exists-p visit-tags-table] 3] ad-add-advice visit-tags-table (org-ctags-load-tag-list nil t (advice lambda nil (when (and org-ctags-enabled-p tags-file-name) (setq-local org-ctags-tag-list (org-ctags-all-tags-in-current-tags-table))))) after nil ad-activate t] 10)
28 (defalias 'org-ctags-enable #[0 "\302\303\304\305#\210\306    \211\205\211@\307\310\306#\210A\266\202\202    \207" [org-ctags-enabled-p org-ctags-open-link-functions put org-mode find-tag-default-function org-ctags-find-tag-at-point t add-hook org-open-link-functions] 6])
29 #@194 TAG is a string.  Search the active TAGS file for a matching tag.
30 If the tag is found, return a list containing the filename, line number, and
31 buffer position where the tag is found.
32
33 (fn TAG)
34 (defalias 'org-ctags-get-filename-for-tag #[257 "\204    \301\302 !\210\212\303\304!\210\205Mr\305!q\210eb\210\306\307\310\311!\"\312\313#\203K\314\315\316!!\314\315\317!!\320\321!\203A\315\316!E\202F\322\323\324 \"\266\202\202L\312))\207" [tags-file-name call-interactively visit-tags-table visit-tags-table-buffer same get-file-buffer re-search-forward format "^.*%s\\([0-9]+\\),\\([0-9]+\\)$" regexp-quote nil t string-to-number match-string 1 2 re-search-backward "\f\n\\(.*\\),[0-9]+\n" error "Malformed TAGS file: %s" buffer-name] 6 (#$ . 3177) "sTag: "])
35 #@89 Read all tags defined in the active TAGS file, into a list of strings.
36 Return the list.
37 (defalias 'org-ctags-all-tags-in-current-tags-table #[0 "\301\204\n\302\303 !\210\212\304\305!\210r\306!q\210eb\210\307\310\301\311#\203,\312\313\314!!B\262\202*\211\207" [tags-file-name nil call-interactively visit-tags-table visit-tags-table-buffer same get-file-buffer re-search-forward "^.*\\(.*\\)\\([0-9]+\\),\\([0-9]+\\)$" t substring-no-properties match-string 1] 5 (#$ . 3949) nil])
38 #@85 Replace all instances of SEARCH with REPLACE in STRING.
39
40 (fn SEARCH REPLACE STRING)
41 (defalias 'org-ctags-string-search-and-replace #[771 "\300\301!\302\211%\207" [replace-regexp-in-string regexp-quote t] 9 (#$ . 4445)])
42 #@152 Visit or create a file called `NAME.org', and insert a new topic.
43 The new topic will be titled NAME (or TITLE if supplied).
44
45 (fn NAME &optional TITLE)
46 (defalias 'org-ctags-open-file #[513 "\3011%\302\303\"\210\304\305!\210db\210\306\307\310\206!#c\210\304\311!\210\312 0\207\313\314\"\207" [org-ctags-new-topic-template (error) org-open-file t message "Opened file OK" org-ctags-string-search-and-replace "%t" capitalize "Inserted new file text OK" org-mode-restart error "Error %S in org-ctags-open-file"] 6 (#$ . 4675) "sFile name: "])
47 (byte-code "\300\301\302\303\304$\210\305\301\306\"\207" [ad-add-advice xref-find-definitions (org-ctags-set-org-mark-before-finding-tag nil t (advice lambda nil "Before trying to find a tag, save our current position on org mark ring." (save-excursion (when (and (derived-mode-p 'org-mode) org-ctags-enabled-p) (org-mark-ring-push))))) before nil ad-activate t] 5)
48 #@108 Determine default tag to search for, based on text at point.
49 If there is no plausible default, return nil.
50 (defalias 'org-ctags-find-tag-at-point #[0 "\300\211\211\30112\212\302\303!\210\304`\\\262)\212b\210\305\306!\210`S\262)V\205.`Y\205.`X0\2026\210\2029\204\237\212\307\310!\210`\262)\212\311\310!\210`\262)V\204\237\212\312 \211\262\205t\307\313\"\205t`\211\262V\205t\307\310!\205t`\211\262)\204\237\212\314 \211\262\205\233\311\313\"\205\233`\211\262W\205\233\311\310!\205\233`\211\262)\205\243\315\"\207" [nil (error) search-backward "[[" 2 search-forward "]" skip-syntax-backward "w_" skip-syntax-forward line-beginning-position "^w_" line-end-position buffer-substring-no-properties] 6 (#$ . 5594)])
51 #@202 This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
52 Look for a tag called `NAME' in the current TAGS table.  If it is found,
53 visit the file and location where the tag is found.
54
55 (fn NAME)
56 (defalias 'org-ctags-find-tag #[257 "p\300 \301\302 !\3031\304!\210\3050\202\"\210q\210b\210\302 \306\223\210\306\207" [point-marker copy-marker mark-marker (error) xref-find-definitions t nil] 7 (#$ . 6350) "sTag: "])
57 #@486 This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
58 Visit buffer named `NAME.org'.  If there is no such buffer, visit the file
59 with the same name if it exists.  If the file does not exist, then behavior
60 depends on the value of CREATE.
61
62 If CREATE is nil (default), then return nil.  Do not create a new file.
63 If CREATE is t, create the new file and visit it.
64 If CREATE is the symbol `ask', then ask the user if they wish to create
65 the new file.
66
67 (fn NAME &optional CREATE)
68 (defalias 'org-ctags-visit-buffer-or-file #[513 "\300\301!!\302P\303\302P!\203\304\303\302P!!\202J\305!\203+\306\307\"\210\310\311\"\202J\312\311\"\204B\312\313\"\203I\314\315\316\"!\203I\317\"\202J\320\207" [substitute-in-file-name expand-file-name ".org" get-buffer pop-to-buffer-same-window file-exists-p message "Opening existing org file `%S'..." org-open-file t eql ask y-or-n-p format-message "File `%s.org' not found; create?" org-ctags-open-file nil] 7 (#$ . 6784) nil])
69 #@181 This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
70 Wrapper for org-ctags-visit-buffer-or-file, which ensures the user is
71 asked before creating a new file.
72
73 (fn NAME)
74 (defalias 'org-ctags-ask-visit-buffer-or-file #[257 "\300\301\"\207" [org-ctags-visit-buffer-or-file ask] 4 (#$ . 7776)])
75 #@280 This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
76 Append a new toplevel heading to the end of the current buffer.  The
77 heading contains NAME surrounded by <<angular brackets>>, thus making
78 the heading a destination for the tag `NAME'.
79
80 (fn NAME &optional NARROWP)
81 (defalias 'org-ctags-append-topic #[513 "~\210db\210\301\302!\210\303\304\305 \"\210\306\307\310!#c\210\311u\210\312\210\302y\210\211\203(\313 \210\314\207" [org-ctags-new-topic-template newline 2 message "Adding topic in buffer %s" buffer-name org-ctags-string-search-and-replace "%t" capitalize -4 nil org-narrow-to-subtree t] 6 (#$ . 8086) "sTopic: "])
82 #@193 This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
83 Wrapper for org-ctags-append-topic, which first asks the user if they want
84 to append a new topic.
85
86 (fn NAME &optional NARROWP)
87 (defalias 'org-ctags-ask-append-topic #[513 "\300\301\302\"!\205 \303\"\207" [y-or-n-p format-message "Topic `%s' not found; append to end of buffer?" org-ctags-append-topic] 6 (#$ . 8732)])
88 #@181 This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
89 Like ORG-CTAGS-FIND-TAG, but calls the external ctags program first,
90 to rebuild (update) the TAGS file.
91
92 (fn NAME)
93 (defalias 'org-ctags-rebuild-tags-file-then-find-tag #[257 "\204    \301\302 !\210\303 \203\304 \210\305!\207" [tags-file-name call-interactively visit-tags-table buffer-file-name org-ctags-create-tags org-ctags-find-tag] 3 (#$ . 9126)])
94 #@132 This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
95 Wrapper for org-ctags-rebuild-tags-file-then-find-tag.
96
97 (fn NAME)
98 (defalias 'org-ctags-ask-rebuild-tags-file-then-find-tag #[257 "\300 \205\301\302\303\304\300 !#!\205\305!\207" [buffer-file-name y-or-n-p format-message "Tag `%s' not found.  Rebuild table `%s/TAGS' and look again?" file-name-directory org-ctags-rebuild-tags-file-then-find-tag] 7 (#$ . 9553)])
99 #@181 This function is intended to be used in ORG-OPEN-LINK-FUNCTIONS.
100 Put as the last function in the list if you want to prevent Org's
101 default behavior of free text search.
102
103 (fn NAME)
104 (defalias 'org-ctags-fail-silently #[257 "\300\207" [t] 2 (#$ . 9993)])
105 #@535 (Re)create tags file in the directory of the active buffer.
106 The file will contain tag definitions for all the files in the
107 directory and its subdirectories which are recognized by ctags.
108 This will include files ending in `.org' as well as most other
109 source files (.C, .H, .EL, .LISP, etc).  All the resulting tags
110 end up in one file, called TAGS, located in the directory.  This
111 function may take several seconds to finish if the directory or
112 its subdirectories contain large numbers of taggable files.
113
114 (fn &optional DIRECTORY-NAME)
115 (defalias 'org-ctags-create-tags #[256 "\303 \204    \304\305!\210\211\206\306\303 !\307\212\310\311\312    \313\314P!\313\315P!%!\262\211\316\267\2029\317\302!\210\320 \211\202:\307)\207" [org-ctags-path-to-ctags org-ctags-tag-regexp org-ctags-tag-list buffer-file-name cl--assertion-failed (buffer-file-name) file-name-directory nil shell-command format "%s --langdef=orgmode --langmap=orgmode:.org --regex-orgmode=\"%s\" -f \"%s\" -e -R \"%s\"" expand-file-name "/TAGS" "/*" #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 46)) make-local-variable org-ctags-all-tags-in-current-tags-table] 12 (#$ . 10252) nil])
116 #@60 History of tags visited by org-ctags-find-tag-interactive.
117 (defvar org-ctags-find-tag-history nil (#$ . 11454))
118 #@193 Prompt for the name of a tag, with autocompletion, then visit the named tag.
119 Uses `ido-mode' if available.
120 If the user enters a string that does not match an existing tag, create
121 a new topic.
122 (defalias 'org-ctags-find-tag-interactive #[0 "\302\303!\203\n\303\202 \304\211\305\306\307\306\301&\211\205,\211\235\203(\211    B\310!\202,\311\312\"\207" [org-ctags-tag-list org-ctags-find-tag-history fboundp ido-completing-read completing-read "Topic: " nil confirm xref-find-definitions run-hook-with-args-until-success org-open-link-functions] 8 (#$ . 11573) nil])
123 (byte-code "\300 \210\301\302!\207" [org-ctags-enable provide org-ctags] 2)