From 60a283942c69f7c50a79959f17274cd0c2e48499 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 10 Dec 2020 19:57:06 -0600 Subject: Add emacsdc --- README.md | 13 +++++++++++++ config.org | 15 ++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1347bdc..4b21784 100644 --- a/README.md +++ b/README.md @@ -1012,6 +1012,19 @@ from [unpackaged.el](https://github.com/alphapapa/unpackaged.el#ensure-blank-lin (add-hook 'kill-emacs-hook #'acdw/refresh-emacs-no-load) +## Ancillary scripts + + +### emacsdc + +A wrapper script around emacs-client that starts the daemon if it hasn’t been yet. + + if ! emacsclient -nc "$@" 2>/dev/null; then + emacs --daemon + emacsclient -nc "$@" + fi + + ## License Copyright © 2020 Case Duckworth diff --git a/config.org b/config.org index 782e318..fd81816 100644 --- a/config.org +++ b/config.org @@ -4,7 +4,7 @@ #+EXPORT_FILE_NAME: README.md #+OPTIONS: toc:nil #+BANKRUPTCY_COUNT: 3 -#+Time-stamp: <2020-12-10 17:46:10 aduckworth> +#+Time-stamp: <2020-12-10 19:54:27 acdw> Let’s configure Emacs using Org mode, they said. It’ll be fun, they said. @@ -1119,6 +1119,19 @@ from [[https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-hea (add-hook 'kill-emacs-hook #'acdw/refresh-emacs-no-load) #+end_src +** Ancillary scripts + +*** emacsdc + +A wrapper script around emacs-client that starts the daemon if it hasn’t been yet. + +#+begin_src sh :tangle emacsdc :shebang "#!/bin/sh" + if ! emacsclient -nc "$@" 2>/dev/null; then + emacs --daemon + emacsclient -nc "$@" + fi +#+end_src + ** License :PROPERTIES: :header-args: :tangle LICENSE :comments no -- cgit 1.4.1-21-gabe81