# HG changeset patch # User Oleksandr Gavenko # Date 1485456813 -7200 # Node ID bc41ca628f69ed24794be69adb963ad6683b78db # Parent 4c92e9fc2efdbc9fa31a76e30e0d05bb3c429c75 Enable company-mode during Emacs startup. Echo full path to executable in echo-area. diff -r 4c92e9fc2efd -r bc41ca628f69 .emacs-my --- a/.emacs-my Thu Jan 26 20:01:50 2017 +0200 +++ b/.emacs-my Thu Jan 26 20:53:33 2017 +0200 @@ -1114,6 +1114,9 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (message "company") +(when (and (fboundp 'package-installed-p) (package-installed-p 'company)) + (require 'company)) + (setq company-dabbrev-other-buffers 'all) ; or `t' or `nil' ;; (setq company-dabbrev-time-limit 0.1) (setq company-dabbrev-downcase nil) @@ -1132,7 +1135,9 @@ (cl-case command (interactive (company-begin-backend 'company-executable)) (prefix (thing-at-point 'filename)) - (candidates (locate-file-completion-table exec-path exec-suffixes (thing-at-point 'filename) 'identity t)))) + (candidates (locate-file-completion-table exec-path exec-suffixes (thing-at-point 'filename) 'identity t)) + ;; (annotation (concat " " (locate-file arg exec-path exec-suffixes))) + (meta (concat "Full path: " (locate-file arg exec-path exec-suffixes))))) (defun my/company-text-setup () (setq-local company-backends '((company-dabbrev company-files)))