From f8bf76f7fbc3fbc04da5dbc0db2f16296b6fb5c2 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sat, 8 Apr 2017 23:37:16 -0700 Subject: [PATCH] varous small fixes --- init.el | 2 ++ my-init.org | 23 ++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/init.el b/init.el index 6b279ca..5596c9b 100644 --- a/init.el +++ b/init.el @@ -32,6 +32,8 @@ ;; 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 diff --git a/my-init.org b/my-init.org index 1c98c88..fa7c72f 100644 --- a/my-init.org +++ b/my-init.org @@ -574,9 +574,20 @@ I need this function here, where INSIDE_EMACS is replaced with RLC_INSIDE_EMACS. ;; 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) @@ -584,6 +595,7 @@ I need this function here, where INSIDE_EMACS is replaced with RLC_INSIDE_EMACS. (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 "" @@ -2268,9 +2280,8 @@ currently makes emacs hang a bunch. dunno why. just using eclipse instead ;; 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) @@ -3649,6 +3660,8 @@ commands to change: select other window: C-x o. #+end_src ** named commands +*** gdb +gdb-many-windows *** tramp sudo /ssh:host|sudo:host: when in the same session, you can then do: -- 2.30.2