;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\300\312!\207" [require dash ht s vc-hooks pfuture treemacs-core-utils treemacs-customization treemacs-workspaces treemacs-dom treemacs-logging] 2) (defconst treemacs--dirs-to-collapse\.py (byte-code "\301\302!\235\203 \303\301\"\207\303\304\"\207" [treemacs-dir "treemacs-dirs-to-collapse.py" directory-files treemacs-join-path "src/scripts/treemacs-dirs-to-collapse.py"] 3)) (defconst treemacs--git-status\.py (byte-code "\301\302!\235\203 \303\301\"\207\303\304\"\207" [treemacs-dir "treemacs-git-status.py" directory-files treemacs-join-path "src/scripts/treemacs-git-status.py"] 3)) (defconst treemacs--single-file-git-status\.py (byte-code "\301\302!\235\203 \303\301\"\207\303\304\"\207" [treemacs-dir "treemacs-single-file-git-status.py" directory-files treemacs-join-path "src/scripts/treemacs-single-file-git-status.py"] 3)) #@103 Maximum size for `treemacs--git-cache'. If it does reach that size it will be cut back to 30 entries. (defvar treemacs--git-cache-max-size 60 (#$ . 1064)) #@480 Stores the results of previous git status calls for directories. Its effective type is HashMap>. These cached results are used as a stand-in during immediate rendering when `treemacs-git-mode' is set to be deferred, so as to minimise the effect of large face changes, especially when a full project is refreshed. Since this table is a global value that can effectively grow indefinitely its value is limited by `treemacs--git-cache-max-size'. (defvar treemacs--git-cache (make-hash-table :size treemacs--git-cache-max-size :test 'equal) (#$ . 1226)) #@121 Get the git face for the given STATUS. Use DEFAULT as default match. STATUS: String DEFAULT: Face (fn STATUS DEFAULT) (defalias 'treemacs--git-status-face #[514 "\300\267\207\301\207\302\207\303\207\304\207\305\207\306\207\207" [#s(hash-table size 6 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("M" 4 "U" 6 "?" 8 "!" 10 "A" 12 "R" 14)) treemacs-git-modified-face treemacs-git-conflict-face treemacs-git-untracked-face treemacs-git-ignored-face treemacs-git-added-face treemacs-git-renamed-face] 4 (#$ . 1819)]) (byte-code "\300\301\302\303#\300\301\304\305#\300\301\306\305#\300\207" [function-put treemacs--git-status-face compiler-macro treemacs--git-status-face--inliner pure t side-effect-free] 6) #@36 (fn INLINE--FORM STATUS DEFAULT) (defalias 'treemacs--git-status-face--inliner #[771 "\3002q\301!\203\211\202\302\303!\301!\203\211\202 \302\304!\305\306\307\310DD\311\307\312DD\313\307\314DD\315\307\316DD\317\307\320DD\321\307\322DD\323 D\257 =\203R\211\266\203\202[\324DC\"\266\203=\203g\211\266\203\202p\324DC\"\266\2030\207" [inline--just-use macroexp-copyable-p make-symbol "status" "default" pcase "M" quote treemacs-git-modified-face "U" treemacs-git-conflict-face "?" treemacs-git-untracked-face "!" treemacs-git-ignored-face "A" treemacs-git-added-face "R" treemacs-git-renamed-face _ macroexp-let*] 17 (#$ . 2553)]) #@186 Return the appropriate face for PATH based on GIT-INFO. If there is no git entry for PATH return DEFAULT. PATH: Filepath GIT-INFO: Hash-Table DEFAULT: Face (fn PATH GIT-INFO DEFAULT) (defalias 'treemacs--get-node-face #[771 "\300\301#\211\302\267\202\303\207\304\207\305\207\306\207\307\207\310\207\207" [gethash nil #s(hash-table size 6 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("M" 11 "U" 13 "?" 15 "!" 17 "A" 19 "R" 21)) treemacs-git-modified-face treemacs-git-conflict-face treemacs-git-untracked-face treemacs-git-ignored-face treemacs-git-added-face treemacs-git-renamed-face] 7 (#$ . 3216)]) (byte-code "\300\301\302\303#\300\301\304\305#\300\301\306\305#\300\207" [function-put treemacs--get-node-face compiler-macro treemacs--get-node-face--inliner pure t side-effect-free] 6) #@43 (fn INLINE--FORM PATH GIT-INFO DEFAULT) (defalias 'treemacs--get-node-face--inliner #[1028 "\3002v\301!\203\211\202\302\303!\301!\203\211\202 \302\304!\301!\203+\211\202.\302\305!\306\307EE=\203B\211\266\203\202K\310DC\"\266\203=\203W\211\266\203\202`\310DC\"\266\203=\203l\211\266\203\202u\310DC\"\266\2030\207" [inline--just-use macroexp-copyable-p make-symbol "path" "git-info" "default" treemacs--git-status-face ht-get macroexp-let*] 14 (#$ . 4041)]) #@128 Cuts `treemacs--git-cache' back down to size. Specifically its size will be reduced to half of `treemacs--git-cache-max-size'. (defalias 'treemacs--resize-git-cache #[0 "\3022\303!\211 \304\245ZC\305\306\307\"\"\266\2020\207" [treemacs--git-cache treemacs--git-cache-max-size --cl-block-__body__-- hash-table-count 2 maphash make-closure #[514 "\302 \"\210\303\300\211\242S\240Y\205\304\305\306\"\207" [V0 treemacs--git-cache remhash 0 throw --cl-block-__body__-- :done] 5 "\n\n(fn KEY _)"]] 6 (#$ . 4547)]) #@100 Dummy with PATH. Real implementation will be `fset' based on `treemacs-git-mode' value. (fn PATH) (defalias 'treemacs--git-status-process-function #[257 "\300\207" [nil] 2 (#$ . 5070)]) #@126 Run `treemacs--git-status-process-function' on PATH, if allowed for PROJECT. Remote projects are ignored. (fn PATH PROJECT) (defalias 'treemacs--git-status-process #[514 "\301!>\204\302\303\304D\"\210\211\305H\306=\205\307!\207" [cl-struct-treemacs-project-tags type-of signal wrong-type-argument treemacs-project 3 local-readable treemacs--git-status-process-function] 6 (#$ . 5264)]) #@104 Dummy with FUTURE. Real implementation will be `fset' based on `treemacs-git-mode' value. (fn FUTURE) (defalias 'treemacs--git-status-parse-function #[257 "\300\301\302\"\207" [make-hash-table :test equal] 4 (#$ . 5666)]) #@85 Start an extended python-parsed git status process for files under PATH. (fn PATH) (defalias 'treemacs--git-status-process-extended #[257 "\306\307\310#\211\205c\311\312!\211\211\205\313\n\311#\262\211\2053\314! >\2040\315\316\317D\"\210\211\320H\262\211\205=\321\322\"\262\211\205G\323\324\"\262B\f\325 \326!BBBBBB\327\330\"*\266\203\207" [file-name-handler-alist default-directory treemacs-dom cl-struct-treemacs-dom-node-tags treemacs-python-executable treemacs--git-status\.py vc-call-backend Git root nil expand-file-name gethash type-of signal wrong-type-argument treemacs-dom-node 4 -map treemacs-dom-node->key -filter stringp "-O" number-to-string apply pfuture-new treemacs-max-git-entries treemacs-git-command-pipe] 11 (#$ . 5895)]) #@245 Parse the git status derived from the output of GIT-FUTURE. The real parsing and formatting is done by the python process. All that's really left to do is pick up the cons list and put it in a hash table. GIT-FUTURE: Pfuture (fn GIT-FUTURE) (defalias 'treemacs--parse-git-status-extended #[257 "\211\203\370\304!\305\306\"\307!\204\230\310!\311\312\313#\314\315\"\316\317\320#\262\262\262G\315W\203S:\2047 C\321\n\204J\322\323\316\324\317\325#\326\327\"#\210\330\331\332\"\266\202\230:\204[ C\321\n\204n\322\323\316\324\317\325#\326\333\"#\210\330\331\332\"\210\334:\204} C\321\n\204\221\322\323\316\324\317\335#\326\327\"#\210\330\331\332\"\210)\210\336!\337U\205\363\340!\341!\203\255\211\202\361\334:\204\267 C\321\n\204\313\322\323\316\324\317\325#\326\342\"#\210\330\331\332\"\210):\204\331 C\321\n\204\353\322\323\316\324\317\325#\326\343!#\210\330\331\332\"\210\321\262\266\202\206\377\344\345\346\"\211\262\207" [treemacs--saved-eldoc-display treemacs-eldoc-display treemacs--no-messages inhibit-message pfuture-await-to-finish process-get stderr s-blank\? s-trim s-replace "\n" ", " s-truncate 80 propertize face error nil message "%s %s" "[Treemacs]" ((:inherit error :weight bold)) format "treemacs-git-status.py wrote to stderr: %s" add-hook pre-command-hook treemacs--restore-eldoc-after-log "treemacs-git-status.py wrote to stderr (see full output in *Messages*): %s" t font-lock-keyword-face process-exit-status 0 read hash-table-p "treemacs-git-status.py output: %s" "treemacs-git-status.py did not output a valid hash table. See full output in *Messages*." make-hash-table :test equal] 10 (#$ . 6676)]) #@68 Start a simple git status process for files under PATH. (fn PATH) (defalias 'treemacs--git-status-process-simple #[257 "\302!\303 B\304\305\306\307\310\311\312&\313\300#\210*\207" [default-directory process-environment file-truename "GIT_OPTIONAL_LOCKS=0" pfuture-new "git" "status" "--porcelain" "--ignored" "-z" "." process-put] 8 (#$ . 8363)]) #@68 Parse the output of GIT-FUTURE into a hash table. (fn GIT-FUTURE) (defalias 'treemacs--parse-git-status-simple #[257 "\300\301\302\303\304$\203{\305!\210\306!\307U\203{\310\311\"\312!\204z\313\314\315\310\316\"#\317\320\321\322\307\323O\"\"\211G\307\211W\203x\2118\211@A@\211GSH\324=\204o\307H\325=\203]T\266\204\202q\326\327\330!\"\330!\307\331O #\210\266\211T\262\2026\266\210\207" [make-hash-table :test equal :size 300 pfuture-await-to-finish process-exit-status 0 process-get stdout s-blank\? vc-call-backend Git root default-directory mapcar #[257 "\300\301\302!\303#\207" [s-split-up-to " " s-trim 1] 5 "\n\n(fn IT)"] s-split "" -1 47 82 puthash treemacs-join-path s-trim-left 1] 15 (#$ . 8723)]) #@401 Apply the git fontification for direct children of PARENT-BTN. GIT-FUTURE is parsed the same way as in `treemacs--create-branch'. Additionally since this function is run on an idle timer the BUFFER to work on must be passed as well since the user may since select a different buffer, window or frame. PARENT-BTN: Button GIT-FUTURE: Pfuture|HashMap BUFFER: Buffer (fn PARENT-BTN GIT-FUTURE BUFFER) (defalias 'treemacs--apply-deferred-git-state #[771 "\304!\205\265\205\265r\211q\210\305! V\203\306\307\310\311#\210\312\313\"\314\n\310#\205\262\312\315\"\316>\205\262\312\317\"T\320!\321#\210\310\322!\211\262\205\257\312\317\"Y\205\257\312\323\"\312\317\"U\203\253\312\324\"\204\253\312\325\"\314\310#\211\326\267\202\217\327\202\220\330\202\220\331\202\220\332\202\220\333\202\220\334\202\220\262\262\335\336T\337\"\206\236e\340\337\"\206\246d\341$\266\210\202B)\266\203\262)\207" [treemacs--git-cache treemacs--git-cache-max-size treemacs-dom buffer-read-only buffer-live-p hash-table-count run-with-idle-timer 2 nil treemacs--resize-git-cache get-text-property :path gethash :state (dir-node-open root-node-open) :depth treemacs--get-or-parse-git-result puthash next-button :key :no-git :default-face #s(hash-table size 6 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("M" 119 "U" 123 "?" 127 "!" 131 "A" 135 "R" 139)) treemacs-git-modified-face treemacs-git-conflict-face treemacs-git-untracked-face treemacs-git-ignored-face treemacs-git-added-face treemacs-git-renamed-face put-text-property previous-single-property-change button next-single-property-change face] 14 (#$ . 9467)]) #@160 Update the FILE node's git state, wrapped in `treemacs-save-position'. Internally calls `treemacs-do-update-single-file-git-state'. FILE: FilePath (fn FILE) (defalias 'treemacs-update-single-file-git-state #[257 "\306\307 \310 \311\312$\211\205\313\314\"\262\315 \211\205K\211\205K\316\317\"\320\321\311\"\206*d\314\"\211\203I\316\317\"W\203I\320\321\311\"\206Bd\314\"\262\202,\262\262\211\205U\322\323\"\262\211\205\230\316\317\"\324\325T\311\"\206je!\211\203\210\316\317\"W\203\210\324\325T\311\"\206\202e!\262\202k\211\205\226\316\317\"U\205\226\211\266\202\262\211\205\242\322\323\"\262\211\205\255\316\323\"\262\211\205\270\316\326\"\262\211\205\303\316\327\"\262\211\203\321\316\330\"\202\334\211\205\332\331!\262\332 \211\205\366\333!r\334\335\"\216\336@\337\"\210\340 *\262\341 !\210\342\267\202N\343\312\"\211\203.\344=\203\345 \210\316`\346\"\242\347=\203\350u\210\351 \210\352 \211\203-\353`\"\210\210\210\202i\354 \312#\203{\n\204J\355 \356\357!!\"\204{\343\312\"\211\203w\344=\203h\345 \210\316`\346\"\242\347=\203h\350u\210\351 \210\352 \211\203v\353`\"\210\210\210\202i\360\203\273\211 !\203\273\343 \312\"\211\203\266\344=\203\247\345 \210\316`\346\"\242\347=\203\247\350u\210\351 \210\352 \211\203\265\353`\"\210\210\266\202i\203\372\211!\203\372\343\312\"\211\203\365\344=\203\346\345 \210\316`\346\"\242\347=\203\346\350u\210\351 \210\352 \211\203\364\353`\"\210\210\266\202i\211;\203!\361!\211G\350V\203\211GSH\362=\203\211\363\364O\202\211\262\202\200\211@\365=\2035G\366V\205\200\367!\202\200\211@;\203MG\366V\203H\367!\202\200@\202\200\370@!\f>\203|G\366V\203c\367!\202\200\370@!\f>\204u\371\372\373@D\"\210@\366H\202\200\374\375\"\262!\204\211\211;\203\257\361!\211G\350V\203\251\211GSH\362=\203\251\211\363\364O\202\252\211\262\202 \211@\365=\203\303G\366V\205 \367!\202 \211@;\203\333G\366V\203\326\367!\202 @\202 \370@!\f>\203 G\366V\203\361\367!\202 \370@!\f>\204\371\372\373@D\"\210@\366H\202 \374\375\"\262\262\202\202\343\312\"\211\203A\344=\2032\345 \210\316`\346\"\242\347=\2032\350u\210\351 \210\352 \211\203@\353`\"\210\210\266\202i\376!\210\202i\204Yb\210\202i\3771f\376!0\210\202i\312\266\344=\203\345 \210\316`\346\"\242\347=\203\350u\210\316`\201@\"\203\220\321`\201@\"b\210\211\205\274`\333!r\334\201A\"\216\336@\337\"\210\363\201BS!\210)\353\201C \"*\262\262\207" [major-mode treemacs-dom treemacs-show-hidden-files treemacs-dotfiles-regex cl-struct-treemacs-project-tags scroll-margin text-property-not-all point-at-bol point-at-eol button nil copy-marker t point-marker get-text-property :depth next-button next-single-property-change button-get :path previous-button previous-single-property-change :state :collapsed :key treemacs--nearest-path treemacs-get-local-window internal--before-with-selected-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord treemacs--current-screen-line treemacs-do-update-single-file-git-state #s(hash-table size 9 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (root-node-closed 257 root-node-open 257 file-node-closed 306 file-node-open 306 dir-node-closed 306 dir-node-open 306 tag-node 838 tag-node-closed 838 tag-node-open 838)) treemacs-find-file-node treemacs-mode beginning-of-line display image 1 hl-line-highlight get-buffer-window set-window-point gethash s-matches\? file-name-nondirectory directory-file-name #[257 "\303\304#\205 \206\305\n\306\307!!\"?\207" [treemacs-dom treemacs-show-hidden-files treemacs-dotfiles-regex gethash nil s-matches\? file-name-nondirectory directory-file-name] 6 "\n\n(fn IT)"] file-name-directory 47 0 -1 :custom 2 butlast type-of signal wrong-type-argument treemacs-project error "Path type did not match: %S" treemacs-goto-node (error) invisible #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] recenter selected-window] 18 (#$ . 11137)]) #@743 Asynchronously update the given FILE node's git fontification. Since an update to a single node can potentially also mean a change to the states of all its parents they will likewise be updated by this function. If the file's current and new git status are the same this function will do nothing. When EXCLUDE-PARENTS is non-nil only the given FILE only the file node is updated. This is only used in case a file-watch update requires the insertion of a new file that, due to being recently created, does not have a git status cache entry. When OVERRIDE-STATUS is non-nil the FILE's cached git status will not be used. FILE: FilePath EXCLUDE-PARENTS: Boolean OVERRIDE-STATUS: Boolean (fn FILE &optional EXCLUDE-PARENTS OVERRIDE-STATUS) (defalias 'treemacs-do-update-single-file-git-state #[769 "p\211;\203(\306!\211G\307V\203\"\211GSH\310=\203\"\211\311\312O\202#\211\262\202\207\211@\313=\203<G\314V\205\207\315!\202\207\211@;\203TG\314V\203O\315!\202\207@\202\207\316@!>\203\203G\314V\203j\315!\202\207\316@!>\204|\317\320\321@D\"\210@\314H\202\207\322\323\"\262\324 \325#\211\205Q\206\251\316!\n>\204\245\317\320\326D\"\210\211\314H??\205\372\316!\n>\204\274\317\320\326D\"\210\211\307H\327\330\316!\n>\204\321\317\320\326D\"\210\314H\325\203\365B\262\316!\n>\204\355\317\320\326D\"\210\314H\262\202\325\262\"AB\324 \325#\203\331\202\211\211\205\324 \325#\262\206\332\f\333  BBBBB*\325+\334\335!)\336\337\335\340\341\342\343\344\345\346\347%&\n\350\351#\210)\262\266\204\207" [cl-struct-treemacs-project-tags treemacs-dom cl-struct-treemacs-dom-node-tags treemacs--git-cache treemacs-python-executable treemacs--single-file-git-status\.py file-name-directory 1 47 0 -1 :custom 2 butlast type-of signal wrong-type-argument treemacs-project error "Path type did not match: %S" gethash nil treemacs-dom-node -map treemacs-dom-node->key "OVERRIDE" "0" "-O" generate-new-buffer "Treemacs Update Single File Process" make-process :name :command :connection-type pipe :filter pfuture--append-output-to-buffer :sentinel make-closure #[514 "\306!?\205\203\307!\310U\203\336\311\301!\203}r\301q\210\312\313r\303q\210\314 )!\211A\262\242\211A\262\242\302\203;\315\302#\210\316!\211\203\203\317!\203L\320\202M\321\322\267\202k\323\202l\324\202l\325\202l\326\202l\327\202l\330\202l\211\331\332T\333\"\206ve\334\333\"\206~d\335$\266\266\211\211\203\330\211@\211\242\243\316!\211\203\317\336\267\202\267\323\202\270\324\202\270\325\202\270\326\202\270\327\202\270\330\202\270\320\331\332T\333\"\206\302e\334\333\"\206\312d\335$\266\266A\266\202\202\206\266*\202}\307!\211\337=\204|r\303q\210\314 )\211GSH\340U\203\310O\202\262\262 :\204/C\312/0\204<\341\342\343\344\335\345#\346\347\300GS H\340U\2035 \310O\2027 \262##\210\350\351\352\"\210 :\204J/C\312/0\204v\341\342\343\344\335\345#\346\353GSH\340U\203o\310O\202q\262\"#\210\350\351\352\"\266\210\354\355\356\"!\207" [V0 V1 V2 V3 buffer-read-only treemacs--saved-eldoc-display process-live-p process-exit-status 0 buffer-live-p nil read buffer-string puthash treemacs-find-visible-node file-directory-p treemacs-directory-face treemacs-git-unmodified-face #s(hash-table size 6 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (#1="M" 83 #2="U" 87 #3="?" 91 #4="!" 95 #5="A" 99 #6="R" 103)) treemacs-git-modified-face treemacs-git-conflict-face treemacs-git-untracked-face treemacs-git-ignored-face treemacs-git-added-face treemacs-git-renamed-face put-text-property previous-single-property-change button next-single-property-change face #s(hash-table size 6 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (#1# 159 #2# 163 #3# 167 #4# 171 #5# 175 #6# 179)) 2 10 message "%s %s" propertize "[Treemacs]" ((:inherit error :weight bold)) format "Update of node \"%s\" failed with status \"%s\" and result" add-hook pre-command-hook treemacs--restore-eldoc-after-log "\"%s\"" kill-buffer process-get buffer treemacs-eldoc-display treemacs--no-messages] 16 "\n\n(fn PROCESS STATUS)"] process-put buffer default-directory buffer-list-update-hook] 27 (#$ . 15250)]) #@780 Start a new process to determine directories to collapse under PATH. Only starts the process if PROJECT is locally accessible (i.e. exists, and is not remote.) Output format is an elisp list of string lists that's read directly. Every string list consists of the following elements: 1) the extra text that must be appended in the view 2) The original full and non-collapsed path 3) a series of intermediate steps which are the result of appending the collapsed path elements onto the original, ending in 4) the full path to the directory that the collapsing leads to. For Example: ("/26.0/elpa" "/home/a/Documents/git/treemacs/.cask" "/home/a/Documents/git/treemacs/.cask/26.0" "/home/a/Documents/git/treemacs/.cask/26.0/elpa") (fn PATH PROJECT) (defalias 'treemacs--collapsed-dirs-process #[514 "\306V\2057 \2057\307!\n>\204\310\311\312D\"\210\211\313H\314=\2057\315 \316\f\317! \2033\320\2024\321&)\207" [treemacs-collapse-dirs treemacs-python-executable cl-struct-treemacs-project-tags default-directory treemacs--dirs-to-collapse\.py treemacs-show-hidden-files 0 type-of signal wrong-type-argument treemacs-project 3 local-readable pfuture-new "-O" number-to-string "t" "x"] 9 (#$ . 19506)]) #@144 Parse the output of collapsed dirs FUTURE. Splits the output on newlines, splits every line on // and swallows the first newline. (fn FUTURE) (defalias 'treemacs--parse-collapsed-dirs #[257 "\211\205\300!\301!\302U\205\303!\262\207" [pfuture-await-to-finish process-exit-status 0 read] 4 (#$ . 20757)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315& \207" [custom-declare-variable treemacs-git-mode funcall function #[0 "\300\207" [nil] 1] "Non-nil if Treemacs-Git mode is enabled.\nSee the `treemacs-git-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `treemacs-git-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :type boolean :group treemacs] 12) #@1933 Toggle `treemacs-git-mode'. When enabled treemacs will check files' git status and highlight them accordingly. This git integration is available in 3 variants: simple, extended and deferred. This is a minor mode. If called interactively, toggle the `Treemacs-Git mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `(default-value 'treemacs-git-mode)'. The mode's hook is called both when the mode is enabled and when it is disabled. The simple variant will start a git status process whose output is parsed in elisp. This version is simpler and slightly faster, but incomplete - it will highlight only files, not directories. The extended variant requires a non-trivial amount of parsing to be done, which is achieved with python (specifically python3). It is slightly slower, but complete - both files and directories will be highlighted according to their git status. The deferred variant is the same is extended, except the tasks of rendering nodes and highlighting them are separated. The former happens immediately, the latter after `treemacs-deferred-git-apply-delay' seconds of idle time. This may be faster (if not in truth then at least in appearance) as the git process is given a much greater amount of time to finish. The downside is that the effect of nodes changing their colours may be somewhat jarring, though this issue is largely mitigated due to the use of a caching layer. All versions run asynchronously and are optimised for not doing more work than is necessary, so their performance cost should, for the most part, be the constant time needed to fork a subprocess. (fn &optional ARG) (defalias 'treemacs-git-mode #[256 "\302 \303\301\304=\203\305\301!?\202!\247\203 \306W\203 \307\202!\310\"\210\311\300!\2038\312\301\"\305\301!\2038\301B \203P\313>\203I\314!\210\202S\315\314!\210\202S\316 \210\317\320\305\301!\203_\321\202`\322\"\210\323\324!\203\210\325\301!\210\302 \203x\211\302 \232\203\210\326\327\305\301!\203\204\330\202\205\331\332#\210\210\333 \210\305\301!\207" [global-minor-modes treemacs-git-mode current-message set-default toggle default-value 1 nil t boundp delq (simple extended deferred) treemacs--setup-git-mode call-interactively treemacs--tear-down-git-mode run-hooks treemacs-git-mode-hook treemacs-git-mode-on-hook treemacs-git-mode-off-hook called-interactively-p any customize-mark-as-set message "Treemacs-Git mode %sabled%s" "en" "dis" "" force-mode-line-update] 6 (#$ . 21617) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar treemacs-git-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\207" [treemacs-git-mode-map treemacs-git-mode-hook variable-documentation put "Hook run after entering or leaving `treemacs-git-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode treemacs-git-mode boundp] 6) #@115 Set up `treemacs-git-mode'. Use either ARG as git integration value of read it interactively. (fn &optional ARG) (defalias 'treemacs--setup-git-mode #[256 "\211\211\301\267\202\302\303M\210\304\305M\207\302\306M\210\304\307M\207\302\310M\210\304\311M\207" [treemacs-git-mode #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (deferred 8 extended 8 simple 16)) treemacs--git-status-process-function treemacs--git-status-process-extended treemacs--git-status-parse-function treemacs--parse-git-status-extended treemacs--git-status-process-simple treemacs--parse-git-status-simple ignore #[257 "\300\301\302\"\207" [make-hash-table :test equal] 4 "\n\n(fn _)"]] 3 (#$ . 25014) (byte-code "\300\301\302\303\"\227!C\207" [intern completing-read "Git Integration: " ("Simple" "Extended" "Deferred")] 4)]) #@32 Tear down `treemacs-git-mode'. (defalias 'treemacs--tear-down-git-mode #[0 "\300\301M\210\302\303M\207" [treemacs--git-status-process-function ignore treemacs--git-status-parse-function #[257 "\300\301\302\"\207" [make-hash-table :test equal] 4 "\n\n(fn _)"]] 2 (#$ . 25858)]) #@172 Get the parsed git result of FUTURE. Parse and set it if it hasn't been done yet. If FUTURE is nil an empty hash table is returned. FUTURE: Pfuture process (fn FUTURE) (defalias 'treemacs--get-or-parse-git-result #[257 "\211\203\300\301\"\211\203 \207\302!\303\301#\210\207\304\305\306\"\207" [process-get git-table treemacs--git-status-parse-function process-put make-hash-table :test equal] 7 (#$ . 26142)]) (byte-code "\300\301\302\303#\300\207" [function-put treemacs--get-or-parse-git-result compiler-macro treemacs--get-or-parse-git-result--inliner] 4) #@28 (fn INLINE--FORM FUTURE) (defalias 'treemacs--get-or-parse-git-result--inliner #[514 "\3002H\211\301!\203\211\202\302\303!\304\305\306\307\310DE\311\312\313\314DDC\315\307\310D\313F\313FF\316CF=\203>\211\266\203\202G\317DC\"\266\2030\207" [inline--just-use macroexp-copyable-p make-symbol "future" if --if-let process-get quote git-table it let result treemacs--git-status-parse-function process-put ht macroexp-let*] 15 (#$ . 26717)]) (byte-code "\305\306!\204l\307\310!????B\211:\203:\211\242\211\311=\2039\243\211\312\267\266\202;\313\314!\266\202;\313\315!\266\202;\210\210\210\211\203A\316\211\204j\317\320!\204j\n:\204S C\321\f\204e\322\323\324\325\326\327#\330\331!#\210\332\333\334\"\210\266\335\336!\207" [treemacs-python-executable treemacs-collapse-dirs treemacs--saved-eldoc-display treemacs-eldoc-display treemacs--no-messages featurep treemacs executable-find "git" t #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (t 40 _ 48)) treemacs-git-mode deferred simple 3 boundp treemacs-no-load-time-warnings nil message "%s %s" propertize "[Treemacs]" face ((:inherit warning :weight bold)) format "Python3 not found, advanced git-mode and directory flattening features will be disabled." add-hook pre-command-hook treemacs--restore-eldoc-after-log provide treemacs-async] 8)