whitespace in sign, plus minor improvements
[dot-emacs] / my-init.org
index 6dcb7f1d5fa54aaf710563413a932c6670543edb..46158c35aeabb1386e43a531c06c77190522fbed 100644 (file)
@@ -605,19 +605,21 @@ I need this function here, where INSIDE_EMACS is replaced with RLC_INSIDE_EMACS.
       (with-temp-message ""
         (basic-save-buffer)))))
 
-(defun my-as-off ()
+;; in the message-send-and-exit advice, got an error because it passed an arg.
+;; didn't look into why, just add ignored args.
+(defun my-as-off (&rest ignore)
   (interactive)
   (setq my-as nil))
 
-(defun my-as-off-local ()
+(defun my-as-off-local (&rest ignore)
   (interactive)
   (setq-local my-as nil))
 
-(defun my-as-on ()
+(defun my-as-on (&rest ignore)
   (interactive)
   (setq my-as t))
 
-(defun my-as-on-local ()
+(defun my-as-on-local (&rest ignore)
   (interactive)
   (setq-local my-as on))
 
@@ -953,7 +955,9 @@ has a list of folders which i'd rather not publish, so it's config is archived.
 
 ;; (setq mu4e-headers-results-limit 2000)
 
-(setq send-mail-function (quote sendmail-send-it) ;; common to gnus also
+(setq
+;; common to gnus. default sendmail-query-once asks us, then sets this via customize.
+send-mail-function (quote sendmail-send-it)
       ;; use the standard imap folders
       mu4e-sent-folder   "/Sent"
       mu4e-drafts-folder "/Drafts"
@@ -967,6 +971,9 @@ has a list of folders which i'd rather not publish, so it's config is archived.
       mu4e-headers-fields (delq (assoc :mailing-list mu4e-headers-fields) mu4e-headers-fields)
       ;; default 500.
       mu4e-headers-results-limit 1000
+      ;; tell exim to use from: as envelope from.
+      ;; exim's default is use outgoing_msg_localpart@hostname.
+      mail-specify-envelope-from t
 
       ;; looking up the list of maildirs when doing jo from summary
       ;; can take a few seconds if we have a ton of messages.
@@ -1040,11 +1047,14 @@ and Ian Kelling as the name"
 ;; on first run   mkdir -p /nocow/user/.mufsf; mu index --maildir=/nocow/user/fsfmd
 (defun mu-exit-wait ()
   (interactive)
-  (let ((wait (= 0 (call-process "/bin/pidof" nil nil nil "mu"))))
+  ;; taken from the mu source
+    (let* ((buf (get-buffer mu4e~proc-name))
+         (proc (and (buffer-live-p buf) (get-buffer-process buf))))
     (mu4e-quit)
     ;; without sleep, we get database locked by another process error when hitting u
     ;; if another mu was running.
-    (when wait (sleep-for 0 300))))
+    (if proc (sleep-for 0 1000))))
+
 (defun fsf-mu4e ()
   (interactive)
   (unless (equal mu4e-maildir "/nocow/user/fsfmd") (mu-exit-wait))
@@ -1057,7 +1067,7 @@ and Ian Kelling as the name"
    user-mail-address "iank@fsf.org"
    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
@@ -2312,7 +2322,7 @@ org-caldav-inbox "/p/cal.org")
 * misc general settings
 
 #+begin_src emacs-lisp
-
+(setq sh-basic-offset 2)
 (setq vc-follow-symlinks t)
 
 ;; give us a shell to start instead of scratch
@@ -3611,16 +3621,20 @@ these colors were better for dark theme
 #+RESULTS:
 : t
 
+
 * zrc
 #+begin_src emacs-lisp
 (require 'znc)
+(defun chirp()
+  (interactive)
+  (start-process-shell-command "ignoreme" nil "mpv --no-terminal --vo=null --volume=50 /a/bin/data/bird.mp3"))
 ;; from https://www.emacswiki.org/emacs/ErcSound
 (defun erc-my-privmsg-sound (proc parsed)
   (let* ((tgt (car (erc-response.command-args parsed)))
          (privp (erc-current-nick-p tgt)))
     (and
-     privp
-     (start-process-shell-command "ignoreme" nil "mpv --no-terminal --vo=null --volume=25 /a/bin/data/bird.mp3")
+     privp (chirp)
+
                                         ;; We must return nil. See help for `erc-server-PRIVMSG-functions'
      nil)))
 (add-hook 'erc-server-PRIVMSG-functions