- mouse-autoselect-window nil: mouse movement no longer switches
active window (was the main cause of apparent cursor jumping)
- focus-follows-mouse nil: same — no focus change on hover
- mouse clicks still disabled ([mouse-1..3] → #'ignore)
- scroll wheel explicitly configured: 3 lines/tick, no acceleration,
no progressive speed (mouse-wheel-scroll-amount)
my/smart-paste bound to s-v (cmd+v) in org-mode and markdown-mode:
- clipboard has image → my/paste-image-from-clipboard
- clipboard has text → normal yank
my/paste-image-from-clipboard:
- saves to attachments/ relative to current file
- filename: image-YYYYMMDD-HHMMSS.png
- org-mode: [[./attachments/image-....png]]
- markdown-mode: 
- creates attachments/ dir if missing
Requires: brew install pngpaste
my/ement-maybe-restore now:
- Loads sessions file manually (ement--load-sessions) before connecting
- Calls ement--reconnect directly on each loaded session — bypasses all
interactive prompts in ement-connect (homeserver discovery, read-passwd)
- Fallback to ement-connect with explicit :homeserver if --reconnect absent
- condition-case wrapper — startup errors are silent, never block Emacs
my/ement-open: use my/ement-maybe-restore (instead of ement-connect
directly) for the 'sessions file exists' branch.
ement checks ement-save-sessions during its own init to register
kill-emacs-hook. Setting it inside after! was too late — the hook
wasn't added, so sessions were never saved on Emacs exit.
Also set ement-sessions-file explicitly to doom-private-dir to avoid
no-littering path redirection surprises.
my/ement-open now handles 3 cases:
1. Already connected -> ement-list-rooms immediately
2. Sessions file exists -> ement-connect (no credentials), then
open rooms via ement-after-initial-sync-hook
3. No saved session -> call-interactively ement-connect, then rooms
my/ement-open-after-sync: self-removing hook that opens room list
after initial sync completes (regardless of how connect was triggered).
Startup auto-connect unchanged (doom-after-init-hook).
Functions defined inside (after! ement ...) are not registered as
interactive commands by Doom. Move my/ement-maybe-restore and
my/ement-open to top level.
Also move add-hook from inside after! to top level (after-init-hook
fires before lazy packages load — use doom-after-init-hook instead).
- my/ement-maybe-restore: restores saved session on after-init-hook,
no credentials prompt (requires one manual login first)
- my/ement-open: SPC o M o — connects if needed, then ement-list-rooms
- Remove SPC o M s (ement-sync is internal, manual call causes double-loop)
- Update quick reference comments
1. my/org-agenda-goto-task-name: replace face-based detection with
regexp-opt over org-todo-keywords. Works for all keywords
(TODO, NEXT, WAIT, DONE, CANCELLED, ...), not just TODO/DONE.
Added helper my/org-agenda-all-keywords.
2. Disable mouse clicks in GUI Emacs (Fix C in macOS GUI section):
global-set-key [mouse-*] to #'ignore, mouse-highlight nil.
Prevents accidental cursor movement when touching trackpad.
Doom mu4e module binds SPC o m directly to #'mu4e (non-prefix).
Collision prevented ement keybindings from loading.
Renamed Matrix prefix to SPC o M (uppercase).