branch: externals/dtache commit 087e8f4c73bbd5d7029cb310c9ee7234cc7c2edb Author: Niklas Eklund <niklas.ekl...@posteo.net> Commit: Niklas Eklund <niklas.ekl...@posteo.net>
Update README The readme file was incorrectly merged. --- README.org | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/README.org b/README.org index c90047d02c..73f2968ccd 100644 --- a/README.org +++ b/README.org @@ -239,27 +239,6 @@ Here the command beginning with =ls= would from now on be using redirect only. For inspiration on how to configure =dtache-list-sessions= to use evil bindings see [[https://gitlab.com/niklaseklund/dotfiles/blob/master/.config/emacs/init.el#L1393][Niklas Eklund's Emacs config]]. -* Tips & Tricks -** Advice functions - -The following two functions are examples on how to create functions that can be used to advice other functions in order to replace =compile= and =async-shell-command= with =dtache-start-session= - -#+begin_src elisp - (defun dtache-compile-advice (orig-fun &rest args) - "Function to replace usage of `compile' before calling ORIG-FUN with ARGS." - (cl-letf (((symbol-function 'compile) - (lambda (args) - (dtache-start-session (car args))))) - (apply orig-fun args))) - - (defun dtache-start-session-advice (orig-fun &rest args) - "Function to replace usage of `async-shell-command' before calling ORIG-FUN with ARGS." - (cl-letf (((symbol-function 'async-shell-command) - (lambda (args) - (dtache-start-session (car args))))) - (apply orig-fun args))) -#+end_src - * Credits I got inspired by =Ambrevar's= pursuits on [[https://ambrevar.xyz/emacs-eshell/][using eshell as his main shell]], and his [[https://github.com/Ambrevar/dotfiles/blob/master/.emacs.d/lisp/package-eshell-detach.el][package-eshell-detach]] got me into the idea of using =dtach= as a base for detachable shell commands.