diff --git a/emacs/init.org b/emacs/init.org index 76bb7fa..7d7a3d0 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -2221,15 +2221,13 @@ nice with Org-roam: (leader-def-key "ps" #'projectile-run-shell-command-in-root) (leader-def-key "pa" #'projectile-run-async-shell-command-in-root) (leader-def-key "p M-x" #'projectile-run-command-in-root) - (defun projectile-pdb () - (interactive) - (with-temp-buffer - (when (projectile-project-root) - (cd (projectile-project-root))) - (let ((command-line (gud-query-cmdline 'pdb))) - (pdb command-line)))) - (jdormit/define-prefix "pd" "debug") - (leader-def-key "pdp" #'projectile-pdb)) + (jdormit/define-prefix "pd" "debug")) + + (defmacro with-projectile-root (&rest body) + `(with-temp-buffer + (when (projectile-project-root) + (cd (projectile-project-root))) + ,@body)) #+END_SRC * Mode line @@ -5790,6 +5788,18 @@ to use instead: (leader-def-key "cg" #'hydra-gud/body) #+END_SRC +* realgud +Like [[info:emacs#Debuggers][GUD]], but better! +#+BEGIN_SRC emacs-lisp + (use-package realgud + :init + (defun projectile-pdb () + (interactive) + (with-projectile-root + (funcall-interactively #'realgud:pdb))) + (leader-def-key "pdp" #'projectile-pdb)) +#+END_SRC + * EDiff #+BEGIN_SRC emacs-lisp (setq ediff-window-setup-function #'ediff-setup-windows-plain)