Commit 62d38b5155e9

Vincent Demeester <vincent@sbr.pm>
2020-03-10 15:36:19
init.el: make sure we don't load built-in org…
… and load org-gcal configuration only when needed. Also, do not load `helpful` if noninteractive. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent ac88d71
config/setup-navigating.el
@@ -6,6 +6,7 @@
          ("C-c n w" . avy-goto-word-1)))
 
 (use-package helpful
+  :unless noninteractive
   :bind (("C-c h F" . helpful-function)
          ("C-c h C" . helpful-command)
          ("C-c h M" . helpful-macro)
config/setup-org.el
@@ -166,6 +166,7 @@
 
 (use-package org-gcal
   :after (org)
+  :commands (org-gcal-fetch)
   :config
   (require 'netrc)
 
emacs.org
@@ -438,6 +438,22 @@
     (load-file (downcase (concat user-emacs-directory "/hosts/" (vde/short-hostname) ".el"))))
 #+end_src
 
+*** Remove built-in =org-mode=
+
+I want to make sure I am using the installed version of =orgmode= (from my org
+configuration) instead of the built-in one. To do that safely, let's remove the built-in
+version out of the load path.
+
+#+begin_src emacs-lisp :tangle init.el
+(require 'cl-seq)
+(setq load-path
+      (cl-remove-if
+       (lambda (x)
+         (string-match-p "org$" x))
+       load-path))
+#+end_src
+
+
 ** ~PATH~'s customization
 :PROPERTIES:
 :header-args: :tangle config/00-paths.el
@@ -993,6 +1009,7 @@
 #+begin_src emacs-lisp
 (use-package org-gcal
   :after (org)
+  :commands (org-gcal-fetch)
   :config
   (require 'netrc)
 
@@ -3328,6 +3345,7 @@
          ("C-c n w" . avy-goto-word-1)))
 
 (use-package helpful
+  :unless noninteractive
   :bind (("C-c h F" . helpful-function)
          ("C-c h C" . helpful-command)
          ("C-c h M" . helpful-macro)
init.el
@@ -108,6 +108,13 @@
 (if (file-exists-p (downcase (concat user-emacs-directory "/hosts/" (vde/short-hostname) ".el")))
     (load-file (downcase (concat user-emacs-directory "/hosts/" (vde/short-hostname) ".el"))))
 
+(require 'cl-seq)
+(setq load-path
+      (cl-remove-if
+       (lambda (x)
+         (string-match-p "org$" x))
+       load-path))
+
 (setenv "PAGER" "cat")
 (setenv "TERM" "xterm-256color")
 (setenv "NOTMUCH_CONFIG" (expand-file-name ".config/notmuch/notmuchrc" (getenv "HOME")))