is there a way to make compile shell process happen in eshell / "real" shell?

Emacs Asked by Falseee on January 1, 2022

i wanted to bind a key to a compile and run command, then i found this post, Compile and run single file c++ programs in Emacs[SOLVED]
( last answer)

It works perfectly fine and as intended.

The only problem i am having is: is it possible to run the "compile" process in the eshell or in the shell instead of the "compile" shell? The problem with the "compile" shell is that i am unable to write anything after the program exited.

For those who dont want to click on the link,here is the elisp function, even tho i dont think it has much to do with the question:

(defun compileandrun()
  (compile (concat "g++ "  (file-name-nondirectory (buffer-file-name)) " -o " (file-name-sans-extension   (file-name-nondirectory (buffer-file-name))) " && ./" (file-name-sans-extension  (file-name-nondirectory (buffer-file-name)))) t )
(other-window 1)
(add-hook 'c++-mode-hook
          (lambda () (local-set-key (kbd "<f8>") #'compileandrun)))

Add your own answers!

Related Questions

How to check if a customize group exists in Emacs Lisp code?

1  Asked on September 2, 2021 by prouleau


encrypted password file with emacs & gpg

1  Asked on September 2, 2021 by user313032


How to pass an optional agrument to kill-emacs?

1  Asked on September 2, 2021 by ianinini


Tramp can’t connect – cannot find ssh

0  Asked on September 2, 2021 by n1k31t4


Emacs insane CPU load caused by org-superstar-mode

2  Asked on September 2, 2021 by mor3dr3ad


What ASCII character is C-q C-E?

1  Asked on September 2, 2021


M-x man: Can’t find the %s manpage caused by loading helm

0  Asked on September 2, 2021 by wdkrnls


Can the ring data structure really be rotated?

1  Asked on September 2, 2021


How do I compose an email using Emacs’ keybindings?

0  Asked on September 2, 2021 by user81065


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP