Enable company-mode during Emacs startup. Echo full path to executable in echo-area.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 26 Jan 2017 20:53:33 +0200
changeset 1464 bc41ca628f69
parent 1463 4c92e9fc2efd
child 1465 9def370d67f4
Enable company-mode during Emacs startup. Echo full path to executable in echo-area.
.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)))