From 5e8f32776e9e807557be83a8150efa29f43fb063 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 17 Mar 2025 15:52:43 -0400 Subject: fix bug with qemu-file handler --- .config/emacs/modules/bd--files.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/emacs/modules/bd--files.el b/.config/emacs/modules/bd--files.el index 06a113a..8eab7ed 100644 --- a/.config/emacs/modules/bd--files.el +++ b/.config/emacs/modules/bd--files.el @@ -24,10 +24,12 @@ (start-process "nsxiv" nil "nsxiv" (expand-file-name file))) (defun bd/qemu (file) "Open FILE with QEMU." - (start-process "qemu-system" nil "qemu-system-x86_64" (expand-file-name file) - "-nographic" "-net" "nic" "-net" - "user,hostfwd=tcp:127.0.0.1:2222-:22" "--accel" "kvm" "-m" "4G") - "Running headless.") + (let ((options `("qemu-system" nil "qemu-system-x86_64" ,(expand-file-name file) + "-net" "nic" "-net""user,hostfwd=tcp:127.0.0.1:2222-:22" + "--accel" "kvm" "-m" "4G"))) + (unless (string-match-p "graphic" file) + (setq options (append options (list "-nographic")))) + (apply 'start-process options))) (defun bd/rom (file) "Open FILE with an emulator." (let ((command -- cgit v1.2.3