]> git.donarmstrong.com Git - lib.git/blobdiff - emacs_el/configuration/don-configuration.org
fix missing ) for org-mode
[lib.git] / emacs_el / configuration / don-configuration.org
index 9151612ed365cc075bc0fd26766add8a9387a158..407dde718bc7020cdc23072954a7099ee05c4fd6 100644 (file)
@@ -809,7 +809,7 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 ** Mutt
 *** Message-mode
 #+BEGIN_SRC emacs-lisp
-  (use-package message-mode
+  (use-package message
 
     :mode "muttng-[a-z0-9]+-[0-9]+-"
     :mode "mutt-[a-z0-9]+-[0-9]+-"
@@ -878,10 +878,10 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
 #+END_SRC
 ** Agenda Configuration
 #+BEGIN_SRC emacs-lisp
-  :mode "\\.\\(org\\|org_archive\\|txt\\)$"
+  :mode ("\\.\\(org\\|org_archive\\|txt\\)\\'" . org-mode)
   :bind (("C-c l"  . org-store-link)
          ("C-c a"  . org-agenda)
-         ("C-c b"  . org-iswitchb)
+         ("C-c b"  . org-iswitchb))
   :config
   (setq-default org-log-done 'time)
   (setq-default org-agenda-ndays 5)
@@ -1002,12 +1002,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
       (write-file "/tmp/timeline.org")
       (org-agenda arg "L")))
   (define-key org-mode-map (kbd "C-c t") 'org-agenda-timeline-all)
-  ;; add automatic reminders for appointments
-  (defadvice  org-agenda-redo (after org-agenda-redo-add-appts)
-    "Pressing `r' on the agenda will also add appointments."
-    (progn 
-      (setq appt-time-msg-list nil)
-      (org-agenda-to-appt)))
 
 #+END_SRC
 ** General config
@@ -1794,6 +1788,47 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
                   (load-file "~/.hide/org_gcal.el"))
               )
     )
+#+END_SRC
+** appt integration
+#+BEGIN_SRC emacs-lisp
+  (use-package appt
+    :config
+    ;; Show notification 10 minutes before event
+    (setq appt-message-warning-time 10)
+    ;; Disable multiple reminders
+    (setq appt-display-interval appt-message-warning-time)
+    (setq appt-display-mode-line nil)
+  
+    ;; add automatic reminders for appointments
+    (defun my/org-agenda-to-appt ()
+      (interactive)
+      (setq appt-time-msg-list nil)
+      (org-agenda-to-appt))
+    ;; add reminders when starting emacs
+    (my/org-agenda-to-appt)
+    ;; when rebuilding the agenda
+    (defadvice  org-agenda-redo (after org-agenda-redo-add-appts)
+      "Pressing `r' on the agenda will also add appointments."
+      (my/org-agenda-to-appt)
+      )
+    ;; when saving all org buffers
+    (defadvice org-save-all-org-buffers (after org-save-all-org-buffers-add-appts)
+      "Re-add appts after saving all org buffers"
+      (my/org-agenda-to-appt))
+                                          ; Display appointments as a window manager notification
+    (setq appt-disp-window-function 'my/appt-display)
+    (setq appt-delete-window-function (lambda () t))
+  
+    (setq my/appt-notification-app (concat (getenv "HOME") "/bin/appt_notification"))
+  
+    (defun my/appt-display (min-to-app new-time msg)
+      (if (atom min-to-app)
+          (start-process "my/appt-notification-app" nil my/appt-notification-app min-to-app msg)
+        (dolist (i (number-sequence 0 (1- (length min-to-app))))
+          (start-process "my/appt-notification-app" nil my/appt-notification-app
+                         (nth i min-to-app) (nth i msg))))))
+
+
 #+END_SRC
 ** End use-package
 #+BEGIN_SRC emacs-lisp
@@ -1834,14 +1869,22 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
   (global-unset-key "\M-g")
   (global-set-key (kbd "M-g l") 'goto-line)
 #+END_SRC
+* Debian
+** debian-changelog
+#+BEGIN_SRC emacs-lisp
+  (use-package debian-changelog
+    :mode "debian/changelog"
+    :config
+    (setq debian-changelog-mailing-address "don@debian.org")
+    (setq debian-changelog-full-name "Don Armstrong"))
+#+END_SRC
 * Misc (uncharacterized)
 #+BEGIN_SRC emacs-lisp
-  (setq calendar-latitude 40.11)
-  (setq calendar-longitude -88.24)
+  (setq calendar-latitude 38.6)
+  (setq calendar-longitude -121.5)
   (setq case-fold-search t)
   (setq confirm-kill-emacs (quote y-or-n-p))
   (setq cperl-lazy-help-time nil)
-  (setq debian-changelog-mailing-address "don@debian.org")
   (display-time)
   (setq display-time-24hr-format t)
   (setq display-time-day-and-date t)
@@ -2037,11 +2080,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori
    (define-key cm-map "b" 'outline-backward-same-level)       ; Backward - same level
    (global-set-key "\M-o" cm-map)
 
-
-  ; debian stuff
-  (setq-default debian-changelog-mailing-address "don@debian.org")
-  (setq-default debian-changelog-full-name "Don Armstrong")
-
   ; ediff configuration
   ; don't use the multi-window configuration
   (setq ediff-window-setup-function 'ediff-setup-windows-plain)