From 6e8f41fe3b5902194641eee0dacd3816f0765ec8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:34:07 -0500 Subject: bash emacs integration: if DISPLAY=nil, unset it --- .config/bash/rc.d/emacs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/bash/rc.d/emacs.sh b/.config/bash/rc.d/emacs.sh index 12fa9ad..c254ec7 100644 --- a/.config/bash/rc.d/emacs.sh +++ b/.config/bash/rc.d/emacs.sh @@ -85,6 +85,7 @@ if [[ $TERM == eterm* ]]; then # Set the shell's X11 display (emacs -> shell) _emacs_set_shell_DISPLAY() { export DISPLAY=$(_emacs_unquote "$(_emacs_run "(cdr (assoc 'display (frame-parameters)))")") + [[ $DISPLAY != nil ]] || unset DISPLAY } ## Do those things ##################################################### -- cgit v1.2.3-54-g00ecf From 1bf3ec9c7bd181eb279aad981de2d1376c7298c9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:35:25 -0500 Subject: emacs: I like graphviz-dot-mode --- .config/emacs/init.el | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 4bce12a..d879d5d 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -117,6 +117,7 @@ page-break-lines ; Major modes apel flim semi wanderlust + graphviz-dot-mode markdown-mode nginx-mode ;nxhtml ; nxhtml is invasive, only enable if actively using -- cgit v1.2.3-54-g00ecf From 1d696096996928bcc29c0c710797413c58ca5d8e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:35:55 -0500 Subject: emacs: switch to the new advice system --- .config/emacs/init.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index d879d5d..e25961e 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -129,8 +129,11 @@ (when (fboundp 'tool-bar-mode) (tool-bar-mode -1)) -(defadvice align-regexp (around lukeshu-align-with-spaces) - (let ((indent-tabs-mode nil)) ad-do-it)) +(defun align-regexp--use-spaces (orig-fun &rest args) + "Use spaces for alignment" + (let ((indent-tabs-mode nil)) + (apply orig-fun args))) +(advice-add 'align-regexp :around #'align-regexp--use-spaces) (require 'go-mode-load nil t) -- cgit v1.2.3-54-g00ecf From ffc992122569fd3202cead69f72a57e701853821 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:36:30 -0500 Subject: emacs: work around a bug in sh-mode --- .config/emacs/init.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/emacs/init.el b/.config/emacs/init.el index e25961e..4379085 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -135,6 +135,14 @@ (apply orig-fun args))) (advice-add 'align-regexp :around #'align-regexp--use-spaces) +(defun sh-smie-sh-rules--fix (args) + "Replace :after \"then\" with :after \"if\" because Emacs 24 +sh-script.el is broken." + (if (equal args (list :after "then")) + (list :after "if") + args)) +(advice-add 'sh-smie-sh-rules :filter-args #'sh-smie-sh-rules--fix) + (require 'go-mode-load nil t) -- cgit v1.2.3-54-g00ecf From 3fed229c02272767ad4b925afcbf73f43be0afbe Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:41:20 -0500 Subject: gpg-agent does not need to be run explictly anymore --- .config/systemd/user/default.target.wants/gpg-agent.service | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .config/systemd/user/default.target.wants/gpg-agent.service diff --git a/.config/systemd/user/default.target.wants/gpg-agent.service b/.config/systemd/user/default.target.wants/gpg-agent.service deleted file mode 100644 index 93c12b0..0000000 --- a/.config/systemd/user/default.target.wants/gpg-agent.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description="GnuPG agent daemon" - -[Service] -Type=forking -ExecStart=/usr/bin/gpg-agent --daemon --write-env-file ${XDG_RUNTIME_DIR}/gpg - -[Install] -WantedBy=default.target -- cgit v1.2.3-54-g00ecf From 6a5bd645c59b44ae87d09cf350b38e04fbf99d81 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 1 Jan 2015 16:41:56 -0500 Subject: add changes in .conf/systemd --- .../systemd/user/default.target.wants/emacs-daemon.service | 11 +---------- .config/systemd/user/emacs-daemon.service | 10 ++++++++++ .config/systemd/user/x0vncserver@.service | 10 ++++++++++ 3 files changed, 21 insertions(+), 10 deletions(-) mode change 100644 => 120000 .config/systemd/user/default.target.wants/emacs-daemon.service create mode 100644 .config/systemd/user/emacs-daemon.service create mode 100644 .config/systemd/user/x0vncserver@.service diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service deleted file mode 100644 index 279d83a..0000000 --- a/.config/systemd/user/default.target.wants/emacs-daemon.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Emacs deamon - -[Service] -Type=forking -ExecStart=/bin/bash -l -c 'emacs --daemon' -ExecStop=/bin/bash -l -c 'emacsclient -e "(kill-emacs)"' - -[Install] -WantedBy=default.target diff --git a/.config/systemd/user/default.target.wants/emacs-daemon.service b/.config/systemd/user/default.target.wants/emacs-daemon.service new file mode 120000 index 0000000..5a3b3f7 --- /dev/null +++ b/.config/systemd/user/default.target.wants/emacs-daemon.service @@ -0,0 +1 @@ +/home/luke/.config/systemd/user/emacs-daemon.service \ No newline at end of file diff --git a/.config/systemd/user/emacs-daemon.service b/.config/systemd/user/emacs-daemon.service new file mode 100644 index 0000000..279d83a --- /dev/null +++ b/.config/systemd/user/emacs-daemon.service @@ -0,0 +1,10 @@ +[Unit] +Description=Emacs deamon + +[Service] +Type=forking +ExecStart=/bin/bash -l -c 'emacs --daemon' +ExecStop=/bin/bash -l -c 'emacsclient -e "(kill-emacs)"' + +[Install] +WantedBy=default.target diff --git a/.config/systemd/user/x0vncserver@.service b/.config/systemd/user/x0vncserver@.service new file mode 100644 index 0000000..99e897c --- /dev/null +++ b/.config/systemd/user/x0vncserver@.service @@ -0,0 +1,10 @@ +[Unit] +Description=VNC server for X displays + +[Service] +Type=simple +ExecStart=/bin/bash -l -c 'x0vncserver display=:%I PasswordFile="${HOME}/.vnc/passwd"' +Restart=always + +[Install] +WantedBy=default.target -- cgit v1.2.3-54-g00ecf