help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Start Emacs with a minimal bash and Emacs lisp mixed script for test


From: Emanuel Berg
Subject: Re: Start Emacs with a minimal bash and Emacs lisp mixed script for testing.
Date: Tue, 03 Aug 2021 18:08:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> Try:
>
>   #! /bin/bash
>
>   :; set -e
>   :; emacs -Q --load "$(realpath -e $0)" -- "$@"; exit
>
>   (setq test-var 3)
>
> Then type test-var and do `eval-last-sexp'.

Or even more minimal:

  #! /bin/zsh

  ; emacs -Q --load "$(realpath -e $0)"; exit

  (setq test-var 1)

(I changed the shell to zsh because that's what I use.)

And you don't have to do 'bash SCRIPT', instead just
'chmod +x SCRIPT', put in $PATH, and 'SCRIPT'.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]