minor fixes
authorIan Kelling <iank@fsf.org>
Tue, 29 May 2018 00:23:01 +0000 (20:23 -0400)
committerIan Kelling <iank@fsf.org>
Tue, 29 May 2018 00:23:01 +0000 (20:23 -0400)
.gitignore
init.el
my-init.org

index 887888e2e5755efd5c6530bec06885449acb9a2d..ae7be910b3f9b37663785955006a6c49f4a7e64f 100644 (file)
@@ -26,6 +26,7 @@
 /emacs-disabled
 /session.*
 *.elc
 /emacs-disabled
 /session.*
 *.elc
+/games
 
 # artifacts I create
 /my-init.el
 
 # artifacts I create
 /my-init.el
diff --git a/init.el b/init.el
index 5596c9b998c60401293416f88b01eaee496aefe0..551249a3ba42f3b7a896dff2f1943f51cb568ecd 100644 (file)
--- a/init.el
+++ b/init.el
 
 ;; stop from minimizing & freezing the gui
 
 
 ;; stop from minimizing & freezing the gui
 
-;; Added by Package.el.  This must come before configurations of
-;; installed packages.  Don't delete this line.  If you don't want it,
-;; just comment it out by adding a semicolon to the start of the line.
-;; 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"))
 ;; used to freeze emacs and was really annoying,
 ;; seems its changed now. no harm in keeping this though.
 (global-unset-key (kbd "C-z"))
index 46158c35aeabb1386e43a531c06c77190522fbed..36593573fb1d0953a1914255fe06a9ef3d25cab5 100644 (file)
@@ -1,4 +1,4 @@
-#+TITLE: My Personal Init Customization
+#+title: My Personal Init Customization
 #+OPTIONS: toc:nil num:nil ^:nil
 * copyright
 # Copyright (C) 2017 Ian Kelling
 #+OPTIONS: toc:nil num:nil ^:nil
 * copyright
 # Copyright (C) 2017 Ian Kelling
@@ -856,6 +856,7 @@ interesting light themes
 #+end_src
 
 * yasnippet
 #+end_src
 
 * yasnippet
+
 cd ~/.emacs.d/src
 git clone --recursive https://github.com/capitaomorte/yasnippet
 touch snippets/.yas-make-groups
 cd ~/.emacs.d/src
 git clone --recursive https://github.com/capitaomorte/yasnippet
 touch snippets/.yas-make-groups
@@ -1003,7 +1004,7 @@ send-mail-function (quote sendmail-send-it)
     (read-only-mode 0)
     (let ((start (match-beginning 0))
           (end (search-forward "-----END PGP MESSAGE-----" nil t)))
     (read-only-mode 0)
     (let ((start (match-beginning 0))
           (end (search-forward "-----END PGP MESSAGE-----" nil t)))
-      (shell-command-on-region start end "gpg -dq" nil t shell-command-default-error-buffer t)
+      (shell-command-on-region start end "gpg2 -dq" nil t shell-command-default-error-buffer t)
       )))
 (add-hook 'mu4e-view-mode-hook 'my-decrypt)
 
       )))
 (add-hook 'mu4e-view-mode-hook 'my-decrypt)
 
@@ -1063,6 +1064,7 @@ and Ian Kelling as the name"
    mu4e-headers-visible-lines 15
    mu4e-maildir "/nocow/user/fsfmd"
    mu4e-refile-folder "/Spam"
    mu4e-headers-visible-lines 15
    mu4e-maildir "/nocow/user/fsfmd"
    mu4e-refile-folder "/Spam"
+   mu4e-index-lazy-check nil
    mu4e-get-mail-command "/a/bin/distro-setup/fsf-get-mail"
    user-mail-address "iank@fsf.org"
    mail-signature "
    mu4e-get-mail-command "/a/bin/distro-setup/fsf-get-mail"
    user-mail-address "iank@fsf.org"
    mail-signature "
