From: Steve Youngs Date: Wed, 15 Apr 2020 08:24:40 +0000 (+1000) Subject: Add HTML versions of my init files X-Git-Url: http://cgit.sxemacs.org/?p=website;a=commitdiff_plain;h=449794f78ced27c8a3577af1ad232c70a63cebfd Add HTML versions of my init files Signed-off-by: Steve Youngs --- diff --git a/SYinits/00-build.html b/SYinits/00-build.html new file mode 100644 index 0000000..9c6bd8c --- /dev/null +++ b/SYinits/00-build.html @@ -0,0 +1,136 @@ + + + + + 00-build.el + + + + + + +
+;; 00-build.el --- Loads the required crap for all my init files
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 06:33:39 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits/>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/00-build.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   This simply loads everything needed to compile and load my init
+;;   files.
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+
+;; This used to have a whole swag of eval-and-compile's and a tonne of
+;; vars globally-declare-boundp'd, but it would seem that my current
+;; inits are sufficiently well written to not need anything in here to
+;; get a clean init compile.  Go me!!
+
+;;; 00-build.el ends here
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:12:18 AEST 2020 + +
+ + + diff --git a/SYinits/01-vars.html b/SYinits/01-vars.html new file mode 100644 index 0000000..2ac017d --- /dev/null +++ b/SYinits/01-vars.html @@ -0,0 +1,283 @@ + + + + + 01-vars.el + + + + + + +
+;; 01-vars.el --- Various variables
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 06:38:48 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits/>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/01-vars.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   This init file sets up a few miscelaneous variables and whatnot.
+;;   If anything has to be loaded very early in the boot up I'll put
+;;   it in here because this file is loaded first.
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+
+;:*=======================
+;:* Keep garbage collection out of my way.
+;;
+(setq gc-cons-threshold 50000000)
+
+
+;:*=======================
+;:* Set default font
+(defvar sydeffaces
+  '(default bold bold-italic italic)
+  "List symbols for default fonts.")
+
+(mapc
+ #'(lambda (font)
+     (remove-specifier (face-font font) 'global '(x default) nil))
+ sydeffaces)
+
+(progn
+  (set-face-font 'default
+                 (make-font-instance
+                  "-xos4-terminus-medium-r-*-*-*-150-*-*-*-*-iso8859-*")
+                 'global '(x default))
+  (set-face-font 'bold
+                 (make-font-instance
+                  "-xos4-terminus-bold-r-*-*-*-150-*-*-*-*-iso8859-*")
+                 'global '(x default))
+  (set-face-font 'bold-italic
+                 (make-font-instance
+                  "-*-times-bold-i-*-*-*-140-*-*-*-*-iso8859-*")
+                 'global '(x default))
+  (set-face-font 'italic
+                 (make-font-instance
+                  "-*-times-medium-i-*-*-*-140-*-*-*-*-*-*")
+                 'global '(x default)))
+
+;:*=======================
+;:* Lossage Messages
+;; A lot of the time I'm running some very unstable code.  So I set
+;; this quite high so I can catch all the help-lossage messages.
+(setq view-lossage-message-count 1000)
+
+;:*=======================
+;:* SXEmacs has a sane filename for custom-file
+(unless (featurep 'sxemacs)
+  (setq custom-file
+        (expand-file-name "custom-steve.el" user-init-directory))
+  (load-file custom-file))
+
+;:*=======================
+;:* Set the default font
+(set-face-property
+ 'default
+ 'face "-*-Terminus-medium-r-*-*-*-140-*-*-*-*-iso8859-*")
+
+;:*=======================
+;:* Stuff. Lots of stuff...
+
+(setq-default
+ buffers-menu-grouping-function
+ 'group-buffers-menu-by-mode-then-alphabetically
+ buffers-menu-sort-function
+ 'sort-buffers-menu-by-mode-then-alphabetically
+ buffers-menu-submenus-for-groups-p t
+ case-fold-search t
+ case-replace t
+ get-frame-for-buffer-default-instance-limit nil
+ mouse-yank-at-point t
+ next-line-add-newlines nil
+ overwrite-mode nil
+ require-final-newline t
+ teach-extended-commands-p t
+ teach-extended-commands-timeout 5
+ temp-buffer-show-function 'show-temp-buffer-in-current-frame
+ zmacs-regions t)
+
+(defvar gnus-directory (paths-construct-path 
+                        (list (user-home-directory) "Gnus"))
+  "Gnus directory.")
+   
+(defvar message-directory (paths-construct-path 
+                           (list (user-home-directory) "Gnus"))
+  "Gnus directory.")
+
+
+;:*=======================
+;:* Unicode shit
+;(unless (fboundp 'ucs-to-char)
+(when (featurep '(and mule mule-ucs-autoloads))
+  ;; Order is important here
+  (progn
+    (require 'tae)
+    (require 'un-define)
+    (set-coding-priority-list '(utf-8))
+    (set-coding-category-system 'utf-8 'utf-8))
+  (and (coding-system-p (find-coding-system 'utf-8))
+       (setq-default buffer-file-coding-system
+                     (coding-system-name
+                      (find-coding-system 'utf-8)))))
+
+;:*=======================
+;:* Fix #'run-at-time
+;;  You get an `args-out-of-range' error if you try to set a #'run-at-time
+;;  to go off in the past.  That's not as silly as it sounds, think of
+;;  things you want to run once per day.  At some point the 'time' will be
+;;  in the past for the current day.
+(or (featurep 'timer-funcs)
+    (require 'timer-funcs))
+
+(defadvice run-at-time (before future-run-at-time first activate)
+  "If TIME is in the past, set it for tomorrow."
+  (when (stringp time)
+    (let ((tspec (timer-parse-time time)))
+      (if tspec
+          (progn
+            (setq time
+                  (ceiling
+                   (itimer-time-difference tspec (current-time))))
+            (if (< time 0)
+                (setq time (+ time 86400))))))))
+   
+;:*=======================
+;:* Here because sometimes... order important it is
+(require 'ffi-wand)
+
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
+(message "variables initialiased")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:12:00 AEST 2020 + +
+ + + diff --git a/SYinits/02-keys.html b/SYinits/02-keys.html new file mode 100644 index 0000000..951faed --- /dev/null +++ b/SYinits/02-keys.html @@ -0,0 +1,281 @@ + + + + + 02-keys.el + + + + + + +
+;; 02-keys.el --- Keybindings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 06:44:18 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits/>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/02-keys.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   Sets up my keybindings
+;;
+;;   BTW, there are a number of different ways to actually set a
+;;   keybinding in emacs and I honestly could not tell you which way
+;;   is best.  I don't think any one way is really any better than
+;;   any other.  I've used most (all?) of them here in this file.
+;;   Whichever format you like is the right one to use. :-)
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+
+;:*=======================
+;:* Global key bindings
+(global-set-key "\C-xw" 'what-line)
+(global-set-key [f2] 'undo)
+(global-set-key [(super tab)] 'lisp-complete-symbol)
+(global-set-key [(meta f3)] 'view-file)
+(global-set-key [f5] "\M-w")
+(global-set-key [f6] "\C-y")
+(global-set-key [f7] 'save-buffer)
+(global-set-key [f8] 'start-kbd-macro)
+(global-set-key [f9] 'end-kbd-macro)
+(global-set-key [(control f8)] 'call-last-kbd-macro)
+(global-set-key [(control f5)] 'sy-extent-kill-save)
+(global-set-key [XF86Copy] #'copy-primary-selection)
+(global-set-key [XF86Cut] #'kill-primary-selection)
+(global-set-key [XF86Paste] #'yank-clipboard-selection)
+
+;:*=======================
+;:* compose-key tô t¥pé fünky £ïttlê chãrs
+(require 'x-compose)
+(global-set-key "\C-cm" compose-map)
+
+;:*=======================
+;:* cursor into first line with C-pageup
+(define-key global-map '(control prior) 'beginning-of-buffer)
+(define-key global-map '(control next) 'end-of-buffer)
+
+;:*=======================
+;:* Enable menubar accelerators (double-wow!)
+(setq menu-accelerator-enabled 'menu-fallback)
+(setq menu-accelerator-modifiers '(super))
+(setq menu-accelerator-prefix nil)
+(define-key global-map [f10] 'accelerate-menu)
+
+;:*=======================
+;:* Popup window with buffer list ; from XEmacs FAQ (2.61)
+(defun cw-build-buffers ()
+  "Popup buffer menu."
+  (interactive "@")
+  (run-hooks 'activate-menubar-hook)
+  (popup-menu (car (find-menu-item current-menubar '("Buffers")))))
+(global-set-key '(control !) 'cw-build-buffers)
+
+;:*=======================
+;:* keymapping to resize frames
+(define-key global-map [(control x) (up)] #'shrink-window)
+(define-key global-map [(control x) (down)]  #'enlarge-window)
+(define-key global-map [(control x) (left)] #'shrink-window-horizontally)
+(define-key global-map [(control x) (right)]  #'enlarge-window-horizontally)
+
+;:*=======================
+;:* bind key to kill-whole-line
+(global-set-key '(control ,) 'kill-entire-line)
+
+;:*=======================
+;:* Set C-x C-b to use ibuffer
+(define-key global-map [(control x) (control b)] 'ibuffer)
+
+;:*=======================
+;:* OK, so just who the hell is sending those emails
+(define-key global-map [f12] 'from)
+
+;:*=======================
+;:* Bind the Euro to a key
+(define-key global-map "\C-ce"
+  (lambda () 
+    (interactive) 
+    (insert (make-char 'latin-iso8859-15 #x24))))
+
+;:*=======================
+;:* Toggle in/out of eshell
+(global-set-key (kbd "C-c s") 'eshell-toggle)
+
+;:*=======================
+;:* Extra Mouse buttons (wheel etc)
+;;
+;;  A little bragging never hurts... SXEmacs allows you to bind up to
+;;  32 mouse buttons.  I'm not sure about GNU/Emacs, but XEmacs only
+;;  lets you bind 10 (or is it 12?).  OK, I've never seen a rat that
+;;  had 32 buttons, but you never know what these gamer kiddies will
+;;  want one day. :-)
+(require 'mwheel)
+(define-key global-map [(button4)] 'mwheel-scroll)
+(define-key global-map [(button5)] 'mwheel-scroll)
+(define-key global-map [(shift button4)] 'mwheel-scroll)
+(define-key global-map [(shift button5)] 'mwheel-scroll)
+(define-key global-map [(button9)] 'beginning-of-buffer)
+(define-key global-map [(button8)] 'end-of-buffer)
+(define-key global-map [(button10)] 'recenter)
+
+;:*=======================
+;:* Numeric keypad
+(define-key key-translation-map [kp-divide]     [?/])
+(define-key key-translation-map [kp-multiply]   [?*])
+(define-key key-translation-map [kp-subtract]   [?-])
+(define-key key-translation-map [kp-add]        [?+])
+(define-key key-translation-map [kp-enter]     [?\r])
+(define-key key-translation-map [kp-decimal]    [?.])
+(define-key key-translation-map [kp-begin]   [begin])
+(define-key key-translation-map [kp-home]     [home])
+(define-key key-translation-map [kp-end]       [end])
+(define-key key-translation-map [kp-next]     [next])
+(define-key key-translation-map [kp-prior]   [prior])
+(define-key key-translation-map [kp-left]     [left])
+(define-key key-translation-map [kp-right]   [right])
+(define-key key-translation-map [kp-up]         [up])
+(define-key key-translation-map [kp-down]     [down])
+(define-key key-translation-map [kp-insert] [insert])
+(define-key key-translation-map [kp-delete] [delete])
+(define-key key-translation-map [kp-0]          [?0])
+(define-key key-translation-map [kp-1]          [?1])
+(define-key key-translation-map [kp-2]          [?2])
+(define-key key-translation-map [kp-3]          [?3])
+(define-key key-translation-map [kp-4]          [?4])
+(define-key key-translation-map [kp-5]          [?5])
+(define-key key-translation-map [kp-6]          [?6])
+(define-key key-translation-map [kp-7]          [?7])
+(define-key key-translation-map [kp-8]          [?8])
+(define-key key-translation-map [kp-9]          [?9])
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+(message "Key maps set successfully")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:11:41 AEST 2020 + +
+ + + diff --git a/SYinits/03-c-mode.html b/SYinits/03-c-mode.html new file mode 100644 index 0000000..ad72bf1 --- /dev/null +++ b/SYinits/03-c-mode.html @@ -0,0 +1,211 @@ + + + + + 03-c-mode.el + + + + + + +
+;; 03-c-mode.el --- Set up C mode
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 06:45:27 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits/>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/03-c-mode.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;   This sets up my C programming styles.  Note, too, that with this
+;;   setup I am able to have different styles for different projects.
+;;   It is a little kludgy, but it works.
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+;:*=======================
+;:* Defaults
+(setq c-comment-leader "  ")
+(setq c-default-style
+      '((c-mode . "linux")
+        (c++-mode . "linux")
+        (java-mode . "java")
+        (python-mode . "python")
+        (other . "gnu")))
+
+;:*=======================
+;:* Special style for Linux source files
+(defun linux-c-mode ()
+  "C mode with adjusted defaults for use with the Linux kernel.
+
+Key-bindings:
+\\{c-mode-map}"
+  (c-mode)
+  (c-set-style "linux")
+  (setq mode-name "Linux/C"))
+
+(add-to-list
+ 'auto-mode-alist '("^.*/linux.*/.*\\.[ch]$" . linux-c-mode))
+
+;:*=======================
+;:* C style for XEmacs core source files
+(defun xemacs-c-mode ()
+  "C mode with adjusted defaults for use with XEmacs core sources.
+
+Key-bindings:
+\\{c-mode-map}"
+  (c-mode)
+  (c-set-style "gnu")
+  (setq mode-name "XE/C"))
+
+(add-to-list
+ 'auto-mode-alist '("^.*/xemacs.*/.*\\.[ch]$" . xemacs-c-mode))
+
+;:*=======================
+;:* C style for SXEmacs core source files
+(defvar c-enable-xemacs-performance-kludge-p)
+(defun sxemacs-c-mode ()
+  "C mode with adjusted defaults for use with SXEmacs core sources.
+
+Key-bindings:
+\\{c-mode-map}"
+  (c-mode)
+  (c-set-style "linux")
+  (setq mode-name "SXE/C")
+  (make-variable-buffer-local 'c-enable-xemacs-performance-kludge-p)
+  (setq c-enable-xemacs-performance-kludge-p t))
+
+(add-to-list
+ 'auto-mode-alist '("^.*/sxemacs.*/.*\\.[ch]$" . sxemacs-c-mode))
+
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+(message "C mode initialised.")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:11:21 AEST 2020 + +
+ + + diff --git a/SYinits/04-w3.html b/SYinits/04-w3.html new file mode 100644 index 0000000..1898727 --- /dev/null +++ b/SYinits/04-w3.html @@ -0,0 +1,163 @@ + + + + + 04-w3.el + + + + + + +
+;; 04-w3.el --- W3 Settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 06:47:51 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits/>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/04-w3.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   I very rarely use W3, but it does work (I'll leave the interpretation
+;;   of "work" up to you)
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+(setq 
+ url-automatic-caching t
+ url-be-asynchronous t
+ url-keep-history t
+ url-news-use-article-mode t
+ url-personal-mail-address "steve@steveyoungs.com"
+ url-privacy-level 'none
+ url-proxy-services nil
+ w3-auto-image-alt nil
+ w3-default-homepage "http://localhost/"
+ w3-do-incremental-display t
+ w3-do-scripting t
+ w3-documentation-root "/home/steve/documents/XEmacs/w3/"
+ w3-honor-stylesheets t
+ w3-hotlist-file "~/.url/.mosaic-hotlist-default"
+ w3-java-vm-program "/opt/jdk/jre/bin/java_vm"
+ w3-latex-print-links 'footnote
+ w3-min-img-size 5
+ w3-use-menus 
+ '(file edit view go bookmark options buffers style search emacs nil help)
+ w3-use-terminal-characters t
+ w3-user-colors-take-precedence t 
+ w3-user-fonts-take-precedence nil)
+;:*====================================================================
+(message "W3 initialised")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:12:39 AEST 2020 + +
+ + + diff --git a/SYinits/05-latex.html b/SYinits/05-latex.html new file mode 100644 index 0000000..2b90582 --- /dev/null +++ b/SYinits/05-latex.html @@ -0,0 +1,382 @@ + + + + + 05-latex.el + + + + + + +
+;; 05-latex.el --- LaTeX Settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 06:49:13 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits/>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/05-latex.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   Do you remember back in the old days when you'd write a letter
+;;   on a piece of paper, stick it in an envelope, put a stamp on it
+;;   and have the postal service deliver it for you?  Well I still do
+;;   that and LaTeX is how I get it done.  At least the writing,
+;;   formatting, and printing side of it anyway.
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+;:*=======================
+;:* Initialise aucTeX
+(require 'tex-site)
+(require 'latex)
+(require 'reftex)
+(require 'reftex-vars)
+(require 'latex-units)
+(require 'font-latex)
+(require 'latex-toolbar)
+
+;:*=======================
+;:* auto-mode-alist
+;; LaTeX or latex ???  It doesn't really matter because LaTeX-mode is
+;; an alias to latex-mode, I just prefer the former name and like to
+;; keep things less messy.
+;;
+;; Remove the ones set from tex-mode.el in the texinfo pkg that use
+;; latex-mode
+(remove-alist 'auto-mode-alist "\\.\\(?:sty\\|cls\\|bbl\\)\\'")
+(remove-alist 'auto-mode-alist "\\.[tT]e[xX]\\'")
+(remove-alist 'auto-mode-alist "\\.ltx\\'")
+;; Add them back for LaTeX-mode
+(add-to-list 'auto-mode-alist '("\\.\\(?:sty\\|cls\\|bbl\\)\\'" . LaTeX-mode))
+(add-to-list 'auto-mode-alist '("\\.[tT]e[xX]\\'" . LaTeX-mode))
+(add-to-list 'auto-mode-alist '("\\.ltx\\'" . LaTeX-mode))
+(add-to-list 'auto-mode-alist '("\\.drv\\'" . LaTeX-mode))
+;; doctex
+(add-to-list 'auto-mode-alist '("\\.dtx\\'" . doctex-mode))
+
+;:*=======================
+;:* Shutup the byte-compiler
+(defvar ispell-extra-args)
+(defvar LaTeX-mode-map)
+(defvar TeX-shell)
+
+(setq
+ LaTeX-float nil
+ TeX-arg-cite-note-p t
+ TeX-arg-footnote-number-p t
+ TeX-arg-item-label-p nil
+ TeX-auto-parse-length 999999999
+ TeX-auto-private
+ (file-name-as-directory
+  (expand-file-name "documents/TeXauto" (getenv "HOME")))
+ TeX-auto-save t
+ TeX-debug-bad-boxes nil
+ TeX-macro-private
+ (file-name-as-directory
+  (expand-file-name "documents/TeX" (getenv "HOME")))
+ TeX-outline-extra nil
+ TeX-parse-self t
+ TeX-printer-default "Single Colour"
+ TeX-printer-list
+ '(("Duplex Colour" "dvips -f %s|lpr -PDuplex_Colour" "lpq -PDuplex_Colour")
+   ("Single Colour" "dvips -f %s|lpr -PSingle_Colour" "lpq -PSingle_Colour")
+   ("Duplex Grey" "dvips -f %s|lpr -PDuplex_Grey" "lpq -PDuplex_Grey")
+   ("Single Grey" "dvips -f %s|lpr -PSingle_Grey" "lpq -PSingle_Grey")
+   ("Photo" "dvips -f %s|lpr -PPhoto" "lpq -PPhoto")
+   ("DL Envelope" "dvips -f %s|lpr -PDL_Envelope" "lpq -PDL_Envelope")))
+
+(setq-default LaTeX-default-options "a4paper,12pt")
+(setq-default TeX-master t)
+
+(setq TeX-view-style '(("^a5$" "xdvi -thorough %d -paper a5")
+                       ("^landscape$" "xdvi -thorough %d -paper a4r -s 4")
+                       ("." "xdvi -thorough %d")))
+
+;:*=======================
+;:* Count words in a TeX text
+(defun sds-word-count (start end)
+  "Count lines/words/characters from START to END.
+Replacement for count-lines-region."
+  (interactive "r")
+  (let ((ost (syntax-table)) 
+        (nst (copy-syntax-table)))
+    (modify-syntax-entry ?_ "w" nst)
+    (modify-syntax-entry ?- "w" nst)
+    (save-excursion
+      (save-restriction
+        (narrow-to-region start end)
+        (goto-char (min start end))
+        (unwind-protect
+            (progn (set-syntax-table nst)
+                   (message 
+                    "Region (%d to %d) has: %d lines; %d words; %d characters."
+                             start end (count-lines start end)
+                             (string-to-number (how-many "\\<"))
+                             (- end start)))
+          (set-syntax-table ost))))))
+
+;:*=======================
+;:*  RefTeX Minor Mode 
+
+;; Turn on RefTeX Minor Mode for all LaTeX files
+(autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
+(autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
+(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
+
+;: RefTeX is a minor mode with distinct support for \ref, \label and
+;: \cite commands in (multi-file) LaTeX documents.
+(setq 
+ reftex-default-label-alist-entries
+ '(Sideways AMSTeX amsmath endnotes fancybox floatfig longtable
+            picinpar rotating sidecap subfigure supertab wrapfig LaTeX)
+ reftex-enable-partial-scans t
+ reftex-extra-bindings t
+ reftex-guess-label-type t
+ reftex-initialize-temporary-buffers t
+ reftex-insert-label-flags '(t t)
+ reftex-keep-temporary-buffers t
+ reftex-label-alist 
+ '((nil ?s nil nil nil ("Capital" "Cap." "Section" "Part") -3)
+   (nil ?e nil nil nil ("Equation" "Eq.") -3)
+   (nil ?t nil nil nil ("Table") -3)
+   (nil ?f nil nil nil ("Figure" "Illustration" "Ill.") -3)
+   (nil ?n nil nil nil ("Comment") -3)
+   (nil ?i nil nil nil ("Point") -3))
+ reftex-label-menu-flags '(t t t t t t t t)
+ reftex-plug-into-AUCTeX t
+ reftex-save-parse-info t
+ reftex-toc-follow-mode t
+ reftex-toc-include-labels t
+ reftex-use-multiple-selection-buffers t
+ reftex-vref-is-default t)
+
+(define-key reftex-mode-map [(shift button=)]
+  'reftex-mouse-view-crossref)
+
+;:*=======================
+;:* Index support
+;;When writing a document with an index you will probably define
+;;additional macros which make entries into the index.  Let's look at an
+;;example.
+;;     \newcommand{\ix}[1]{#1\index{#1}}
+;;     \newcommand{\nindex}[1]{\textit{#1}\index[name]{#1}}
+(setq reftex-index-macros '(("\\ix{*}" "idx" ?x "" nil nil)
+                            ("\\nindex{*}" "name" ?n "" nil nil)
+                            index))
+
+(defun return-created-string ()
+  "Return a \"Created:\" string."
+  (let ((time (current-time-string)))
+    (concat "Created at: "
+            (substring time 0 20)
+            (nth 1 (current-time-zone))
+            " "
+            (substring time -4) " ")))
+
+;:*=======================
+;* Hooks.
+(defun sy-LaTeX-toolbar ()
+  (interactive)
+  (set-specifier left-toolbar-width (cons (current-buffer) 32))
+  (latex-toolbar-install))
+
+(defun sy-LaTeX-mode-hook ()
+  (turn-on-auto-fill)
+  (setq TeX-shell "/bin/zsh")
+  (make-local-variable 'ispell-extra-args)
+  (push "-t" ispell-extra-args)
+  (turn-on-reftex)
+  (add-to-list 'TeX-command-list
+               '("xpdf" "xpdf %s.pdf" TeX-run-silent t nil))
+  (add-to-list 'TeX-command-list
+               '("gv" "gv %s.ps" TeX-run-silent t nil))
+  (add-to-list 'TeX-command-list
+               '("pdflatex" "pdflatex -interaction=nonstopmode %t"
+                 TeX-run-command nil t))
+  (when (device-on-window-system-p)
+    (outl-mouse-minor-mode 1)
+    ;; I can't get my extra toolbar to display from the hook, I don't
+    ;; yet know why, so instead I bind `S-H-t' locally to load it.
+    (local-set-key [(super hyper t)] #'sy-LaTeX-toolbar)))
+
+(add-hook 'LaTeX-mode-hook #'sy-LaTeX-mode-hook 'append)
+
+(setq LaTeX-section-hook
+      '(LaTeX-section-heading
+        LaTeX-section-title
+        LaTeX-section-toc
+        LaTeX-section-section
+        LaTeX-section-label))
+
+;:*=======================
+;:* Texinfo
+;; Jumping through hoops to ensure that we DO NOT get the AUCTeX
+;; tex-info.  The texinfo.el from the "texinfo" (S)XEmacs package is
+;; older, but far, far, superior.  Honestly, the AUCTeX / GNU people
+;; have no idea what they're missing.
+(eval-after-load 'tex-info
+  (progn
+    (delq 'texinfo-mode TeX-modes)
+    (defalias 'texinfo-mode #'ignore)
+    (require 'texinfo)))
+
+(set-face-parent 'texinfo-heading-face 'font-lock-function-name-face)
+
+;; Perdy colours!
+(setq texinfo-font-lock-keywords
+      `(("@\\([a-zA-Z]+\\|[^ \t\n]\\)" 1 font-lock-keyword-face) ;commands
+        ("^\\*\\([^\n:]*\\)" 1 font-lock-function-name-face t) ;menu items
+        ("@\\(emph\\|i\\|sc\\){\\([^}]+\\)" 2 'italic)
+        ("@\\(strong\\|b\\){\\([^}]+\\)" 2 'bold)
+        ("@\\(kbd\\|key\\|url\\|uref\\){\\([^}]+\\)" 2 font-lock-string-face)
+        ("@\\(file\\|email\\){\\([^}]+\\)" 2 font-lock-string-face keep)
+        ("@\\(samp\\|code\\|var\\|math\\|env\\|command\\|option\\){\\([^}]+\\)"
+         2 font-lock-variable-name-face keep)
+        ("@\\(cite\\|x?ref\\|pxref\\|dfn\\|inforef\\){\\([^}]+\\)"
+         2 font-lock-reference-face) ;; #### XEmacs change
+        ("@\\(anchor\\){\\([^}]+\\)" 2 font-lock-type-face)
+        ("@\\(dmn\\|acronym\\|value\\){\\([^}]+\\)" 2 font-lock-builtin-face)
+        ("@\\(end\\|itemx?\\) +\\(.+\\)" 2 font-lock-keyword-face keep)
+        (,(concat "^@\\(" (regexp-opt (mapcar 'car texinfo-section-list) t)
+                  "\\)\\(.*\n\\)") 3 texinfo-heading-face t)
+        ("@c\\(omment\\)? \\(.*$\\)" 2 font-lock-comment-face)
+        ("@node \\(.*$\\)" 1 font-lock-warning-face)
+        ("^@[cfvkpt]index \\(.*$\\)" 1 font-lock-variable-name-face)))
+
+(defun sy-texinfo-menu ()
+  (easy-menu-add texinfo-mode-menu))
+
+(add-hook 'texinfo-mode-hook #'sy-texinfo-menu)
+(add-hook 'texinfo-mode-hook #'font-lock-mode)
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
+(message "LaTeX initialised")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:12:55 AEST 2020 + +
+ + + diff --git a/SYinits/07-html.html b/SYinits/07-html.html new file mode 100644 index 0000000..6efbdb6 --- /dev/null +++ b/SYinits/07-html.html @@ -0,0 +1,394 @@ + + + + + 07-html.el + + + + + + +
+;; 07-html-sy.el --- HTML settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Wednesday Apr 15, 2020 18:03:47 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits/>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/07-html.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   Sets up things for writing HTML.
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+;:*=======================
+;:* General HTML settings.
+(setq
+ html-helper-htmldtd-version
+ "<?xml version=\"1.0\" encoding=\"utf-8\"?>
+<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
+ html-helper-use-expert-menu t
+ hm--html-automatic-create-modified-line t
+ hm--html-automatic-update-modified-line t
+ hm--html-changed-comment-prefix "Changed with SXEmacs, by: "
+ hm--html-created-comment-prefix "Created with SXEmacs, by: "
+ hm--html-expert t
+ hm--html-html-doctype-version
+ "\"-//W3C//DTD XHTML 1.0 Transitional//EN\"
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\""
+ hm--html-log-date-format "%y-%m-%d"
+ hm--html-template-dir 
+ (file-name-as-directory 
+  (expand-file-name "templates"
+                    (locate-data-directory "hm--html-menus")))
+ hm--html-frame-template-file 
+ (expand-file-name "frame.html.tmpl" hm--html-template-dir)
+ hm--html-title-date-format "%y-%m-%d"
+ hm--html-username "Steve Youngs"
+ html-sigusr1-signal-value 10)
+
+;; SGML stuff.
+(setq
+ sgml-auto-activate-dtd t
+ sgml-live-element-indicator t
+ sgml-validate-command "onsgmls -s -m  %s %s")
+
+(defvar sy-sgml-dirs
+  (directory-files-recur "/usr/share/sgml" 'full nil nil 'subdir)
+  "List of directories for `sgml-system-path'.")
+
+(setq sgml-system-path
+      (append '("." 
+                "/usr/share/sxemacs/xemacs-packages/etc/psgml-dtds/")
+              sy-sgml-dirs))
+
+(autoload 'html-mode "psgml-html" "Load psgml-html-mode" t)
+(autoload 'css-mode "css-mode")
+
+(add-hook 'html-mode-hook #'hm--html-minor-mode)
+(eval-when-compile (defvar ispell-extra-args))
+(add-hook 'html-mode-hook
+          #'(lambda ()
+              (make-local-variable 'ispell-extra-args)
+              (push "-H" ispell-extra-args)))
+(add-hook 'html-helper-timestamp-hook #'html-helper-default-insert-timestamp)
+
+;:*=======================
+;:* Hrvoje Niksic's htmlize
+;;
+;;  `htmlize.el' comes with the "text-modes" SXEmacs package.
+;;
+;;  `htmlize.el' is a lovely piece of code for converting Emacs buffers
+;;  into HTML.  The default settings should be fine for most people most
+;;  of the time in most situations.  But, by now, I'm sure that you've
+;;  come to the realisation that I don't fit into that category.  So
+;;  lets hack... :-)
+(eval-and-compile
+  (require 'htmlize))
+
+;; Force XHTML 1.0 Transitional
+(defun htmlize-default-doctype ()
+  nil
+  "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">")
+
+;; File-local variables can cause problems so this advice simply
+;; disables them when htmlize runs.
+(defadvice htmlize-buffer (around nolocals (&rest args) activate)
+  "Turn off file local variables during htmlize-buffer."
+  (let ((enable-local-variables nil)
+        buf)
+    (setq buf ad-do-it)
+    (when (interactive-p) (switch-to-buffer buf))))
+
+;; By default htmlize would turn 'file.el' into 'file.el.html', I
+;; prefer that it turned it into 'file.html'.  That's what this advice
+;; does.
+(defadvice htmlize-make-file-name (before filename activate)
+  "Prefer filenames \"file.ext\" -> \"file.html\"."
+  (setq file (file-name-sans-extension file)))
+
+;; This function, run from `htmlize-after-hook' lets me embed HTML
+;; comments inside normal source comments and also allows me to set up
+;; relative hyperlinks.
+(defun sy-htmlize-set-links ()
+  "Function run from `htmlize-after-hook'.
+
+It takes care of any relative hyperlinks and also dequotes any HTML
+comments that were incorrectly quoted.
+
+Relative hyperlinks need to be prepared in a particular way in the
+file that is to be converted to HTML.  For example, in an emacs lisp
+file you might see:
+
+    Get the latest rls=/src/foo.el;rld=version here;rle.
+
+Which would be converted to:
+
+    Get the latest <a href=\"/src/foo.el\">version here</a>."
+  ;; LOL, we actually need to _NOT_ do it in _this_ file so the doc
+  ;; string for this function looks right.
+  (unless (string-match "07-html" (buffer-name htmlbuf))
+    (save-excursion
+      (goto-char (point-min))
+      (mapcar
+       '(lambda (x) (save-excursion (eval x)))
+       '((replace-string "rls=" "<a href=\"")
+         (replace-string ";rld=" "\">")
+         (replace-string ";rle" "</a>")
+         (replace-string "&lt;!--" "<!--")
+         (replace-string "--&gt;" "-->"))))))
+
+(defun sy-htmlize-add-xmlns ()
+  "Adds a xmlns property to the html tag.
+
+Because we are trying to output XHTML we need to add the xmlns to the
+html tag.  Done via `htmlize-after-hook'."
+  (save-excursion
+    (goto-char (point-min))
+    (re-search-forward "<html>" nil t)
+    (replace-match
+     "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">")))
+
+;; I know that the pages generated by `htmlize.el' are valid HTML and
+;; are created by SXEmacs.  So I announce the fact by adding the appropriate
+;; logos to the bottom of the page, together with a copyright notice.  This
+;; is the raw HTML for that.
+;; Used to have valid CSS as well but that is way too much mucking
+;; about to get the validator to work from within an iframe.  In case
+;; you are wondering, the CSS produced from htmlize is definitely
+;; valid.
+;; <a href=\"http://jigsaw.w3.org/css-validator/check/referer\" target=\"_blank\">
+;;   <img style=\"padding:0px 0px 0px 5px;border:0;width:88px;height:31px\"
+;;     src=\"/Images/vcss.png\"
+;;     title=\"Valid CSS!\" alt=\"Valid CSS!\" />
+;; </a>
+(defvar sy-htmlize-appendix
+  (concat "<!--  SXEmacs Logo -->
+    <div class=\"img\">
+      <a href=\"https://www.sxemacs.org/\" target=\"_parent\">
+        <img style=\"padding:0px 5px 0px 0px;border:0;width:88px;height:31px\"
+          src=\"/Images/cbsx.png\"
+          title=\"This page was created entirely in SXEmacs\"
+          alt=\"Created with SXEmacs\" />
+      </a>
+<!--  End SXEmacs Logo -->
+<!--  Valid XHTML 1.0 -->
+      <a href=\"http://validator.w3.org/check?uri=" "%s" "\" target=\"_blank\">
+       <img style=\"padding:0px 5px 0px 10px;border:0;width:88px;height:31px\"
+          src=\"/Images/valid-xhtml10.png\"
+          title=\"Valid XHTML 1.0 Transitional!\"
+          alt=\"Valid XHTML 1.0 Transitional!\" />
+      </a>
+    </div>
+<!--  End Valid XHTML 1.0 -->
+
+    <h6>Copyright &#169; "
+          (format-time-string "%Y") " Steve Youngs<br />
+     Verbatim copying and distribution is permitted in any medium,
+    providing this notice is preserved.<br />
+<!-- hhmts start -->
+<!-- hhmts end -->
+   </h6>
+
+"
+))
+
+;; Appends the above to each page.  Run from `htmlize-after-hook'.
+(autoload 'url-hexify-string "url-util")
+(defun sy-htmlize-append ()
+  "Append some things to the end of files produced by `htmlize.el'."
+  (let ((html (url-hexify-string
+               (concat "https://www.sxemacs.org/SYinits/"
+                       (buffer-name)))))
+    (goto-char (point-max))
+    (re-search-backward "</body>" nil t)
+    (insert (format sy-htmlize-appendix html))))
+
+;; Set a couple of basic things.
+(setq
+ htmlize-html-charset nil
+ htmlize-html-major-mode 'html-mode
+ htmlize-head-tags
+ "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
+    <meta name=\"author\" content=\"Steve Youngs\" />
+    <meta name=\"owner\" content=\"steve@sxemacs.org\" />
+")
+
+(setq htmlize-hyperlink-style "
+      a {
+        color: #FF0000;
+        background-color: inherit;
+        font: inherit;
+        font-weight: bold;
+        text-decoration: underline;
+      }
+      a:hover {
+        color: #FFFFFF;
+        background-color: #FD00FD;
+        text-decoration: underline;
+      }
+      .img a:hover {
+        background-color: #000000;
+        text-decoration: none;
+      }
+")
+
+;; Hooks
+(defvar sy-htmlize-this-file nil
+  "The name of the file we htmlize'd.")
+(defun sy-htmlize-before-hook ()
+  "Prepares the buffer for htmlising.
+Turns off howm-mode as it can play havoc with the font-locking, and we
+force a fontify of the buffer."
+  (setq sy-htmlize-this-file (buffer-file-name))
+  (and howm-mode (howm-mode 0))
+  (font-lock-fontify-buffer))
+
+(defun sy-htmlize-after-hook ()
+  (sy-htmlize-set-links)
+  (sy-htmlize-append)
+  (sy-htmlize-add-xmlns)
+  (with-current-buffer (get-file-buffer sy-htmlize-this-file)
+    (normal-mode)) ; Will turn howm-mode back on if it was off
+  (setq sy-htmlize-this-file nil))
+
+(add-hook 'htmlize-before-hook #'sy-htmlize-before-hook)
+(add-hook 'htmlize-after-hook #'sy-htmlize-after-hook)
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
+(message "HTML settings initialised")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:13:12 AEST 2020 + +
+ + + diff --git a/SYinits/08-sounds.html b/SYinits/08-sounds.html new file mode 100644 index 0000000..01c420f --- /dev/null +++ b/SYinits/08-sounds.html @@ -0,0 +1,172 @@ + + + + + 08-sounds.el + + + + + + +
+;; 08-sounds.el --- Sound set up
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 07:39:34 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/08-sounds.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   Just sets up sound stuff.
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+;:*=======================
+;:* Set default sound device
+(when (getenv "DISPLAY")                ; skip the lot if not in X11
+  (setq default-audio-device (make-audio-device 'pulse))
+  ;(setq default-audio-device (make-audio-device 'alsa))
+  (init-workers 6)
+  (setq synchronous-sounds nil)
+  (load "sound")
+  (setq bell-volume 100)
+  (when (device-sound-enabled-p)
+    (load-sound-file "low-smash" 'auto-save-error)
+    (load-sound-file "bark" 'command-error)
+    (load-sound-file "slap" 'undefined-key)
+    (load-sound-file "slap" 'undefined-click)
+    (load-sound-file "clink" 'no-completion)
+    (load-sound-file "bong" 'y-or-n-p)
+    (load-sound-file "explosion" 'yes-or-no-p)
+    (load-sound-file "drip" 'buffer-bound)
+    (load-sound-file "whip" 'read-only)
+    (load-sound-file "bass-snap" 'default)
+    (load-sound-file "yeep" 'quit)
+    (load-sound-file "drum-beep" 'isearch-failed)
+    (load-sound-file "bass-snap" 'isearch-quit)
+    (load-sound-file "slap" 'ready)
+    (load-sound-file "return" 'warp)
+    (load-sound-file "cuckoo" 'alarm))
+  )
+;:*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+(if default-audio-device
+    (message "sounds loaded")
+  (message "sounds NOT loaded (OK if this is a TTY)"))
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:13:26 AEST 2020 + +
+ + + diff --git a/SYinits/09-toolbar.html b/SYinits/09-toolbar.html new file mode 100644 index 0000000..46d5855 --- /dev/null +++ b/SYinits/09-toolbar.html @@ -0,0 +1,215 @@ + + + + + 09-toolbar.el + + + + + + +
+;; 09-toolbar.el --- Toolbar set up
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 07:43:09 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/09-toolbar.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   Sets up the toolbar the way I like it.
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+;; Re-organise the default toolbar.
+(when (featurep 'toolbar)
+  (setq
+   toolbar-info-use-separate-frame t
+   toolbar-mail-reader 'gnus
+   toolbar-news-use-separate-frame t)
+  (customize-set-variable 'toolbar-captioned-p nil))
+
+(setq edit-toolbar-added-buttons-alist 'nil)
+
+(mapcar
+ (lambda (cons)
+   (setf (symbol-value (car cons)) (toolbar-make-button-list (cdr cons))))
+ edit-toolbar-added-buttons-alist)
+
+(defun toolbar-redo ()
+  (interactive)
+  (call-interactively #'redo))
+
+(defvar toolbar-redo-icon
+  (toolbar-make-button-list
+   (locate-data-file "redo.png")))
+
+(defun toolbar-irc ()
+  (interactive)
+  (call-interactively #'sy-riece))
+
+(defvar toolbar-irc-icon
+  (toolbar-make-button-list
+   (locate-data-file "irc@32x32.png")))
+
+(defun toolbar-emoney ()
+  (interactive)
+  (call-interactively #'emoney))
+
+(defvar toolbar-emoney-icon
+  (toolbar-make-button-list
+   (locate-data-file "emoney.png")))
+
+(and (device-on-window-system-p)
+     (set-specifier
+      default-toolbar 
+      '([toolbar-file-icon toolbar-open t "Open a file"] 
+        [toolbar-folder-icon toolbar-dired t "Edit a directory"] 
+        [toolbar-disk-icon toolbar-save t "Save buffer"] 
+        [toolbar-printer-icon toolbar-print t "Print buffer"] 
+        [toolbar-cut-icon toolbar-cut t "Kill region"] 
+        [toolbar-copy-icon toolbar-copy t "Copy region"] 
+        [toolbar-paste-icon toolbar-paste t "Paste from clipboard"] 
+        [toolbar-undo-icon toolbar-undo t "Undo"]
+        [toolbar-redo-icon toolbar-redo t "Redo"]
+        [toolbar-spell-icon toolbar-ispell t "Check spelling"] 
+        [toolbar-replace-icon toolbar-replace t "Search & Replace"] 
+        [toolbar-compile-icon toolbar-compile t "Start a compilation"] 
+        [toolbar-debug-icon toolbar-debug t "Start a debugger"]
+        [toolbar-emoney-icon toolbar-emoney t "Manage your millions with eMoney"]
+        [toolbar-irc-icon toolbar-irc t "Be productive with Riece"]
+        [toolbar-news-icon gnus-other-frame t "Gnus"]
+        nil 
+        [toolbar-info-icon toolbar-info t "Don't Panic!!"])))
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+(message "Toolbar set successfully")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:13:40 AEST 2020 + +
+ + + diff --git a/SYinits/10-pkgs.html b/SYinits/10-pkgs.html new file mode 100644 index 0000000..ce212a1 --- /dev/null +++ b/SYinits/10-pkgs.html @@ -0,0 +1,798 @@ + + + + + 10-pkgs.el + + + + + + +
+;; 10-pkgs.el --- Various XE Package Settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 07:58:14 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/10-pkgs.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   Lots of settings for various XEmacs packages that I use.  Plus a
+;;   few other packages.
+;;
+;;   I want to point out that I DO NOT blindly install the "sumo"
+;;   packages.  I only install what I need and use.  And I absolutely
+;;   DO NOT have the "fsf-compat" package installed, although I do
+;;   have overlay.el from there.  It just makes my life a tad easier.
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;
+
+;;; Code:
+;:*======================
+;:* MusicPD  (Not an XEmacs package)
+(require 'mpd)
+
+(defun sy-mpd-play ()
+  "Start playing music from a randomly chosen playlist."
+  (interactive)
+  (mpd-send "clear")
+  (mpd-send "load Full-sorted.playlist")
+  (mpd-send "random 1")
+  (mpd-send "repeat 1")
+  (mpd-playpause))
+
+(defun 2001-mpd-play ()
+  "Start playing 2001 audio book."
+  (interactive)
+  (mpd-send "clear")
+  (mpd-send "load 2001_A_Space_Odyssey.playlist")
+  (mpd-send "random 0")
+  (mpd-send "repeat 0")
+  (mpd-playpause))
+
+;; Audio keybindings
+(global-set-key [XF86AudioPlay] #'mpd-playpause)
+(global-set-key [XF86AudioStop] #'mpd-stop)
+(global-set-key [XF86AudioNext] #'mpd-next-track)
+(global-set-key [XF86AudioPrev] #'mpd-previous-track)
+(global-set-key [XF86AudioRaiseVolume] #'mpd-volume-up)
+(global-set-key [XF86AudioLowerVolume] #'mpd-volume-down)
+(global-set-key [XF86AudioMute] #'mpd-volume-mute/unmute)
+
+;; Mpd frame props
+(unless (or (string= (getenv "KDE_FULL_SESSION") "true")
+            (string= (getenv "SAWFISH_IS_RUNNING") "true"))
+  (push (cons 'override-redirect t) mpd-dock-frame-plist))
+(push (cons 'left 1780) mpd-dock-frame-plist)
+(push (cons 'top 5) mpd-dock-frame-plist)
+(push (cons 'internal-border-width 4) mpd-dock-frame-plist)
+(push (cons 'border-width 1) mpd-dock-frame-plist)
+(push (cons 'border-color "red") mpd-dock-frame-plist)
+
+;:*======================
+;:* View-process (`top' for emacs)
+(require 'view-process-mode)
+(setq View-process-host-names-and-system-types
+      '(("bastard.steveyoungs.com"
+         ("linux" nil "bsd"
+          View-process-field-name-descriptions-linux
+          View-process-kill-signals-linux))))
+(setq View-process-status-command-switches-system-v "auxw")
+(setq View-process-ps-header-window-offset 3)
+(add-hook 'View-process-header-mode-hook
+          (lambda ()
+            (set-specifier horizontal-scrollbar-visible-p nil (current-buffer))
+            (set-specifier vertical-scrollbar-visible-p nil (current-buffer))))
+
+;:*=====================
+;:* whitespace-mode
+(autoload 'whitespace-mode "whitespace-mode" nil t)
+(autoload 'whitespace-incremental-mode "whitespace-mode" nil t)
+
+;:*======================
+;:* func-menu
+(require 'func-menu)
+(add-hook 'find-file-hooks 'fume-setup-buffer)
+(add-hook 'Manual-mode-hook 'turn-on-fume-mode)
+(define-key fume-mode-map [(control button3)] #'mouse-function-menu)
+(setq
+ fume-display-in-modeline-p t
+ fume-menu-path '("View"))
+
+;:*======================
+;:* recent-files.el --- Maintain menu of recently opened files.
+(when (featurep 'menubar)
+  (require 'recent-files)
+  (setq recent-files-non-permanent-submenu t
+        recent-files-menu-path '("File")
+        recent-files-add-menu-before "Insert File..."
+        recent-files-save-file
+        (expand-file-name ".recent-files.el" user-init-directory)
+        recent-files-dont-include
+        '(#r"\.config/sxemacs/\(howm\|diary\).*$"
+          #r"sxemacs/timelog$"
+          #r"info/dir$"
+          #r"\.\(newsrc*\|bbdb\)$"
+          #r"init\.d\.el"))
+  (recent-files-initialize))
+
+;:*======================
+;:* jka-compr
+;; Handle automatic (de)compresion of [bg]zip files
+(require 'jka-compr)
+(jka-compr-install)
+
+;:*======================
+;:* iswitchb
+;: A really cool package to switch buffers
+(require 'iswitchb)
+(setq iswitchb-default-method 'samewindow)
+(iswitchb-default-keybindings)
+(add-hook
+ 'iswitchb-define-mode-map-hook
+ '(lambda ()
+    (define-key iswitchb-mode-map " " 'iswitchb-next-match)
+    (define-key iswitchb-mode-map [(control ?\ )] 'iswitchb-prev-match)
+    (define-key iswitchb-mode-map "\C-a" 'iswitchb-toggle-ignore)))
+
+;:*======================
+;:* backup
+;:  move all backups in one directory
+(require 'backup-dir)
+(setq bkup-backup-directory-info
+      '((t "~/.autosave/" ok-create full-path)))
+(setq version-control 'preserve-prefer-numbered)
+(setq-default delete-old-versions t)
+
+;:*======================
+;:* Load minibuffer history, but only if mule or file-coding is available
+(when (featurep '(or mule file-coding))
+  (require 'savehist)
+  (setq savehist-file (expand-file-name "history" user-init-directory))
+  (setq savehist-coding-system
+        (coding-system-name (find-coding-system 'utf-8)))
+  (savehist-mode 1))
+
+;:*======================
+;:* Kyle Jones' redo package.
+(when running-xemacs
+  (require 'redo)
+  (global-set-key [(control f2)] 'redo))
+
+(require 'scroll-in-place)
+
+;:*======================
+;:* pending-del
+;:  Non-nil when Pending Delete mode is enabled. In Pending Delete mode, typed
+;:  text replaces the selected region. Normally, you shouldn't modify this
+;:  variable by hand, but use the function `pending-delete-mode' instead. However,
+;:  you can customize the default value from the options menu (auto delete
+;:  selection).
+(require 'pending-del)
+(turn-on-pending-delete nil)
+
+;:*======================
+;:* comment-region
+;:  Comment or uncomment each line in the region.
+;:  Comments are terminated on each line, even for syntax in which newline does
+;:  not end the comment.  Blank lines do not get comments.
+(require 'newcomment)
+(global-set-key '(control f12)  'comment-or-uncomment-region)
+(global-set-key '(meta f12) 'comment-or-uncomment-region)
+
+;;; FIXME: SXEInits
+;:*======================
+;:* parens that mark sexpressions
+(require 'paren)
+(paren-set-mode 'paren)
+
+;:*======================
+;:* easy editing of crontab files
+(require 'crontab-edit "crontab.elc")
+(setq crontab-delete-blank-lines nil)
+(setq crontab-filename (expand-file-name ".crontab" (user-home-directory)))
+(setq crontab-directory
+      (paths-construct-path '("spool" "cron" "crontabs") "/var"))
+
+;:*======================
+;:* a major mode for editing X resource database files
+(autoload 'xrdb-mode "xrdb-mode" "Mode for editing X resource files" t)
+
+;:*======================
+;:* Footnote package
+(require 'footnote)
+
+;:*======================
+;:* Filladapt-Mode
+(require 'filladapt)
+(setq-default filladapt-mode t)
+(setq filladapt-fill-column-tolerance 5)
+(add-hook 'c-mode-hook 'turn-off-filladapt-mode)
+
+;:*======================
+;:* Speedbar
+;;; FIXME:  Speedbar Tooltips
+;;; snap:///${XPKGS}/speedbar/speedbar.el
+(setq
+ speedbar-query-confirmation-method 'none-but-delete
+ speedbar-show-unknown-files t
+ speedbar-tag-hierarchy-method '(speedbar-prefix-group-tag-hierarchy
+                                 speedbar-trim-words-tag-hierarchy
+                                 speedbar-simple-group-tag-hierarchy
+                                 speedbar-sort-tag-hierarchy)
+ ;; speedbar-track-mouse-flag t
+ ;; speedbar-use-tool-tips-flag t
+ speedbar-visiting-tag-hook 'speedbar-recenter-to-top)
+
+(when (featurep 'menubar)
+  (add-menu-button '("Tools")
+                   ["Speedbar" speedbar-frame-mode
+                    :style toggle
+                    :selected (and (boundp 'speedbar-frame)
+                                   (frame-live-p speedbar-frame)
+                                   (frame-visible-p speedbar-frame))]
+                   "--"))
+(global-set-key [(f4)] 'speedbar-get-focus)
+(require 'sb-image)
+(require 'sb-info)
+(require 'sb-texinfo)
+(eval-after-load "speedbar" '(load-library "sb-texinfo"))
+(eval-after-load "speedbar" '(load-library "sb-html"))
+(autoload 'w3-speedbar-buttons "sb-w3"
+  "W3 specific speedbar button generator.")
+
+;;; Speedbar frame props
+;;  'name' (so I can use matched windows in Sawfish)
+(setq speedbar-frame-plist
+      (plist-put speedbar-frame-plist 'name "Speedbar::Frame"))
+;; No scrollbars
+(setq speedbar-frame-plist
+      (plist-put speedbar-frame-plist 'scrollbar-height 0))
+(setq speedbar-frame-plist
+      (plist-put speedbar-frame-plist 'scrollbar-width 0))
+;; A little wider than default
+(setq speedbar-frame-plist
+      (plist-put speedbar-frame-plist 'width 25))
+
+;; FIXME: see... PKGFix
+;; Try to load the speedbar on the right of the current frame
+(defalias 'dframe-reposition-frame-xemacs 'dframe-reposition-frame-emacs)
+(setq speedbar-default-position 'right)
+
+;; Speedbar only does the repositioning thing if the frame has to be
+;; created.  If you have only closed the speedbar frame with 'q'
+;; instead of deleting it with 'Q' then the frame remains live.  As
+;; there is no perceptible speed difference of coming back from
+;; either a closed or deleted speedbar frame the following will
+;; force a delete-frame even if you are only closing it.
+(defun sy-speedbar-kill ()
+  (when (frame-live-p speedbar-frame)
+    (delete-frame speedbar-frame)))
+
+(add-hook 'speedbar-before-delete-hook #'sy-speedbar-kill)
+
+
+;:*======================
+;:* Shell-mode
+;; Trying to get compilation buffers to recognise ANSI colour
+;; sequences because GCC.  Doesn't seem to work.  Probably have to
+;; stick to `GCC_COLORS= make'
+(defun sy/comint-hooks ()
+  (ansi-color-for-comint-mode-on)
+  (fast-lock-mode 1)
+  (font-lock-mode 1))
+(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
+(add-hook 'comint-mode-hook #'sy/comint-hooks)
+(add-hook 'compilation-mode-hook #'sy/comint-hooks)
+(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
+(add-hook 'shell-mode-hook 'turn-on-font-lock)
+
+;:*=======================
+;:* Shell-script
+(setq sh-basic-offset 4)
+
+;:*======================
+;:* Compile-Mode
+(setq
+ compilation-always-signal-completion t
+ mode-compile-make-program "GCC_COLORS= make"
+ compilation-read-command t
+ compilation-window-height 10
+ compile-command "GCC_COLORS= make")
+
+;:*======================
+;:* Version Control
+(vc-load-vc-hooks)
+;; #'vc-load-vc-hooks brings in vc-xemacs which adds this hook. I
+;; would never need it.
+(remove-hook 'find-file-hooks 'vc-xemacs-hg-find-file-hook)
+(setq
+ ;; I pretty much only use git now so there's no point in VC trying to
+ ;; handle any other type.
+ vc-handled-backends '(GIT)
+ vc-follow-symlinks t)
+
+;:*======================
+;:* Ediff & Diff-mode
+(require 'ediff)
+(require 'diff-mode)
+(setq ediff-use-toolbar-p t
+      ediff-custom-diff-options "-u"
+      ediff-window-setup-function 'ediff-setup-windows-plain)
+(setq diff-switches "-u")
+
+;:*=====================
+;:* Tramp
+(require 'tramp)
+(setq tramp-default-method "ssh"
+      tramp-auto-save-directory "~/.autosave/"
+      tramp-remote-path
+      '("/usr/lib/pkgusr"
+        "/usr/bin"
+        "/bin"
+        "/usr/X11R6/bin"))
+
+; :*======================
+; :* Eshell
+(setq
+ eshell-directory-name
+ (file-name-as-directory
+  (expand-file-name "eshell" user-init-directory))
+ eshell-ask-to-save-history 'always
+ eshell-save-history-on-exit t
+ eshell-banner-message (concat "Welcome to Eshell on "
+                               (system-name)
+                               ", running "
+                               (shell-command-to-string "uname -rs")
+                               "In: "
+                               emacs-version
+                               "\n\n")
+ eshell-hist-ignoredups t
+ eshell-modules-list '(eshell-alias
+                       eshell-banner
+                       eshell-basic
+                       eshell-cmpl
+                       eshell-dirs
+                       eshell-glob
+                       eshell-hist
+                       eshell-ls
+                       eshell-pred
+                       eshell-prompt
+                       ;eshell-rebind
+                       eshell-script
+                       ;eshell-smart
+                       eshell-term
+                       eshell-unix
+                       eshell-xtra))
+
+(defun sy-eshell-bol-maybe (&optional prompt)
+  "*Move point to beginning of command or bol if there already.
+ If at bol, move point to beginning of command.
+ Optional arg, PROMPT is a regexp of your eshell prompt."
+  (interactive)
+  (let* ((prompt (or prompt "^.+ [$%] "))
+         (lbpos (point-at-bol))
+         (prspos (save-excursion
+                   (goto-char lbpos)
+                   (search-forward-regexp prompt (point-at-eol) t)))
+         (cpos (point)))
+    (goto-char
+     (cond ((null prspos)
+            lbpos)
+           ((= cpos (or prspos 0))
+            lbpos)
+           (prspos)
+           (t lbpos)))))
+
+(defun sy-eshell-bol-maybe-key ()
+  (define-key eshell-mode-map [(control ?a)] 'sy-eshell-bol-maybe))
+
+(add-hook 'eshell-mode-hook #'sy-eshell-bol-maybe)
+(add-hook 'eshell-mode-hook #'sy-eshell-bol-maybe-key t)
+(add-hook 'eshell-output-filter-functions #'eshell-handle-ansi-color)
+
+(defun sy-esh-cdl (&optional type)
+  "Eshell function to find current kernel's build or source dir.
+
+ Non-nil TYPE means find the current kernel's build directory, otherwise
+ find the source directory."
+  (let* ((base "/lib/modules/")
+         (ver (substring (shell-command-to-string "uname -r") 0 -1))
+         (dir (file-name-as-directory
+               (concat base ver "/"
+                       (if type
+                           "build"
+                         "source")))))
+    (cd dir)))
+
+(defun cdls ()
+  "Change directory to current kernel source directory.
+
+ Convenience function to use with Eshell."
+  (interactive)
+  (sy-esh-cdl))
+
+(defun cdlb ()
+  "Change directory to current kernel build directory.
+
+ Convenience function to use with Eshell."
+  (interactive)
+  (sy-esh-cdl 'build))
+
+; :*======================
+; :* FFAP -- Find File At Point
+(require 'ffap)
+
+;; Make sure ffap does NOT get in my way...
+(setq ffap-bindings nil)
+
+(global-set-key [f3] #'find-file-at-point)
+(global-set-key [(control x) ?4 f3] #'ffap-other-window)
+(global-set-key [(control x) ?5 f3] #'ffap-other-frame)
+(global-set-key [(shift button3)] #'ffap-at-mouse)
+(global-set-key [(control shift button3)] #'ffap-menu)
+
+(setq
+ ffap-machine-p-known 'accept
+ ffap-machine-p-unknown 'accept
+ ffap-machine-p-local 'accept)
+
+
+;:*======================
+;:* Auto-Insert
+(require 'auto-insert-tkld)
+
+(setq auto-insert-alist '(("\\.texi\\(nfo\\)?$" . "TeXinfo")
+                          ("\\.c$"              . "C")
+                          ("\\.cc$"             . "C++")
+                          ("\\.h$"              . "C Header")
+                          ("\\.el$"             . "Emacs Lisp")
+                          ("[Mm]akefile"        . "Makefile")
+                          ("\\.sh$"             . "Sh")
+                          ("\\.pl$"             . "Perl")))
+
+(setq auto-insert-type-alist '(("TeXinfo"    . "texinfo-insert.texi")
+                               ("C"          . "c-insert.c")
+                               ("C Header"   . "h-insert.h")
+                               ("C++"        . "c++-insert.cc")
+                               ("Emacs Lisp" . "elisp-insert.el")
+                               ("Makefile"   . "makefile.inc")
+                               ("Perl"       . "perl-insert.pl")
+                               ("Sh"         . "sh-insert.sh")))
+
+(add-to-list 'auto-insert-path '"~/documents/Templates/")
+
+;; Don't auto-insert into AucTeX style .els
+(defadvice TeX-auto-store (around no-auto-insert activate)
+  "Ensure auto-insert is deactivated"
+  (let ((auto-insert-automatically nil))
+    ad-do-it))
+(message "Auto-Insert initialised!")
+
+;:*=======================
+;:* My git shit
+(require 'sy-git)
+(require 'git)
+
+;:*======================
+;:* Emacs Lisp List
+(defvar sxell-initialised-flag)
+(defvar sxell-download-directory)
+(when (and (featurep '(and sxemacs postgresql))
+           (fboundp 'ffi-defun))
+  (require 'sxell)
+  (setq sxell-initialised-flag t
+        sxell-download-directory
+        (file-name-as-directory (expand-file-name "download/SXEmacs"
+                                                  (user-home-directory)))))
+;:*======================
+;:* EasyPG
+(require 'epa-setup)
+
+(defun sy-epa-export-key ()
+  "Wrapper for `epa-export-keys' to export ASCII armoured keys."
+  (interactive)
+  (let ((epa-armor t))
+    (call-interactively #'epa-export-keys)))
+
+(define-key epa-key-list-mode-map [?O] #'sy-epa-export-key)
+
+;:*=======================
+;:* Howm thing. (this needs mule, but that is default so no biggie)
+(require 'howm)
+
+(setq
+ howm-directory (file-name-as-directory
+                 (expand-file-name "howm" user-init-directory))
+ howm-keyword-file (expand-file-name "howm-keys" user-init-directory)
+ howm-history-file (expand-file-name "howm-history" user-init-directory))
+
+;; howm has the unfortunate name that ends in `wm' which is what
+;; winmgr-mode uses, so nuke winmgr-mode from auto-mode-alist
+(remove-alist 'auto-mode-alist "\\.[^/]*wm2?\\(?:rc\\)?\\'")
+
+;; The howm people are nuts, they bind C-h to scroll-down
+;; Get rid of it and replace with DEL and BACKSPACE
+(define-key howm-menu-mode-map "\C-h" nil)
+(define-key howm-menu-mode-map [delete] #'scroll-down)
+(define-key howm-menu-mode-map [backspace] #'scroll-down)
+(define-key riffle-summary-mode-map "\C-h" nil)
+(define-key riffle-summary-mode-map [delete] #'scroll-other-window-down)
+(define-key riffle-summary-mode-map [backspace] #'scroll-other-window-down)
+(define-key riffle-contents-mode-map "\C-h" nil)
+(define-key riffle-contents-mode-map [delete] #'scroll-down)
+(define-key riffle-contents-mode-map [backspace] #'scroll-down)
+
+;; Add a binding to show the active todo list
+(global-set-key [(control ?c) ?t] #'howm-list-active-todo)
+
+;; Another problem with howm... it fucks up window configuration
+;; Advice time!
+(defadvice howm-keyword-search (before howm-save-kw (&rest args) activate)
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
+
+(defadvice howm-list-grep-fixed (before howm-save-win1 (&rest args) activate)
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
+
+(defadvice howm-list-grep (before howm-save-win (&rest args) activate)
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
+
+(defadvice howm-list-todo (before howm-save-win (&rest args) activate)
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
+
+(defadvice howm-list-active-todo (before howm-save-win (&rest args) activate)
+ "Save window configuration before viewing howm buffers."
+ (window-configuration-to-register ?h))
+
+(defadvice riffle-kill-buffer (after howm-restore-win (&rest args) activate)
+  "Restore the original window configuration."
+  (jump-to-register ?h))
+
+;; howm fucks up font-lock'ing like you wouldn't believe, adding a
+;; call to `turn-on-font-lock' here at least restores a certain level
+;; of normalcy.
+(defun turn-on-howm-mode ()
+  (turn-on-font-lock)
+  (howm-mode 1))
+
+(defun turn-off-howm-mode ()
+  (howm-mode 0)
+  (font-lock-mode))
+
+;; Turn it on where I need it
+(add-hook 'lisp-interaction-mode-hook #'turn-on-howm-mode)
+(add-hook 'text-mode-hook #'turn-on-howm-mode)
+(add-hook 'latex-mode-hook #'turn-on-howm-mode)
+(add-hook 'c-mode-hook #'turn-on-howm-mode)
+(add-hook 'sh-mode-hook #'turn-on-howm-mode)
+;; You gotta be fooking kidding me, this prevents lisp-initd.el from
+;; compiling the generated .el (moved to init.el)
+;; (add-hook 'emacs-lisp-mode-hook #'turn-on-howm-mode)
+
+;; Turn it off where I don't
+;; I actually would love to have howm in all of these modes, but I
+;; cannot get the font-locking working properly with it on
+(add-hook 'html-mode-hook #'turn-off-howm-mode)
+(add-hook 'texinfo-mode-hook #'turn-off-howm-mode)
+(add-hook 'message-mode-hook #'turn-off-howm-mode)
+(add-hook 'change-log-mode-hook #'turn-off-howm-mode)
+
+;:*=====================
+;:* snap!
+;; save/load snapshot of application to/from text
+;; Usage:
+
+;; (1) M-x snap-record on application, e.g. Wanderlust.
+;; (2) Yank (C-y) on any buffer, e.g. *scratch* or ~/memo.txt.
+;; (3) M-x snap-play on yanked text ==> snapshot (1) is restored.
+(require 'snap)
+(global-set-key [(hyper ?s) ?r] #'snap-record)
+
+;; env var trickery.
+(setq snap-abbreviate-environment-variables
+      '("EMCHAT" "JAVA_HOME" "EL" "XPKGS" "MPKGS" "PKGS" "QTDIR"
+        "BLDS" "SXESITE" "SXEWD" "SYdrive" "SYdrop" "HOME"))
+
+(defadvice snap-abbreviate-file-name (around env-var (raw-path) activate)
+  ad-do-it
+  (let ((path (expand-file-name raw-path))
+        (rules (mapcar #'(lambda (var)
+                           (let ((val (getenv var)))
+                             (and val
+                                  (cons (concat "^" (regexp-quote val))
+                                        (format "${%s}" var)))))
+                       snap-abbreviate-environment-variables)))
+    (mapc #'(lambda (r)
+              (when (and r (string-match (car r) path))
+                (setq ad-return-value
+                      (replace-regexp-in-string (car r) (cdr r) path))))
+          (reverse rules))))
+
+;; Bookmark extras
+(eval-after-load "bookmark"
+  (progn
+    (ad-enable-advice 'bookmark-buffer-file-name 'around 'with-snap)
+    (ad-enable-advice 'bookmark-jump-noselect 'around 'with-snap)))
+
+;; ffap extras
+(setq ffap-url-regexp snap-ffap-url-regexp)
+(setq ffap-url-fetcher snap-ffap-url-fetcher)
+
+;:*=======================
+;:* ElDoc (handy thingy dingy for lisp programming)
+;;  displays function args and var doc strings in echo area
+;(setq eldoc-use-idle-timer-p nil)
+;(autoload #'turn-on-eldoc-mode "eldoc" nil t)
+;(add-hook 'emacs-lisp-mode-hook #'turn-on-eldoc-mode)
+;(add-hook 'lisp-interaction-mode-hook #'turn-on-eldoc-mode)
+
+;:*=======================
+;:* Man pages
+(require 'man)
+
+;; You can't follow xrefs via keyboard, so...
+(defun sy:Manual-follow-xref-kbd ()
+  "Invoke `manual-entry' on the cross-reference at point."
+  (interactive)
+  (let* ((ext (extent-at (point)))
+         (data (and ext (extent-property ext 'man))))
+    (if (eq (car-safe data) 'Manual-follow-xref)
+        (eval data)
+      (error 'search-failed "no manual cross-reference there."))
+    (or (manual-entry (extent-string ext))
+        ;; Couldn't find it, try other sections.
+        (and (string-match "[ \t]*([^)]+)\\'" (extent-string ext))
+             (progn
+               (message "No entries found for %s; checking other sections..."
+                        (extent-string ext))
+               (manual-entry
+                (substring (extent-string ext) 0 (match-beginning 0))
+                nil t))))))
+
+(define-key Manual-mode-map [(control return)] #'sy:Manual-follow-xref-kbd)
+(define-key Manual-mode-map [button1] #'Manual-follow-xref)
+
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
+(message "packages loaded")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:13:56 AEST 2020 + +
+ + + diff --git a/SYinits/11-cal.html b/SYinits/11-cal.html new file mode 100644 index 0000000..e8adbd7 --- /dev/null +++ b/SYinits/11-cal.html @@ -0,0 +1,733 @@ + + + + + 11-cal.el + + + + + + +
+;; 11-cal.el --- Calendar Settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 08:12:34 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/11-cal.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   My calendar/diary settings
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+;:*=======================
+;:* Calendar
+(require 'cedet-compat)
+(require 'diary-lib)
+;(require 'calendar)
+(setq 
+ calendar-latitude -27.47
+ calendar-longitude 153.02
+ calendar-location-name "Brisbane"
+ calendar-time-zone 600
+ cal-tex-diary t
+; calendar-date-display-form ; see: "Howm Integration" below
+; '((if dayname (concat dayname ", ")) day " " monthname " " year)
+ calendar-time-display-form
+ '(24-hours ":" minutes
+            (if time-zone " (") time-zone (if time-zone ")"))
+ calendar-week-start-day 1
+ diary-file (expand-file-name "diary" user-init-directory)
+ diary-mail-addr "steve"
+ diary-mail-days 7
+ european-calendar-style t
+ mark-diary-entries-in-calendar t
+ number-of-diary-entries 7
+ view-diary-entries-initially t)
+
+;; Use a dedicated frame for my calendar
+(setq calendar-and-diary-frame-parameters
+      '((name . "Calendar")
+        (title . "Calendar")
+        (height . 40)
+        (width . 80)
+        (minibuffer . t)
+        (default-toolbar-visible-p . nil)
+        (default-gutter-visible-p . nil)
+        (menubar-visible-p . t))
+      calendar-setup 'one-frame)
+
+;:*=======================
+;:* Todo
+;; Turning this off for a while to see if I can get used to using Howm
+;; more.
+;;(autoload 'todo-mode "todo-mode"
+;;  "Major mode for editing TODO lists." t)
+;;(autoload 'todo-show "todo-mode"
+;;  "Show TODO items." t)
+;;(autoload 'todo-insert-item "todo-mode"
+;;  "Add TODO item." t)
+;;(global-set-key "\C-ct" 'todo-show) ;; switch to TODO buffer
+;;(global-set-key "\C-cn" 'todo-insert-item) ;; insert new item
+;; (setq
+;;  todo-prefix "&%%(todo-cp)"
+;;  todo-file-do (expand-file-name "todo-do" (paths-construct-path
+;;                                         (list user-init-directory
+;;                                               "todo-mode")))
+;;  todo-file-done (expand-file-name "todo-done" (paths-construct-path
+;;                                             (list user-init-directory
+;;                                                   "todo-mode")))
+;;  todo-file-top (expand-file-name "todo-top" (paths-construct-path
+;;                                           (list user-init-directory
+;;                                                 "todo-mode")))
+;;  todo-time-string-format "%3b, %d")
+
+;:*=======================
+;:* Fancy Diary with perdy colours!
+(defun sy-hide-fancy-dashes ()
+  "Hides the long lines of dashes from todo-mode in fancy diary display."
+  (save-excursion
+    (goto-char (point-min))
+    (while (re-search-forward "-----" nil t)
+      (set-extent-property
+       (make-extent (match-beginning 0) (1+ (match-end 0)))
+       'invisible t))))
+
+(define-derived-mode fancy-diary-display-mode fundamental-mode "Diary"
+  "Minor mode for displaying Fancy Diary entries buffer."
+  (set (make-local-variable 'font-lock-defaults)
+       '(fancy-diary-font-lock-keywords t))
+  (sy-hide-fancy-dashes)
+  (font-lock-mode)
+  (define-key (current-local-map) "o" 'other-window)
+  (define-key (current-local-map) [space] 'scroll-up-command)
+  (define-key (current-local-map) [backspace] 'scroll-down-command))
+
+(defadvice fancy-diary-display (after set-mode activate)
+  "Give the Fancy Diary Entries buffer a mode of its own.
+
+It has the ever-so-original name of: `fancy-diary-display-mode', adds
+a couple of motion keybindings, and lets you set up font lock keywords
+for a fontified Diary buffer."
+  (save-excursion
+    (set-buffer (get-buffer-create fancy-diary-buffer))
+    (fancy-diary-display-mode)))
+
+(defun fancy-diary-font-lock-keywords ()
+  (let* ((today (regexp-opt (list (calendar-date-string (calendar-current-date)))))
+         (keywords `(("^---\\s-\\(.*$\\)" (1 font-lock-function-name-face))
+                     ("^.*SY:" . font-lock-keyword-face)
+                     ("\"\\(.*\\)\"" (1 font-lock-string-face))
+                     ("`\\(.*?\\)'" (1 font-lock-reference-face))
+                     ("[0-9]+:[0-9]+" . font-lock-warning-face)
+                     (,today . font-lock-warning-face)
+                     ("\\(^.*\\)\n=" (1 font-lock-comment-face)))))
+    keywords))
+
+(defvar fancy-diary-font-lock-keywords (fancy-diary-font-lock-keywords))
+
+;:*=======================
+;:* Display ISO week numbers
+;;
+;; I saw this code mentioned on c.e.x.  I just snarfed what I needed
+;; and SXEmacserised it.
+(require 'cal-iso)
+
+(defvar calendar-use-colours t
+  "Tries to fontify Calendar if non-nil.")
+
+(defvar calendar-week-string "WK"
+  "String (up to three chars) used in calendar header to identify week numbers.")
+
+(defun sy-generate-calendar-month (month year indent)
+  "Produce a calendar for ISO-week, month, year on the Gregorian calendar.
+The calendar is inserted in the buffer starting at the line on which point
+is currently located, but indented INDENT spaces.  The indentation is done
+from the first character on the line and does not disturb the first INDENT
+characters on the line."
+  (let* ((blank-days                    ; At start of month
+          (mod
+           (- (calendar-day-of-week (list month 1 year))
+              calendar-week-start-day)
+           7))
+         (last (calendar-last-day-of-month month year)))
+    (goto-char (point-min))
+    (calendar-insert-indented
+     (calendar-string-spread
+      (list (format "%s %d" (calendar-month-name month) year)) ?  20)
+     indent t)
+    ;; Add colour to month name
+    (if calendar-use-colours
+        (set-extent-property (make-extent (point-min) (1- (point)))
+                     'face 'calendar-header-face))
+    (calendar-insert-indented "" indent) ; Go to proper spot
+    (calendar-for-loop
+     i from 0 to 6 do
+     (insert (substring (aref calendar-day-name-array
+                              (mod (+ calendar-week-start-day i) 7)) 0 2))
+     ;; Add colour to week day names and sundays
+     (if calendar-use-colours
+         (set-extent-property (make-extent  (- (point) 2) (point)) 'face
+                      (if (= 0 (mod (+ calendar-week-start-day i) 7))
+                          'calendar-sunday-face
+                        'calendar-header-face)))
+     (insert " "))
+    ;; Add week-string after week dates
+    (insert (concat calendar-week-string 
+                    (make-string (- 3 (length calendar-week-string)) ? )))
+    ;; Add colour to week-string
+    (if calendar-use-colours
+        (set-extent-property (make-extent  (- (point) 3) (point))
+                     'face 'calendar-week-face))
+    (calendar-insert-indented "" 0 t);; Force onto following line
+    (calendar-insert-indented "" indent);; Go to proper spot
+    ;; Add blank days before the first of the month
+    (calendar-for-loop i from 1 to blank-days do (insert "   "))
+    ;; Put in the days of the month
+    (calendar-for-loop
+     i from 1 to last do
+     (insert (format "%2d " i))
+     (if (not calendar-use-colours)
+         nil
+       (put-text-property (- (point) 3) (1- (point)) 'mouse-face 'highlight)
+       ;; Add colour to sunday
+       (if (= 1 (mod (+ blank-days calendar-week-start-day i) 7))
+           (set-extent-property (make-extent  (- (point) 3) (1- (point)))
+                        'face 'calendar-sunday-face)))
+     (and (zerop (mod (+ i blank-days) 7))
+          ;; Add ISO-week # at the end each week entry
+          (not (insert
+                (format "%2d " (extract-calendar-month
+                                (calendar-iso-from-absolute
+                                 (calendar-absolute-from-gregorian
+                                  (list month i year)))))))
+          ;; Add colour to week #
+          (if calendar-use-colours
+              (set-extent-property (make-extent  (- (point) 3) (1- (point)))
+                           'face 'calendar-week-face)
+            t)
+          (/= i last)
+          (calendar-insert-indented "" 0 t);; Force onto following line
+          (calendar-insert-indented "" indent)))));; Go to proper spot
+
+(defalias 'generate-calendar-month #'sy-generate-calendar-month)
+
+;:*=======================
+;:* Hooks
+(add-hook 'diary-display-hook #'fancy-diary-display)
+(add-hook 'diary-hook #'appt-make-list)
+(add-hook 'list-diary-entries-hook
+          #'(lambda ()
+             (sort-diary-entries)
+             (include-other-diary-files)))
+(add-hook 'mark-diary-entries-hook #'mark-included-diary-files)
+(add-hook 'today-visible-calendar-hook #'calendar-mark-today)
+(add-hook 'calendar-move-hook #'(lambda () (diary-view-entries 1)))
+(add-hook 'calendar-mode-hook
+          #'(lambda ()
+              (setq fancy-diary-font-lock-keywords
+                    (fancy-diary-font-lock-keywords))))
+
+;:*=======================
+;:* Holidays
+(defvar displayed-month)
+(defvar displayed-year)
+(require 'holidays)
+
+;; First up, a slightly re-written easter-holiday function
+(defun sy-easter-holidays ()
+  "List of dates related to Easter, as visible in calendar window.
+Ever-so-slightly modified to include the Easter Monday holiday."
+ (if (and (> displayed-month 5) (not all-christian-calendar-holidays))
+     nil;; Ash Wednesday, Good Friday, and Easter are not visible.
+   (let* ((century (1+ (/ displayed-year 100)))
+          (shifted-epact        ;; Age of moon for April 5...
+           (% (+ 14 (* 11 (% displayed-year 19));;     ...by Nicaean rule
+                 (-           ;; ...corrected for the Gregorian century rule
+                  (/ (* 3 century) 4))
+                 (/    ;; ...corrected for Metonic cycle inaccuracy.
+                  (+ 5 (* 8 century)) 25)
+                 (* 30 century));;              Keeps value positive.
+              30))
+          (adjusted-epact       ;;  Adjust for 29.5 day month.
+           (if (or (= shifted-epact 0)
+                   (and (= shifted-epact 1) (< 10 (% displayed-year 19))))
+               (1+ shifted-epact)
+             shifted-epact))
+          (paschal-moon       ;; Day after the full moon on or after March 21.
+           (- (calendar-absolute-from-gregorian (list 4 19 displayed-year))
+              adjusted-epact))
+          (abs-easter (calendar-dayname-on-or-before 0 (+ paschal-moon 7)))
+          (mandatory
+           (list
+            (list (calendar-gregorian-from-absolute abs-easter)
+                  "Easter Sunday")
+            (list (calendar-gregorian-from-absolute (- abs-easter 2))
+                  "Good Friday")
+            (list (calendar-gregorian-from-absolute (+ abs-easter 1))
+                  "Easter Monday")
+            (list (calendar-gregorian-from-absolute (- abs-easter 46))
+                  "Ash Wednesday")
+            (list (calendar-gregorian-from-absolute (- abs-easter 47))
+                  "Shrove Tuesday \(Pancake Tuesday\)")))
+          (optional
+           (list
+            (list (calendar-gregorian-from-absolute (- abs-easter 63))
+                  "Septuagesima Sunday")
+            (list (calendar-gregorian-from-absolute (- abs-easter 56))
+                  "Sexagesima Sunday")
+            (list (calendar-gregorian-from-absolute (- abs-easter 49))
+                  "Shrove Sunday")
+            (list (calendar-gregorian-from-absolute (- abs-easter 48))
+                  "Shrove Monday")
+            (list (calendar-gregorian-from-absolute (- abs-easter 14))
+                  "Passion Sunday")
+            (list (calendar-gregorian-from-absolute (- abs-easter 7))
+                  "Palm Sunday")
+            (list (calendar-gregorian-from-absolute (- abs-easter 3))
+                  "Maundy Thursday")
+            (list (calendar-gregorian-from-absolute (+ abs-easter 35))
+                  "Rogation Sunday")
+            (list (calendar-gregorian-from-absolute (+ abs-easter 39))
+                  "Ascension Day")
+            (list (calendar-gregorian-from-absolute (+ abs-easter 49))
+                  "Pentecost (Whitsunday)")
+            (list (calendar-gregorian-from-absolute (+ abs-easter 50))
+                  "Whitmonday")
+            (list (calendar-gregorian-from-absolute (+ abs-easter 56))
+                  "Trinity Sunday")
+            (list (calendar-gregorian-from-absolute (+ abs-easter 60))
+                  "Corpus Christi")))
+          (output-list
+           (filter-visible-calendar-holidays mandatory)))
+     (if all-christian-calendar-holidays
+         (setq output-list
+               (append 
+                (filter-visible-calendar-holidays optional)
+                output-list)))
+     output-list)))
+
+;; Get rid of all the Americanised holidays
+(setq
+ christian-holidays nil
+ hebrew-holidays nil
+ islamic-holidays nil
+ general-holidays nil
+ local-holidays nil
+ oriental-holidays nil
+ other-holidays nil)
+
+;; Set up standard Aussie holidays
+(setq calendar-holidays
+      '((holiday-fixed 1 1 "New Year's Day")
+        ;; If New Year's day is on a weekend the public
+        ;; holiday is the following Monday
+        (if (or (eq 0 (calendar-day-of-week (list 1 1 displayed-year)))
+                (eq 6 (calendar-day-of-week (list 1 1 displayed-year))))
+            (holiday-float 1 1 1 "New Year's Day Public Holiday"))
+        (holiday-fixed 1 26 "Australia Day")
+        ;; If Australia Day falls on a weekend, the
+        ;; holiday is the following Monday
+        (if (eq 0 (calendar-day-of-week (list 1 26 displayed-year)))
+            (holiday-fixed 1 27 "Australia Day Public Holiday"))
+        (if (eq 6 (calendar-day-of-week (list 1 26 displayed-year)))
+            (holiday-fixed 1 28 "Australia Day Public Holiday"))
+        (holiday-fixed 2 14 "Valentine's Day")
+        (holiday-fixed 3 17 "St. Patrick's Day")
+        (holiday-fixed 4 1 "April Fools' Day")
+        (holiday-fixed 4 25 "Anzac Day")
+        ;; If Anzac Day falls on a weekend, the holiday
+        ;; is the following Monday
+        (if (eq 0 (calendar-day-of-week (list 4 25 displayed-year)))
+            (holiday-fixed 4 26 "Anzac Day Public Holiday"))
+        (if (eq 6 (calendar-day-of-week (list 4 25 displayed-year)))
+            (holiday-fixed 4 27 "Anzac Day Public Holiday"))
+        (holiday-float 5 1 1 "Labour Day")
+        (holiday-float 5 0 2 "Mother's Day")
+        (holiday-float 6 1 2 "Queen's Birthday")
+        ;; Brisbane Ekka holiday is on the 2nd Wednesday
+        ;; in August, unless there are 5 Wednesdays in
+        ;; August, then it is the 3rd Wednesday.
+        (if (eq 8 (car (calendar-nth-named-day 5 3 8 displayed-year)))
+            (holiday-float 8 3 3 "Brisbane Show Day")
+          (holiday-float 8 3 2 "Brisbane Show Day"))
+        (holiday-float 9 0 1 "Father's Day")
+        (holiday-fixed 12 25 "Christmas Day")
+        (holiday-fixed 12 26 "Boxing Day")
+        ;; If Xmas falls on weekend, the public holiday
+        ;; is the following Mon/Tue
+        (if (or (eq 0 (calendar-day-of-week (list 12 25 displayed-year)))
+                (eq 6 (calendar-day-of-week (list 12 25 displayed-year))))
+            (holiday-fixed 12 27 "Xmas Day Public Holiday"))
+        (if (or (eq 0 (calendar-day-of-week (list 12 26 displayed-year)))
+                (eq 6 (calendar-day-of-week (list 12 26 displayed-year))))
+            (holiday-fixed 12 28 "Boxing Day Public Holiday"))
+        (solar-equinoxes-solstices)
+        (sy-easter-holidays)))
+(setq mark-holidays-in-calendar t)
+
+;:*=======================
+;:* Appointments
+(require 'appt)
+(require 'balloon-help)
+(balloon-help-mode 1)
+(setq 
+ balloon-help-background "BlanchedAlmond"
+ balloon-help-foreground "Black"
+ display-time-24hr-format t
+ display-time-day-and-date t
+ display-time-no-mail-balloon "What! No mail? That can't be right."
+ display-time-mail-balloon-show-gnus-group t
+ display-time-mail-balloon-max-displayed 20
+ display-time-mail-balloon-gnus-split-width 19
+ display-time-mail-balloon-enhance-gnus-group
+ '("private.*")
+ display-time-mail-balloon-suppress-gnus-group
+ '("\\(SPAM.*\\|returned\\.mail\\)"))
+(display-time)
+(appt-activate 1)
+(setq 
+ appt-message-warning-time 30
+ appt-display-format 'echo
+ appt-audible t
+ appt-display-mode-line t
+ appt-announce-method 'appt-persistent-message-announce)
+(add-hook 'appt-make-list-hook #'appt-included-diary-entries)
+(appt-activate 1)
+
+;:*=======================
+;:* Howm integration
+(setq
+ calendar-date-display-form
+ '("[" year "-" (format "%02d" (string-to-int month))
+   "-" (format "%02d" (string-to-int day)) "] "
+   (if dayname (concat dayname ", ")) day " " monthname " " year))
+
+(defun howm-mark-calendar-date ()
+  (interactive)
+  (let* ((howm-schedule-types
+          howm-schedule-menu-types)
+         (raw (howm-reminder-search
+               howm-schedule-types))
+         (str nil) (yy nil) (mm nil) (dd nil))
+    (while raw
+      (setq str (nth 1 (car raw)))
+      (when
+          (string-match
+           "\\([0-9]+\\)-\\([0-9]+\\)-\\([0-9]+\\)"
+           str)
+        (setq yy (match-string 1 str))
+        (setq mm (match-string 2 str))
+        (setq dd (match-string 3 str)))
+      (when (and yy mm dd)
+        (mark-calendar-date-pattern
+         (string-to-int mm)
+         (string-to-int dd)
+         (string-to-int yy)))
+      (setq mm nil)
+      (setq dd nil)
+      (setq yy nil)
+      (setq raw (cdr raw)))))
+
+(defadvice mark-diary-entries
+  (after mark-howm-entry activate)
+  (howm-mark-calendar-date))
+
+(and-boundp 'howm-menu-display-rules
+  (setq
+   howm-menu-display-rules
+   (cons
+    (cons "%hdiary[\n]?" 'howm-menu-diary)
+    howm-menu-display-rules)))
+
+(defun howm-menu-diary ()
+  (message "scanning diary...")
+  (delete-region
+   (match-beginning 0) (match-end 0))
+  (let* ((now (decode-time (current-time)))
+         (diary-date
+          (list (nth 4 now) (nth 3 now) (nth 5 now)))
+         (diary-display-hook 'ignore)
+         (howm-diary-entry nil)
+         (howm-diary-entry-day nil)
+         (str nil)
+         yy mm dd)
+    (unwind-protect
+        (setq howm-diary-entry
+              (diary-list-entries
+               diary-date howm-menu-schedule-days))
+      (save-excursion
+        (set-buffer
+         (find-buffer-visiting diary-file))
+        (subst-char-in-region
+         (point-min) (point-max) ?\^M ?\n t)
+        (setq selective-display nil)))
+    (while howm-diary-entry
+      (setq howm-diary-entry-day (car howm-diary-entry))
+      (setq mm (nth 0 (car howm-diary-entry-day)))
+      (setq dd (nth 1 (car howm-diary-entry-day)))
+      (setq yy (nth 2 (car howm-diary-entry-day)))
+      (setq str (nth 1 howm-diary-entry-day))
+      (setq howm-diary-entry (cdr howm-diary-entry))
+      (insert
+       (format
+        ">>d [%04d-%02d-%02d] %s\n" yy mm dd str))))
+  (message "scanning diary...done"))
+
+(setq diary-date-forms
+      '((month "/" day "[^/0-9]")
+        (month "/" day "/" year "[^0-9]")
+        ("\\[" year "-" month "-" day "\\]" "[^0-9]")
+        (monthname " *" day "[^,0-9]")
+        (monthname " *" day ", *" year "[^0-9]")
+        (dayname "\\W")))
+
+(defun howm-open-diary (&optional dummy)
+  (interactive)
+  (let ((date-str nil) (str nil))
+    (save-excursion
+      (beginning-of-line)
+      (when (re-search-forward
+             ">>d \\(\\[[-0-9]+\\]\\) " nil t)
+        (setq str
+              (concat
+               "^.+"
+               (buffer-substring-no-properties
+                (point) (line-end-position))))
+        (setq date-str
+              (concat
+               "^.+"
+               (buffer-substring-no-properties
+                (match-beginning 1)
+                (match-end 1))
+               " " str))
+        (find-file
+         (substitute-in-file-name diary-file))
+        (howm-mode t)
+        (goto-char (point-min))
+        (if (re-search-forward date-str nil t)
+            ()
+          (re-search-forward str nil t))))))
+
+(defun add-diary-action-lock-rule ()
+  (let ((rule
+         (action-lock-general
+          'howm-open-diary
+          "^\\(>>d\\) "
+          1 1)))
+    (if (not (member rule action-lock-default-rules))
+        (progn
+          (setq action-lock-default-rules
+                (cons rule action-lock-default-rules))
+          (action-lock-set-rules
+           action-lock-default-rules)))))
+
+(add-hook 'action-lock-mode-on-hook
+          'add-diary-action-lock-rule)
+
+(defadvice make-diary-entry
+  (after howm-mode activate)
+  (text-mode)
+  (howm-mode t))
+
+;;; ;;;;;;;;;;
+
+;;; ;; M-x calendar, move cursor to a certain date, and
+;;; ;; M-x howm-from-calendar to search that date in howm notes.
+(defun howm-from-calendar ()
+  (interactive)
+  (let* ((mdy (calendar-cursor-to-date t))
+         (m (car mdy))
+         (d (second mdy))
+         (y (third mdy))
+         (key (format-time-string
+               howm-date-format
+               (encode-time 0 0 0 d m y))))
+    (howm-keyword-search key)))
+
+;; Bind howm-from-calendar to "H-d" key.
+(add-hook 'initial-calendar-window-hook
+          #'(lambda ()
+            (local-set-key [(hyper ?d)] 'howm-from-calendar)))
+
+       
+
+;; Type "H-d" in howm menu to open calendar.
+(add-hook 'howm-menu-hook
+          #'(lambda ()
+            (local-set-key [(hyper ?d)] 'calendar)))
+
+;:*=======================
+;:* timeclock
+;;  I tried using it for a while but I found that because it wasn't
+;;  automated I never remembered to "clock-in" or "clock-out" and
+;;  change tasks.  I would probably use it if it were a lot more like
+;;  xwem-worklog.
+;;
+;; Track time spent doing certain things
+;; (require 'timeclock)
+;; (setq timeclock-file (expand-file-name "timelog" user-init-directory))
+;; (setq timeclock-relative nil)
+;; (add-hook 'kill-emacs-query-functions 'timeclock-query-out)
+;; (timeclock-modeline-display)
+
+(define-key ctl-x-map "ti" 'timeclock-in)
+(define-key ctl-x-map "to" 'timeclock-out)
+(define-key ctl-x-map "tc" 'timeclock-change)
+(define-key ctl-x-map "tr" 'timeclock-reread-log)
+(define-key ctl-x-map "tu" 'timeclock-update-modeline)
+(define-key ctl-x-map "tw" 'timeclock-when-to-leave-string)
+
+
+
+;:*=======================
+;:* Start itimer to refresh just after midnight
+;; This needs my `future-run-at-time' advice.
+(run-at-time "00:01" 86400 #'redraw-calendar)
+
+;:*=======================
+;:* Get the show on the road
+(defun sy-calendar-setup ()
+  (mark-diary-entries)
+  (mark-calendar-holidays)
+  (diary-show-all-entries))
+
+(add-hook 'calendar-load-hook 'sy-calendar-setup)
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
+(message "Calendar settings loaded")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:14:11 AEST 2020 + +
+ + + diff --git a/SYinits/12-misc.html b/SYinits/12-misc.html new file mode 100644 index 0000000..74d35ae --- /dev/null +++ b/SYinits/12-misc.html @@ -0,0 +1,1070 @@ + + + + + 12-misc.el + + + + + + +
+;; 12-misc --- Miscellaneous Settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 18:46:14 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/12-misc.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;  For stuff that just doesn't seem to fit anywhere else.
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+;;; Code:
+;:*=======================
+;:* Why type 'y e s RET' or 'n o RET' when 'y' or 'n' will do.
+(fset 'yes-or-no-p 'y-or-n-p)
+
+(setq x-allow-sendevents t)
+
+;:*======================
+;: Enable the command `narrow-to-region' ("C-x n n")
+;(setq narrow-to-region t)
+(put 'narrow-to-region 'disabled nil)
+
+;:*======================
+;:* Enable `erase-buffer'
+(put 'erase-buffer 'disabled nil)
+
+;:*======================
+;:* Put the mouse selection in the kill buffer
+;: Jan Vroonhof <vroonhof@frege.math.ethz.ch>
+(defun mouse-track-drag-copy-to-kill (event count)
+  "Copy the dragged region to the kill ring"
+  (let ((region (default-mouse-track-return-dragged-selection event)))
+    (when region
+      (copy-region-as-kill (car region)
+                           (cdr region)))
+    nil))
+(add-hook 'mouse-track-drag-up-hook 'mouse-track-drag-copy-to-kill)
+
+;:*=======================
+;:* Keep the mouse pointer away from the text cursor
+(require 'avoid)
+(mouse-avoidance-mode 'banish)
+
+;:*======================= 
+;:* Frame title.
+(setq frame-title-format
+      (concat "-={%b}=- "
+              (construct-emacs-version-name)
+              " ["
+              (and-boundp 'sxemacs-codename
+                sxemacs-codename)
+              "]"))
+
+;:*======================
+;:* Additions to the menubar.
+(when (featurep 'menubar)
+  (require 'big-menubar)
+
+  ;; Get rid of stuff from big-menubar that I don't like/use
+  (delete-menu-item '("Top"))
+  (delete-menu-item '("<<"))
+  (delete-menu-item '(" | "))
+  (delete-menu-item '(">>"))
+  (delete-menu-item '("Bot"))
+  (delete-menu-item '("Motion"))
+
+  ;; Add back the "Motion" menu, but as a submenu under "Cmds"
+  ;; Motion menu.
+  (add-submenu
+   '("Cmds")
+   '("Motion"
+     ["Goto Mark"                  exchange-point-and-mark (mark t)]
+     ["Goto Line..."                          goto-line           t]
+     "---"
+     ["End of Balanced Parentheses ( )"       forward-list        t]
+     ["Beginning of Balanced Parentheses ( )" backward-list       t]
+     ["Next Opening Parenthesis ("            down-list           t]
+     ["Previous Opening Parenthesis ("        backward-up-list    t]
+     ["Next Closing Parenthesis )"            up-list             t]
+     "---"
+     ["End of Balanced Expression"            forward-sexp        t]
+     ["Beginning of Balanced Expression"      backward-sexp       t]
+     "---"
+     ["End of Function"                       end-of-defun        t]
+     ["Beginning of Function"                 beginning-of-defun  t]
+     "---"
+     ["Next Page"                             forward-page        t]
+     ["Previous Page"                         backward-page       t]
+     "---"
+     ["End of Buffer"                         end-of-buffer       t]
+     ["Beginning of Buffer"                   beginning-of-buffer t]
+     "---"
+     ["Save Current Position..."              point-to-register   t]
+     ["Goto Saved Position..."                register-to-point   t]
+     "---"
+     ["Set Marker..."                         set-user-marker     t]
+     ["Goto Marker..."                        goto-user-marker    t]
+     ["List Markers"                          list-markers        t]
+     "---"
+     ["Set Goal Column"                       set-goal-column     t]
+     ["Cancel Goal Column"          (set-goal-column t) goal-column])
+   "Abbrev"))
+
+
+;:*======================
+;:* create a Kill-Ring menu
+(when (featurep 'menubar)
+  (defvar str)
+  (defvar yank-menu-length 40
+    "*Maximum length of an item in the menu for select-and-yank.")
+  (defun select-and-yank-filter (menu)
+    (let* ((count 0))
+      (append menu
+              (mapcar
+               #'(lambda (str)
+                   (if (> (length str) yank-menu-length)
+                       (setq str (substring str 0 yank-menu-length)))
+                   (prog1
+                       (vector
+                        str
+                        (list
+                         'progn
+                         '(push-mark (point))
+                         (list 'insert (list 'current-kill count t)))
+                        t)
+                     (setq count (1+ count))))
+               kill-ring))))
+  (add-submenu '("Edit") '("Kill-Ring"
+                           :included kill-ring
+                           :filter select-and-yank-filter)))
+
+;:*======================
+;: resize-minibuffer-mode makes the minibuffer automatically
+;: resize as necessary when it's too big to hold its contents.
+;(autoload 'resize-minibuffer-mode "rsz-minibuf" nil t)
+;(resize-minibuffer-mode)
+;(setq resize-minibuffer-window-exactly nil)
+;(setq minibuffer-max-depth nil)
+(setq resize-minibuffer-mode t)
+;:*======================
+;:* don't invert colors when grabbing a password
+;:  (because sometimes it screws up and leaves the frame 
+;:  with dorked up colors).
+(setq passwd-invert-frame-when-keyboard-grabbed nil)
+
+;:*=======================
+;:* VI-style matching parenthesis
+;:  From Eric Hendrickson edh @ med.umn.edu
+(defun match-paren (arg)
+  "Go to the matching parenthesis if on parenthesis."
+  (interactive "p")
+  (cond ((looking-at "[([{]") (forward-sexp 1) (backward-char))
+        ((looking-at "[])}]") (forward-char) (backward-sexp 1))))
+(global-set-key '(control f1) 'match-paren)
+
+;:*======================
+;:* Inserting elisp Comments
+; by Jonas Luster <mailto:jonas @ nethammer.qad.org>
+(defun elispcomment ()
+;:*=====================
+  (interactive)
+  (insert ";:*=======================\n")
+  (insert ";:* " (setq str (read-input "Comment: ")) "\n")
+  (insert "\n"))
+(global-set-key '(control f3) 'elispcomment)
+
+;:*======================
+;:* Time-Stamp
+(require 'time-stamp)
+(add-hook 'write-file-hooks 'time-stamp)
+(set 'time-stamp-active t)
+(set 'time-stamp-format "%a %3b %2d, %4y %02H:%02M:%02S %u")
+
+;:*======================
+;:* Image formats
+(require 'image-mode)
+;; Needed to load this earlier for some reason that I have long since
+;; forgotten, so it is now in 01-vars-sy.el
+;;(require 'ffi-wand)
+
+;; If you want to use #'Wand-display whenever you C-x C-f imagefile
+;; uncomment this.  It's cool and all, but there are definitely times
+;; when you don't want to view images with #'Wand-display.  Editing
+;; XPM files for example.  Have you seen xpm-mode? it's awesome.
+;(Wand-find-file-enable)
+;; But sometimes you do want it so...
+(global-set-key [(super ?x) (super ?f)] #'Wand-display)
+
+;:*=======================
+;:* ffi-magic
+;; Automatic coding-system detection via libmagic
+(require 'ffi-magic)
+(magic:find-file-magic-alist-enable)
+
+;:*======================
+;:* Dired enhancements.
+(require 'dired)
+(setq dired-ls-locale "POSIX")
+
+;; Pack and Unpack tarballs
+(require 'dired-tar)
+(setq dired-tar-compress-with 'xz)
+
+;; FFI/libWand for image files in Dired
+(defun sy-dired-wand ()
+ (interactive)
+ (let ((file (dired-get-filename)))
+   (Wand-display file)))
+
+(define-key dired-mode-map [?b] #'sy-dired-wand)
+
+;; Play audio files directly from dired.
+(defun sy-dired-play-audio ()
+  (interactive)
+  (let ((file (dired-get-filename)))
+    (when (magic:file-audio-p file)
+      (let ((stream (make-media-stream :file file)))
+        (play-media-stream stream)))))
+
+(define-key dired-mode-map [(control ?c) ?p] #'sy-dired-play-audio)
+
+;(setq dired-use-ls-dired t)
+;(setq dired-listing-switches "-alih")
+
+;:*======================
+;:* Change some modeline indicators
+(setq pending-delete-modeline-string nil)
+(setq fume-mode-line-string nil)
+(setq filladapt-mode-line-string nil)
+(setq mouse-avoidance-mode-line-string nil)
+(add-minor-mode 'abbrev-mode " Ab")
+(add-hook 'lisp-interaction-mode-hook #'(lambda () (setq mode-name "LI")))
+
+;:*======================
+;:* Force efs into passive ftp because of my firewall
+(setq efs-use-passive-mode t)
+
+;:*======================
+;:* ibuffer - replacement for buffer-menu
+(require 'ibuffer)
+(setq 
+ ibuffer-expert t
+ ibuffer-default-sorting-mode 'major-mode
+ ibuffer-fontification-level t
+ ibuffer-saved-filter-groups
+ ;; First match wins.
+ '(("My-ibuffer-grps"
+    ("ChangeLog"
+     (mode . change-log-mode))
+    ("Dired"
+     (mode . dired-mode))
+    ("Programming"
+     (or
+      (mode . emacs-lisp-mode)
+      (mode . cperl-mode)
+      (mode . c-mode)
+      (mode . c++-mode)
+      (mode . java-mode) 
+      (mode . idl-mode)
+      (mode . lisp-mode)))
+    ("Documentation"
+     (or
+      (mode . help-mode)
+      (mode . hyper-apropos-help-mode)
+      (mode . hyper-apropos-mode)
+      (mode . Info-mode)
+      (mode . Manual-mode)))
+    ("Riece"
+     (or
+      (mode . riece-channel-list-mode)
+      (mode . riece-channel-mode)
+      (mode . riece-command-mode)
+      (mode . riece-dialogue-mode)
+      (mode . riece-others-mode)
+      (mode . riece-user-list-mode)))
+    ("Gnus"
+     (or
+      (mode . message-mode)
+      (mode . mail-mode)
+      (mode . gnus-group-mode)
+      (mode . gnus-summary-mode) 
+      (mode . gnus-article-mode)))
+    ("Fundamental"
+     (mode . fundamental-mode))
+    )))
+
+(add-hook 'ibuffer-mode-hooks 
+          (lambda () 
+            (ibuffer-switch-to-saved-filter-groups "My-ibuffer-grps")
+            (ibuffer-add-to-tmp-hide "\\*scratch\\*")))
+
+;:*======================
+;:* Sawfish mode
+(require 'sawfish)
+(add-to-list 'auto-mode-alist '("\\.sawfishrc$" . sawfish-mode))
+(add-to-list 'auto-mode-alist '("\\.jl$" . sawfish-mode))
+
+;:*======================
+;:* from.el - check whose sent us mail
+;; Not that much use anymore now that most of my mail is via IMAP so
+;; doesn't go through my local server or spool.
+(require 'from)
+(setq 
+ from-mailspools '("~/mail/INBOX")
+ from-use-other-window nil
+ from-quit-command 'kill-buffer
+ from-highlight-regexp
+ #r"Merge-Req\(?:uest\)?\|P\(?:-Req\|atch\|ull-Req\)\|SXEmacs\|patch")
+
+;:*======================
+;:* PS-Print
+(require 'ps-print)
+(require 'ps-mule)
+(require 'ps-bdf)
+(require 'lpr)
+(setq 
+ bdf-directory-list '("/usr/share/fonts/bdf")
+ ps-multibyte-buffer 'bdf-font-except-latin
+ ps-paper-type 'a4
+ printer-name "Duplex_Colour")
+
+;:*======================
+;:* Line and Column numbers.
+(line-number-mode 1)
+(column-number-mode 1)
+
+;:*======================
+;:* Setting initial default-directory.
+(setq default-directory (file-name-as-directory (user-home-directory)))
+
+;:*======================
+;:* Sane ChangeLogs
+(when (featurep 'mule)
+  ;; Cater for the majority of the World who don't have names and
+  ;; languages that fit nicely into US-ASCII.
+  (add-to-list 'file-coding-system-alist
+               (cons "ChangeLog\\(.?[[:alnum:][:punct:]]+\\)?"
+                     '(utf-8 . utf-8))))
+
+;; Try to have even the oddly named ChangeLogs in change-log-mode
+(add-to-list
+ 'auto-mode-alist 
+ '("ChangeLog\\(.?[[:alnum:][:punct:]]+\\)?" . change-log-mode))
+
+;; My sy-git.el has nice font-locking for git logs, so use it outside
+;; of sy-git-mode as well.
+(defun sy-change-log-mode-hook ()
+  (save-excursion
+    (when (re-search-forward "^commit [0-9a-f]+" 1000 t)
+      (set (make-local-variable 'font-lock-defaults)
+           '(sy-git-log-font-lock-keywords t t)))))
+
+(add-hook 'change-log-mode-hook #'sy-change-log-mode-hook)
+
+;:*======================
+;:* Directory Abbrevs
+;;  Love this.  It saves me so much time.
+(setq directory-abbrev-alist
+      `(("^/instcore" . ,(concat (car emacs-roots)
+                                "share/sxemacs-"
+                                emacs-program-version))
+        ("^/instpkg" . ,(concat (car emacs-roots)
+                                "share/sxemacs"))
+        ("^/prog" . "~/programming")
+        ("^/linux" . "/usr/src/kernel/linux")
+        ("^/src" . "/usr/src")
+        ("^/sxe" . "/home/steve/programming/SXEmacs")
+        ("^/core" . "/home/steve/programming/SXEmacs/core/sxemacs.git")
+        ("^/web" . "/home/steve/programming/SXEmacs/web/website")
+        ("^/init" . ,(expand-file-name "init.d" user-init-directory))
+        ("^/blds" . "/home/steve/programming/SXEmacs/core/BUILDS")
+        ("^/lisp" . "/home/steve/programming/lisp")
+        ("^/pkgs" . "/home/steve/programming/SXEmacs/packages")
+        ("^/xpkgs" . "/home/steve/programming/SXEmacs/packages/xemacs-packages")
+        ("^/mpkgs" . "/home/steve/programming/SXEmacs/packages/mule-packages")))
+
+;:*======================
+;:* The beginnings of procmail-mode.el.
+;;
+;; I can't remember who I stole this from, but if it was you, please
+;; let me know so I can give you the credit you deserve.
+(defvar procmail-font-lock-keywords)
+
+(define-derived-mode procmail-mode fundamental-mode "Procmail"
+  "Major mode for editing procmail recipes."
+
+  (setq comment-start "#")
+  (setq comment-start-skip "#[ \t]*")
+
+  ;;register keywords
+  (setq procmail-font-lock-keywords
+        (list '("#.*"
+                . font-lock-comment-face)
+              '("^[\t ]*:.*"
+                . font-lock-type-face)
+              '("[A-Za-z_]+=.*"
+                . font-lock-keyword-face)
+              '("^[\t ]*\\*.*"
+                . font-lock-doc-string-face)
+              '("\$[A-Za-z0-9_]+"
+                . font-lock-function-name-face)))
+  (font-lock-mode))
+
+(add-to-list 'auto-mode-alist '("\\.procmailrc$" . procmail-mode))
+
+;; And because my ~/.procmailrc has lots of high ASCII to defeat
+;; Chinese SPAM I set its coding to binary.
+(when (featurep 'mule)
+  (add-to-list 'file-coding-system-alist '("\\.procmailrc$" . binary)))
+
+;:*======================
+;:* Build Reports
+(setq
+ build-rpt-prompts '(("Status?: "
+                      ("Success"
+                       "Success (tests fail)"
+                       "Failure"
+                       "Failure (tests fail)"
+                       "OK (with issues)")))
+ build-rpt-use-gnus-group "nnml:sxemacs.builds"
+ build-rpt-use-gnus-p t
+ build-rpt-make-output-files
+ '("/usr/src/sxemacs/make.err"
+   "/usr/src/sxemacs/check.err"
+   "/usr/src/sxemacs/install.err"
+   ))
+
+;:*======================
+;:* Set the frame geometry
+(unless (getenv "XWEM_RUNNING")
+  (setq default-frame-plist
+        '(name "SXEFrame" width 90))
+  (setq initial-frame-plist '(width 90)))
+
+
+;:*======================
+;:* The Beginnings of a Finance package
+(setq
+ emoney-accounts-directory
+ (file-name-as-directory
+  (expand-file-name "emoney" user-init-directory))
+ emoney-bank-url "https://internetbanking.suncorpbank.com.au/"
+ emoney-date-format "%Y-%m-%d"
+ emoney-default-account "scorp-main.emy"
+ emoney-recalculate-on-quit t
+ emoney-save-after-recalculate t
+ emoney-use-new-frame t)
+
+(require 'emoney)
+
+;:*======================
+;:* Modeline enhancements.
+;;
+;; Reorganise the modeline so that the line and column numbers are on
+;; the left where you can see them.  Also add a bit of colour to the
+;; left and right ID extents so they stand out.
+(when (or (< emacs-minor-version 5)
+          (featurep 'sxemacs))
+  (setq-default modeline-buffer-identification
+                (list (cons modeline-buffer-id-left-extent
+                            (cons 10 (list
+                                      (list 'line-number-mode "L%l ")
+                                      (list 'column-number-mode "C%c ")
+                                      (list (cons -3 (list "%p")))
+                                      ":")))
+                      (cons modeline-buffer-id-right-extent "%17b")))
+
+  (setq-default
+   modeline-format
+   (list
+    ""
+    (if (boundp 'modeline-multibyte-status)
+        "%C" ;modeline-multibyte-status
+      "NoMule")
+    (cons modeline-modified-extent 'modeline-modified)
+    (cons modeline-buffer-id-extent 'modeline-buffer-identification)
+    " "
+    'global-mode-string
+    " %[("
+    (cons modeline-minor-mode-extent
+          (list "" 'mode-name 'minor-mode-alist))
+    (cons modeline-narrowed-extent "%n")
+    'modeline-process
+    ")%]----"
+    "-%-"))
+
+  (set-extent-face modeline-buffer-id-left-extent 'font-lock-warning-face)
+  (set-extent-face modeline-buffer-id-right-extent 'font-lock-comment-face))
+
+;:*======================
+;:* Enable funky completion.
+;;
+;; This allows you to do things like type "M-x b-c-f RET" and it will
+;; expand to `byte-compile-file'.
+(require 'completer)
+
+;:*======================
+;:* Misc Stuff that I haven't yet put anywhere permanent
+;;
+;;  I used to have my browse-url setting here, but because of xdg that
+;;  really isn't necessary anymore.
+(setq 
+ abbrev-mode t
+ allow-deletion-of-last-visible-frame t
+ bookmark-default-file (expand-file-name "bookmarks" user-init-directory)
+ bookmark-save-flag 1
+ complex-buffers-menu-p t
+ etalk-process-file "talk"
+ find-function-source-path nil
+ font-menu-ignore-scaled-fonts nil
+ ges-post-use-mime t
+ mail-user-agent 'message-user-agent
+ modeline-scrolling-method 'scrollbar
+ progress-feedback-use-echo-area t
+ report-xemacs-bug-no-explanations t
+ scroll-step 1
+ lookup-syntax-properties nil)
+
+(quietly-read-abbrev-file)
+(add-hook 'text-mode-hook 'turn-on-auto-fill)
+;(customize-set-variable 'gutter-buffers-tab-visible-p nil)
+(setq gutter-buffers-tab-enabled nil)
+(customize-set-variable 'user-mail-address "steve@steveyoungs.com")
+(setq query-user-mail-address nil)
+(blink-cursor-mode 1)
+;; (when (featurep 'mule)
+;;   (set-language-environment "Latin-1"))
+(unless (gnuserv-running-p)
+  (gnuserv-start))
+(require 'mozmail)
+
+;:*=======================
+;:* Info-mode
+(require 'info)
+
+(setq toolbar-info-frame-plist
+      '((width . 80)
+        (height . 45)
+        (name . "InfoFrame")
+        (menubar-visible-p . nil)
+        (default-toolbar-visible-p . t)
+        ;; I have a idea to put nav buttons in the gutter.
+        (default-gutter-visible-p . t)
+        (top-gutter-height . 24)))
+
+(unless (fboundp 'Info-search-next)
+  (defun Info-search-next ()
+    "Repeat search starting from point with last regexp used in `Info-search'."
+    (interactive)
+    (Info-search Info-last-search))
+  (define-key Info-mode-map "z" 'Info-search-next))
+
+(setq
+ Info-directory-list
+ '("/home/steve/.local/share/sxemacs/site-packages/info"
+   "/home/steve/.local/share/sxemacs/xemacs-packages/info"
+   "/usr/share/info"
+   ;; "/usr/share/sxemacs/site-packages/info"
+   ;; "/usr/share/sxemacs/sxemacs-packages/info"
+   "/usr/share/sxemacs/xemacs-packages/info"
+   "/usr/share/sxemacs/mule-packages/info")
+ Info-dir-contents-directory
+ "/home/steve/.local/share/sxemacs/site-packages/info"
+ Info-save-auto-generated-dir 'always
+ Info-button1-follows-hyperlink t)
+;:*=======================
+;:* gdb-highlight
+(add-hook 'gdb-mode-hook #'(lambda () (require 'gdb-highlight)))
+
+;:*=======================
+;:* etags
+(require 'etags)
+(defun sy-find-tag-regex (tagname)
+  "Use `igrep-find' command to find all occurances of tag with TAGNAME."
+  (interactive (if current-prefix-arg (list (current-word))
+                 (list (find-tag-tag "Find tag: "))))
+  (let ((dir (file-name-directory tags-file-name)))
+    (igrep-find "grep" tagname (concat dir "/*"))))
+
+;:*=======================
+;:* Google
+(require 'google-query)
+(setq google-query-mirror "https://www.google.com.au"
+      google-query-result-count 100)
+(global-set-key [(control f9)] 'google-query)
+(global-set-key [(meta f9)] 'google-query-region)
+
+;:*=======================
+;:* What the fuck does that acronym mean?
+;; This requires wtf(6).  No idea where you get it from, but it comes
+;; with Slackware.
+;; (wtf "lol") => LOL: laughing out loud
+(defun wtf (acronym)
+  "What the fuck is... ACRONYM"
+  (interactive "sWhat the fuck is: ")
+  (let* ((wtf (executable-find "wtf"))
+         (term (substring (shell-command-to-string
+                           (concat wtf " " acronym)) 0 -1)))
+    (if (interactive-p)
+        (if current-prefix-arg
+            (insert term)
+          (message term))
+      term)))
+
+;:*=======================
+;:* Interactively append to the latest kill
+;;
+(defun sy-add-to-kill (start end &optional prepend)
+  "Copy region START END and append it to the latest kill.
+
+Or, PREPEND with prefix arg.
+
+With this you could select \"THIS \" word, `\\[kill-ring-save]' to save it
+to the kill ring, then select this \"WORD \" and do `\\[sy-add-to-kill]',
+then select this word \"HERE\", do `\\[sy-add-to-kill]', then select these
+words \"DON'T WANT \", do `\\[universal-argument] \\[sy-add-to-kill]', and
+finally do `\\[yank]' and you'd get...
+
+   DON'T WANT THIS WORD HERE"
+  (interactive "r\nP")
+  (let ((prepend (or prepend
+                     current-prefix-arg)))
+    (if prepend
+        (kill-append (buffer-substring start end) 'before)
+      (kill-append (buffer-substring start end) nil))))
+
+(global-set-key [(meta ?W)] 'sy-add-to-kill)
+
+;:*=======================
+;:* DNS
+(add-to-list 'auto-mode-alist '("/var/chroot/named/etc/zones/.*$" . dns-mode))
+
+(defun dig-mx (domain)
+  "View MX records for DOMAIN.
+
+With a prefix arg, prompt for a server to query."
+  (interactive "sDomain: ")
+  (unless (interactive-p)
+    (error 'invalid-operation "`dig-mx' must be called interactively"))
+  (if current-prefix-arg
+      (dig domain "MX" nil nil nil
+           (format "%s" (read-string "Server: " nil nil "localhost")))
+    (dig domain "MX")))
+
+(defun dig-ns (domain)
+  "View NS records for DOMAIN.
+
+With a prefix arg, prompt for a server to query."
+  (interactive "sDomain: ")
+  (unless (interactive-p)
+    (error 'invalid-operation "`dig-ns' must be called interactively"))
+  (if current-prefix-arg
+      (dig domain "NS" nil nil nil
+           (format "%s" (read-string "Server: " nil nil "localhost")))
+    (dig domain "NS")))
+
+(defun dig-any (domain)
+  "View DNS records for DOMAIN.
+
+With a prefix arg, prompt for a server to query."
+  (interactive "sDomain: ")
+  (unless (interactive-p)
+    (error 'invalid-operation "`dig-any' must be called interactively"))
+  (if current-prefix-arg
+      (dig domain "ANY" nil nil nil
+           (format "%s" (read-string "Server: " nil nil "localhost")))
+    (dig domain "ANY")))
+
+;:*=======================
+;:* Hard disk temperature!
+;(or (ignore-errors (require 'hddtemp))
+;    (progn
+;      (load-module "cl-loop")
+;      (require 'hddtemp)))
+
+;;; get fancy and stick it in the modeline
+;(defvar hddtemp-global-mode-string "sda:0°C"
+;  "Default hddtemp modeline string.")
+;(setq global-mode-string (append global-mode-string
+;                                (list hddtemp-global-mode-string)))
+
+;(defun hddtemp-modeline-string ()
+;  (let* ((disc0 (hddtemp 0))
+;        (str (format "sda:%s°%s"
+;                     (nth 2 disc0) (nth 3 disc0))))
+;    (setq hddtemp-global-mode-string str)))
+
+;(start-itimer "hdd-modeline"
+;             #'(lambda ()
+;                 (progn
+;                   (setq global-mode-string
+;                         (delq hddtemp-global-mode-string global-mode-string))
+;                   (hddtemp-modeline-string)
+;                   (setq global-mode-string
+;                         (append global-mode-string
+;                                 (list hddtemp-global-mode-string)))))
+;             10 10)
+
+;:*=======================
+;:* Term
+; M-x term usually gives really horrid "staircase" output.  This fixes
+; that.
+(add-hook 'term-exec-hook 
+          #'(lambda ()
+              (set-buffer-process-coding-system 'binary 'binary)))
+
+;:*=======================
+;:* Phonetic Alphabet
+(defvar phonetics-hash
+  #s(hash-table test equal
+                data ("a" "alpha"
+                      "b" "bravo"
+                      "c" "charlie"
+                      "d" "delta"
+                      "e" "echo"
+                      "f" "foxtrot"
+                      "g" "golf"
+                      "h" "hotel"
+                      "i" "india"
+                      "j" "juliet"
+                      "k" "kilo"
+                      "l" "lima"
+                      "m" "mike"
+                      "n" "november"
+                      "o" "oscar"
+                      "p" "papa"
+                      "q" "quebec"
+                      "r" "romeo"
+                      "s" "sierra"
+                      "t" "tango"
+                      "u" "uniform"
+                      "v" "victor"
+                      "w" "whiskey"
+                      "x" "x-ray"
+                      "y" "yankee"
+                      "z" "zulu"
+                      " " "SPC"
+                      "0" "zero"
+                      "1" "one"
+                      "2" "two"
+                      "3" "three"
+                      "4" "four"
+                      "5" "five"
+                      "6" "six"
+                      "7" "seven"
+                      "8" "eight"
+                      "9" "niner"))
+  "Hash table of phonetic alphabet.")
+
+(defun phoneticise (string)
+  "Return STRING rewritten using the phonetic alphabet.
+
+For example: \"cat\" => \"charlie alpha tango\".
+With a prefix arg, insert phoneticised string at point.
+It ignores punctuation."
+  (interactive "sString to phoneticise: ")
+  (let ((str (string-to-list (downcase string)))
+        phonetics)
+    (with-temp-buffer
+      (while str
+        (insert (or (gethash (char-to-string (car str)) phonetics-hash)
+                    (char-to-string (car str))) " ")
+        (setq str (cdr str)))
+      (setq phonetics (buffer-string)))
+    (if current-prefix-arg
+        (insert phonetics)
+      (if (interactive-p)
+          (message "%s" phonetics)
+        phonetics))))
+
+;:*=======================
+;:* Copy the text without the extents
+(defun sy-extent-kill-save ()
+  "Save the extent under point's string to kill ring."
+  (interactive)
+  (kill-new (extent-string (extent-at (point)))))
+
+;:*=======================
+;:* PkgUsr tools
+(require 'pkgusr)
+
+;:*=======================
+;:* There's a new sexy rc.d style init in SXEmacs, and this is how I
+;;  deal with it.
+;;
+;;  I now have my init files named with a 2 digit numerical prefix.
+;;  This is so I can control which order `lisp-initd-compile-and-load'
+;;  will load my stuff.  Consequently, finding a particular init file is
+;;  much harder now because I can never remember what bloody number it
+;;  has.  This takes the remembering out of the equation.
+(defvar sy-init-hash (make-hash-table :test #'equal :size 20)
+  "A hash table of my numbered init files.")
+
+(defvar sy-init-files
+  (directory-files lisp-initd-dir nil ".*\.el$" 'sorted-list t)
+  "List of my init files.")
+
+(mapc
+ (lambda (value)
+   (let ((key (substring value 3 -3)))
+     (puthash key value sy-init-hash)))
+ sy-init-files)
+
+(defvar sy-init-hash-vector (hash-keys-to-vector sy-init-hash)
+  "A vector from my init file hash to use for completion.")
+
+(defvar sy-init-history nil
+  "History for `sy-init-file-other-window'.")
+
+(defun sy-init-file-other-window (initf &optional codesys)
+  "Basically, `find-file-other-window', but for my init files.
+
+Argument INITF is the \"base\" name of the init file.
+Optional prefix arg, CODESYS, is to specify a coding system to use.
+
+I have this because I've prefixed all of my init files with a 2
+digit number so I can ensure they get loaded in the right order with
+`lisp-initd-compile-and-load'.  And I can never remember what init
+files are assigned what numbers."
+  (interactive (list (completing-read "Init file: "
+                                      (mapcar #'list sy-init-hash-vector)
+                                      nil nil nil sy-init-history)
+                     (when current-prefix-arg
+                       (read-coding-system "Coding System: "))))
+  (let* ((lib (gethash initf sy-init-hash))
+         (expanded (expand-file-name lib lisp-initd-dir)))
+    (find-file-other-window expanded codesys)))
+
+(global-set-key [(control ?x) ?4 ?i] #'sy-init-file-other-window)
+
+;:*=======================
+;:* "Active" menubar
+;; Nifty little thing that hides the menubar and makes it visible when
+;; the rat is on the toolbar.
+;; but it's annoying
+;(require 'active-menu)
+;(active-menu 1)
+
+;:*=======================
+;:* LiveJournal posting thingy
+;;  Sadly, this no longer works because I neglected to keep it up to
+;;  date with LiveJournal API changes.  But it was damn cool while it
+;;  lasted.
+(require 'lj)
+;(setq lj-cookie-flavour 'chrome)
+(setq lj-cookie-flavour 'firefox)
+(setq lj-user-id "bastard_blog")
+(setq lj-archive-posts t)
+(setq lj-bcc-address "Steve Youngs <steve@localhost>")
+(setq lj-default-location "Brisbane, Australia")
+(setq lj-signature
+      "<hr />
+<p style=\"color:#FD00FD;font-size:10pt;font-weight:bold;\">
+Till next time...<br />
+<i>Steve</i>
+</p>")
+(add-hook 'lj-before-post-hook #'lj-validate)
+(add-hook 'lj-after-post-hook #'lj-get-tags)
+
+;:*=======================
+;:* Handy kbd macros
+;;
+;; numpoints -- make numbered list points.  Before using, initialise
+;; numeric register `n' to zero
+(number-to-register 0 ?n)
+(defalias 'numpoints
+  (read-kbd-macro "2*RET 2*SPC C-x r + n C-x r i n C-e ) SPC"))
+(global-set-key [(control ?c) (control ?n)] #'numpoints)
+(define-key message-mode-map [(hyper ?n)] #'numpoints)
+
+;:*=======================
+;:* Do things with environment variables let-bound
+;;
+;;  (with-environment-variables (("VAR" "VALUE") ("VAR2" "VALUE2"))
+;;    (do-shit-here))
+;;
+;(require 'with-environment-variables)
+
+;:*=======================
+;:* Play Sudoku
+(require 'sudoku)
+(setq sudoku-level 'easy)
+(setq modeline-coding-system "%C")
+
+;:*=======================
+;:* Stupid fucking Google Chrome is MIME-illiterate
+(defun sy-browse-url-of-file (&optional file)
+  "Ask a WWW browser to display FILE.
+
+Display the current buffer's file if FILE is nil or if called
+interactively.  Turn the filename into a URL with function
+`browse-url-file-url'.  Pass the URL to a browser using the
+`browse-url' function then run `browse-url-of-file-hook'.
+
+This has been reworked a little to cater for Google Chrome not knowing
+anything about MIME types."
+  (interactive)
+  (let (oldfile)
+    (or file
+        (setq file (buffer-file-name))
+        (error "Current buffer has no file"))
+    (unless (string-match "^\\.html?$" (file-name-extension file t))
+      (setq oldfile file)
+      (rename-file file (concat file ".html"))
+      (setq file (concat file ".html")))
+    (let ((buf (get-file-buffer file)))
+      (if buf
+          (save-excursion
+            (set-buffer buf)
+            (cond ((not (buffer-modified-p)))
+                  (browse-url-save-file (save-buffer))
+                  (t (message "%s modified since last save" file))))))
+    (unwind-protect
+        (progn
+          (browse-url (browse-url-file-url file))
+          (sit-for 1))
+      (and oldfile (rename-file file oldfile))))
+  (run-hooks 'browse-url-of-file-hook))
+
+(fset #'browse-url-of-file #'sy-browse-url-of-file)
+
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
+(message "miscellaneous initialised")
+
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:14:27 AEST 2020 + +
+ + + diff --git a/SYinits/13-bbdb.html b/SYinits/13-bbdb.html new file mode 100644 index 0000000..8188d0e --- /dev/null +++ b/SYinits/13-bbdb.html @@ -0,0 +1,308 @@ + + + + + 13-bbdb.el + + + + + + +
+;; 13-bbdb.el --- Big Brother DataBase (BBDB)
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 18:51:53 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/13-bbdb.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;  BBDB settings.
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+;:*======================
+;:* Some standard stuff first
+(require 'bbdb)
+(require 'bbdb-pgp)
+
+;:*=======================
+;:* Make sure gnus stuff is loaded
+(load-file (expand-file-name ".gnus" (user-home-directory)))
+
+(bbdb-initialize 'gnus 'message 'w3 'sendmail)
+(bbdb-insinuate-gnus)
+(bbdb-insinuate-message)
+(bbdb-insinuate-sc)
+(bbdb-insinuate-sendmail)
+(bbdb-insinuate-w3)
+
+;; BBDB/PGP stuff
+(setq 
+ bbdb/pgp-method 'mml-pgpmime
+ bbdb/pgp-default-action 'sign
+ bbdb/pgp-quiet t)
+
+(defun sy-bbdb-gnus-auto-notes-hook (record)
+  "Runs `bbdb-auto-notes-hook' on the original article.
+This is so a header doesn't have to be visible for BBDB to notice
+any changes.
+Kudos to Robert Fenk <fenk@users.sf.net> for this."
+  (save-excursion
+    (set-buffer (get-buffer gnus-article-buffer))
+    (set-buffer gnus-original-article-buffer)
+    (goto-char (point-min))
+    (bbdb-auto-notes-hook record)))
+
+(autoload 'gnus-convert-face-to-png "gnus-fun")
+
+;;; FIXME: Not ideal, it currently puts cface at one end of the name,
+;;; and the xface at the other.  I'd prefer both glyphs on the same
+;;; side (preferrably left)
+(defun sy-bbdb-display-cx-face ()
+  "Search for face properties and display the faces.
+This is from Alex Shroeder."
+  (let ((inhibit-read-only t); edit the BBDB buffer
+        (all-records bbdb-records)
+        cface xface record start ext)
+    (while all-records
+      (setq record (caar all-records)
+            cface (bbdb-record-getprop record 'cface)
+            xface (bbdb-record-getprop record 'face)
+            start (marker-position (nth 2 (car all-records))))
+      (when (or cface xface)
+        (setq ext (extent-at start)))
+      (when cface
+        (set-extent-begin-glyph
+         ext
+         (make-glyph
+          (list (vector 'png :data (gnus-convert-face-to-png cface))))))
+      (when xface
+        (set-extent-end-glyph
+         ext
+         (make-glyph
+          (list (vector 'xface :data (concat "X-Face: " xface)
+                        :foreground "black"
+                        :background "white")))))
+      (setq all-records (cddr all-records)))))
+
+(setq 
+ bbdb-always-add-addresses t
+ bbdb-canonicalize-redundant-nets-p t
+ bbdb-canonicalize-net-hook
+ (lambda (addr)
+   (cond 
+    ((string-match 
+      "\\`\\([^0-9]+\\)\\(-dated-[^@]+\\|-[0-9]+\\|\\+[^@]+\\.[^@]+\\)\\(@.*\\)\\'"
+      addr)
+     (concat (substring addr (match-beginning 1) (match-end 1))
+             (substring addr (match-beginning 3) (match-end 3))))
+    (t addr)))
+ bbdb-complete-name-allow-cycling t
+ bbdb-completion-display-record t
+ bbdb-completion-type 'primary-or-name
+ bbdb-default-area-code 7
+ bbdb-dial-local-prefix nil
+ bbdb-display-layout 'multi-line
+ bbdb-dwim-net-address-allow-redundancy t
+ bbdb-electric-p nil
+ bbdb-new-nets-always-primary 'never
+ bbdb-north-american-phone-numbers-p nil
+ bbdb-notice-hook 'sy-bbdb-gnus-auto-notes-hook
+ bbdb-offer-save 'auto
+ bbdb-pop-up-display-layout 'multi-line
+ bbdb-pop-up-target-lines 7
+ bbdb-quiet-about-name-mismatches nil
+ bbdb-use-pop-up nil
+ bbdb/gnus-score-default 25
+ bbdb/gnus-summary-in-bbdb-format-letter "X"
+ bbdb/mail-auto-create-p nil
+ bbdb/news-auto-create-p nil)
+
+;:*=======================
+;:* All my email addresses, well the important ones anyway.
+(let ((emails '("steve@steveyoungs.com"
+                "steve@thereadinglamp.net"
+                "steve@bastard.steveyoungs.com"
+                "steve@bastard.no-ip.org"
+                "steve@sxemacs.org"
+                "steve@sywriting.com"
+                "sryoungs@iinet.net.au"
+                "steve.r.youngs@gmail.com"
+                ;; The following aren't mine, but I'm using
+                ;; `bbdb-user-mail-names' in
+                ;; `gnus-ignored-from-addresses.  It's just easier.
+                "post@gwene.org")))
+  (setq bbdb-user-mail-names (regexp-opt emails t)))
+
+;:*=======================
+;:* Update some stuff automatically
+(setq bbdb-auto-notes-alist
+      '(("Organization"
+         (".*" company 0 'replace))
+        ("Newsgroups"
+         ("[^,]+" newsgroups 0))
+        ("Subject"
+         (".*" last-subj 0 'replace))
+        ("User-Agent" 
+         (".*" mailer 0 'replace))
+        ("X-Mailer" 
+         (".*" mailer 0 'replace))
+        ("X-Newsreader" 
+         (".*" mailer 0 'replace))
+        ("X-Attribution"
+         (".*" attribution 0 'replace))
+        ("X-Now-Playing"
+         (".*" music 0 'replace))
+        ("X-Face" 
+         (".+" face 0 'replace))
+        ("Face" 
+         (".+" cface 0 'replace))))
+
+;:*=======================
+;:* mail aliases
+(autoload 'bbdb-define-all-aliases "bbdb-com" 
+  "Hook mail alias feature of BBDB into message-mode." t)
+
+;:*=======================
+;:* Hooks
+(add-hook 'bbdb-notice-hook 'bbdb-auto-notes-hook)
+(add-hook 'bbdb-change-hook 'bbdb-timestamp-hook) 
+(add-hook 'bbdb-create-hook 'bbdb-creation-date-hook)
+(add-hook 'bbdb-list-hook 'sy-bbdb-display-cx-face)
+(add-hook 'message-setup-hook 'bbdb-define-all-aliases)
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
+(message "bbdb initialised")
+
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:14:43 AEST 2020 + +
+ + + diff --git a/SYinits/14-fonts.html b/SYinits/14-fonts.html new file mode 100644 index 0000000..4dba69f --- /dev/null +++ b/SYinits/14-fonts.html @@ -0,0 +1,529 @@ + + + + + 14-fonts.el + + + + + + +
+;; 14-fonts.el --- Fonts/Faces Settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 18:53:24 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/14-fonts.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   Sets all my pretty colours and shit.
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+;:*=======================
+;:* font-lock
+(require 'font-lock)
+
+;:*=======================
+;:* Turn on Lazy-(lock|shot)
+;;; Lazy-lock
+(require 'lazy-lock)
+;; (if (eq emacs-minor-version 5)
+;;     (setq font-lock-support-mode 'lazy-lock-mode)
+(add-hook 'font-lock-mode-hook 'turn-on-lazy-lock)
+;; (setq lazy-lock-stealth-time 15)
+
+;;; Lazy-shot (my preference)
+;; (require 'lazy-shot)
+;; (setq lazy-shot-verbose nil)
+;; (setq lazy-shot-stealth-verbose nil)
+;; (add-hook 'font-lock-mode-hook 'turn-on-lazy-shot)
+
+;;; Fast-lock (it has caching!)
+;; (require 'fast-lock)
+;; (setq fast-lock-cache-directories
+;;       (list (paths-construct-path (list (getenv "XDG_CACHE_HOME")
+;;                                      "sxemacs" "fast-lock"))))
+;; (push 'save-buffer fast-lock-save-events)
+;; (fast-lock-mode 1)
+;; (add-hook 'font-lock-mode-hook 'turn-on-fast-lock)
+;; (setq-default fast-lock-mode t)
+
+;:*=======================
+;:* describe-face-at-point, a function to find out which face is which
+(defun describe-face-at-point ()
+  "Describe faces at point."
+  (interactive)
+  (let ((faces (get-char-property (point) 'face)))
+    (if (listp faces)
+        (hyper-apropos
+         (mapconcat
+          #'(lambda (f)
+              (symbol-name f)) faces "\\|") nil)
+      (hyper-describe-face faces)
+      (other-window 1))))
+
+;; Some convenience face stuff
+(require 'facemenu)
+
+;:*=======================
+;:* Alex Schroeder's color-theme
+;;
+;; A very nice package, get it from:
+;;     <http://www.emacswiki.org/cgi-bin/wiki.pl?ColorTheme>
+(autoload 'color-theme-install "color-theme")
+(defun sy-colour-theme ()
+  "Colour theme by Steve Youngs, created 2001-09-01."
+  (interactive)
+  (color-theme-install
+   `(sy-colour-theme
+     ;; Misc basic stuff.
+     ((background-color . "black")
+      (frame-background-mode . dark)
+      (background-toolbar-color . "#cccccccccccc")
+      (border-color . "#000000000000")
+      (bottom-toolbar-shadow-color . "#7a7a7a7a7a7a")
+      (cursor-color . "red3")
+      (foreground-color . "white")
+      (top-toolbar-shadow-color . "#f5f5f5f5f5f5"))
+     ((buffers-tab-face . buffers-tab)
+      (cperl-here-face . font-lock-string-face)
+      (cperl-invalid-face quote underline)
+      (cperl-pod-face . font-lock-comment-face)
+      (cperl-pod-head-face . font-lock-variable-name-face)
+      (paren-match-face . paren-face-match)
+      (paren-mismatch-face . paren-face-mismatch)
+      (paren-no-match-face . paren-face-no-match)
+      (smiley-mouse-face . highlight)
+      (vc-mode-face . highlight))
+     (about-headline-face ((t (:bold t :foreground "HotPink"))))
+     (about-link-face ((t (:bold t :foreground "Yellow"))))
+     (blue ((t (:foreground "blue"))))
+     (buffers-tab ((t (:bold t :background "grey65" :foreground "black"))))
+     (green ((t (:foreground "green"))))
+     (gui-button-face ((t (:background "grey75" :foreground "black"))))
+     (highlight ((t (:background "darkseagreen2" :foreground "red"))))
+     (list-mode-item-selected ((t (:background "gray68" :foreground "white"))))
+     (primary-selection ((t (:background "gray65"))))
+     (red ((t (:foreground "red"))))
+     (secondary-selection ((t (:background "paleturquoise"))))
+     (text-cursor ((t (:background "red3" :foreground "black"))))
+     (underline ((t (:underline t))))
+     (yellow ((t (:foreground "yellow"))))
+     ;; Calendar/Diary.
+     (calendar-today-face ((t (:bold t :foreground "HotPink"))))
+     (calendar-week-face ((t (:bold t :foreground "yellow"))))
+     (calendar-header-face ((t (:bold t :foreground "HotPink"))))
+     (calendar-sunday-face ((t (:bold t :foreground "Red"))))
+     (diary-face ((t (:foreground "Cyan"))))
+     (holiday-face ((t ( :foreground "Yellow"))))
+     ;; cperl-mode.
+     (cperl-array-face ((t (:bold t :foreground "Blue"))))
+     (cperl-hash-face ((t (:bold t :foreground "Red"))))
+     (cperl-nonoverridable-face ((t (:foreground "chartreuse3"))))
+     ;; Custom
+     (custom-group-tag-face ((t (:foreground "Yellow"))))
+     (custom-state-face ((t (:foreground "Cyan"))))
+     (custom-variable-tag-face ((t (:foreground "LawnGreen"))))
+     ;; PCL-CVS
+     ;(cvs-filename-face ((t (:bold t :foreground "Yellow"))))
+     ;(cvs-header-face ((t (:foreground "Green"))))
+     ;(cvs-msg-face ((t ( :foreground "Cyan"))))
+     ;; XEtla
+     ;(xetla-archive-name ((t (:foreground "yellow"))))
+     ;(xetla-location-http ((t (:foreground "sandybrown"))))
+     ;(xetla-location-local ((t (:foreground "indianred"))))
+     ;(xetla-location-sftp ((t (:foreground "wheat"))))
+     ;; dictionary
+     (dictionary-word-entry-face ((t (:italic nil :foreground "Green"))))
+     (dictionary-reference-face ((t (:foreground "Yellow"))))
+     ;; diff-mode
+     (diff-added-face ((t ( :foreground "LawnGreen"))))
+     (diff-changed-face ((t ( :foreground "Cyan"))))
+     (diff-file-header-face 
+      ((t ( :foreground "BlanchedAlmond"))))
+     (diff-header-face ((t ( :foreground "BlanchedAlmond"))))
+     (diff-hunk-header-face ((t ( :foreground "Yellow"))))
+     (diff-index-face ((t ( :foreground "Orange"))))
+     (diff-removed-face ((t ( :foreground "HotPink"))))
+     ;; Dired.
+     (dired-face-boring ((t (:foreground "Gray65"))))
+     (dired-face-directory ((t (:bold t :foreground "yellow"))))
+     (dired-face-executable ((t (:bold t :foreground "LimeGreen"))))
+     (dired-face-flagged ((t (:background "LightSlateGray" :foreground "black"))))
+     (dired-face-header ((t (:background "Orange" :foreground "black" :bold t))))
+     (dired-face-marked ((t (:background "PaleVioletRed" :foreground "black" :bold t))))
+     (dired-face-permissions ((t (:background "Turquoise" :foreground "black"))))
+     (dired-face-setuid ((t (:foreground "Red" :bold t))))
+     (dired-face-socket ((t (:foreground "magenta"))))
+     (dired-face-symlink ((t (:foreground "cyan"))))
+     ;; Balloon Help.
+     (display-time-mail-balloon-enhance-face ((t (:background "red"))))
+     (display-time-mail-balloon-gnus-group-face ((t (:foreground "blue"))))
+     (display-time-time-balloon-face ((t (:foreground "magenta"))))
+     ;; Ediff
+     (ediff-current-diff-face-A 
+      ((t (:background "pale green" :foreground "firebrick"))))
+     (ediff-current-diff-face-Ancestor 
+      ((t (:background "VioletRed" :foreground "Black"))))
+     (ediff-current-diff-face-B 
+      ((t (:background "Yellow" :foreground "DarkOrchid"))))
+     (ediff-current-diff-face-C ((t (:background "Pink" :foreground "Navy"))))
+     (ediff-even-diff-face-A ((t (:background "light grey" :foreground "Black"))))
+     (ediff-even-diff-face-Ancestor ((t (:background "Grey" :foreground "White"))))
+     (ediff-even-diff-face-B ((t (:background "Grey" :foreground "White"))))
+     (ediff-even-diff-face-C ((t (:background "light grey" :foreground "Black"))))
+     (ediff-fine-diff-face-A ((t (:background "sky blue" :foreground "Navy"))))
+     (ediff-fine-diff-face-Ancestor 
+      ((t (:background "Green" :foreground "Black"))))
+     (ediff-fine-diff-face-B ((t (:background "cyan" :foreground "Black"))))
+     (ediff-fine-diff-face-C ((t (:background "Turquoise" :foreground "Black"))))
+     (ediff-odd-diff-face-A ((t (:background "Grey" :foreground "White"))))
+     (ediff-odd-diff-face-Ancestor 
+      ((t (:background "light grey" :foreground "Black"))))
+     (ediff-odd-diff-face-B ((t (:background "light grey" :foreground "Black"))))
+     (ediff-odd-diff-face-C ((t (:background "Grey" :foreground "White"))))
+     ;; LaTeX
+     (font-latex-bold-face ((t (:foreground "brown"))))
+     (font-latex-italic-face ((t (:foreground "lightcoral"))))
+     (font-latex-math-face ((t (:foreground "dodgerblue"))))
+     (font-latex-sedate-face ((t (:foreground "gray51"))))
+     (font-latex-string-face ((t (:foreground "green3"))))
+     (font-latex-warning-face ((t (:foreground "red"))))
+     ;; Font Lock
+     (font-lock-comment-face ((t (:foreground "SkyBlue"))))
+     (font-lock-doc-string-face ((t (:foreground "LimeGreen"))))
+     (font-lock-function-name-face ((t (:foreground "yellow" :bold t))))
+     (font-lock-keyword-face ((t (:foreground "Salmon"))))
+     (font-lock-preprocessor-face ((t (:foreground "magenta3"))))
+     (font-lock-reference-face ((t (:foreground "Turquoise"))))
+     (font-lock-string-face ((t (:foreground "green3"))))
+     (font-lock-type-face ((t (:foreground "dodgerblue"))))
+     (font-lock-variable-name-face ((t (:foreground "PeachPuff"))))
+     (font-lock-warning-face ((t (:bold t :foreground "Red"))))
+     ;; gdb highlight
+     (gdb-highlight-face ((t (:bold t :foreground "BlanchedAlmond"))))
+     (gdb-breakpoint-number-face ((t (:foreground "magenta3"))))
+     (gdb-breakpoint-enabled-face ((t (:foreground "steelblue"))))
+     (gdb-function-name-face ((t (:bold t :foreground "yellow"))))
+     (gdb-function-location-face ((t (:foreground "Salmon"))))
+     (gdb-variable-name-face ((t (:foreground "PeachPuff"))))
+     (gdb-type-name-face ((t (:foreground "dodgerblue"))))
+     ;; Gnus/Message
+     (gnus-cite-attribution ((t (:foreground "hotpink"))))
+     (gnus-cite-1 ((t (:foreground "LawnGreen"))))
+     (gnus-cite-10 ((t (:foreground "magenta"))))
+     (gnus-cite-11 ((t (:foreground "MediumBlue"))))
+     (gnus-cite-2 ((t (:foreground "PeachPuff"))))
+     (gnus-cite-3 ((t (:foreground "Cyan"))))
+     (gnus-cite-4 ((t (:foreground "Salmon"))))
+     (gnus-cite-5 ((t (:foreground "DarkSalmon"))))
+     (gnus-cite-6 ((t (:foreground "LavenderBlush"))))
+     (gnus-cite-7 ((t (:foreground "LawnGreen"))))
+     (gnus-cite-8 ((t (:foreground "LightSkyBlue"))))
+     (gnus-cite-9 ((t (:foreground "LightSeaGreen"))))
+     (gnus-emphasis-bold ((t (:bold t))))
+     (gnus-emphasis-bold-italic ((t (:italic t :bold t))))
+     (gnus-emphasis-highlight-words ((t (:foreground "yellow"))))
+     (gnus-emphasis-italic ((t (:italic t))))
+     (gnus-emphasis-underline ((t (:underline t))))
+     (gnus-emphasis-underline-bold ((t (:underline t :bold t))))
+     (gnus-emphasis-underline-bold-italic ((t (:underline t :italic t :bold t))))
+     (gnus-emphasis-underline-italic ((t (:underline t :italic t))))
+     (gnus-group-mail-1-empty ((t (:foreground "DeepPink3"))))
+     (gnus-group-mail-1 ((t (:bold t :foreground "DeepPink3"))))
+     (gnus-group-mail-2-empty ((t (:foreground "HotPink3"))))
+     (gnus-group-mail-2 ((t (:bold t :foreground "HotPink3"))))
+     (gnus-group-mail-3-empty ((t (:foreground "BlanchedAlmond"))))
+     (gnus-group-mail-3 ((t (:foreground "Yellow"))))
+     (gnus-group-mail-low-empty ((t (:foreground "DeepPink4"))))
+     (gnus-group-mail-low ((t (:bold t :foreground "DeepPink4"))))
+     (gnus-group-news-1-empty ((t (:foreground "BlanchedAlmond"))))
+     (gnus-group-news-1 ((t (:foreground "LawnGreen"))))
+     (gnus-group-news-2-empty ((t (:foreground "CadetBlue4"))))
+     (gnus-group-news-2 ((t (:bold t :foreground "CadetBlue4"))))
+     (gnus-group-news-3 ((t (:foreground "HotPink"))))
+     (gnus-group-news-4 ((t (:bold t))))
+     (gnus-group-news-5 ((t (:bold t))))
+     (gnus-group-news-6 ((t (:bold t))))
+     (gnus-group-news-low-empty ((t (:foreground "DarkGreen"))))
+     (gnus-group-news-low ((t (:bold t :foreground "DarkGreen"))))
+     (gnus-header-content ((t (:foreground "LightGreen"))))
+     (gnus-header-from ((t (:foreground "Cyan"))))
+     (gnus-header-name ((t (:foreground "hotpink"))))
+     (gnus-header-newsgroups ((t (:bold t :foreground "yellow"))))
+     (gnus-header-subject ((t (:bold t :foreground "SkyBlue"))))
+     (gnus-picon ((t (:background "white" :foreground "white"))))
+     (gnus-picon-xbm ((t (:background "white" :foreground "white"))))
+     (gnus-server-agent ((t (:bold t :foreground "HotPink"))))
+     (gnus-server-opened ((t (:foreground "green"))))
+     (gnus-server-closed ((t (:foreground "gray55"))))
+     (gnus-server-denied ((t (:foreground "red"))))
+     (gnus-server-offline ((t (:foreground "BlanchedAlmond"))))
+     (gnus-signature ((t (:bold t :foreground "BlanchedAlmond"))))
+     (gnus-summary-cancelled ((t (:foreground "yellow"))))
+     (gnus-summary-high-ancient ((t (:bold t :foreground "RoyalBlue"))))
+     (gnus-summary-high-read ((t (:foreground "SlateGrey"))))
+     (gnus-summary-high-ticked ((t (:bold t :foreground "firebrick"))))
+     (gnus-summary-high-unread ((t (:bold t :foreground "HotPink"))))
+     (gnus-summary-low-ancient ((t (:italic t :foreground "RoyalBlue"))))
+     (gnus-summary-low-read ((t (:foreground "Grey"))))
+     (gnus-summary-low-ticked ((t (:italic t :foreground "firebrick"))))
+     (gnus-summary-low-unread ((t ( :foreground "coral"))))
+     (gnus-summary-normal-ancient ((t (:foreground "RoyalBlue"))))
+     (gnus-summary-normal-read ((t (:foreground "SlateGrey"))))
+     (gnus-summary-normal-ticked ((t (:foreground "firebrick"))))
+     (gnus-summary-normal-unread ((t (:bold t :foreground "white"))))
+     (gnus-summary-selected ((t (:underline t :foreground "Cyan"))))
+     (gnus-x ((t (:background "white" :foreground "black"))))
+     (message-cited-text ((t (:foreground "Cyan"))))
+     (message-header-cc ((t (:foreground "LawnGreen"))))
+     (message-header-name ((t (:foreground "hotpink"))))
+     (message-header-newsgroups ((t (:bold t :foreground "yellow"))))
+     (message-header-other ((t (:foreground "Green"))))
+     (message-header-subject ((t (:bold t :foreground "SkyBlue"))))
+     (message-header-to ((t (:foreground "BlanchedAlmond"))))
+     (message-header-xheader ((t (:foreground "blue"))))
+     (message-mml ((t (:foreground "ForestGreen"))))
+     (message-separator ((t (:bold t :foreground "yellow"))))
+     (mm-uu-extract ((t (:background "black"))))
+     ;; MMM-mode
+     (mmm-default-submode-face ((t (:background "black"))))
+     ;; Hyper-apropos.
+     (hyper-apropos-documentation ((t (:foreground "white"))))
+     (hyper-apropos-hyperlink ((t (:foreground "yellow"))))
+     ;; ibuffer
+     (ibuffer-deletion-face ((t (:foreground "BlanchedAlmond"))))
+     (ibuffer-dired-buffer-face ((t (:foreground "cyan"))))
+     (ibuffer-help-buffer-face ((t (:foreground "Yellow"))))
+     (ibuffer-hidden-buffer-face ((t (:foreground "DarkMagenta"))))
+     (ibuffer-marked-face ((t (:foreground "green"))))
+     (ibuffer-occur-match-face ((t (:bold t :foreground "Red"))))
+     (ibuffer-read-only-buffer-face ((t (:foreground "hotpink"))))
+     (ibuffer-special-buffer-face ((t (:foreground "skyblue"))))
+     ;; Info
+     (info-node ((t (:bold t :foreground "yellow"))))
+     (info-xref ((t (:bold t :foreground "BlanchedAlmond"))))
+     ;; Isearch
+     (isearch ((t (:background "yellow" :foreground "red"))))
+     (isearch-secondary ((t (:foreground "red3"))))
+     ;; Riece
+     (riece-ctcp-action-face ((t (:foreground "PaleGreen" :bold t))))
+     (riece-dialogue-prefix-face ((t (:foreground "red" :bold t))))
+     (riece-channel-list-default-face ((t (:foreground "yellow" :bold t))))
+     (riece-keyword-face ((t (:foreground "hotpink" :bold t))))
+     ;; Man
+     (man-italic ((t (:italic t :size "14pt" :foreground "BlanchedAlmond"))))
+     (man-heading ((t (:bold t :foreground "yellow"))))
+     (man-xref ((t (:underline t :foreground "hotpink"))))
+     ;; Modeline
+     (modeline ((t (:background "Gray80" :foreground "Black"))))
+     (modeline-buffer-id ((t (:background "Gray80" :foreground "blue4"))))
+     (modeline-mousable ((t (:background "Gray80" :foreground "firebrick"))))
+     (modeline-mousable-minor-mode 
+      ((t (:background "Gray80" :foreground "green4"))))
+     ;; Paren
+     (paren-blink-off ((t (:foreground "black"))))
+     (paren-face-match ((t (:background "turquoise"))))
+     (paren-face-mismatch ((t (:background "purple" :foreground "white"))))
+     (paren-face-no-match ((t (:background "yellow" :foreground "black"))))
+     (paren-match ((t (:background "darkseagreen2" :foreground "yellow3"))))
+     (paren-mismatch ((t (:background "DeepPink" :foreground "white"))))
+     ;; Eshell
+     (eshell-ls-directory-face ((t (:foreground "Yellow" :bold t))))
+     ;; Shell
+     (shell-option-face ((t (:foreground "Cyan"))))
+     (shell-output-2-face ((t (:foreground "LawnGreen"))))
+     (shell-output-3-face ((t (:foreground "HotPink"))))
+     (shell-output-face ((t (:foreground "BlanchedAlmond"))))
+     (shell-prompt-face ((t (:foreground "Yellow"))))
+     ;; Speedbar
+     (speedbar-button-face ((t (:foreground "green4"))))
+     (speedbar-directory-face ((t (:foreground "BlanchedAlmond"))))
+     (speedbar-file-face ((t (:foreground "cyan4"))))
+     (speedbar-highlight-face ((t (:background "green"))))
+     (speedbar-selected-face ((t (:underline t :foreground "red"))))
+     (speedbar-tag-face ((t (:foreground "brown"))))
+     ;; Widget
+     (widget-button-face ((t (:foreground "magenta"))))
+     (widget-button-pressed-face ((t (:foreground "red"))))
+     (widget-documentation-face ((t (:foreground "BlanchedAlmond"))))
+     (widget-field-face ((t (:background "Grey30" :foreground "Yellow"))))
+     (widget-inactive-face ((t (:foreground "dim gray"))))
+     (zmacs-region ((t (:background "gray30" :foreground "yellow"))))
+     ;; xwem
+     ;(xwem-framei-dockapp-face ((t (:foreground "cyan" :background "black" :bold t))))
+     ;; EasyPG
+     (epa-field-body-face ((t (:foreground "turquoise" :italic t))))
+     (epa-field-name-face ((t (:foreground "BlanchedAlmond"))))
+     (epa-mark-face ((t (:foreground "red" :bold t))))
+     (epa-string-face ((t (:foreground "green"))))
+     (epa-validity-disabled-face ((t (:foreground "grey50"))))
+     (epa-validity-high-face ((t (:foreground "hotpink" :bold t))))
+     (epa-validity-low-face ((t (:foreground "grey80"))))
+     (epa-validity-medium-face ((t (:foreground "PaleTurquoise"))))
+     ;; howm
+     (action-lock-face ((t (:underline t))))
+     (howm-menu-key-face ((t (:foreground "HotPink"))))
+     (howm-menu-list-face ((t (:foreground "black" :background "yellow"))))
+     (howm-mode-ref-face ((t (:foreground "yellow"))))
+     (howm-mode-title-face ((t (:foreground "BlanchedAlmond"))))
+     (howm-mode-wiki-face ((t (:foreground "SkyBlue"))))
+     (howm-reminder-defer-face ((t (:foreground "white"))))
+     (howm-reminder-done-face ((t (:foreground "grey65"))))
+     (howm-reminder-schedule-face ((t (:foreground "cyan"))))
+     (howm-reminder-todo-face ((t (:foreground "hotpink" :bold t))))
+     (howm-reminder-normal-face ((t (:foreground "Salmon"))))
+     ;; Sudoku
+     (sudoku-value-face ((t (:foreground "yellow" :bold t :size ,sudoku-font-size))))
+     )))
+
+(sy-colour-theme)
+
+;:*======================= :* 
+; Use a sexy background pixmap.
+;(set-face-background-pixmap 'default 
+;                           [xpm :file "~/documents/pictures/misc/marble.xpm"])
+;:*=======================
+;:* Set background-mode to dark (why isn't this autodetected?)
+(setq frame-background-mode 'dark)
+
+;; Highlight 'FIXME:' and '--SY' in comments.  So far, just lisp mode.
+(add-to-list 'lisp-font-lock-keywords-2
+             '(";+.*\\(FIXME:\\|--SY\\.?$\\)" 1 font-lock-warning-face prepend))
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+(message "fonts initialised")
+
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:15:05 AEST 2020 + +
+ + + diff --git a/SYinits/15-supercite.html b/SYinits/15-supercite.html new file mode 100644 index 0000000..6c0ffb6 --- /dev/null +++ b/SYinits/15-supercite.html @@ -0,0 +1,233 @@ + + + + + 15-supercite.el + + + + + + +
+;; 15-supercite.el --- Mail citing Settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 19:00:53 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/15-supercite.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   Setting up citing in Gnus with Supercite.
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+(require 'supercite)
+(require 'time-date)
+;; Warning: This triggers a bug that has been fixed in an as yet to be
+;; released SXEmacs Gnus package.  Sorry.  I will get the packages out
+;; as soon as I can.  This was as of: [2020-04-09]
+(defun sy-september-citation-line ()
+  (let ((sc-mumble "")
+        (whofrom (sc-whofrom)))
+    (when whofrom
+      (insert
+       sc-reference-tag-string
+       (sc-hdr "On "
+               (int-to-string
+                (- (time-to-days (mail-header-parse-date
+                                  (sc-mail-field "date")))
+                   (time-to-days (encode-time 0 0 0 01 09 1993))))
+               " September 1993, ")
+       (sc-mail-field "sc-author")
+       " wrote:\n"))))
+
+(setq sc-rewrite-header-list 
+      '((sc-no-header) 
+        (sc-header-on-said) 
+        (sc-header-inarticle-writes) 
+        (sc-header-regarding-adds) 
+        (sc-header-attributed-writes) 
+        (sc-header-author-writes) 
+        (sc-header-verbose) 
+        (sc-no-blank-line-or-header)
+        (sc-header-author-email-writes)
+        (sy-september-citation-line)))
+
+(setq sc-preferred-attribution-list
+      '("sc-lastchoice"
+        "x-attribution"
+        "sc-consult"
+        "initials"
+        "firstname"
+        "emailname"
+        "lastname"))
+
+(setq 
+ message-cite-function 'sc-cite-original
+ sc-confirm-always-p nil
+ sc-preferred-header-style 4
+ sc-auto-fill-region-p t
+ sc-fixup-whitespace-p t
+ sc-electric-references-p t
+ sc-cite-blank-lines-p nil
+ sc-nested-citation-p nil
+ sc-citation-separator " "
+ sc-reference-tag-string "|--> "
+ sc-citation-delimiter ">"
+ sc-extract-address-components 'gnus-extract-address-components)
+
+(defun sy-sc-remove-signature ()
+  "Removes the signature from the original message.
+
+To use, hang it off the appropriate hook such as `sc-pre-hook' so
+you're not citing useless stuff."
+  (save-excursion
+    (let ((start (point))
+          (end (mark t))
+          (sig-sep gnus-signature-separator)
+          mark)
+      (while sig-sep
+        (goto-char end)
+        (when (re-search-backward (car sig-sep) start t)
+          (forward-line -1)
+          (while (looking-at "[ \t]*$")
+            (forward-line -1))
+          (forward-line 1)
+          (setq mark (set-marker (make-marker) (point)))
+          (delete-region mark (mark t)))
+        (setq sig-sep (cdr sig-sep))))))
+
+(add-hook 'sc-load-hook 'sc-setup-filladapt)
+(add-hook 'sc-pre-hook 'sy-sc-remove-signature)
+(add-hook 'mail-citation-hook 'sc-cite-original)
+
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+(message "Supercite settings loaded successfully")
+
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:15:32 AEST 2020 + +
+ + + diff --git a/SYinits/16-riece.html b/SYinits/16-riece.html new file mode 100644 index 0000000..9c9a428 --- /dev/null +++ b/SYinits/16-riece.html @@ -0,0 +1,931 @@ + + + + + 16-riece.el + + + + + + +
+;; 16-riece.el --- Riece (IRC) Settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 19:11:39 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/16-riece.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   My Riece settings.
+;;
+;;   Riece is a very nice IRC client for emacs.  Unlike ERC which
+;;   tries to be like "traditional" IRC clients, Riece is much more
+;;   emacs like.
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:
+(require 'riece-options)
+(require 'riece-biff)
+(require 'riece-log)
+(require 'riece)
+
+;; For flyspell in the command buffer.  See `sy-riece-command-mode-hooks'.
+(or (featurep 'overlay)
+    (ignore-errors (require 'overlay)))
+(or (featurep 'flyspell)
+    (ignore-errors (require 'flyspell)))
+
+;; Misc setq's
+(setq riece-alias-percent-hack-mask "*.net"
+      riece-biff-check-channels '("#sxemacs"
+                                  "#emchat"
+                                  "#xemacs")
+      riece-channel-buffer-mode t
+      riece-ctlseq-colors
+            '("white" "black" "blue" "green" "red" "brown"
+              "purple" "orange" "yellow" "lightgreen" "darkcyan"
+              "cyan" "lightblue" "HotPink" "grey35" "grey")
+      riece-default-channel-binding nil
+      riece-default-coding-system 'utf-8
+      riece-desktop-notify-always t
+      riece-gather-channel-modes t
+      riece-hide-list '(joins parts quits)
+      riece-ignore-discard-message nil
+      riece-keywords
+      '("Bastard" "EMchat" "eMoney" "Gnus" "LFS" "LinuxFromScratch"
+        "LineageOS" "Lineage" "Linux From Scratch" "Riece" "SteveYoungs"
+        "SXEmacs" "XEmacs" "Youngs" "Steve Youngs" "SYWriting"
+        "SY Writing" "Gaiman" "Neil Gaiman" "xwem")
+      riece-layout '"bottom-right"
+      riece-retry-with-new-nickname t
+      riece-server-alist
+      '(("roddenberry.freenode.net" :host "roddenberry.freenode.net")
+        ("irc.sxemacs.org" :host "irc.sxemacs.org")
+        ("irc.freenode.net" :host "irc.freenode.net")
+        ("irc.au.freenode.net" :host "irc.au.freenode.net")
+        ("irc.nac.net" :host "irc.nac.net")
+        ("irc.efnet.org" :host "irc.efnet.org")
+        ("irc.efnet.net" :host "irc.efnet.net"))
+      riece-user-agent 'emacs-riece-config
+      riece-user-list-buffer-mode t)
+
+;; Addons
+(riece-command-insinuate-addon 'riece-yank)
+(riece-command-insinuate-addon 'riece-hangman)
+(riece-command-insinuate-addon 'riece-keepalive)
+(riece-command-insinuate-addon 'riece-shrink-buffer)
+(riece-command-insinuate-addon 'riece-xfaceb)
+(riece-command-insinuate-addon 'riece-button)
+(riece-command-insinuate-addon 'riece-epg)
+
+(riece-command-enable-addon 'riece-hangman)
+
+;; Leave this OFF it is too annoying.  Fun, but annoying.
+;; (riece-command-insinuate-addon 'riece-doctor)
+;; (riece-command-enable-addon 'riece-doctor)
+
+;; A few handy functions that extend Riece's features a bit.
+(defvar riece-unread-channels)
+(defun sy-riece-clear-unread-chans ()
+  "Get rid of the unread mark on all channels."
+  (interactive)
+  (let ((current riece-current-channel))
+    (setq riece-unread-channels nil)
+    (riece-switch-to-channel current)))
+
+(defun sy-riece-relist-chans-clear-blanks ()
+  "Relist the channel buffer removing any blanks in the sequence.
+
+When you part from a channel/user you are left with a gap in the
+sequence of channel numbers in the channels buffer.  This removes
+those gaps."
+  (interactive)
+  (let ((current riece-current-channel))
+    (setq riece-current-channels
+          (remove-if #'null riece-current-channels))
+    (riece-switch-to-channel current)))
+
+(defun sy-riece-command-memoserv (command)
+  "Send COMMAND, a string, to MEMOSERV.
+
+With prefix arg, also /join."
+  (interactive "sMemoserv: ")
+  (when current-prefix-arg
+    (riece-command-join (list ["MemoServ" ""])))
+  (riece-send-string (format "MEMOSERV %s\r\n" command)))
+
+(defun sy-riece-command-chanserv (command)
+  "Send COMMAND, a string, to CHANSERV.
+
+With prefix arg, also /join."
+  (interactive "sChanserv: ")
+  (when current-prefix-arg
+    (riece-command-join (list ["ChanServ" ""])))
+  (riece-send-string (format "CHANSERV %s\r\n" command)))
+
+(defun sy-riece-command-nickserv (command)
+  "Send COMMAND, a string, to NICKSERV.
+
+With prefix arg, also /join."
+  (interactive "sNickserv: ")
+  (when current-prefix-arg
+    (riece-command-join (list ["NickServ" ""])))
+  (riece-send-string (format "NICKSERV %s\r\n" command)))
+
+;; Seems to not exist anymore. :-(
+(defun sy-riece-command-seenserv (command)
+  "Send COMMAND, a string, to SEENSERV.
+
+SeenServ doesn't actually exist anymore, so this sends `info nick' to
+NickServ which gives us the same info.
+
+With prefix arg, also /join."
+  (interactive "sLast saw who (nick): ")
+  (when current-prefix-arg
+    (riece-command-join (list ["NickServ" ""])))
+  (riece-send-string (format "NICKSERV info %s\r\n" command)))
+
+(defun sy-riece-command-quick-op ()
+  "Request Ops from ChanServ in the current channel."
+  (interactive)
+  (let ((chan (riece-identity-prefix riece-current-channel)))
+    (sy-riece-command-chanserv (format "OP %s" chan))))
+
+(defun sy-riece-command-mute-user (&optional user unmute)
+  "Set mode +q on USER, effectively muting them.
+
+Optional prefix arg, UNMUTE to let them speak again."
+  (interactive "i\nP")
+  (let ((user (or user
+                  (completing-read
+                   "(Un)Mute user: "
+                   (riece-with-server-buffer
+                       (riece-identity-server riece-current-channel)
+                     (riece-channel-get-users (riece-identity-prefix
+                                               riece-current-channel)))))))
+    (riece-send-string 
+     (format "MODE %s %sq %s\r\n"
+             (riece-identity-prefix riece-current-channel)
+             (if (or unmute
+                     current-prefix-arg)
+                 "-"
+               "+")
+             user))))
+
+(defun sy-riece-list-banned (channel)
+  "List the banned users on CHANNEL, current if omitted."
+  (interactive "P")
+  (let ((channel (if current-prefix-arg
+                     (vector (read-string "Channel: ") "")
+                   riece-current-channel)))
+    (riece-send-string
+     (format "MODE %s b\r\n" (riece-identity-prefix channel)))))
+
+(defun sy-riece-command-ban-user (&optional user unban)
+  "Ban USER from current channel.
+
+Optional prefix arg, UNBAN removes the ban."
+  (interactive "i\nP")
+  (let ((user (or user
+                  (completing-read
+                   "(Un)Ban user: "
+                   (riece-with-server-buffer
+                       (riece-identity-server riece-current-channel)
+                     (riece-channel-get-users (riece-identity-prefix
+                                               riece-current-channel))))))
+        reason)
+    (if (or unban
+            current-prefix-arg)
+        (riece-send-string
+         (format "MODE %s -b %s\r\n"
+                 (riece-identity-prefix riece-current-channel)
+                 user))
+      (setq reason (read-string "Reason: " nil nil
+                                "Need a reason?  Look in a mirror!"))
+      (riece-send-string
+       (format "MODE %s +b %s\r\n"
+               (riece-identity-prefix riece-current-channel)
+               user))
+      (riece-command-kick user reason))))
+
+;; Share the muzak!
+(defun sy-riece-say-now-playing (&optional notice)
+  "Say into the current channel what mp3 is playing.
+
+With non-nil optional prefix arg, NOTICE, send it as a notice."
+  (interactive "P")
+  (riece-command-send-message
+   (format "NP: %s" (mpd-now-playing)) 
+   (and current-prefix-arg
+        'notice)))
+
+(defun sy-riece-say-all-purpose (&optional notice)
+  "Send the all-purpose answer to everything."
+  (interactive "P")
+  (riece-command-send-message "Adolf Hitler in fishnets"
+                              (if current-prefix-arg
+                                  'notice
+                                nil)))
+  
+
+;; Tell the world what we're using.
+(defun sy-riece-say-version (&optional notice)
+  "Say the version of Riece we are running.
+
+With non-nil prefix arg, NOTICE, send as a notice."
+  (interactive "P")
+  (riece-command-send-message
+   (format "I'm using: %s" (riece-extended-version))
+   (if current-prefix-arg
+       'notice
+     nil)))
+
+;; say (foo) => bar
+(defun sy-riece-send-form ()
+  "Sends a form and it's eval"
+  (interactive)
+  (let* ((form (read-string "sexp: "))
+         (value (eval (read form))))
+    (riece-command-send-message (format "%s => %s" form value)
+                                (if current-prefix-arg
+                                    'notice
+                                  nil))))
+
+(defun sy-make-rot13-translation-table ()
+  "Create a rot13 table."
+  (let ((i -1)
+        (table (make-string 256 0))
+        (a (char-to-int ?a))
+        (A (char-to-int ?A)))
+    (while (< (incf i) 256)
+      (aset table i i))
+    (concat
+     (substring table 0 A)
+     (substring table (+ A 13) (+ A 13 (- 26 13)))
+     (substring table A (+ A 13))
+     (substring table (+ A 26) a)
+     (substring table (+ a 13) (+ a 13 (- 26 13)))
+     (substring table a (+ a 13))
+     (substring table (+ a 26) 255))))
+
+(defun sy-rot13-string (string)
+  "Convert TEXT to rot13-ese."
+  (let ((table (sy-make-rot13-translation-table)))
+    (with-temp-buffer
+      (insert string)
+      (translate-region (point-min) (point-max) table)
+      (buffer-string))))
+
+(defun sy-riece-send-rot13 (text)
+  "Talk in rot13-ese."
+  (interactive "srot13: ")
+  (riece-command-send-message
+   (sy-rot13-string text)
+   (if current-prefix-arg
+       'notice
+     nil)))
+
+(defun sy-morse-string (string)
+  "Return STRING in morse code."
+  (with-temp-buffer
+    (insert string)
+    (morse-region (point-min) (point-max))
+    (goto-char (point-min))
+    (while (re-search-forward "/" nil t)
+      (replace-match " "))
+    (buffer-string)))
+
+(defun sy-riece-send-morse (text)
+  "Talk in morse code."
+  (interactive "sMorse: ")
+  (riece-command-send-message
+   (sy-morse-string text)
+   (if current-prefix-arg
+       'notice
+     nil)))
+
+;; Show off!
+(autoload 'riece-command-ctcp-action "riece-ctcp" nil t)
+(defun sy-riece-show-off ()
+  "Brag about how many channels/people we're talking to."
+  (interactive)
+  (sy-riece-relist-chans-clear-blanks)
+  (let* ((channels riece-current-channels)
+         (numchans (length channels))
+         (numppl 0)
+         currchan)
+    (while channels
+      (setq currchan (car channels))
+      (setq numppl (+ numppl
+                      (length (riece-with-server-buffer
+                                  (riece-identity-server currchan)
+                                (riece-channel-get-users 
+                                 (riece-identity-prefix currchan))))))
+      (setq channels (cdr channels)))
+    (riece-command-ctcp-action
+     riece-current-channel
+     (format
+      "is in %d channels, talking to %d people :-P"
+      numchans numppl))))
+
+;; Brag about how long SXEmacs has been up
+(defun sy-riece-sxe-uptime ()
+  "Display as action SXEmacs uptime."
+  (interactive)
+  (let* ((ut (uptime))
+         (days (car ut))
+         (hours (cadr ut))
+         (minutes (caddr ut))
+         (seconds (cadddr ut)))
+    (riece-command-ctcp-action
+     riece-current-channel
+     (concat "-=[ SXEmacs Uptime: "
+             (unless (zerop days)
+               (if (eq days 1)
+                   "1 day, "
+                 (concat (number-to-string days) " days, ")))
+             (unless (zerop hours)
+               (if (eq hours 1)
+                   "1 hour, "
+                 (concat (number-to-string hours) " hours, ")))
+             (unless (zerop minutes)
+               (if (eq minutes 1)
+                   "1 minute, "
+                 (concat (number-to-string minutes) " minutes, ")))
+             (if (zerop seconds)
+                 "and 0 seconds"
+               (if (eq seconds 1)
+                   "and 1 second."
+                 (concat "and "
+                         (number-to-string seconds)
+                         " seconds")))
+             " ]=-"))))
+      
+
+;; segassem desrever eikeeg ylbirreT
+(defun sy-riece-reverse ()
+  ".sdrawkcab kaepS"
+  (interactive)
+  (let ((str (read-string "Say backwards: ")))
+    (riece-command-send-message
+     (concat (nreverse (string-to-list str))) nil)))
+
+;; .oO0{ what's he thinking? }
+(defun sy-riece-think ()
+  "Send a .oO0{ think balloon action }."
+  (interactive)
+  (let ((think (read-string "What are you thinking? ")))
+    (riece-command-ctcp-action
+     riece-current-channel
+     (format ".oO0{ %s }" think))))
+
+;; When pictures speak louder than words...
+(defun sy-riece-fuck-you (&optional upyours)
+  "For those occasions where... you know what I mean."
+  (interactive "P")
+  (let ((fuckyou "
+     _                         _
+    |_|                       |_|
+    | |         /^^^\\         | |
+   _| |_      (| \"o\" |)      _| |_
+ _| | | | _    (_---_)    _ | | | |_
+| | | | |' |    _| |_    | `| | | | |
+|          |   /     \\   |          |
+ \\        /  / /(. .)\\ \\  \\        /
+   \\    /  / /  | . |  \\ \\  \\    /
+     \\  \\/ /    ||Y||    \\ \\/  /
+      \\__/      || ||      \\__/
+                () ()
+                || ||
+               ooO Ooo")
+        (upyours "
+    .-.    
+    |U|    
+    | |    
+    | |    
+   _| |_   
+  | | | |-.
+ /|     ` |
+| |       |
+|         |
+\\         /
+ |       | 
+ |       |")
+        (riece-yank-tick 0.1))
+    (with-temp-buffer
+      (if current-prefix-arg 
+          (insert upyours)
+        (insert fuckyou))
+      (kill-region (point-min) (point-max)))
+    (riece-command-yank nil nil)))
+
+;; Nick completion.  Lets face it, compared to other IRC clients like
+;; BitchX or even ERC, Riece's nick completion is pretty sucky. :-(
+;; This is my vain attempt to improve it.
+(defun sy-riece-command-complete-user ()
+  "Like `riece-command-complete-user' but restrict to current chan.
+
+This version of nick completion maintains the original case of the
+nick being completed.  The version in Riece downcases the completion
+\(could be a bug\).
+
+If the completion is being inserted at column zero, `: ' is appended,
+otherwise ` ' is added.
+
+The following is not yet implemented, but I'd also like to be able to
+complete from the middle of a nick...
+
+  Nickname     User Types      Expands To
+  --------     ----------      ----------
+  MyNick        nic<TAB>       MyNick:<SPC>"
+  (interactive)
+  (let* ((completion-ignore-case t)
+         (table (riece-with-server-buffer
+                    (riece-identity-server riece-current-channel)
+                  (riece-channel-get-users (riece-identity-prefix
+                                            riece-current-channel))))
+         (current (or (current-word) ""))
+         (completion (try-completion current table))
+         (all (all-completions current table)))
+    (if (eq completion t)
+        nil
+      (if (null completion)
+          (message "Can't find completion for \"%s\"" current)
+        (if (equal current completion)
+            (with-output-to-temp-buffer "*Help*"
+              (display-completion-list all))
+          (re-search-forward "\\>" nil t)
+          (delete-region (point) (- (point) (length current)))
+          (if (eq (point) (point-at-bol))
+              (insert completion ": ")
+            (insert completion " ")))))))
+
+;(defalias 'riece-command-complete-user 'sy-riece-command-complete-user)
+
+;; "schme" <marcus@sxemacs.org> funky cycling completion
+;; Reworked to support cycling in both directions using dllists, plus
+;; other misc improvements by me. --SY.
+(defvar riece-me:completion-time 3
+  "Time in seconds before completion list is reset.")
+(defvar riece-me:*completion-timer* (make-itimer)
+  "Completion timer.")
+(defvar riece-me:*completion-list* nil
+  "Completion list.")
+
+(defvar sy-riece-nick-syntax-table
+  (let ((table (copy-syntax-table text-mode-syntax-table)))
+    (modify-syntax-entry ?~  "w " table)
+    (modify-syntax-entry ?`  "w " table)
+    (modify-syntax-entry ?-  "w " table)
+    (modify-syntax-entry ?_  "w " table)
+    (modify-syntax-entry ?+  "w " table)
+    (modify-syntax-entry ?{  "w " table)
+    (modify-syntax-entry ?[  "w " table)
+    (modify-syntax-entry ?}  "w " table)
+    (modify-syntax-entry ?]  "w " table)
+    (modify-syntax-entry ?\\ "w " table)
+    (modify-syntax-entry ?|  "w " table)
+    (modify-syntax-entry ?:  "w " table)
+    (modify-syntax-entry ?\; "w " table)
+    (modify-syntax-entry ?'  "w " table)
+    (modify-syntax-entry ?<  "w " table)
+    (modify-syntax-entry ?,  "w " table)
+    (modify-syntax-entry ?>  "w " table)
+    table)
+  "Syntax table used in funky nick cycling completion.")
+
+(defun sy-riece-init-completion-timer ()
+  "Initialise the completion timer."
+  (let ((timer riece-me:*completion-timer*))
+    (set-itimer-function timer #'(lambda ()
+                                   (setq riece-me:*completion-list* nil)))
+    (set-itimer-value timer riece-me:completion-time)))
+(add-hook 'riece-after-login-hook #'sy-riece-init-completion-timer)
+
+(defsubst sy-riece-cycle-list (list &optional reverse)
+  "Return a list of head of LIST, and LIST rotated 1 place forward.
+
+If optional argument, REVERSE is non-nil, rotate the list in the other
+direction."
+  (let ((list (apply #'dllist list))
+        name)
+    (if reverse
+        (dllist-rrotate list)
+      (dllist-lrotate list))
+    (setq name (dllist-car list))
+    (list name (dllist-to-list list))))
+
+(defsubst sy-riece-set-completion-timer ()
+  "(Re)set completion timer's value."
+  (let ((timer riece-me:*completion-timer*))
+    (and (itimerp timer)
+         (set-itimer-value timer riece-me:completion-time))))
+
+(defun sy-riece-complete-user-backwards ()
+  "Complete nick, cycling backwards.
+See `riece-me:command-complete-user'."
+  (interactive)
+  (riece-me:command-complete-user 'reverse))
+
+(defun sy-riece-command-mode-hooks ()
+  "Add some nice stuff in Riece's command buffer."
+  (when (eq major-mode 'riece-command-mode)
+    ;; Define a few keys here so they don't have the `C-c' prefix
+    (local-set-key [iso-left-tab] #'sy-riece-complete-user-backwards)
+    (local-set-key [(super next)] #'riece-command-user-list-scroll-up)
+    (local-set-key [(super prior)] #'riece-command-user-list-scroll-down)
+    (local-set-key [(hyper next)] #'riece-command-scroll-up)
+    (local-set-key [(hyper prior)] #'riece-command-scroll-down)
+    ;; Turn on flyspell mode if available
+    (and (featurep (and 'overlay 'flyspell))
+         (flyspell-mode 1))))
+
+(add-hook 'riece-command-mode-hook #'sy-riece-command-mode-hooks)
+
+
+(defun riece-me:command-complete-user (&optional reverse)
+  "Like `riece-command-complete-user' but restrict to current chan.
+
+This completion does not pop up any completion buffers, instead it
+cycles through the user names \"in-place\" with each successive TAB.
+
+With non-nil optional argument, REVERSE, the cycling goes in the other
+direction.
+
+If the completion is being inserted at column zero, \": \" is appended,
+otherwise \" \" is added. "
+  (interactive)
+  (unless riece-me:*completion-list*
+    (unless (itimer-live-p riece-me:*completion-timer*)
+      (sy-riece-set-completion-timer)
+      (activate-itimer riece-me:*completion-timer*))
+    (let* ((completion-ignore-case t)
+           (table (riece-with-server-buffer
+                      (riece-identity-server riece-current-channel)
+                    (riece-channel-get-users (riece-identity-prefix
+                                              riece-current-channel))))
+           (current (current-word))
+           (completion (try-completion current table))
+           (all (all-completions current table)))
+      (if (null completion)
+          (message "Can't find completion for \"%s\"" current)
+        (setq riece-me:*completion-list* all))))
+  (when riece-me:*completion-list*
+    (multiple-value-bind (completion newlist)
+        (sy-riece-cycle-list riece-me:*completion-list* reverse)
+      (setq riece-me:*completion-list* newlist)
+      (with-syntax-table sy-riece-nick-syntax-table
+        (unless (string= "" (current-word))
+          (backward-delete-word))
+        (insert completion)
+        (let ((nicksuffix " "))
+          (save-excursion
+            (backward-word)
+            (and (bolp)
+                 (setq nicksuffix ": ")))
+          (insert nicksuffix)))
+      (sy-riece-set-completion-timer))))
+
+(defalias 'riece-command-complete-user 'riece-me:command-complete-user)
+;;;
+
+(defun sy-riece-add-rem-biff-channel (&optional remove)
+  "Add the current channel to the list of channels for riece-biff.
+
+With optional prefix arg, REMOVE, remove the current channel from the
+biff list."
+  (interactive "P")
+  (if (or current-prefix-arg
+          remove)
+      ;; Remove chan.
+      (progn
+        (setq riece-biff-check-channels
+              (remove (riece-identity-prefix riece-current-channel)
+                      riece-biff-check-channels))
+        (message "Channel: %s removed from riece-biff channel list."
+                 (riece-identity-prefix riece-current-channel)))
+    ;; Add chan.
+    (add-to-list 'riece-biff-check-channels
+                 (riece-identity-prefix riece-current-channel))
+    (message "Channel: %s added to riece-biff channel list."
+             (riece-identity-prefix riece-current-channel))))
+
+(defun sy-riece-get-sxemacs-topic-version ()
+  "Return the \"version\" section of #sxemacs topic."
+  (let* ((topic (riece-with-server-buffer
+                    (riece-identity-server riece-current-channel)
+                  (riece-channel-get-topic "#sxemacs")))
+         (ver (third (split-string-by-char topic ?\ ))))
+    ver))
+
+(defun sy-riece-sxemacs-topic-version-update (&optional newver)
+  "*Updates the \"version\" section of #sxemacs topic with NEWVER.
+With a prefix arg, prompt for the new version string."
+  (interactive "P")
+  (let* ((oldver (sy-riece-get-sxemacs-topic-version))
+         (gitver (substring (shell-command-to-string
+                             "( cd ${SXEWD}; git describe master )")
+                            0 -1))
+         (newver (or (and current-prefix-arg
+                          (read-string "New Version: "
+                                       sxemacs-git-version nil
+                                       sxemacs-git-version))
+                     gitver))
+        (chan (riece-identity-prefix riece-current-channel)))
+    (unless (string= chan "#sxemacs")
+      (error 'invalid-argument "Wrong channel" chan))
+    (riece-command-send-message
+     (format ",topic change 1 s/%s/%s/" oldver newver) nil)))
+
+;; Define keys for those functions.
+(define-key riece-command-map (kbd "C-c C") #'sy-riece-clear-unread-chans)
+(define-key riece-command-map (kbd "C-c r")
+  #'sy-riece-relist-chans-clear-blanks)
+(define-key riece-command-map (kbd "C-c m") #'sy-riece-command-mute-user)
+(define-key riece-command-map (kbd "C-b") #'sy-riece-command-ban-user)
+(define-key riece-command-map (kbd "C-o") #'sy-riece-command-quick-op)
+(define-key riece-command-map (kbd "C-c n") #'sy-riece-say-now-playing)
+(define-key riece-command-map (kbd "C-c V") #'sy-riece-say-version)
+(define-key riece-command-map (kbd "C-c s") #'sy-riece-show-off)
+(define-key riece-command-map (kbd "C-c f") #'sy-riece-fuck-you)
+(define-key riece-command-map (kbd "C-c b") #'sy-riece-add-rem-biff-channel)
+(define-key riece-command-map (kbd "C-c ?") #'sy-riece-think)
+(define-key riece-command-map (kbd "C-c R") #'sy-riece-reverse)
+(define-key riece-command-map (kbd "C-c T") #'sy-riece-sxemacs-topic-version-update)
+(define-key riece-command-map (kbd "C-c U") #'sy-riece-sxe-uptime)
+(define-key riece-command-map [a] #'sy-riece-say-all-purpose)
+
+;; So I can start Riece in a new frame
+(defvar riece-frame nil
+  "Frame for Riece.")
+
+(defun sy-riece (&optional ask)
+  "Run Riece in a new frame.
+
+With non-nil optional prefix ASK Riece will prompt for a server to
+connect to."
+  (interactive "P")
+  (let ((riece-server (if current-prefix-arg
+                          nil
+                        "irc.sxemacs.org")))
+    (setq riece-frame (new-frame '((name . "RieceFrame")
+                                   (width . 110))))
+    (select-frame riece-frame)
+    (call-interactively 'riece)
+    (focus-frame riece-frame)))
+
+(defun sy-riece-exit-hook ()
+  (when (frame-live-p riece-frame)
+    (delete-frame riece-frame))
+  (setq riece-frame nil))
+
+(add-hook 'riece-exit-hook #'sy-riece-exit-hook)
+
+;; riece-startup-channel-list doesn't fit in with the way I do things
+;; and the way freenode functions.  It gets called too damned early.
+;; What follows is my attempt to make Riece behave better with logging
+;; into freenode, registering to nickserv, joining initial channels,
+;; and getting ops with chanserv.
+(defvar sy-riece-startup-channel-list
+  '("#sxemacs"
+    "#emchat"
+    "#xemacs"
+    "#emacs"
+    ;"#kde"
+    ;"#kde-devel"
+    "#LineageOS"
+    ;"#LineageOS-dev"
+    "#lxqt"
+    ;"#postgresql"
+    ;"#systemd"
+    "#zsh"
+    )
+  "List of channels to join after logging in and identifying to nickserv.")
+
+;; Set up channel coding systems
+;;
+;; This is a PITA... turn on utf and can't read iso-8859-1 special
+;; chars, turn it off and can't read utf.  Have I mentioned how much I
+;; hate this crap? --SY.
+(mapcar
+ #'(lambda (chan)
+     (if (string-match #r"#\(sxemacs\|emchat\)" chan)
+         (push (cons chan 'iso-8859-1) riece-channel-coding-system-alist)
+       (push (cons chan 'utf-8) riece-channel-coding-system-alist)))
+ sy-riece-startup-channel-list)
+
+(defun sy-riece-login ()
+  (progn
+    (riece-send-string (format "PRIVMSG NickServ :identify %s\r\n"
+                               (getenv "IRCPASSWD")))
+    (sleep-for 15))
+  (let ((channel-list sy-riece-startup-channel-list)
+        entry identity)
+    (while channel-list
+      (unless (listp (setq entry (car channel-list)))
+        (setq entry (list (car channel-list))))
+      (if (equal (riece-identity-server
+                  (setq identity (riece-parse-identity (car entry))))
+                 riece-server-name)
+          (riece-command-join-channel identity (nth 1 entry)))
+      (setq channel-list (cdr channel-list))))
+  (riece-send-string "PRIVMSG ChanServ :op #sxemacs\r\n")
+  (riece-send-string "PRIVMSG ChanServ :op #emchat\r\n")
+  (riece-send-string "PRIVMSG ChanServ :op #xemacs\r\n")
+  (riece-send-string
+   (format "PRIVMSG SXEbot :identify SteveYoungs %s\r\n"
+           (getenv "BOTPASSWD"))))
+
+(add-hook 'riece-after-login-hook #'sy-riece-login)
+
+;; Until I can find a solution to my hook problem (login hook not
+;; running to completion) I use this to finish the job
+(defun sy-riece-cleanup-login ()
+  (interactive)
+  (let ((metachans
+         #r".*\.freenode\.net\|\(Chan\|Nick\|Memo\|Seen\)Serv\|SXEbot\|freenode-connect"))
+    (mapcar
+     #'(lambda (chan-vect)
+         (mapcar
+          #'(lambda (chan)
+              (and (string-match metachans chan)
+                   (riece-part-channel chan-vect)))
+          chan-vect))
+     riece-current-channels)
+    (sy-riece-relist-chans-clear-blanks)
+    (riece-command-switch-to-channel-by-number 1)))
+
+;; CANNOT get this to work from the hook.  I suspect it is a
+;; networking/async/timing thing.  I have it bound to a key
+;; seq... `C-c C-c l', a PITA though.
+;(add-hook 'riece-after-login-hook #'sy-riece-cleanup-login 'append)
+(define-key riece-command-map (kbd "C-c l") 'sy-riece-cleanup-login)
+
+;; Automatically clear Riece Biff indicator by switching to the right
+;; window/frame
+(defun sy-riece-check-command-buffer ()
+  (and (get-buffer-window (or riece-command-buffer "*Command*"))
+       (riece-biff-clear)))
+
+(defadvice switch-to-buffer (after riece-update (&rest args) activate)
+  "After switching buffers, check to see if riece-biff should be cleared.
+The riece-biff modeline indicator will only be cleared if
+`riece-command-buffer' is visible in the selected frame."
+  (sy-riece-check-command-buffer))
+
+(add-hook 'select-frame-hook #'sy-riece-check-command-buffer)
+
+;; Easier switch to Riece when running on TTY.
+(defun sy-switch-to-riece ()
+  "I use this to switch to Riece when I'm on a tty."
+  (interactive)
+  (when (buffer-live-p riece-command-buffer)
+    (pop-to-buffer riece-command-buffer)
+    (riece-command-configure-windows)))
+
+(define-key global-tty-map [(control ?c) ?r] #'sy-switch-to-riece)
+
+;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+(message "Riece settings loaded successfully")
+
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:15:57 AEST 2020 + +
+ + + diff --git a/SYinits/17-emchat.html b/SYinits/17-emchat.html new file mode 100644 index 0000000..042fd59 --- /dev/null +++ b/SYinits/17-emchat.html @@ -0,0 +1,409 @@ + + + + + 17-emchat.el + + + + + + +
+;; 17-emchat.el --- EMchat Settings
+
+;; Copyright (C) 2007 - 2020 Steve Youngs
+
+;;     Author: Steve Youngs <steve@sxemacs.org>
+;; Maintainer: Steve Youngs <steve@sxemacs.org>
+;;    Created: <2007-12-02>
+;; Time-stamp: <Thursday Apr  9, 2020 19:14:30 steve>
+;;   Download: <https://downloads.sxemacs.org/SYinits>
+;;   HTMLised: <https://www.sxemacs.org/SYinits/17-emchat.html>
+;;   Git Repo: git clone https://git.sxemacs.org/syinit
+;;   Keywords: init, compile
+
+;; This file is part of SYinit
+
+;; Redistribution and use in source and binary forms, with or without
+;; modification, are permitted provided that the following conditions
+;; are met:
+;;
+;; 1. Redistributions of source code must retain the above copyright
+;;    notice, this list of conditions and the following disclaimer.
+;;
+;; 2. Redistributions in binary form must reproduce the above copyright
+;;    notice, this list of conditions and the following disclaimer in the
+;;    documentation and/or other materials provided with the distribution.
+;;
+;; 3. Neither the name of the author nor the names of any contributors
+;;    may be used to endorse or promote products derived from this
+;;    software without specific prior written permission.
+;;
+;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
+;; IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;; DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+;;; Commentary:
+;;
+;;   My EMchat settings.
+;;
+;;   [2020-02-12] Sadly, everything here is deprecated and non-working.  A
+;;   while back the ICQ people stopped using the OSCAR protocol and disallow
+;;   ALL 3rd-party clients. On top of that, ICQ is 100% owned and operated
+;;   by the Russian govt.  You probably shouldn't even use the official
+;;   client as they routinely hand over your chat logs and details to
+;;   their Russian minders.  I wish I was joking. --SY.
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;;; Todo:
+;;
+;;     
+
+;;; Code:  Entire file commented, see above
+;:*=======================
+;:* emchat settings
+;; (setq emchat-directory
+;;       (file-name-as-directory
+;;        (expand-file-name "emchat" user-init-directory)))
+;; (load "emchat")
+
+;; ;;; Experimental stuff
+;; ;; EMchat works great in a tty, but some settings I use are best
+;; ;; suited for X, so this just turns them off.
+;; (defun tty-im-setup ()
+;;   "Set some things so I can use EMchat/Riece in tty."
+;;   (interactive)
+;;   (setq emchat-status-use-gutter nil
+;;      emchat-start-in-new-frame nil
+;;      emchat-wharf-frame-use-p nil))
+;; ;;; 
+
+;; (when (device-on-window-system-p)
+;;   (setq emchat-status-use-gutter t
+;;      emchat-start-in-new-frame t))
+
+;; (setq
+;;  emchat-doctor-enabled-flag t
+;;  emchat-emphasis-enabled-flag t
+;;  emchat-history-enabled-flag t
+;;  emchat-log-fill-column 72
+;;  emchat-port 5190
+;;  emchat-server "login.icq.com"
+;;  emchat-smiley t
+;;  emchat-track-enable t
+;;  emchat-track-indicator-type 'char
+;;  emchat-user-alias "JackaLX"
+;;  emchat-user-password (getenv "ICQPASSWD")
+;;  emchat-user-meta-nickname "JackaLX"
+;;  emchat-user-meta-firstname "Steve"
+;;  emchat-user-meta-lastname "Youngs"
+;;  emchat-user-meta-primary-email "steve@sxemacs.org"
+;;  emchat-user-meta-secondary-email "steve@steveyoungs.com"
+;;  emchat-user-meta-city "Brisbane"
+;;  emchat-user-meta-state "DOA"
+;;  emchat-user-meta-hide-ip t
+;;  emchat-user-meta-authorization t
+;;  emchat-user-meta-about 
+;;  "EMchat Maintainer.\n
+;;  If you'd like to help out with the EMchat project,
+;;  please send me a message.  Or go to:
+;;     <http://www.emchat.org/>\n
+;;  SXEmacs - It's not just an editor.
+;;           It's a way of life!
+;;     <http://www.sxemacs.org/>"
+;;  emchat-user-meta-homepage "http://www.sxemacs.org/"
+;;  emchat-user-meta-sex 'male
+;;  emchat-user-meta-language-1 12
+;;  emchat-user-meta-language-2 12
+;;  emchat-user-meta-language-3 12
+;;  emchat-user-meta-web-aware t
+;;  emchat-user-initial-status "online"
+;;  emchat-user-meta-age 38
+;;  emchat-user-meta-birth-day 19
+;;  emchat-user-meta-birth-month 6
+;;  emchat-user-meta-birth-year 66
+;;  emchat-user-meta-cell-phone "6666 6666"
+;;  emchat-user-meta-country 61
+;;  emchat-user-meta-fax "7777 7777"
+;;  emchat-user-meta-phone "8888 8888"
+;;  emchat-user-meta-street "1 Linux Lane"
+;;  emchat-user-meta-work-homepage "http://www.sxemacs.org/"
+;;  emchat-user-meta-work-address "What me, work?"
+;;  emchat-user-meta-work-city "Penguinville"
+;;  emchat-user-meta-work-company "SlackBiz"
+;;  emchat-user-meta-work-department "Slackers"
+;;  emchat-user-meta-work-fax "9999 9999"
+;;  emchat-user-meta-work-phone "5555 5555"
+;;  emchat-user-meta-work-position "Seated"
+;;  emchat-user-meta-work-state "DOA"
+;;  emchat-user-meta-zipcode "9999"
+;;  emchat-buddy-view 'emchat-all-aliases
+;;  emchat-use-sound-flag nil
+;;  emchat-save-log-on-exit-p nil
+;;  emchat-log-debug-flag t
+;;  emchat-user-meta-invisible nil
+;;  emchat-buddy-show-avatar t
+;;  emchat-buddy-xface-foreground "black"
+;;  emchat-buddy-xface-background "red")
+
+;; ;; PulseAudio only seems to work if X is running
+;; (when (getenv "DISPLAY")
+;;   (setq  emchat-use-sound-flag t))
+
+;; ;; Lets not auto-away.
+;; (customize-set-variable 'emchat-auto-away-timeout 0)
+
+;; (emchat-world-update)
+
+;; (when emchat-use-sound-flag
+;;   (setq emchat-audio-device
+;;      ;(make-audio-device 'alsa))
+;;      (make-audio-device 'pulse
+;;                         :client "SXEmacs::EMchat"
+;;                         :stream "EMchat::Stream"
+;;                         :role "phone"))
+;;   ;; SXEmacs doesn't like current ffmpeg, and SoX is dodgy ATM too
+;;   (setq emchat-media-driver 'sndfile)
+;;   (setq default-media-stream-volume 50)
+;;   (setq emchat-sound-alist
+;;      '((auth-sound . "Auth.wav")
+;;        (buddy-sound . "Online.wav")
+;;        (chat-sound . "Chat.wav")
+;;        (emailx-sound . "System.wav")
+;;        (message-sound . "Message.wav")
+;;        (pager-sound . "System.wav")
+;;        (system-sound . "System.wav")
+;;        (url-sound . "URL.wav"))))
+
+
+;; ;:*=======================
+;; ;:* Addons/extensions
+
+;; (defun sy-emchat-now-playing ()
+;;   "Return title/artist of current song."
+;;   (interactive)
+;;   (format "NP: %s" (mpd-now-playing)))
+
+;; (defun sy-emchat-send-now-playing ()
+;;   "Send title/artist of current song."
+;;   (interactive)
+;;   (let ((song (sy-emchat-now-playing))
+;;      (alias (emchat-alias-around)))
+;;     (emchat-send-message song alias)))
+
+;; (defun sy-emchat-yow ()
+;;   "When you can't think of what to say..."
+;;   (interactive)
+;;   (let ((message (yow))
+;;      (alias (emchat-alias-around)))
+;;     (emchat-send-message message alias)))
+
+
+;; (require 'emchat-menu)
+;; (define-key emchat-log-mode-map (kbd "C-c p") #'sy-emchat-send-now-playing)
+;; (define-key emchat-log-mode-map (kbd "C-c y") #'sy-emchat-yow)
+
+;; ;:*=======================
+;; ;:* Hooks
+;; (eval-when-compile
+;;   (defvar alias)
+;;   (defvar message))
+
+;; ;;(defun sy-emchat-temp (&optional fahrenheit)
+;; ;;  "Returns a string to send to a ICQ user saying the current temp.
+
+;; ;;With optional arg, FAHRENHEIT, don't send the temp in celsius."
+;; ;;  (if fahrenheit
+;; ;;      (let ((xwem-weather-temperature-format 'fahrenheit))
+;; ;;   (format "The current temperature here is: %s°F"
+;; ;;           (substring (xwem-weather-get-temp) 0 -2)))
+;; ;;    (let ((xwem-weather-temperature-format 'celsius))
+;; ;;      (format "The current temperature here is: %s°C"
+;; ;;         (substring (xwem-weather-get-temp) 0 -2)))))
+
+;; (defconst sy-beer-love
+;;   ["when you realise, 24 beers in a case, 24 hours in a day.  Coincidence?"
+;;    "when you wake up with `CRS'... Can't Remember Shit."
+;;    "when, to you, it's not a six-pack, it's a support group."
+;;    "when it is the reason you get up every afternoon."
+;;    "when you favour the 2 party system... party on Friday, party on Saturday."
+;;    "when getting f#@ked up is your hobby."]
+;;   "Proof you love beer.")
+
+;; (defun sy-emchat-beer-love ()
+;;   (let ((prefix "You know you love beer... ")
+;;      (love (aref sy-beer-love
+;;                  (% (+ (% (random t) 1000) 1000)
+;;                     (length sy-beer-love)))))
+;;     (concat prefix love)))
+
+;; (defun sy-emchat-incoming-msg-hook ()
+;;   (when (or (member alias emchat-visible-contacts)
+;;          (not (member alias emchat-invisible-contacts)))
+;;     (let ((repo "The main EMchat git repo is:
+;; git clone https://git.emchat.org/emchat")
+;;        (download "EMchat source tarballs and (S)XEmacs pkg tarballs
+;; can be downloaded from:  Offline ATM, sorry")
+;;        (latest (shell-command-to-string
+;;                 "cd ~/programming/EMchat/emchat && git describe"))
+;;        (lastlog (shell-command-to-string
+;;                  "cd ~/programming/EMchat/emchat && git log -1"))
+;;        (time (format-time-string "The local time here is: %c"))
+;;        (beer (sy-emchat-beer-love))
+;;        (song (sy-emchat-now-playing))
+;;        (help "Cmds are prefixed with `,,' (ie, ,,cmd).  Only the first
+;; valid cmd in a msg is accepted.  The cmd can appear anywhere in
+;; the msg.
+
+;; Accepted cmds: version, latest, lastlog, emchat-repo, download, yow,
+;; time, beer, song, help."))
+;;       (cond ((string-match ",,version" message)
+;;           (emchat-send-message-helper
+;;            (format "I am using %s" (emchat-version)) (list alias)
+;;            'automatic "Version sent"))
+;;          ((string-match ",,latest" message)
+;;           (emchat-send-message-helper latest (list alias) 'automatic "Latest sent"))
+;;          ((string-match ",,lastlog" message)
+;;           (emchat-send-message-helper lastlog (list alias) 'automatic "Lastlog sent"))
+;;          ((string-match ",,emchat-repo" message)
+;;           (emchat-send-message-helper repo (list alias) 'automatic "Repo sent"))
+;;          ((string-match ",,download" message)
+;;           (emchat-send-message-helper download (list alias) 'automatic "Download sent"))
+;;          ((string-match ",,yow" message)
+;;           (emchat-send-message-helper (format "%s" (yow)) (list alias)
+;;                                     'automatic "Yow sent"))
+;;          ((string-match ",,time" message)
+;;           (emchat-send-message-helper time (list alias) 'automatic "Time sent"))
+;;                                      ;((string-match ",,temp-f" message)
+;;                                      ; (emchat-send-message (sy-emchat-temp 'fahrenheit) alias))
+;;                                      ;((string-match ",,temp" message)
+;;                                      ; (emchat-send-message (sy-emchat-temp) alias))
+;;          ((string-match ",,beer" message)
+;;           (emchat-send-message-helper beer (list alias) 'automatic "Beer sent"))
+;;          ((string-match ",,song" message)
+;;           (emchat-send-message-helper song (list alias) 'automatic "Song sent"))
+;;          ((string-match ",,help" message)
+;;           (emchat-send-message-helper help (list alias) 'automatic "Help sent"))))))
+
+;; (add-hook 'emchat-new-message-hook #'sy-emchat-incoming-msg-hook)
+
+;; (defun sy-emchat-zero-wharf ()
+;;   "Helper func to zero wharf counters."
+;;   (interactive)
+;;   (emchat-wharf-change-messages "New" -9999)
+;;   (emchat-wharf-change-messages "Sys" -9999))
+
+;; ;; Use the Wharf if not using XWEM
+;; (unless (or (string= "notyet" (getenv "XWEM_RUNNING"))
+;;          (string= "yes" (getenv "XWEM_RUNNING"))
+;;          (not (device-on-window-system-p)))
+;;   (require 'emchat-wharf)
+;;   (setq emchat-wharf-frame-use-p t)
+;;   (setq emchat-wharf-notice-riece-flag t)
+;;   (push (cons 'left 1690) emchat-wharf-frame-props)
+;;   (push (cons 'top 5) emchat-wharf-frame-props)
+;;   (push (cons 'internal-border-width 4) emchat-wharf-frame-props)
+;;   ;; `override-redirect' means no WM decorations, and you also get
+;;   ;; sticky and always on top and skip pagers and task lists etc.
+;;   ;; The downside is that often new windows will appear underneath
+;;   ;; because the WM/DE has no knowledge of its existence.  I don't
+;;   ;; use this in KDE because you can easily get the same effect
+;;   ;; without the downside with KDE's "Window Rules".  I also don't
+;;   ;; use this in Sawfish for similar reasons.
+;;   (unless (or (string= (getenv "KDE_FULL_SESSION") "true")
+;;            (string= (getenv "SAWFISH_IS_RUNNING") "true"))
+;;     (push (cons 'override-redirect t) emchat-wharf-frame-props))
+;;   (push (cons 'border-width 1) emchat-wharf-frame-props)
+;;   (push (cons 'border-color "red") emchat-wharf-frame-props)
+;;   (add-hook 'emchat-new-message-hook #'emchat-wharf-inc-messages)
+;;   (add-hook 'emchat-system-message-hook #'emchat-wharf-inc-system)
+;;   (add-hook 'emchat-read-message-hook #'emchat-wharf-dec-messages)
+;;   (add-hook 'riece-biff-activity-hook #'emchat-wharf-riece-active)
+;;   (add-hook 'riece-biff-clear-hook #'emchat-wharf-riece-inactive)
+;;   (add-hook 'emchat-track-clear-hook #'sy-emchat-zero-wharf)
+;;   (define-key emchat-log-mode-map [?C] #'sy-emchat-zero-wharf))
+
+;; ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*
+;; (message "EMchat settings loaded")
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:16:13 AEST 2020 + +
+ + + diff --git a/SYinits/index.html b/SYinits/index.html new file mode 100755 index 0000000..b29cef7 --- /dev/null +++ b/SYinits/index.html @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/SYinits/init-el.html b/SYinits/init-el.html new file mode 100644 index 0000000..19b9652 --- /dev/null +++ b/SYinits/init-el.html @@ -0,0 +1,172 @@ + + + + + init-el + + + + + + +
+;; init.el --- My TopLevel SXEmacs init file.   -*- mode: emacs-lisp -*-
+;;
+;;; Personal SXEmacs configuration of Steve Youngs <steve@sxemacs.org>
+;;
+;; Download this init.el source here.
+
+;; This is my `user-init-file' (~/.config/sxemacs/init.el).  I like a
+;; "modular" approach to things, so all this file does is load the
+;; various other init files.  This is done via SXEmacs' new SysV
+;; style rc.d mechanism: lisp-initd.el
+;;
+
+;:*=======================
+;:* W A R N I N G --- D A N G E R (thar be dragons!)
+;;
+;;   I have absolutely no problem or issues with anyone stealing
+;;   any (or all) of these configs.  But please understand that it
+;;   most likely WILL NOT run "out of the box" for you.  This is my
+;;   personal config and it is not meant to be a "one size fits
+;;   all" or a "newbie fast-track" type of setup.
+;;
+;;   In fact, if you are a newbie I would strongly suggest that you
+;;   don't put any of this stuff into your own setup until you
+;;   understand what it does.  Just keep it somewhere away from your
+;;   SXEmacs' load-path and gradually incorporate things as you get
+;;   to know what it all does.
+;;
+;;   I'm happy to help you out with your config and/or answer questions
+;;   about this one.  Email me at <steve@sxemacs.org>
+;;
+
+;;; Credits:
+;;
+;;   The HTML version of this file was created with Hrvoje Niksic's
+;;   htmlize.el which is part of the XEmacs "text-modes" package.
+;;
+
+;; For debugging...
+;(setq debug-on-error t)
+;(setq debug-on-signal t)
+;(setq stack-trace-on-signal t)
+
+
+;:*=======================
+;:* On with the show!
+(save-window-excursion
+  (lisp-initd-compile-and-load))
+
+;; Having this in one of my inits in ~/.config/sxemacs/init.d causes
+;; lisp-initd.el to NOT be able to byte-compile init.d.el
+(add-hook 'emacs-lisp-mode-hook #'turn-on-howm-mode)
+
+;; I'm toying with the idea of trying to get XWEM running again.  This
+;; won't run until I explicitly set XWEM_RUNNING to "notyet" in my
+;; ~/.xinitrc, so quite safe to leave this here until I'm ready for
+;; it.
+(when (and (string= "notyet" (getenv "XWEM_RUNNING"))
+           (device-on-window-system-p))
+  (require 'xwem-load)
+  (xwem-init)
+  (setenv "XWEM_RUNNING" "yes"))
+
+;:*=======================
+;:* Links to the rest of my config
+;;
+;;   The descriptions are hyperlinks to the HTML versions of the init
+;;   files for easy viewing online.  And the filenames are hyperlinks
+;;   to the source init files themselves.
+;;
+;; 
+
+
+; Pre-Loads for byte-compiling the init files: 00-build.el
+; Misc Variables: 01-vars.el
+; Key bindings: 02-keys.el
+; C-mode Settings: 03-c-mode.el
+; Emacs/W3 Settings: 04-w3.el
+; LaTeX Settings: 05-latex.el
+; HTML (coding) Settings: 07-html.el
+; Sound Settings: 08-sounds.el
+; Toolbar Settings: 09-toolbar.el
+; Lots of XE packages Settings: 10-pkgs.el
+; Calendar/Diary Settings: 11-cal.el
+; Misc Stuff: 12-misc.el
+; BBDB Settings: 13-bbdb.el
+; Pretty Colours: 14-fonts.el
+; Mail citing: 15-supercite.el
+; Riece (IRC) Settings: 16-riece.el
+; EMchat Settings: 17-emchat.el
+
+ +
+ + Created with SXEmacs + + + + + Valid XHTML 1.0 Transitional! + +
+ + +
Copyright © 2020 Steve Youngs
+ Verbatim copying and distribution is permitted in any medium, + providing this notice is preserved.
+ +Last modified: Wed Apr 15 18:16:31 AEST 2020 + +
+ + +