diff options
author | Case Duckworth | 2021-01-27 18:00:21 -0600 |
---|---|---|
committer | Case Duckworth | 2021-01-27 18:00:21 -0600 |
commit | 14c1d690cf8018230689dd8dbf4e83408a9a0c06 (patch) | |
tree | d5bee9f2e4eb43df0038fb58d0cfae5532d747a0 | |
parent | Add dired-jump keybinding (diff) | |
download | emacs-14c1d690cf8018230689dd8dbf4e83408a9a0c06.tar.gz emacs-14c1d690cf8018230689dd8dbf4e83408a9a0c06.zip |
Fancify Windows batch files
-rw-r--r-- | config.org | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/config.org b/config.org index 6ddbb0b..242ba86 100644 --- a/config.org +++ b/config.org | |||
@@ -2438,20 +2438,27 @@ into the multiple settings available for w32 systems. | |||
2438 | **** Common variables | 2438 | **** Common variables |
2439 | 2439 | ||
2440 | #+begin_src bat :noweb-ref w32-bat-common | 2440 | #+begin_src bat :noweb-ref w32-bat-common |
2441 | set HOME=%~dp0..\.. | 2441 | if not exist %HOME% (set HOME=%~dp0..\..) |
2442 | set EMACS=%HOME%\Applications\Emacs\bin\runemacs.exe | 2442 | set EMACS=%HOME%\Applications\Emacs\bin\runemacs.exe |
2443 | chdir %HOME% | 2443 | set EMACSC=%HOME%\Applications\Emacs\bin\emacsclientw.exe |
2444 | set GIT=%HOME%\Applications\Git\bin\git.exe | ||
2444 | #+end_src | 2445 | #+end_src |
2445 | 2446 | ||
2446 | **** Emacs Daemon | 2447 | **** Emacs Autostart |
2447 | 2448 | ||
2448 | Either run this once at startup, or put a shortcut of it in the | 2449 | Either run this once at startup, or put a shortcut of it in the |
2449 | Startup folder: | 2450 | Startup folder: |
2450 | =%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup=. | 2451 | =%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup=. |
2451 | 2452 | ||
2452 | #+begin_src bat :tangle (if (eq system-type 'windows-nt) "~/Applications/cmd/Emacs Daemon.cmd" "") | 2453 | #+begin_src bat :tangle (if (eq system-type 'windows-nt) "~/Applications/cmd/Emacs Autostart.cmd" "") |
2453 | <<w32-bat-common>> | 2454 | <<w32-bat-common>> |
2454 | %EMACS% --daemon | 2455 | REM git pull the config |
2456 | start "git" /wait %GIT% -C %HOME%\.emacs.d pull | ||
2457 | |||
2458 | REM start emacs | ||
2459 | chdir %HOME% | ||
2460 | start "emacs-daemon" %EMACS% --daemon=autostart | ||
2461 | start "emacs" %EMACSC% -n -c --server-file=autostart %* | ||
2455 | #+end_src | 2462 | #+end_src |
2456 | 2463 | ||
2457 | **** Emacs Client | 2464 | **** Emacs Client |
@@ -2463,8 +2470,14 @@ run =runemacs.exe=. | |||
2463 | 2470 | ||
2464 | #+begin_src bat :tangle (if (eq system-type 'windows-nt) "~/Applications/cmd/Emacs.cmd" "") | 2471 | #+begin_src bat :tangle (if (eq system-type 'windows-nt) "~/Applications/cmd/Emacs.cmd" "") |
2465 | <<w32-bat-common>> | 2472 | <<w32-bat-common>> |
2466 | set EMACSC=%HOME%\Applications\Emacs\bin\emacsclientw.exe | 2473 | start "emacs" "%EMACSC%" -n -c -a "%EMACS%" %* |
2467 | "%EMACSC%" -n -c -a "%EMACS%" %* | 2474 | #+end_src |
2475 | |||
2476 | **** Emacs Daemon | ||
2477 | |||
2478 | #+begin_src bat :tangle (if (eq system-type 'windows-nt) "~/Applications/cmd/Emacs Daemon.cmd" "") | ||
2479 | <<w32-bat-common>> | ||
2480 | start "emacs-daemon" %EMACS% --daemon | ||
2468 | #+end_src | 2481 | #+end_src |
2469 | 2482 | ||
2470 | **** Emacs Safe Start | 2483 | **** Emacs Safe Start |
@@ -2473,7 +2486,7 @@ This runs Emacs with the factory settings. | |||
2473 | 2486 | ||
2474 | #+begin_src bat :tangle (if (eq system-type 'windows-nt) "~/Applications/cmd/Emacs Safe Start.cmd" "") | 2487 | #+begin_src bat :tangle (if (eq system-type 'windows-nt) "~/Applications/cmd/Emacs Safe Start.cmd" "") |
2475 | <<w32-bat-common>> | 2488 | <<w32-bat-common>> |
2476 | "%EMACS%" -Q %* | 2489 | start "emacs-safe" "%EMACS%" -Q %* |
2477 | #+end_src | 2490 | #+end_src |
2478 | 2491 | ||
2479 | **** Emacs Debug | 2492 | **** Emacs Debug |
@@ -2482,7 +2495,7 @@ This runs Emacs with the =--debug-init= option enabled. | |||
2482 | 2495 | ||
2483 | #+begin_src bat :tangle (if (eq system-type 'windows-nt) "~/Applications/cmd/Emacs Debug.cmd" "") | 2496 | #+begin_src bat :tangle (if (eq system-type 'windows-nt) "~/Applications/cmd/Emacs Debug.cmd" "") |
2484 | <<w32-bat-common>> | 2497 | <<w32-bat-common>> |
2485 | "%EMACS%" --debug-init %* | 2498 | start "emacs-debug" "%EMACS%" --debug-init %* |
2486 | #+end_src | 2499 | #+end_src |
2487 | 2500 | ||
2488 | * Appendices | 2501 | * Appendices |