@@ -1811,6 +1813,10 @@ make all
      (define-key haskell-mode-map (kbd "C-a") 'nil)
      (define-key haskell-mode-map (kbd "C-j") 'nil)))
 
      (define-key haskell-mode-map (kbd "C-a") 'nil)
      (define-key haskell-mode-map (kbd "C-j") 'nil)))
 
+(eval-after-load "python-mode"
+  '(progn
+(define-key python-mode-map (kbd "C-j") nil)))
+
 (defun pretty-lambdas-haskell ()
   (font-lock-add-keywords
    nil `((,(concat "(?\\(" (regexp-quote "\\") "\\)")
 (defun pretty-lambdas-haskell ()
   (font-lock-add-keywords
    nil `((,(concat "(?\\(" (regexp-quote "\\") "\\)")
@@ -2094,6 +2100,13 @@ currently makes emacs hang a bunch. dunno why. just using eclipse instead
 * modes with little configuration needed
   #+begin_src emacs-lisp
 
 * modes with little configuration needed
   #+begin_src emacs-lisp
 
+(require 'outshine)
+(add-hook 'outline-minor-mode-hook 'outshine-hook-function)
+(add-hook 'emacs-lisp-mode-hook 'outline-minor-mode)
+(add-hook 'sh-mode-hook 'outline-minor-mode)
+
+
+
 (setq org-caldav-url "https://cal.iankelling.org"
 org-caldav-calendar-id "ian"
 org-caldav-inbox "/p/cal.org")
 (setq org-caldav-url "https://cal.iankelling.org"
 org-caldav-calendar-id "ian"
 org-caldav-inbox "/p/cal.org")
@@ -2322,6 +2335,10 @@ org-caldav-inbox "/p/cal.org")
 * misc general settings
 
 #+begin_src emacs-lisp
 * misc general settings
 
 #+begin_src emacs-lisp
+;; https://www.emacswiki.org/emacs/FillParagraph
+;; make list items start paragraphs.
+(setq paragraph-start "\f\\|[ \t]*$\\|[ \t]*[-+*] ")
+
 (setq sh-basic-offset 2)
 (setq vc-follow-symlinks t)
 
 (setq sh-basic-offset 2)
 (setq vc-follow-symlinks t)
 
@@ -2464,7 +2481,12 @@ unchecked some stuff so that it inherits from default.
 #+begin_src emacs-lisp
 
 
 #+begin_src emacs-lisp
 
 
-
+(defun fill-buffer ()
+  (interactive)
+  (save-mark-and-excursion
+    (beginning-of-buffer)
+    (while (= (forward-line) 0)
+      (fill-paragraph))))
 
 
 (defun next-backup-dir ()
 
 
 (defun next-backup-dir ()
@@ -3625,9 +3647,12 @@ these colors were better for dark theme
 * zrc
 #+begin_src emacs-lisp
 (require 'znc)
 * zrc
 #+begin_src emacs-lisp
 (require 'znc)
+(setq erc-fill-prefix "")
 (defun chirp()
   (interactive)
 (defun chirp()
   (interactive)
-  (start-process-shell-command "ignoreme" nil "mpv --no-terminal --vo=null --volume=50 /a/bin/data/bird.mp3"))
+  (setq vol 50)
+  (when (string= (system-name) "tp") (setq vol 40))
+  (start-process-shell-command "ignoreme" nil (format "mpv --no-terminal --vo=null --volume=%d /a/bin/data/bird.mp3" vol)))
 ;; from https://www.emacswiki.org/emacs/ErcSound
 (defun erc-my-privmsg-sound (proc parsed)
   (let* ((tgt (car (erc-response.command-args parsed)))
 ;; from https://www.emacswiki.org/emacs/ErcSound
 (defun erc-my-privmsg-sound (proc parsed)
   (let* ((tgt (car (erc-response.command-args parsed)))
@@ -3642,7 +3667,7 @@ these colors were better for dark theme
 
 (defun erc-sound-if-not-server (match-type nickuserhost msg)
   (unless (string-match "Server:[0-9]+" nickuserhost)
 
 (defun erc-sound-if-not-server (match-type nickuserhost msg)
   (unless (string-match "Server:[0-9]+" nickuserhost)
-    (start-process-shell-command "ignoreme" nil "mpv --no-terminal --vo=null /a/bin/data/bird.mp3")))
+    (chirp)))
 (add-hook 'erc-text-matched-hook 'erc-sound-if-not-server)
 
 (erc-track-mode 1)
 (add-hook 'erc-text-matched-hook 'erc-sound-if-not-server)
 
 (erc-track-mode 1)
@@ -4665,6 +4690,7 @@ dot-mode-execute
 *** C-q
 org-cycle, comint previous arg
 #+begin_src emacs-lisp
 *** C-q
 org-cycle, comint previous arg
 #+begin_src emacs-lisp
+(global-set-key (kbd "C-q") 'outline-cycle)
 (add-hook 'org-mode-hook
           (lambda () (define-key org-mode-map (kbd "C-q") 'org-cycle)))
 (define-key widget-keymap (kbd "C-q") 'widget-forward)
 (add-hook 'org-mode-hook
           (lambda () (define-key org-mode-map (kbd "C-q") 'org-cycle)))
 (define-key widget-keymap (kbd "C-q") 'widget-forward)
@@ -5493,14 +5519,15 @@ plain newline
 *** C-space]
 org-edit-special
 #+begin_src emacs-lisp
 *** C-space]
 org-edit-special
 #+begin_src emacs-lisp
+;; commented due to new keyboard needing ctrl-space for mark
 ;; (kbd "<C-space>") does not work, (kbd "C-SPC") should work
 ;; (kbd "<C-space>") does not work, (kbd "C-SPC") should work
-(add-hook 'org-mode-hook
-          (lambda ()
-            (define-key org-mode-map (kbd "C-SPC") 'org-edit-special)
-            ;; org-src-mode-map is broken in git version of emacs.
-            ;; temporarily use this for exiting edit-special mode.
-            (global-set-key (kbd "C-M--") 'org-edit-src-exit)
-            (define-key org-src-mode-map (kbd "C-SPC") 'org-edit-src-exit)))
+;; (add-hook 'org-mode-hook
+;;           (lambda ()
+;;             (define-key org-mode-map (kbd "C-SPC") 'org-edit-special)
+;;             ;; org-src-mode-map is broken in git version of emacs.
+;;             ;; temporarily use this for exiting edit-special mode.
+;;             (global-set-key (kbd "C-M--") 'org-edit-src-exit)
+;;             (define-key org-src-mode-map (kbd "C-SPC") 'org-edit-src-exit)))
 #+end_src
 *** M-space
 *** C-M-space
 #+end_src
 *** M-space
 *** C-M-space