;; emacs -f benchmark-init/show-durations-tree
;; to catch things post-init
;; emacs -f benchmark-init/deactivate
- ;;(require 'benchmark-init)
- ;;(add-hook 'after-init-hook 'benchmark-init/deactivate)
+ (require 'benchmark-init)
+ (add-hook 'after-init-hook 'benchmark-init/deactivate)
;;
;; these need to be done before the hook in order to satisfy the byte compiler or batch mode
;; mu4e has a bug right now, undo breaks when saving drafts
(not (string= (buffer-file-name) "*draft*"))
(buffer-modified-p)
- (not (org-src-edit-buffer-p)))
+ (not (and (boundp 'org-src-edit-buffer-p) (org-src-edit-buffer-p))))
;; serial is incremented on each save, so let's do a bit less of them
(not (derived-mode-p 'dns-mode))
(setq my-auto-save-last last)
;; and git will automatically remove it unless i manually disable it.
mail-signature "
---
+--
Ian Kelling | Senior Systems Administrator, Free Software Foundation
GPG Key: B125 F60B 7B28 7FF6 A2B7 DF8F 170A F0E2 9542 95DF
https://fsf.org | https://gnu.org
(defun gtags-update-hook()
"Update GTAGS file incrementally upon saving a file"
- (when (and ggtags-mode ggtags-project-root)
+ (when (and (boundp 'ggtags-mode) ggtags-mode ggtags-project-root)
(gtags-update-current-file)))
(add-hook 'after-save-hook 'gtags-update-hook)
;; show the name of the current function definition in the modeline
- (require 'which-func)
+ ;;(require 'which-func)
(setq which-func-modes t)
(which-function-mode 1)
(define-key Info-mode-map [mouse-4] nil)
(define-key Info-mode-map [mouse-5] nil))
- (eval-after-load "info" '(my-info-init))
-
- (require 'smooth-scroll)
- ;; long gnus summary buffers lags too much with this,
- ;; but I like it enough to leave it enabled by default
- ;; and crank up the step size to be faster
- ;; and it doesn't have a way to enable it only for certain modes etc.
- ;; todo sometime, make it work for certain modes only
- (smooth-scroll-mode t)
- ;; its too slow with the default of 2
- (setq smooth-scroll/vscroll-step-size 7)
- ;; sublimity doesn't work as good going fast by default
- ;; smooth-scrolling.el, does not do smooth scrolling. its about cursor location
+ (add-hook 'info-mode-hook 'my-info-init)
(setq sh-here-document-word "'EOF'")
imenu-auto-rescan t
indicate-empty-lines t) ; mark end of buffer
+ (require 'smooth-scroll)
+ ;; long gnus summary buffers lags too much with this,
+ ;; but I like it enough to leave it enabled by default
+ ;; and crank up the step size to be faster
+ ;; and it doesn't have a way to enable it only for certain modes etc.
+ ;; todo sometime, make it work for certain modes only
+ (smooth-scroll-mode t)
+ ;; its too slow with the default of 2
+ (setq smooth-scroll/vscroll-step-size 7)
+ ;; sublimity doesn't work as good going fast by default
+ ;; smooth-scrolling.el, does not do smooth scrolling. its about cursor location
+
(blink-cursor-mode '(-4))
(menu-bar-mode -1)
;; todo, testout these mode specific settings from graphene.
;; Ruby-specific pairs and handlers
- (require 'smartparens-ruby)
+
+ (eval-after-load "ruby"
+ '(require 'smartparens-ruby))
;; Markdown
(sp-local-pair '(markdown-mode gfm-mode) "*" "*"
(sp-local-pair 'html-mode "\"" nil :unless '(:rem sp-point-after-word-p))
-;;; smex
- ;; todo; check out smex-show-unbound-commands shows frequently used commands that have no key bindings.
- ; these must be before smex-initialize
- (setq
- smex-save-file "~/.emacs.d/.smex-items")
- (smex-initialize)
+
;;; spell correction
(setq
ispell-program-name "hunspell"
(dolist
(r `(
(?i (file . ,"~/.emacs.d/init.el"))
+ (?w (file . ,"/a/work.org"))
(?t (file . ,"/a/t.org"))
(?x (file . ,"/a/x.txt"))
))
;;; keybinds
;;;; misc
+
+ (define-prefix-command 'terminal-key-map)
+ (global-set-key (kbd "\e[") 'terminal-key-map)
+
+
+
(global-set-key (kbd "C-x C-b") 'ibuffer)
(global-set-key (kbd "C-M-q") 'quoted-insert)
-;;;;; C-w ---
- ;; in terminal, it's ctrl-backspace, duplicate keybind.
+;;;;; C-w
+
+ (global-set-key (kbd "C-w") 'counsel-find-file)
+
;;;;; M-w org-clock-in
(global-set-key (kbd "M-w") 'org-clock-in)
(global-set-key (kbd "C-s") 'kill-region)
-;;;;; M-x - smex
+;;;;; M-x - counsel-m-x
- (global-set-key (kbd "M-x") 'smex)
+
+ ;; todo; check out smex-show-unbound-commands shows frequently used commands that have no key bindings.
+ ;; this must be before smex-initialize
+ (setq
+ smex-save-file "~/.emacs.d/.smex-items")
+
+ ;; this uses smex
+ (global-set-key (kbd "M-x") 'counsel-M-x)
;;;;; C-M-x - cut-to-register
;;;;; C-backspace - backward-kill-symbol
+ (define-key terminal-key-map (kbd "4b") 'backward-kill-symbol) ;c-backspace in my konsole
+
+ ;; c-w is duplicate in terminal
(global-set-key (kbd "<C-backspace>") 'backward-kill-symbol)
(add-hook 'comint-mode-hook
(lambda ()
(delete-windows-on "*Help*")
))
-;;;;; C-i - -----
+;;;;; C-i -
+ (define-key input-decode-map [?\C-i] [C-i])
;;;;; C-M-i - query-replace-regexp
(global-set-key (kbd "C-M-i") 'query-replace-regexp)
(org-show-context 'mark-goto)))
(global-set-key (kbd "C-j") 'my-pop-to-mark-command)
- (define-key ido-common-completion-map (kbd "C-j") 'ido-select-text)
(add-hook 'ido-setup-hook
- (lambda () (define-key ido-common-completion-map (kbd "C-j") 'ido-select-text)))
+ (lambda ()
+ (define-key ido-common-completion-map (kbd "C-j") 'ido-select-text)
+ ))
(add-hook 'lisp-interaction-mode-hook
(lambda ()
(define-key lisp-interaction-mode-map (kbd "C-j") nil)))
(move-beginning-of-line 2))
(global-set-key (kbd "C-M-;") 'comment-current-line-dwim)
+;;;;; C-m
+(define-key input-decode-map [?\C-m] [C-m])
;;;;; C-M-m - recursive grep
(define-key global-map (kbd "C-M-m") 'rgrep)
-;;;;; C-, - counsel-find-file
+;;;;; C-, - ---
+;; not recognized by terminal, can't get konsole keydef file to recognize comma,
+;; todo: dig into konsole sources, or try newer version than t8
- (global-set-key (kbd "C-,") 'counsel-find-file)
(add-hook 'flyspell-mode-hook
(lambda () (define-key flyspell-mode-map (kbd "C-,") nil)))
(add-hook 'flyspell-mode-hook
(lambda () (define-key flyspell-mode-map (kbd "C-.") nil)))
(define-key dot-mode-map (kbd "C-.") nil)
+ (define-key terminal-key-map (kbd "4c") 'recentf-ido-find-file)
(global-set-key (kbd "C-.") 'recentf-ido-find-file)
(add-hook 'php-mode-hook
(lambda () (define-key php-mode-map (kbd "C-.") nil)))
;;;;; C-S-down-arrow - m-x for major mode
+;; todo, update this for ivy
(global-set-key (kbd "<C-S-kp-enter>") 'smex-major-mode-commands)
;;;;; C-lbracket - ----
(global-set-key (kbd "<M-return>") 'plain-newline)
-;;;;; C-M-return - newline-anywhere-previous
- (defun newline-anywhere-previous ()
- "Add a newline from anywhere in the line."
- (interactive)
- (forward-line -1)
- (end-of-line)
- (newline-and-indent))
- (global-set-key (kbd "<C-M-return>") 'newline-anywhere-previous)
-
;;;;; C-space - org-edit-special
;; commented due to new keyboard needing ctrl-space for mark