summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-02-02 16:09:54 +0000
committerjao <jao@gnu.org>2021-02-02 16:09:54 +0000
commit133fc14bdce86178356ab8ec73cacaf33c64811c (patch)
tree6fb071507184893f057c41f512c59c7cdf6f136e
parent1201c387a5473a6f98d4ae936fbddad834c179a0 (diff)
downloadelibs-133fc14bdce86178356ab8ec73cacaf33c64811c.tar.gz
elibs-133fc14bdce86178356ab8ec73cacaf33c64811c.tar.bz2
more clean-ups
-rw-r--r--init.org241
1 files changed, 114 insertions, 127 deletions
diff --git a/init.org b/init.org
index 9d7b2c3..4e77933 100644
--- a/init.org
+++ b/init.org
@@ -62,80 +62,58 @@
`(jao-syscase ((gnu/linux ,@body))))
#+end_src
-*** Paths (load, info, exec)
-***** Paths
- #+begin_src emacs-lisp
- (defvar jao-local-lisp-dir "~/lib/elisp"
- "Directory for external elisp libraries and repos")
+*** Paths
+ #+begin_src emacs-lisp
+ (defvar jao-local-lisp-dir "~/lib/elisp"
+ "Directory for external elisp libraries and repos")
- (defvar jao-data-dir (expand-file-name "data" jao-emacs-dir)
- "Directory containing static data, such as images.")
+ (defvar jao-data-dir (expand-file-name "data" jao-emacs-dir)
+ "Directory containing static data, such as images.")
- (defun jao-data-file (file) (expand-file-name file jao-data-dir))
+ (defun jao-data-file (file) (expand-file-name file jao-data-dir))
- (defvar jao-org-dir (expand-file-name "~/org"))
+ (defvar jao-org-dir (expand-file-name "~/org"))
- (defvar jao-sink-dir
- (file-name-as-directory (expand-file-name "~/doc/sink"))
- "Directory used for downloads and such.")
+ (defvar jao-sink-dir
+ (file-name-as-directory (expand-file-name "~/doc/sink"))
+ "Directory used for downloads and such.")
- (defvar jao-site-dir (expand-file-name "site" jao-emacs-dir))
- (defun jao-site-el (basename)
- (expand-file-name (concat basename ".el") jao-site-dir))
+ (defvar jao-site-dir (expand-file-name "site" jao-emacs-dir))
+ (defun jao-site-el (basename)
+ (expand-file-name (concat basename ".el") jao-site-dir))
- (defun jao-load-site-el (basename)
- (let ((lf (jao-site-el basename)))
- (if (file-exists-p lf)
- (load lf)
- (message "Attempted to load non existing %s" lf))))
+ (defun jao-load-site-el (basename)
+ (let ((lf (jao-site-el basename)))
+ (if (file-exists-p lf)
+ (load lf)
+ (message "Attempted to load non existing %s" lf))))
- (defun jao-load-org (file)
- (let ((file (format "%s.org" (file-name-sans-extension file))))
- (literate-elisp-load-file (expand-file-name file jao-emacs-dir))))
- #+end_src
-***** Extending paths
- #+begin_src emacs-lisp
- (defun jao-exec-path (file)
- (let ((fn (expand-file-name file)))
- (add-to-list 'exec-path fn nil)
- (setenv "PATH" (concat fn ":" (getenv "PATH")))))
-
- (defun jao-load-path (subdir)
- "Add to load path a subdir of `jao-local-lisp-dir'"
- (let ((path (expand-file-name subdir jao-local-lisp-dir)))
- (when (file-directory-p path) (add-to-list 'load-path path))))
- #+end_src
-***** Load path initialisation
- #+begin_src emacs-lisp
- (add-to-list 'load-path jao-local-lisp-dir)
- (let ((libd (expand-file-name "lib" jao-emacs-dir)))
- (add-to-list 'load-path libd)
- (dolist (f (directory-files libd t "^[^.]+$"))
- (when (file-directory-p f) (add-to-list 'load-path f))))
- #+end_src
-***** Info paths
- #+begin_src emacs-lisp
- (defvar jao-info-dir
- (expand-file-name (jao-d-l "~/.emacs.d/info" "~/doc/info")))
- (require 'info)
- (add-to-list 'Info-directory-list jao-info-dir)
- #+end_src
-*** Preamble (pre.el)
- Private variables defined in pre.el
- #+begin_src emacs-lisp
- (defvar jao-mails "")
- (defvar jao-mails-regexp)
+ (defun jao-load-org (file)
+ (let ((file (format "%s.org" (file-name-sans-extension file))))
+ (literate-elisp-load-file (expand-file-name file jao-emacs-dir))))
- (defvar jao-irc-channels '())
+ (defun jao-exec-path (file)
+ (let ((fn (expand-file-name file)))
+ (add-to-list 'exec-path fn nil)
+ (setenv "PATH" (concat fn ":" (getenv "PATH")))))
- (defvar jao-slack-client-id)
- (defvar jao-slack-token)
+ (defun jao-load-path (subdir)
+ "Add to load path a subdir of `jao-local-lisp-dir'"
+ (let ((path (expand-file-name subdir jao-local-lisp-dir)))
+ (when (file-directory-p path) (add-to-list 'load-path path))))
#+end_src
-
- Loading pre.el
+*** Load and info path initialisation
#+begin_src emacs-lisp
- (jao-load-site-el "pre")
- (setq jao-mails-regexp (regexp-opt jao-mails))
+ (add-to-list 'load-path jao-local-lisp-dir)
+ (let ((libd (expand-file-name "lib" jao-emacs-dir)))
+ (add-to-list 'load-path libd)
+ (dolist (f (directory-files libd t "^[^.]+$"))
+ (when (file-directory-p f) (add-to-list 'load-path f))))
+
+ (defvar jao-info-dir
+ (expand-file-name (jao-d-l "~/.emacs.d/info" "~/doc/info")))
+ (require 'info)
+ (add-to-list 'Info-directory-list jao-info-dir)
#+end_src
*** Custom location of custom.el and co.
#+begin_src emacs-lisp
@@ -144,10 +122,10 @@
(setq custom-unlispify-tag-names nil)
(setq custom-buffer-done-kill t)
#+end_src
-*** Bookmarks
- #+BEGIN_SRC emacs-lisp
- (setq bookmark-default-file "~/.emacs.d/emacs.bmk")
- #+END_SRC
+*** Preamble (pre.el)
+ #+begin_src emacs-lisp
+ (jao-load-site-el "pre")
+ #+end_src
*** Session and history
#+BEGIN_SRC emacs-lisp
(setq backup-directory-alist (quote (("." . "~/.emacs.d/backups"))))
@@ -503,6 +481,10 @@
echo-keystrokes 2)
#+end_src
+*** Bookmarks
+ #+BEGIN_SRC emacs-lisp
+ (setq bookmark-default-file "~/.emacs.d/emacs.bmk")
+ #+END_SRC
*** Helpful
#+begin_src emacs-lisp
(use-package helpful
@@ -1682,6 +1664,10 @@
*** message mode
***** Customization
#+begin_src emacs-lisp
+ (defvar jao-mails "")
+ (defvar jao-mails-regexp)
+ (setq jao-mails-regexp (regexp-opt jao-mails))
+
(require 'message)
(setq message-send-mail-function 'message-send-mail-with-sendmail
message-sendmail-envelope-from 'header
@@ -3750,66 +3736,67 @@
* Chats
*** Circe
***** General configuration
- #+begin_src emacs-lisp
- (use-package circe
- :ensure t
- :bind (:map circe-channel-mode-map
- (("C-c C-a" . lui-track-jump-to-indicator)))
- :init
- (setq circe-default-realname "https://jao.io"
- circe-default-part-message ""
- circe-default-quit-message ""
- circe-ignore-list nil
- circe-server-coding-system '(undecided . undecided)
- circe-server-killed-confirmation 'ask-and-kill-all
- circe-server-auto-join-default-type :after-auth
- circe-format-say "({nick}) {body}"
- circe-format-self-say "(jao) {body}"
- circe-new-buffer-behavior 'ignore
- circe-new-buffer-behavior-ignore-auto-joins t
- circe-nickserv-ghost-style 'after-auth
- circe-prompt-string ": "
- circe-completion-suffix ", "
- circe-reduce-lurker-spam t
-
- circe-nick-next-function
- (lambda (old)
- (replace-regexp-in-string "-" "`" (circe-nick-next old)))
-
- circe-lagmon-mode-line-format-string "" ;; "%.0f "
- circe-lagmon-mode-line-unknown-lag-string "" ;; "? "
- circe-lagmon-timer-tick 120
- circe-lagmon-reconnect-interval 180
-
- lui-max-buffer-size 30000
- lui-fill-column 80
- lui-time-stamp-position 'right
- lui-time-stamp-format "%H:%M"
- lui-flyspell-p nil
-
- lui-track-indicator 'fringe
- lui-track-behavior 'before-tracking-next-buffer)
- :config
- (setq circe-network-options
- (let ((up (jao--get-user/password "freenode"))
- (bup (jao--get-user/password "bitlbee")))
- `(("Freenode" :nick ,(car up) :channels ,jao-irc-channels
- :tls t :sasl-username ,(car up) :sasl-password ,(cadr up))
- ("Bitlbee"
- :host "127.0.0.1" :nick ,(car bup)
- :channels ,jao-bitlbee-channels
- :lagmon-disabled t
- :nickserv-password ,(cadr bup) :user ,(car bup)))))
-
- (jao-shorten-modes 'circe-channel-mode
- 'circe-server-mode
- 'circe-query-mode)
-
- (circe-lagmon-mode)
- (enable-circe-color-nicks)
- (enable-circe-display-images)
- (enable-lui-track))
- #+end_src
+ #+begin_src emacs-lisp
+ (defvar jao-irc-channels '())
+ (use-package circe
+ :ensure t
+ :bind (:map circe-channel-mode-map
+ (("C-c C-a" . lui-track-jump-to-indicator)))
+ :init
+ (setq circe-default-realname "https://jao.io"
+ circe-default-part-message ""
+ circe-default-quit-message ""
+ circe-ignore-list nil
+ circe-server-coding-system '(undecided . undecided)
+ circe-server-killed-confirmation 'ask-and-kill-all
+ circe-server-auto-join-default-type :after-auth
+ circe-format-say "({nick}) {body}"
+ circe-format-self-say "(jao) {body}"
+ circe-new-buffer-behavior 'ignore
+ circe-new-buffer-behavior-ignore-auto-joins t
+ circe-nickserv-ghost-style 'after-auth
+ circe-prompt-string ": "
+ circe-completion-suffix ", "
+ circe-reduce-lurker-spam t
+
+ circe-nick-next-function
+ (lambda (old)
+ (replace-regexp-in-string "-" "`" (circe-nick-next old)))
+
+ circe-lagmon-mode-line-format-string "" ;; "%.0f "
+ circe-lagmon-mode-line-unknown-lag-string "" ;; "? "
+ circe-lagmon-timer-tick 120
+ circe-lagmon-reconnect-interval 180
+
+ lui-max-buffer-size 30000
+ lui-fill-column 80
+ lui-time-stamp-position 'right
+ lui-time-stamp-format "%H:%M"
+ lui-flyspell-p nil
+
+ lui-track-indicator 'fringe
+ lui-track-behavior 'before-tracking-next-buffer)
+ :config
+ (setq circe-network-options
+ (let ((up (jao--get-user/password "freenode"))
+ (bup (jao--get-user/password "bitlbee")))
+ `(("Freenode" :nick ,(car up) :channels ,jao-irc-channels
+ :tls t :sasl-username ,(car up) :sasl-password ,(cadr up))
+ ("Bitlbee"
+ :host "127.0.0.1" :nick ,(car bup)
+ :channels ,jao-bitlbee-channels
+ :lagmon-disabled t
+ :nickserv-password ,(cadr bup) :user ,(car bup)))))
+
+ (jao-shorten-modes 'circe-channel-mode
+ 'circe-server-mode
+ 'circe-query-mode)
+
+ (circe-lagmon-mode)
+ (enable-circe-color-nicks)
+ (enable-circe-display-images)
+ (enable-lui-track))
+ #+end_src
***** Commands (recover &co.)
#+begin_src emacs-lisp
(with-eval-after-load "circe"