Fix CUA mode, selection keybindings, and replace Corfu with Company

Major improvements to Emacs configuration:

1. Fixed CUA mode and C-Shift-Arrow selection issues
   - Properly configured CUA mode for copy/paste (C-c, C-v, C-x)
   - Fixed C-Shift-Arrow word selection that was being intercepted
   - Added mode-specific CUA disabling for special modes

2. Replaced Corfu with Company mode
   - Removed problematic Corfu configuration causing errors
   - Installed and configured Company for stable auto-completion
   - Set up proper completion triggers and navigation

3. Integrated standalone fix files into existing configuration
   - Merged keybinding-fix.el into relevant config files
   - Added diagnostic functions for debugging keybinding issues
   - Cleaner organization with fixes in their respective modules

4. Enhanced diagnostics
   - Added diagnose-cua-selection for CUA/selection issues
   - Added diagnose-key-conflicts for debugging key bindings
   - Emergency editing restoration functions preserved

All changes tested and verified working.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-10 07:35:41 +02:00
parent a4328ce3ba
commit bc4e786853
7 changed files with 722 additions and 178 deletions

14
init.el
View File

@@ -89,15 +89,11 @@
(load-file portfolio-tracker)
(message "Portfolio tracker with live prices loaded."))))
;; Keybinding fixes for special modes
(let ((keybinding-fix (expand-file-name "lisp/keybinding-fix.el" user-emacs-directory)))
(when (file-exists-p keybinding-fix)
(load-file keybinding-fix)
;; Automatically apply fixes for special modes
(fix-elfeed-keybindings)
(fix-portfolio-tracker-keybindings)
(disable-cua-in-special-modes)
(message "Keybinding fixes loaded and applied.")))
;; Keybinding fixes are now integrated into the respective configuration files:
;; - Elfeed fixes in lisp/elfeed-config.el
;; - Portfolio tracker fixes in portfolio-tracker-v2.el
;; - CUA mode handling in lisp/init-ui.el
;; - Diagnostic functions in lisp/init-editor.el
;;; Custom Settings (preserved from original)
;;; These are managed by Emacs Custom system - do not edit manually