From a5ed9c62c51d69e3532af39bb8cd2b15023fd817 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 5 May 2019 15:56:38 +0200 Subject: [PATCH] Added edit-server, use conf-mode for /etc/conf.d/. --- init.el | 32 +++++++++++++++++++++++++------- server/server | 2 +- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/init.el b/init.el index 3cb3162..25031bb 100644 --- a/init.el +++ b/init.el @@ -1,5 +1,5 @@ ;;; init.el --- tastytea's Emacs init file. -;; Time-stamp: <2019-05-02T18:29:43+00:00> +;; Time-stamp: <2019-05-05T13:51:28+00:00> ;;; Commentary: ;; I am using this file with Emacs 26, but most of it will probably work with @@ -632,10 +632,10 @@ With argument, do this that many times." (whitespace-space ((nil :foreground "gray18")))) ;; Spell checking. -(if (or (executable-find "aspell") - (executable-find "hunspell") - (executable-find "ispell")) - (unless slow-computer +(unless slow-computer + (if (or (executable-find "aspell") + (executable-find "hunspell") + (executable-find "ispell")) (use-package flyspell :custom (ispell-dictionary "english") @@ -751,6 +751,11 @@ With argument, do this that many times." :hook (find-file . auto-insert)) +;; Use conf-mode for openrc config files. +(use-package conf-mode + :mode + ("\\`/etc/conf.d/" . conf-mode)) + ;;;;;;;;;;;;;;;;;;;; LaTeX ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if (executable-find "xetex") (use-package tex-site @@ -871,6 +876,8 @@ With argument, do this that many times." :hook (yaml-mode . my/set-fill-column-80)) +(use-package mediawiki) + ;;;;;;;;;;;;;;;;;;;; Server / Remote editing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Edit remote files. (unless slow-computer @@ -906,8 +913,19 @@ With argument, do this that many times." "phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh") :config (if (not (eq (server-running-p) t)) ; Run server if not t. - (server-start)) - ))) + (server-start))) + + ;; Server for Firefox-extension that allows to use Emacs to edit textareas. + ;; https://addons.mozilla.org/de/firefox/addon/edit-with-emacs1/ + (use-package edit-server + :config + (edit-server-start) + :custom + (edit-server-url-major-mode-alist + '(("\\`likeable\\.space" . markdown-mode) + ("\\`wiki\\.gentoo\\.org" . mediawiki-mode) + ))) + )) ;; Set garbage collection threshold to original value. (setq gc-cons-threshold (car (get 'gc-cons-threshold 'standard-value))) diff --git a/server/server b/server/server index bb9b730..941ebfc 100644 --- a/server/server +++ b/server/server @@ -1,2 +1,2 @@ -127.0.0.1:51313 17176 +127.0.0.1:51313 26773 phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh \ No newline at end of file