;; You may delete these explanatory comments.
(package-initialize)
+;; used to freeze emacs and was really annoying,
+;; seems its changed now. no harm in keeping this though.
(global-unset-key (kbd "C-z"))
;; these need to be done before the hook in order to satisfy the byte compiler
;; main hook for my auto save
(add-hook 'auto-save-hook 'my-auto-save)
;; additional hook to try to deal with emacs not auto-saving when a buffer isn't active
-(add-hook 'window-configuration-change-hook 'my-auto-save)
+(add-hook 'window-configuration-change-hook 'my-auto-save-win)
-(defun my-auto-save ()
+;; this function from mu4e really does not like buffer saving
+(advice-add 'message-send-and-exit :before 'my-as-off)
+(advice-add 'message-send-and-exit :after 'my-as-on)
+
+;; avoid window config hook saving too much, it can
+;; get into loops in some random situations
+(setq my-auto-save-last nil)
+(defun my-auto-save-win ()
+ (unless (eq (current-buffer) my-auto-save-last)
+ (my-auto-save (current-buffer))))
+
+(defun my-auto-save (&optional last)
(when (and
my-as
(buffer-file-name)
(not (string= (buffer-file-name) "*draft*"))
(buffer-modified-p)
(not (org-src-edit-buffer-p)))
+ (setq my-auto-save-last last)
(let (message-log-max)
;; a bit of a hack to partially suppress the constant saving in the echo area
(with-temp-message ""
;; this starter kit setting is probably good
(if window-system (setq frame-title-format '(buffer-file-name "%f" ("%b"))))
-(set-terminal-coding-system 'utf-8)
-(set-keyboard-coding-system 'utf-8)
-(prefer-coding-system 'utf-8)
+
+;;(prefer-coding-system 'utf-8-unix)
;; remove ugly 3d box feature
(set-face-attribute 'mode-line nil :box nil)
#+end_src
** named commands
+*** gdb
+gdb-many-windows
*** tramp sudo
/ssh:host|sudo:host:
when in the same session, you can then do: