-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Expand file tree
/
Copy pathe
More file actions
executable file
·33 lines (26 loc) · 1.27 KB
/
e
File metadata and controls
executable file
·33 lines (26 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash -eux
exec vim "$@"
# # Wrapper script to invoke interactive emacs commands in a daemon instance.
# # These days many people don't suspect it,
# # but Emacs got server ('emacs' binary) and client ('emacsclient') parts.
# # Launching server (i.e. default 'emacs' command) evaluates the config
# # and could potentially take seconds if it's very heavy
# # Launching the client however is lightning fast. It's just a matter of creating a window.
# ARGS=(
# # This trick gives you best of two worlds: if there is an Emacs daemon running,
# # it just connects to it. Otherwise, it spawns a daemon first and then connects to it.
# # Without this setting if you didn't have a daemon running, the command would fail.
# -a ''
# # open a new fram on the current terminal
# # -nw
# # spawn new GUI window, otherwise it tries to launch client in terminal
# --create-frame
# --frame-parameters="'(fullscreen . maximized)"
# # # process rest of arguments as elisp code
# # --eval
# # # bring focus to the window
# # '(select-frame-set-input-focus (selected-frame))'
# )
# # without any extra args it just invokes the daemon instance, otherwise executes the args
# exec emacsclient "${ARGS[@]}" \
# "$@" # pass through whatever else you are trying to run