Borrowed from https://github.com/nilcons/emacs-use-package-fast/ to
load [[https://github.com/jwiegley/use-package/][use-package]] even faster
#+BEGIN_SRC emacs-lisp
- (setq package-enable-at-startup nil)
- (setq package--init-file-ensured t)
- (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
- ("melpa" . "https://melpa.org/packages/")
- ("org" . "http://orgmode.org/elpa/") ))
(eval-and-compile
+ ;; add /etc/ssl/ca-global/ca-certificates.crt so that we can
+ ;; download packages when we're on Debian hosts which chop down the
+ ;; list of available certificates
+ (add-to-list 'gnutls-trustfiles "/etc/ssl/ca-global/ca-certificates.crt")
+ (setq package-enable-at-startup nil)
+ (setq package--init-file-ensured t)
+ (setq package-user-dir "~/var/emacs/elpa")
+ (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
+ ("melpa" . "https://melpa.org/packages/")
+ ("org" . "http://orgmode.org/elpa/")))
(setq use-package-verbose (not (bound-and-true-p byte-compile-current-file))))
(mapc #'(lambda (add) (add-to-list 'load-path add))
(eval-when-compile
nil))
load-path))))))
- (require 'use-package)
+ ;;; fix up info paths for packages
+ (with-eval-after-load "info"
+ (info-initialize)
+ (dolist (dir (directory-files package-user-dir))
+ (let ((fdir (concat (file-name-as-directory package-user-dir) dir)))
+ (unless (or (member dir '("." ".." "archives" "gnupg"))
+ (not (file-directory-p fdir))
+ (not (file-exists-p (concat (file-name-as-directory fdir) "dir"))))
+ (add-to-list 'Info-directory-list fdir)))))
+
+
+ (eval-when-compile
+ (require 'use-package))
(require 'diminish)
(require 'bind-key)
#+END_SRC
*** Auto-YASnippet
#+BEGIN_SRC emacs-lisp
(use-package auto-yasnippet
+ :ensure t
:bind (("H-w" . aya-create)
("H-y" . aya-expand)
)
(bind-key "C-n" #'company-select-next company-active-map)
(bind-key "C-p" #'company-select-previous company-active-map)
- (bind-key "<tab>" #'company-complete company-active-map)
+ ; (bind-key "<tab>" #'company-complete company-active-map)
(bind-key "M-?" #'company-show-doc-buffer company-active-map)
(bind-key "M-." #'company-show-location company-active-map)
(bind-key "M-/" #'company-complete-common org-mode-map)
(setq-default org-log-done 'time)
(setq-default org-agenda-ndays 5)
+ (setq org-agenda-sticky t)
+ (defun dla/show-org-agenda ()
+ (interactive)
+ (let (agendabuffer
+ '(delq nil
+ (mapcar (lambda (x)
+ (and (string-match-p
+ "\*Org Agenda.*\*"
+ (buffer-name x))
+ x)
+ )
+ (buffer-list))))
+ (if agendabuffer
+ (switch-to-buffer
+ (buffer-name agendabuffer))
+ (org-agenda-list)))
+ (delete-other-windows))
+
;; agenda configuration
;; Do not dim blocked tasks
(setq org-agenda-dim-blocked-tasks nil)
"~/projects/org-notes/wildman.org"
"~/projects/org-notes/uddin.org"
"~/projects/org-notes/reviews.org"
+ "~/projects/org-notes/laurel.org"
+ "~/projects/org-notes/from-calendar.org"
"~/org-mode/from-mobile.org"
"~/projects/org-notes/fh.org")))
("<f9> I" . bh/punch-in)
("<f9> O" . bh/punch-out)
("<f9> SPC" . bh/clock-in-last-task)
- ("<f12>" . org-agenda)
+ ("<f12>" . dla/show-org-agenda)
;; ("<f5>" . bh/org-todo)
("<S-f5>" . bh/widen)
("<f7>" . bh/set-truncate-lines)
("<f8>" . org-cycle-agenda-files)
- ("<f9> <f9>" . org-agenda)
+ ("<f9> <f9>" . dla/show-org-agenda)
("<f9> b" . bbdb)
("<f9> c" . calendar)
("<f9> f" . boxquote-insert-file)
(setq case-fold-search t)
(setq confirm-kill-emacs (quote y-or-n-p))
(setq cperl-lazy-help-time nil)
- (display-time)
- (setq display-time-24hr-format t)
- (setq display-time-day-and-date t)
- (display-time-mode 1)
(global-font-lock-mode 1)
(icomplete-mode 1)
(setq log-edit-keep-buffer t)