From dbfdeba212b5fa194780746eed842a36ef590f9c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 2 Jan 2019 23:35:19 +1300 Subject: Remove an error-prone line from .emacs --- emacs/emacs | 1 - 1 file changed, 1 deletion(-) diff --git a/emacs/emacs b/emacs/emacs index 637f8053..31770133 100644 --- a/emacs/emacs +++ b/emacs/emacs @@ -31,4 +31,3 @@ (column-number-mode 1) (line-number-mode 1) (menu-bar-mode -1) -(tool-bar-mode -1) -- cgit v1.2.3 From 8fd20b0d7a9137ed5cc9228648b6879918681d70 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 2 Jan 2019 23:38:29 +1300 Subject: Block stderr from emacs daemon startup --- sh/profile.d/visual.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/profile.d/visual.sh b/sh/profile.d/visual.sh index 899437af..f79158b8 100644 --- a/sh/profile.d/visual.sh +++ b/sh/profile.d/visual.sh @@ -6,7 +6,7 @@ if command -v emacs >/dev/null 2>&1 && # Use or start a GNU Emacs client, if possible if command -v pgrep >/dev/null 2>&1 && pgrep -fxu "$USER" 'emacs --daemon' >/dev/null || - emacs --daemon >/dev/null ; then + emacs --daemon 2>/dev/null ; then VISUAL=emacsclient # If no GNU Emacs daemon is available, just create a new instance every -- cgit v1.2.3 From 23d6f4c0545f1f3a892e3492a3fb6269566dc24f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 3 Jan 2019 22:03:19 +1300 Subject: Adjust some comments in .emacs --- emacs/emacs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emacs/emacs b/emacs/emacs index 31770133..0921133a 100644 --- a/emacs/emacs +++ b/emacs/emacs @@ -26,8 +26,10 @@ backup-directory-alist `(("." . ,(concat user-emacs-directory "backups"))) ) -;; A few more options I've found around the web +;; Show a scratch buffer rather than the startup hints (customize-set-variable 'inhibit-startup-screen t) + +;; Show line and column number in status bar (column-number-mode 1) (line-number-mode 1) (menu-bar-mode -1) -- cgit v1.2.3 From e88ec36ad7bd31a34db0e4376b244328ee6f0b2e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 3 Jan 2019 22:06:18 +1300 Subject: Remove some possibly-unwanted .emacs config --- emacs/emacs | 1 - 1 file changed, 1 deletion(-) diff --git a/emacs/emacs b/emacs/emacs index 0921133a..ea13faa9 100644 --- a/emacs/emacs +++ b/emacs/emacs @@ -32,4 +32,3 @@ ;; Show line and column number in status bar (column-number-mode 1) (line-number-mode 1) -(menu-bar-mode -1) -- cgit v1.2.3 From 03c4332512284d04d8ccbb18ba84e4d55a34ee56 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 3 Jan 2019 22:12:59 +1300 Subject: Add Lisp to filetypes.vim --- vim/filetype.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vim/filetype.vim b/vim/filetype.vim index 2a5725dc..19094374 100644 --- a/vim/filetype.vim +++ b/vim/filetype.vim @@ -172,6 +172,13 @@ augroup filetypedetect \ ?*.l \,?*.lex \ setfiletype lex + " Lisp + autocmd BufNewFile,BufRead + \ ?*.lisp + \,?*.el + \,.emacs + \,emacs + \ setfiletype lisp " Lua files autocmd BufNewFile,BufRead \ ?*.lua -- cgit v1.2.3 From 72778ae77a6f525eb9f3c55a08ebc9db26d78e2a Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 3 Jan 2019 23:49:32 +1300 Subject: Remove a daft comment --- vim/vimrc | 2 -- 1 file changed, 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index f290b144..9c0f5a42 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -260,8 +260,6 @@ nnoremap ]l :lnext nmap [ (PutBlankLinesAbove) nmap ] (PutBlankLinesBelow) -" Normal leader maps; use not for vim-tiny - " \a toggles 'formatoptions' 'a' flag using a plugin nnoremap a :ToggleFlagLocal formatoptions a -- cgit v1.2.3 From 23ab9388efbc21b1c7213bbf4b95eb6d8908592e Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 3 Jan 2019 23:56:33 +1300 Subject: Use :lhelpgrep for help search shortcut --- vim/vimrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index 9c0f5a42..724a32e7 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -400,8 +400,8 @@ xmap } (VerticalRegionDown) " \/ types :vimgrep for me ready to enter a search pattern nnoremap / :vimgrep /\c/j ** -" \? types :helpgrep for me ready to enter a search pattern -nnoremap ? :helpgrep \c +" \? types :lhelpgrep for me ready to enter a search pattern +nnoremap ? :lhelpgrep \c " \\ escapes regex metacharacters nmap \ (RegexEscape) -- cgit v1.2.3 From 97a0d713317036d773df6476f8ae47a1e423276f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 4 Jan 2019 10:18:06 +1300 Subject: Further attempts at sane Emacs VISUAL setting --- .gitignore | 1 + Makefile | 5 ++++- emacs/bin/emacsm.sh | 3 +++ emacs/profile.d/emacs.sh | 2 ++ sh/profile.d/visual.sh | 26 +++++--------------------- 5 files changed, 15 insertions(+), 22 deletions(-) create mode 100644 emacs/bin/emacsm.sh create mode 100644 emacs/profile.d/emacs.sh diff --git a/.gitignore b/.gitignore index 8b407166..309644a0 100644 --- a/.gitignore +++ b/.gitignore @@ -152,6 +152,7 @@ /bin/xrq /dillo/dillorc /dillo/dillorc.m4 +/emacs/bin/emacsm /games/aaf /games/acq /games/aesth diff --git a/Makefile b/Makefile index 31018936..6c7b9ee0 100644 --- a/Makefile +++ b/Makefile @@ -393,8 +393,11 @@ install-dunst: install-x mkdir -p -- $(HOME)/.config/dunst cp -p -- dunst/dunstrc $(HOME)/.config/dunst -install-emacs: +install-emacs: emacs/bin/emacsm install-sh + mkdir -p -- $(HOME)/.local/bin cp -p -- emacs/emacs $(HOME)/.emacs + cp -p -- emacs/bin/emacsm $(HOME)/.local/bin + cp -p -- emacs/profile.d/emacs.sh $(HOME)/.profile.d install-ex: cp -p -- ex/exrc $(HOME)/.exrc diff --git a/emacs/bin/emacsm.sh b/emacs/bin/emacsm.sh new file mode 100644 index 00000000..58571c5c --- /dev/null +++ b/emacs/bin/emacsm.sh @@ -0,0 +1,3 @@ +# Try to manage GNU emacs daemons on the terminal +# Emphasis on "try". Man, I have no idea what I'm doing. +emacsclient --create-frame --alternate-editor='' diff --git a/emacs/profile.d/emacs.sh b/emacs/profile.d/emacs.sh new file mode 100644 index 00000000..34f6d476 --- /dev/null +++ b/emacs/profile.d/emacs.sh @@ -0,0 +1,2 @@ +# Start an Emacs server if we can't detect one already running +pgrep -fx -u "$USER" 'emacs --daemon' >/dev/null || emacs --daemon diff --git a/sh/profile.d/visual.sh b/sh/profile.d/visual.sh index f79158b8..d5280abd 100644 --- a/sh/profile.d/visual.sh +++ b/sh/profile.d/visual.sh @@ -1,24 +1,8 @@ -# If an Emacs is installed, and ~/.emacs exists, use emacs as the visual -# editor; otherwise, use the system's vi -if command -v emacs >/dev/null 2>&1 && - [ -f "$HOME"/.emacs ] ; then - - # Use or start a GNU Emacs client, if possible - if command -v pgrep >/dev/null 2>&1 && - pgrep -fxu "$USER" 'emacs --daemon' >/dev/null || - emacs --daemon 2>/dev/null ; then - VISUAL=emacsclient - - # If no GNU Emacs daemon is available, just create a new instance every - # time - else - VISUAL=emacs - fi - -# If an Emacs isn't installed, just use good old vi +# If my Emacs wrapper is installed, use emacs as the visual editor; otherwise, +# use the system's vi +if command -v emacsm >/dev/null 2>&1 ; then + VISUAL='emacsm' else - VISUAL=vi + VISUAL='vi' fi - -# Export final editor decision export VISUAL -- cgit v1.2.3 From 3511cff5b30de0dc2b1709654cbbe1c164cfafdd Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 4 Jan 2019 10:20:13 +1300 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 3a5682ba..f8ee9b81 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v4.5.1 -Wed Jan 2 10:33:20 UTC 2019 +tejr dotfiles v4.6.0 +Thu Jan 3 21:20:13 UTC 2019 -- cgit v1.2.3