X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=emacs_el%2Fconfiguration%2Fdon-configuration.org;h=3313bcc1c33c02b36061558e9bd5da3b5cfb6563;hb=694b080de63bfd79d380fdc0a3b31c5302093ef0;hp=da73fd3500c92034120b486dc546d05940ef0e8e;hpb=fb0cecd6e493c7ad774fc1a8a6d69afad89fffb2;p=lib.git diff --git a/emacs_el/configuration/don-configuration.org b/emacs_el/configuration/don-configuration.org index da73fd3..3313bcc 100644 --- a/emacs_el/configuration/don-configuration.org +++ b/emacs_el/configuration/don-configuration.org @@ -28,13 +28,18 @@ 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-user-dir "~/var/emacs/elpa") - (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 + (require 'gnutls) + (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 @@ -102,13 +107,14 @@ load [[https://github.com/jwiegley/use-package/][use-package]] even faster * Variables ** Safe Local Variables #+BEGIN_SRC emacs-lisp - (setq safe-local-variable-values - (quote ((auto-save-default) - (make-backup-files) - (cperl-indent-level . 4) - (indent-level . 4) - (indent-tabs-mode . f) - ))) +(setq safe-local-variable-values + (quote ((auto-save-default) + (make-backup-files) + (cperl-indent-level . 4) + (indent-level . 4) + (indent-tabs-mode . f) + (vcl-indent-level . 4) + ))) #+END_SRC * Memory #+BEGIN_SRC emacs-lisp @@ -358,6 +364,7 @@ value, scrolling continues until there is no more output. *** Auto-YASnippet #+BEGIN_SRC emacs-lisp (use-package auto-yasnippet + :ensure t :bind (("H-w" . aya-create) ("H-y" . aya-expand) ) @@ -386,7 +393,7 @@ value, scrolling continues until there is no more output. (bind-key "C-n" #'company-select-next company-active-map) (bind-key "C-p" #'company-select-previous company-active-map) - (bind-key "" #'company-complete company-active-map) + ; (bind-key "" #'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) @@ -1404,6 +1411,24 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori (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) @@ -1497,6 +1522,8 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori "~/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"))) @@ -1591,12 +1618,12 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori (" I" . bh/punch-in) (" O" . bh/punch-out) (" SPC" . bh/clock-in-last-task) - ("" . org-agenda) + ("" . dla/show-org-agenda) ;; ("" . bh/org-todo) ("" . bh/widen) ("" . bh/set-truncate-lines) ("" . org-cycle-agenda-files) - (" " . org-agenda) + (" " . dla/show-org-agenda) (" b" . bbdb) (" c" . calendar) (" f" . boxquote-insert-file) @@ -1877,29 +1904,31 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori #+END_SRC ** General Org Babel Configuration #+BEGIN_SRC emacs-lisp - ;; org babel support - (org-babel-do-load-languages - 'org-babel-load-languages - '((emacs-lisp . t ) - (R . t) - (latex . t) - (ditaa . t) - (dot . t) - )) - ;; use graphviz-dot for dot things - (add-to-list 'org-src-lang-modes '("dot" . graphviz-dot)) - ;; org-babel-by-backend - (defmacro org-babel-by-backend (&rest body) - `(case (if (boundp 'backend) - (org-export-backend-name backend) - nil) ,@body)) - - (defun my/fix-inline-images () - (when org-inline-image-overlays - (org-redisplay-inline-images))) - - (add-hook 'org-babel-after-execute-hook - 'my/fix-inline-images) +;; org babel support +(org-babel-do-load-languages + 'org-babel-load-languages + '((emacs-lisp . t ) + (R . t) + (latex . t) + (ditaa . t) + (dot . t) + )) +;; use graphviz-dot for dot things +(add-to-list 'org-src-lang-modes '("dot" . graphviz-dot)) +;; do not indent begin_src blocks +(setq org-edit-src-content-indentation 0) +;; org-babel-by-backend +(defmacro org-babel-by-backend (&rest body) + `(case (if (boundp 'backend) + (org-export-backend-name backend) + nil) ,@body)) + +(defun my/fix-inline-images () + (when org-inline-image-overlays + (org-redisplay-inline-images))) + +(add-hook 'org-babel-after-execute-hook + 'my/fix-inline-images) #+END_SRC ** LaTeX configuration