From 032ad387c4b0e8aee0d95a1c77d76445c527bce8 Mon Sep 17 00:00:00 2001 From: "Kaz Saita(raspi4)" Date: Tue, 19 Mar 2024 15:23:58 +0900 Subject: [PATCH] [emacs] add straight setup --- emacs.d/init.el | 25 +++++++++++++++++++++++++ install_posix/install_emacs_dotfiles.sh | 12 ++++++++++++ 2 files changed, 37 insertions(+) create mode 100755 install_posix/install_emacs_dotfiles.sh diff --git a/emacs.d/init.el b/emacs.d/init.el index e69de29..89dce96 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -0,0 +1,25 @@ +;; init.el - part of dotfiles +;; https://git.kinoshita-lab.org/kazbo/dotfiles + +;; setup strait +;; cf. https://github.com/radian-software/straight.el +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name + "straight/repos/straight.el/bootstrap.el" + (or (bound-and-true-p straight-base-dir) + user-emacs-directory))) + (bootstrap-version 7)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + +;; use-package +(straight-use-package 'use-package) +(setq straight-use-package-by-default t) + diff --git a/install_posix/install_emacs_dotfiles.sh b/install_posix/install_emacs_dotfiles.sh new file mode 100755 index 0000000..15b6aa1 --- /dev/null +++ b/install_posix/install_emacs_dotfiles.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +echo "configuring emacs.." +src_emacs_dir=`pwd`/../emacs.d +dest=${HOME}/.emacs.d +if [ -d ${dest} ]; then + echo "~/.emacs.d/ exists. abort" + exit 1 +fi + +ln -s ${src_emacs_dir} ${dest} +echo "done." +