diff --git a/core/defuns/defuns-quickrun.el b/core/defuns/defuns-quickrun.el index ddfb8cbc3..bfd909320 100644 --- a/core/defuns/defuns-quickrun.el +++ b/core/defuns/defuns-quickrun.el @@ -20,11 +20,12 @@ If ARG is nil this function calls `recompile', otherwise it calls (when (null narf--build-command) (user-error "No build command was set")) (let ((build-file (cdr narf--build-command)) - (build-cmd (car narf--build-command))) - (if (or (null build-file) (narf/project-has-files build-file)) + (build-cmd (car narf--build-command)) + (default-directory (narf/project-root))) + (if (or (null build-file) (file-exists-p build-file)) (if (symbolp build-cmd) (call-interactively build-cmd) - (compile (format "cd '%s' && %s" (narf/project-root) (format build-cmd (or arg ""))))) + (compile (format build-cmd (or arg "")))) (error "Could not build!")))) ;;;; Code running ;;;;;;;;;;;;;;;;;;;;;; diff --git a/core/defuns/defuns-workgroup.el b/core/defuns/defuns-workgroup.el index dee2b4c31..e308c9096 100644 --- a/core/defuns/defuns-workgroup.el +++ b/core/defuns/defuns-workgroup.el @@ -154,10 +154,13 @@ (defun narf:switch-to-workgroup-at-index (index) (interactive) (narf/workgroup-update-names) - (let ((wgs (wg-workgroup-list-or-error))) - (unless (eq (nth index wgs) (wg-current-workgroup t)) - (wg-switch-to-workgroup-at-index index))) - (narf/workgroup-display t)) + (let ((wg (nth index (wg-workgroup-list-or-error))) + msg) + (if wg + (unless (eq wg (wg-current-workgroup t)) + (wg-switch-to-workgroup-at-index index)) + (setq msg (format "No tab #%s" (1+ index)))) + (narf/workgroup-display t nil msg))) ;;;###autoload (defun narf/undo-window-change ()