Add emacs console helper scripts

This commit is contained in:
2025-09-08 21:16:56 +02:00
parent 7279a53bc0
commit 7cc80e8cf4
14 changed files with 385 additions and 16 deletions

20
bin/emacs-org Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Launch Emacs in terminal mode with Org mode
# Accepts optional org file argument
if [ $# -eq 0 ]; then
# No arguments, start with org-agenda
EMACS_NO_DESKTOP=1 emacs -nw --eval "(progn
(require 'org)
(org-agenda))"
else
# Open specified org file
if [ -f "$1" ]; then
EMACS_NO_DESKTOP=1 emacs -nw "$1" --eval "(org-mode)"
else
# Create new org file
EMACS_NO_DESKTOP=1 emacs -nw "$1" --eval "(progn
(org-mode)
(insert \"#+TITLE: $(basename \"$1\" .org)\n#+DATE: $(date +%Y-%m-%d)\n\n\"))"
fi
fi